Commit 22d5d59b authored by Sukesh Srikakula's avatar Sukesh Srikakula Committed by Greg Kroah-Hartman

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: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarBrett Rudley <brudley@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Tested-by: default avatarGrant Grundler <grundler@chromium.org>
Tested-by: default avatarAaron Plattner <aplattner@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent dcc8fb87
...@@ -1616,6 +1616,7 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1616,6 +1616,7 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
s32 val; s32 val;
s32 wsec; s32 wsec;
s32 err = 0; s32 err = 0;
u8 keybuf[8];
WL_DBG("key index (%d)\n", key_idx); WL_DBG("key index (%d)\n", key_idx);
CHECK_SYS_UP(); CHECK_SYS_UP();
...@@ -1644,6 +1645,9 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -1644,6 +1645,9 @@ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
WL_DBG("WLAN_CIPHER_SUITE_WEP104\n"); WL_DBG("WLAN_CIPHER_SUITE_WEP104\n");
break; break;
case WLAN_CIPHER_SUITE_TKIP: 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; key.algo = CRYPTO_ALGO_TKIP;
WL_DBG("WLAN_CIPHER_SUITE_TKIP\n"); WL_DBG("WLAN_CIPHER_SUITE_TKIP\n");
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment