aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
diff options
context:
space:
mode:
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>2015-04-01 00:24:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-03 15:29:31 +0200
commit14b40d92881533dca8b25647f105b9546433cda2 (patch)
treef98466b91afa587137ec78fd6bb33c7757066fd1 /drivers/staging/rtl8192e/rtllib_crypt_tkip.c
parentstaging: rtl8192e: Fix indentation in rtllib_rx_auth_resp() (diff)
downloadlinux-dev-14b40d92881533dca8b25647f105b9546433cda2.tar.xz
linux-dev-14b40d92881533dca8b25647f105b9546433cda2.zip
staging: rtl8192e: Comment cleanup (style/format)
- Multiline comments use "network subsystem comment style" - Merge short multiline comments - Remove empty comments - Remove function name comment at the end of small (<1 screen) functions - Reformat 802.11 data frame format to use spaces and network format Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_crypt_tkip.c')
-rw-r--r--drivers/staging/rtl8192e/rtllib_crypt_tkip.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
index ccf85309b4b6..656b4b359c50 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
@@ -249,7 +249,8 @@ static void tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK,
u16 IV16)
{
/* Make temporary area overlap WEP seed so that the final copy can be
- * avoided on little endian hosts. */
+ * avoided on little endian hosts.
+ */
u16 *PPK = (u16 *) &WEPSeed[4];
/* Step 1 - make copy of TTAK and bring in TSC */
@@ -276,7 +277,8 @@ static void tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK,
PPK[5] += RotR1(PPK[4]);
/* Step 3 - bring in last of TK bits, assign 24-bit WEP IV value
- * WEPSeed[0..2] is transmitted as WEP IV */
+ * WEPSeed[0..2] is transmitted as WEP IV
+ */
WEPSeed[0] = Hi8(IV16);
WEPSeed[1] = (Hi8(IV16) | 0x20) & 0x7F;
WEPSeed[2] = Lo8(IV16);
@@ -470,7 +472,8 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (iv32 != tkey->rx_iv32) {
/* Previously cached Phase1 result was already
* lost, so it needs to be recalculated for the
- * next packet. */
+ * next packet.
+ */
tkey->rx_phase1_done = 0;
}
if (net_ratelimit()) {
@@ -485,7 +488,8 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
}
/* Update real counters only after Michael MIC verification has
- * completed */
+ * completed
+ */
tkey->rx_iv32_new = iv32;
tkey->rx_iv16_new = iv16;
@@ -639,7 +643,8 @@ static int rtllib_michael_mic_verify(struct sk_buff *skb, int keyidx,
}
/* Update TSC counters for RX now that the packet verification has
- * completed. */
+ * completed.
+ */
tkey->rx_iv32 = tkey->rx_iv32_new;
tkey->rx_iv16 = tkey->rx_iv16_new;