aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Kanzenbach <kurt@kmk-computers.de>2015-10-28 09:01:06 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-28 20:10:55 -0400
commite1cb1af28a9376ebd1a5bd156f4556b944622e17 (patch)
tree8045e81ea0d55b3e2a485a442a15d6a5610bd262
parent7bdb7d554e0e433b92b63f3472523cc3067f8ab4 (diff)
Staging: rtl8192u: ieee80211: corrected block comments
This patch reformats some block comments in order to match the Linux kernel coding style. Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
index bf71501140a4..7c166cfc5bcf 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
@@ -256,8 +256,10 @@ static void tkip_mixing_phase1(u16 *TTAK, const u8 *TK, const u8 *TA, u32 IV32)
256static void tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK, 256static void tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK,
257 u16 IV16) 257 u16 IV16)
258{ 258{
259 /* Make temporary area overlap WEP seed so that the final copy can be 259 /*
260 * avoided on little endian hosts. */ 260 * Make temporary area overlap WEP seed so that the final copy can be
261 * avoided on little endian hosts.
262 */
261 u16 *PPK = (u16 *) &WEPSeed[4]; 263 u16 *PPK = (u16 *) &WEPSeed[4];
262 264
263 /* Step 1 - make copy of TTAK and bring in TSC */ 265 /* Step 1 - make copy of TTAK and bring in TSC */
@@ -283,8 +285,10 @@ static void tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK,
283 PPK[4] += RotR1(PPK[3]); 285 PPK[4] += RotR1(PPK[3]);
284 PPK[5] += RotR1(PPK[4]); 286 PPK[5] += RotR1(PPK[4]);
285 287
286 /* Step 3 - bring in last of TK bits, assign 24-bit WEP IV value 288 /*
287 * WEPSeed[0..2] is transmitted as WEP IV */ 289 * Step 3 - bring in last of TK bits, assign 24-bit WEP IV value
290 * WEPSeed[0..2] is transmitted as WEP IV
291 */
288 WEPSeed[0] = Hi8(IV16); 292 WEPSeed[0] = Hi8(IV16);
289 WEPSeed[1] = (Hi8(IV16) | 0x20) & 0x7F; 293 WEPSeed[1] = (Hi8(IV16) | 0x20) & 0x7F;
290 WEPSeed[2] = Lo8(IV16); 294 WEPSeed[2] = Lo8(IV16);
@@ -463,8 +467,11 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
463 467
464 if (memcmp(icv, pos + plen, 4) != 0) { 468 if (memcmp(icv, pos + plen, 4) != 0) {
465 if (iv32 != tkey->rx_iv32) { 469 if (iv32 != tkey->rx_iv32) {
466 /* Previously cached Phase1 result was already lost, so 470 /*
467 * it needs to be recalculated for the next packet. */ 471 * Previously cached Phase1 result was already
472 * lost, so it needs to be recalculated for the
473 * next packet.
474 */
468 tkey->rx_phase1_done = 0; 475 tkey->rx_phase1_done = 0;
469 } 476 }
470 if (net_ratelimit()) { 477 if (net_ratelimit()) {
@@ -477,8 +484,10 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
477 484
478 } 485 }
479 486
480 /* Update real counters only after Michael MIC verification has 487 /*
481 * completed */ 488 * Update real counters only after Michael MIC verification has
489 * completed.
490 */
482 tkey->rx_iv32_new = iv32; 491 tkey->rx_iv32_new = iv32;
483 tkey->rx_iv16_new = iv16; 492 tkey->rx_iv16_new = iv16;
484 493
@@ -633,8 +642,10 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
633 return -1; 642 return -1;
634 } 643 }
635 644
636 /* Update TSC counters for RX now that the packet verification has 645 /*
637 * completed. */ 646 * Update TSC counters for RX now that the packet verification has
647 * completed.
648 */
638 tkey->rx_iv32 = tkey->rx_iv32_new; 649 tkey->rx_iv32 = tkey->rx_iv32_new;
639 tkey->rx_iv16 = tkey->rx_iv16_new; 650 tkey->rx_iv16 = tkey->rx_iv16_new;
640 651