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

staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): Stop using param->u.crypt.alg

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c36e122f
...@@ -530,6 +530,17 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, ...@@ -530,6 +530,17 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev,
ret = -EINVAL; ret = -EINVAL;
goto exit; goto exit;
} }
switch (keyparms->cipher) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
case WLAN_CIPHER_SUITE_TKIP:
case WLAN_CIPHER_SUITE_CCMP:
break;
default:
ret = -EINVAL;
goto exit;
}
} else { } else {
psta = rtw_get_stainfo23a(pstapriv, param->sta_addr); psta = rtw_get_stainfo23a(pstapriv, param->sta_addr);
if (!psta) { if (!psta) {
...@@ -540,15 +551,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, ...@@ -540,15 +551,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev,
} }
} }
if (strcmp(param->u.crypt.alg, "none") == 0 && (psta == NULL)) {
/* todo:clear default encryption keys */
DBG_8723A("clear default encryption keys, keyid =%d\n",
param->u.crypt.idx);
goto exit;
}
key_len = keyparms->key_len; key_len = keyparms->key_len;
if (!psta && (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 || if (!psta && (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 ||
......
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