diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2014-06-24 15:03:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-24 13:51:01 -0400 |
commit | 8188b1cb6165655d087edf89b6619e62021762d8 (patch) | |
tree | 8c91897d35faffb0f08e76802e7d5b98e8288ff8 /drivers | |
parent | d0dc266692d1bd4579fd9abd4a9b80f8d0ab5150 (diff) |
staging: rtl8723au: rtw_cfg80211_set_encryption(): Use key_params->cipher
Use key_params->cipher to determine WEP/TKIP
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 5ea0fa102eb4..2e21223b15be 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -835,7 +835,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, goto exit; } - if (strcmp(param->u.crypt.alg, "WEP") == 0) { + if (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 || + keyparms->cipher == WLAN_CIPHER_SUITE_WEP104) { RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_, ("wpa_set_encryption, crypt.alg = WEP\n")); DBG_8723A("wpa_set_encryption, crypt.alg = WEP\n"); @@ -912,8 +913,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, param->u.crypt.key, (key_len > 16 ? 16 : key_len)); - if (strcmp(param->u.crypt.alg, - "TKIP") == 0) { + if (keyparms->cipher == + WLAN_CIPHER_SUITE_TKIP) { memcpy(psta->dot11tkiptxmickey. skey, ¶m->u.crypt.key[16], |