From: Samuel Ortiz Date: Fri, 16 Oct 2009 05:18:49 +0000 (+0800) Subject: iwmc3200wifi: Profile flags can be WPA1 or WPA2 not both X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a79c9f62a87e39a265f9b855911fbc1f094ded0;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git iwmc3200wifi: Profile flags can be WPA1 or WPA2 not both UMAC will ASSERT if the profile security flag is WPA1 | WPA2, so we can only accept one of those. Moreover wpa_s wext and nl80211 drivers dont try to send WPA1 | WPA2, but only one at a time. Signed-off-by: Samuel Ortiz Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c index ca75d07831a9..89edb6629426 100644 --- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c +++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c @@ -471,12 +471,12 @@ static int iwm_set_wpa_version(struct iwm_priv *iwm, u32 wpa_version) return 0; } + if (wpa_version & NL80211_WPA_VERSION_1) + iwm->umac_profile->sec.flags = UMAC_SEC_FLG_WPA_ON_MSK; + if (wpa_version & NL80211_WPA_VERSION_2) iwm->umac_profile->sec.flags = UMAC_SEC_FLG_RSNA_ON_MSK; - if (wpa_version & NL80211_WPA_VERSION_1) - iwm->umac_profile->sec.flags |= UMAC_SEC_FLG_WPA_ON_MSK; - return 0; }