Index: uspace/lib/ieee80211/src/ieee80211_impl.c
===================================================================
--- uspace/lib/ieee80211/src/ieee80211_impl.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
+++ uspace/lib/ieee80211/src/ieee80211_impl.c	(revision a35b458e9db1ca95e679799dc7c1b12c83359ca3)
@@ -119,18 +119,18 @@
 {
 	fibril_mutex_lock(&ieee80211_dev->scan_mutex);
-	
+
 	if (ieee80211_get_auth_phase(ieee80211_dev) ==
 	    IEEE80211_AUTH_DISCONNECTED) {
 		fibril_mutex_lock(&ieee80211_dev->ap_list.results_mutex);
-		
+
 		/* Remove old entries we don't receive beacons from. */
 		ieee80211_scan_result_list_t *result_list =
 		    &ieee80211_dev->ap_list;
-		
+
 		list_foreach_safe(result_list->list, cur_link, next_link) {
 			ieee80211_scan_result_link_t *cur_result =
 			    list_get_instance(cur_link,
 			    ieee80211_scan_result_link_t, link);
-			
+
 			if ((time(NULL) - cur_result->last_beacon) >
 			    MAX_KEEP_SCAN_SPAN_SEC)
@@ -138,26 +138,26 @@
 				    cur_result);
 		}
-		
+
 		fibril_mutex_unlock(&ieee80211_dev->ap_list.results_mutex);
-		
+
 		uint16_t orig_freq = ieee80211_dev->current_freq;
-		
+
 		for (uint16_t freq = IEEE80211_FIRST_FREQ;
 		    freq <= IEEE80211_MAX_FREQ; freq += IEEE80211_CHANNEL_GAP) {
 			if (ieee80211_pending_connect_request(ieee80211_dev))
 				break;
-			
+
 			ieee80211_dev->ops->set_freq(ieee80211_dev, freq);
 			ieee80211_probe_request(ieee80211_dev, NULL);
-			
+
 			/* Wait for probe responses. */
 			async_usleep(SCAN_CHANNEL_WAIT_USEC);
 		}
-		
+
 		ieee80211_dev->ops->set_freq(ieee80211_dev, orig_freq);
 	}
-	
+
 	fibril_mutex_unlock(&ieee80211_dev->scan_mutex);
-	
+
 	return EOK;
 }
@@ -183,21 +183,21 @@
 	if ((!key) || (!data))
 		return EINVAL;
-	
+
 	if (!hash)
 		return ENOMEM;
-	
+
 	size_t iters = ((output_size * 8) + 159) / 160;
-	
+
 	const char *a = "Pairwise key expansion";
 	uint8_t result[HASH_SHA1 * iters];
 	uint8_t temp[HASH_SHA1];
-	
+
 	size_t data_size = PRF_CRYPT_DATA_LENGTH + str_size(a) + 2;
 	uint8_t work_arr[data_size];
 	memset(work_arr, 0, data_size);
-	
+
 	memcpy(work_arr, a, str_size(a));
 	memcpy(work_arr + str_size(a) + 1, data, PRF_CRYPT_DATA_LENGTH);
-	
+
 	for (uint8_t i = 0; i < iters; i++) {
 		memcpy(work_arr + data_size - 1, &i, 1);
@@ -206,7 +206,7 @@
 		memcpy(result + i*HASH_SHA1, temp, HASH_SHA1);
 	}
-	
+
 	memcpy(hash, result, output_size);
-	
+
 	return EOK;
 }
@@ -223,8 +223,8 @@
 	if ((!kek) || (!data))
 		return EINVAL;
-	
+
 	if (!output)
 		return ENOMEM;
-	
+
 	uint32_t n = data_size / 8 - 1;
 	uint8_t work_data[n * 8];
@@ -233,10 +233,10 @@
 	uint8_t *work_block;
 	uint8_t a[8];
-	
+
 	memcpy(a, data, 8);
-	
+
 	uint64_t mask = 0xff;
 	uint8_t shift, shb;
-	
+
 	memcpy(work_data, data + 8, n * 8);
 	for (int j = 5; j >= 0; j--) {
@@ -247,5 +247,5 @@
 				a[k] ^= shb;
 			}
-			
+
 			work_block = work_data + (i - 1) * 8;
 			memcpy(work_input, a, 8);
@@ -256,5 +256,5 @@
 		}
 	}
-	
+
 	size_t it;
 	for (it = 0; it < 8; it++) {
@@ -262,10 +262,10 @@
 			break;
 	}
-	
+
 	if (it == 8) {
 		memcpy(output, work_data, n * 8);
 		return EOK;
 	}
-	
+
 	return EINVAL;
 }
@@ -290,19 +290,19 @@
 	if ((!key) || (!buffer))
 		return EINVAL;
-	
+
 	if (!mic)
 		return ENOMEM;
-	
+
 	uint32_t l = uint32le_from_seq(key);
 	uint32_t r = uint32le_from_seq(key + 4);
-	
+
 	ieee80211_data_header_t *data_header =
 	    (ieee80211_data_header_t *) buffer;
-	
+
 	uint8_t *data = buffer + sizeof(ieee80211_data_header_t) +
 	    IEEE80211_TKIP_HEADER_LENGTH;
 	size_t data_size = size - sizeof(ieee80211_data_header_t) -
 	    IEEE80211_TKIP_HEADER_LENGTH;
-	
+
 	/* Process header. */
 	uint8_t *src_addr =
@@ -312,5 +312,5 @@
 	    ieee80211_is_tods_frame(data_header->frame_ctrl) ?
 	    data_header->address3 : data_header->address1;
-	
+
 	ieee80211_michael_mic_block(&l, &r, uint32le_from_seq(dest_addr));
 	ieee80211_michael_mic_block(&l, &r,
@@ -319,14 +319,14 @@
 	ieee80211_michael_mic_block(&l, &r, uint32le_from_seq(src_addr + 2));
 	ieee80211_michael_mic_block(&l, &r, 0);
-	
+
 	/* Process data. */
 	size_t blocks = data_size / 4;
 	size_t pad = data_size % 4;
-	
+
 	for (size_t k = 0; k < blocks; k++) {
 		ieee80211_michael_mic_block(&l, &r,
 		    uint32le_from_seq(&data[k * 4]));
 	}
-	
+
 	/* Add padding. */
 	uint32_t value = 0x5a;
@@ -335,14 +335,14 @@
 		value |= data[blocks * 4 + (i - 1)];
 	}
-	
+
 	ieee80211_michael_mic_block(&l, &r, value);
 	ieee80211_michael_mic_block(&l, &r, 0);
-	
+
 	l = host2uint32_t_le(l);
 	r = host2uint32_t_le(r);
-	
+
 	memcpy(mic, &l, 4);
 	memcpy(mic + 4, &r, 4);
-	
+
 	return EOK;
 }
@@ -376,8 +376,8 @@
 	if (!sequence)
 		return ENOMEM;
-	
+
 	for (size_t i = 0; i < length; i++)
 		sequence[i] = (uint8_t) rand();
-	
+
 	return EOK;
 }
@@ -387,5 +387,5 @@
 	if ((!seq1) || (!seq2))
 		return NULL;
-	
+
 	for (size_t i = 0; i < size; i++) {
 		if (seq1[i] < seq2[i])
@@ -394,5 +394,5 @@
 			return seq2;
 	}
-	
+
 	return seq1;
 }
@@ -403,5 +403,5 @@
 	if (min == seq1)
 		return seq2;
-	
+
 	return seq1;
 }
