Commit e1343f90 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: rtw_cfg80211_set_encryption(): Obtain key from key_params->key

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8188b1cb
...@@ -868,7 +868,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, ...@@ -868,7 +868,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
} }
memcpy(&psecuritypriv->wep_key[wep_key_idx].key, memcpy(&psecuritypriv->wep_key[wep_key_idx].key,
param->u.crypt.key, key_len); keyparms->key, key_len);
psecuritypriv->wep_key[wep_key_idx].keylen = key_len; psecuritypriv->wep_key[wep_key_idx].keylen = key_len;
...@@ -910,19 +910,17 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, ...@@ -910,19 +910,17 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
" == 1\n", __func__); " == 1\n", __func__);
memcpy(psta->dot118021x_UncstKey.skey, memcpy(psta->dot118021x_UncstKey.skey,
param->u.crypt.key, keyparms->key,
(key_len > 16 ? 16 : key_len)); (key_len > 16 ? 16 : key_len));
if (keyparms->cipher == if (keyparms->cipher ==
WLAN_CIPHER_SUITE_TKIP) { WLAN_CIPHER_SUITE_TKIP) {
memcpy(psta->dot11tkiptxmickey. memcpy(psta->dot11tkiptxmickey.
skey, skey,
&param->u.crypt.key[16], &keyparms->key[16], 8);
8);
memcpy(psta->dot11tkiprxmickey. memcpy(psta->dot11tkiprxmickey.
skey, skey,
&param->u.crypt.key[24], &keyparms->key[24], 8);
8);
padapter->securitypriv. padapter->securitypriv.
busetkipkey = 0; busetkipkey = 0;
...@@ -936,18 +934,16 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, ...@@ -936,18 +934,16 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
memcpy(padapter->securitypriv. memcpy(padapter->securitypriv.
dot118021XGrpKey[param->u.crypt. dot118021XGrpKey[param->u.crypt.
idx].skey, idx].skey,
param->u.crypt.key, keyparms->key,
(key_len > 16 ? 16 : key_len)); (key_len > 16 ? 16 : key_len));
memcpy(padapter->securitypriv. memcpy(padapter->securitypriv.
dot118021XGrptxmickey[param->u. dot118021XGrptxmickey[param->u.
crypt.idx]. crypt.idx].
skey, &param->u.crypt.key[16], skey, &keyparms->key[16], 8);
8);
memcpy(padapter->securitypriv. memcpy(padapter->securitypriv.
dot118021XGrprxmickey[param->u. dot118021XGrprxmickey[param->u.
crypt.idx]. crypt.idx].
skey, &param->u.crypt.key[24], skey, &keyparms->key[24], 8);
8);
padapter->securitypriv.binstallGrpkey = padapter->securitypriv.binstallGrpkey =
1; 1;
DBG_8723A DBG_8723A
......
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