[PATCH 28/43] staging: rtl8723au: rtw_cfg80211_set_encryption(): Obtain key from key_params->key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
---
 drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
index 2e21223..e521c77 100644
--- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
@@ -868,7 +868,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
 		}
 
 		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;
 
@@ -910,19 +910,17 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
 						  " == 1\n", __func__);
 
 					memcpy(psta->dot118021x_UncstKey.skey,
-					       param->u.crypt.key,
+					       keyparms->key,
 					       (key_len > 16 ? 16 : key_len));
 
 					if (keyparms->cipher ==
 					    WLAN_CIPHER_SUITE_TKIP) {
 						memcpy(psta->dot11tkiptxmickey.
 						       skey,
-						       &param->u.crypt.key[16],
-						       8);
+						       &keyparms->key[16], 8);
 						memcpy(psta->dot11tkiprxmickey.
 						       skey,
-						       &param->u.crypt.key[24],
-						       8);
+						       &keyparms->key[24], 8);
 
 						padapter->securitypriv.
 							busetkipkey = 0;
@@ -936,18 +934,16 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
 					memcpy(padapter->securitypriv.
 					       dot118021XGrpKey[param->u.crypt.
 								idx].skey,
-					       param->u.crypt.key,
+					       keyparms->key,
 					       (key_len > 16 ? 16 : key_len));
 					memcpy(padapter->securitypriv.
 					       dot118021XGrptxmickey[param->u.
 								     crypt.idx].
-					       skey, &param->u.crypt.key[16],
-					       8);
+					       skey, &keyparms->key[16], 8);
 					memcpy(padapter->securitypriv.
 					       dot118021XGrprxmickey[param->u.
 								     crypt.idx].
-					       skey, &param->u.crypt.key[24],
-					       8);
+					       skey, &keyparms->key[24], 8);
 					padapter->securitypriv.binstallGrpkey =
 						1;
 					DBG_8723A
-- 
1.9.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux