aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSukesh Srikakula <[email protected]>2011-05-13 11:59:38 +0200
committerGreg Kroah-Hartman <[email protected]>2011-05-17 12:12:31 -0700
commit22d5d59b8c4bac63b1466dce5bee5dc48e8ee447 (patch)
tree34c95366207ff66955f4cd493e63e2326f1f6477
parentdcc8fb87f2aceb25929b2a82b65c22f425badbfc (diff)
staging: brcm80211: Fix for WPA GTK install issue in brcmfmac driver
Last 16 bytes of the key sent by cfg80211 needs to be swapped before installing it to FW for TKIP encryption. This is not done for group key in current code, which is corrected with this fix. Cc: [email protected] Cc: [email protected] Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Brett Rudley <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Tested-by: Grant Grundler <[email protected]> Tested-by: Aaron Plattner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
index b44daf959e8f..c60fc7cb7436 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
@@ -1616,6 +1616,7 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
s32 val;
s32 wsec;
s32 err = 0;
+ u8 keybuf[8];
WL_DBG("key index (%d)\n", key_idx);
CHECK_SYS_UP();
@@ -1644,6 +1645,9 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
WL_DBG("WLAN_CIPHER_SUITE_WEP104\n");
break;
case WLAN_CIPHER_SUITE_TKIP:
+ memcpy(keybuf, &key.data[24], sizeof(keybuf));
+ memcpy(&key.data[24], &key.data[16], sizeof(keybuf));
+ memcpy(&key.data[16], keybuf, sizeof(keybuf));
key.algo = CRYPTO_ALGO_TKIP;
WL_DBG("WLAN_CIPHER_SUITE_TKIP\n");
break;