aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 06b9608a2130..0afccda42a24 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -536,6 +536,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
536 int channels, max_bitrates; 536 int channels, max_bitrates;
537 bool supp_ht; 537 bool supp_ht;
538 static const u32 cipher_suites[] = { 538 static const u32 cipher_suites[] = {
539 /* keep WEP first, it may be removed below */
539 WLAN_CIPHER_SUITE_WEP40, 540 WLAN_CIPHER_SUITE_WEP40,
540 WLAN_CIPHER_SUITE_WEP104, 541 WLAN_CIPHER_SUITE_WEP104,
541 WLAN_CIPHER_SUITE_TKIP, 542 WLAN_CIPHER_SUITE_TKIP,
@@ -623,6 +624,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
623 local->hw.wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); 624 local->hw.wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
624 if (!(local->hw.flags & IEEE80211_HW_MFP_CAPABLE)) 625 if (!(local->hw.flags & IEEE80211_HW_MFP_CAPABLE))
625 local->hw.wiphy->n_cipher_suites--; 626 local->hw.wiphy->n_cipher_suites--;
627 if (IS_ERR(local->wep_tx_tfm) || IS_ERR(local->wep_rx_tfm)) {
628 local->hw.wiphy->cipher_suites += 2;
629 local->hw.wiphy->n_cipher_suites -= 2;
630 }
626 631
627 result = wiphy_register(local->hw.wiphy); 632 result = wiphy_register(local->hw.wiphy);
628 if (result < 0) 633 if (result < 0)