From 7989bcf3e21683f413dd1488718166d3ff474bf3 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Wed, 21 May 2014 09:37:31 +0200 Subject: [PATCH] staging: rtl8723au: Store algorithm type in a u32 This will allow us to switch to using WLAN_CIPHER_SUITE_* later Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/include/rtw_cmd.h | 4 ++-- drivers/staging/rtl8723au/include/rtw_security.h | 6 +++--- drivers/staging/rtl8723au/include/sta_info.h | 2 +- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h b/drivers/staging/rtl8723au/include/rtw_cmd.h index 50f810629144..383cd39bd4fe 100644 --- a/drivers/staging/rtl8723au/include/rtw_cmd.h +++ b/drivers/staging/rtl8723au/include/rtw_cmd.h @@ -219,7 +219,7 @@ when 802.1x ==> keyid > 2 ==> unicast key */ struct setkey_parm { - u8 algorithm; /* encryption algorithm, could be none, wep40, TKIP, CCMP, wep104 */ + u32 algorithm; /* encryption algorithm, could be none, wep40, TKIP, CCMP, wep104 */ u8 keyid; u8 grpkey; /* 1: this is the grpkey for 802.1x. 0: this is the unicast key for 802.1x */ u8 set_tx; /* 1: main tx key for wep. 0: other key. */ @@ -237,8 +237,8 @@ when shared key ==> algorithm/keyid */ struct set_stakey_parm { u8 addr[ETH_ALEN]; - u8 algorithm; u8 id;/* currently for erasing cam entry if algorithm == _NO_PRIVACY_ */ + u32 algorithm; u8 key[16]; }; diff --git a/drivers/staging/rtl8723au/include/rtw_security.h b/drivers/staging/rtl8723au/include/rtw_security.h index d117a2053396..7a707bcc5998 100644 --- a/drivers/staging/rtl8723au/include/rtw_security.h +++ b/drivers/staging/rtl8723au/include/rtw_security.h @@ -177,13 +177,13 @@ do {\ case dot11AuthAlgrthm_Open:\ case dot11AuthAlgrthm_Shared:\ case dot11AuthAlgrthm_Auto:\ - encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\ + encry_algo = psecuritypriv->dot11PrivacyAlgrthm;\ break;\ case dot11AuthAlgrthm_8021X:\ if (bmcst)\ - encry_algo = (u8)psecuritypriv->dot118021XGrpPrivacy;\ + encry_algo = psecuritypriv->dot118021XGrpPrivacy;\ else\ - encry_algo = (u8)psta->dot118021XPrivacy;\ + encry_algo = psta->dot118021XPrivacy;\ break;\ } \ } while (0) diff --git a/drivers/staging/rtl8723au/include/sta_info.h b/drivers/staging/rtl8723au/include/sta_info.h index 747e7db2113e..1282c831d483 100644 --- a/drivers/staging/rtl8723au/include/sta_info.h +++ b/drivers/staging/rtl8723au/include/sta_info.h @@ -97,7 +97,7 @@ struct sta_info { u8 hwaddr[ETH_ALEN]; uint ieee8021x_blocked; /* 0: allowed, 1:blocked */ - uint dot118021XPrivacy; /* aes, tkip... */ + u32 dot118021XPrivacy; /* aes, tkip... */ union Keytype dot11tkiptxmickey; union Keytype dot11tkiprxmickey; union Keytype dot118021x_UncstKey; diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 35ed47a79d27..62e8c824406a 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -457,7 +457,7 @@ static int set_pairwise_key(struct rtw_adapter *padapter, struct sta_info *psta) init_h2fwcmd_w_parm_no_rsp(ph2c, psetstakey_para, _SetStaKey_CMD_); - psetstakey_para->algorithm = (u8) psta->dot118021XPrivacy; + psetstakey_para->algorithm = psta->dot118021XPrivacy; memcpy(psetstakey_para->addr, psta->hwaddr, ETH_ALEN); @@ -469,7 +469,7 @@ exit: return res; } -static int set_group_key(struct rtw_adapter *padapter, u8 *key, u8 alg, +static int set_group_key(struct rtw_adapter *padapter, u8 *key, u32 alg, u8 keyid) { u8 keylen; -- 2.11.0