From: Jes Sorensen Date: Tue, 24 Jun 2014 13:03:38 +0000 (+0200) Subject: staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): Stop using param->u.crypt.alg X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f84f97fd6a90080b89a7aa6ddd7b6b5b6d6c3898;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: rtl8723au: rtw_cfg80211_ap_set_encryption(): Stop using param->u.crypt.alg Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 0925d5694fd9..ac13df1dc786 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -530,6 +530,17 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, ret = -EINVAL; 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 { psta = rtw_get_stainfo23a(pstapriv, param->sta_addr); if (!psta) { @@ -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; if (!psta && (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 ||