Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers

Set the NL80211_EXT_FEATURE_CQM_RSSI_LIST wiphy extended feature
wholesale in all mac80211-based drivers that do not set the
IEEE80211_VIF_BEACON_FILTER flags on their interfaces. mac80211 will
be processing supplied RSSI values in ieee80211_rx_mgmt_beacon and
will detect when the thresholds set by
ieee80211_set_cqm_rssi_range_config are crossed. Remaining (few)
drivers need code to enable the firmware to monitor the thresholds.
This is mostly only compile-tested.

Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Andrew Zaborowski and committed by
Johannes Berg
ae44b502 2c3c5f8c

+52
+2
drivers/net/wireless/admtek/adm8211.c
··· 1917 1917 1918 1918 dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band; 1919 1919 1920 + wiphy_ext_feature_set(dev->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1921 + 1920 1922 err = ieee80211_register_hw(dev); 1921 1923 if (err) { 1922 1924 printk(KERN_ERR "%s (adm8211): Cannot register device\n",
+2
drivers/net/wireless/ath/ar5523/ar5523.c
··· 1689 1689 if (error) 1690 1690 goto out_cancel_rx_cmd; 1691 1691 1692 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1693 + 1692 1694 usb_set_intfdata(intf, hw); 1693 1695 1694 1696 error = ieee80211_register_hw(hw);
+2
drivers/net/wireless/ath/ath10k/mac.c
··· 8248 8248 ar->hw->wiphy->cipher_suites = cipher_suites; 8249 8249 ar->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); 8250 8250 8251 + wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 8252 + 8251 8253 ret = ieee80211_register_hw(ar->hw); 8252 8254 if (ret) { 8253 8255 ath10k_err(ar, "failed to register ieee80211: %d\n", ret);
+2
drivers/net/wireless/ath/ath5k/base.c
··· 2564 2564 2565 2565 hw->extra_tx_headroom = 2; 2566 2566 2567 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 2568 + 2567 2569 /* 2568 2570 * Mark the device as detached to avoid processing 2569 2571 * interrupts until setup is complete.
+2
drivers/net/wireless/ath/ath9k/htc_drv_init.c
··· 780 780 } 781 781 782 782 SET_IEEE80211_PERM_ADDR(hw, common->macaddr); 783 + 784 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 783 785 } 784 786 785 787 static int ath9k_init_firmware_version(struct ath9k_htc_priv *priv)
+2
drivers/net/wireless/ath/ath9k/init.c
··· 955 955 ath9k_cmn_reload_chainmask(ah); 956 956 957 957 SET_IEEE80211_PERM_ADDR(hw, common->macaddr); 958 + 959 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 958 960 } 959 961 960 962 int ath9k_init_device(u16 devid, struct ath_softc *sc,
+2
drivers/net/wireless/ath/carl9170/main.c
··· 1874 1874 for (i = 0; i < ARRAY_SIZE(ar->noise); i++) 1875 1875 ar->noise[i] = -95; /* ATH_DEFAULT_NOISE_FLOOR */ 1876 1876 1877 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1878 + 1877 1879 return ar; 1878 1880 1879 1881 err_nomem:
+3
drivers/net/wireless/ath/wcn36xx/main.c
··· 1112 1112 wcn->hw->sta_data_size = sizeof(struct wcn36xx_sta); 1113 1113 wcn->hw->vif_data_size = sizeof(struct wcn36xx_vif); 1114 1114 1115 + wiphy_ext_feature_set(wcn->hw->wiphy, 1116 + NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1117 + 1115 1118 return ret; 1116 1119 } 1117 1120
+2
drivers/net/wireless/atmel/at76c50x-usb.c
··· 2377 2377 2378 2378 wiphy->hw_version = priv->board_type; 2379 2379 2380 + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 2381 + 2380 2382 ret = ieee80211_register_hw(priv->hw); 2381 2383 if (ret) { 2382 2384 printk(KERN_ERR "cannot register mac80211 hw (status %d)!\n",
+2
drivers/net/wireless/broadcom/b43/main.c
··· 5598 5598 5599 5599 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 5600 5600 5601 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 5602 + 5601 5603 wl->hw_registred = false; 5602 5604 hw->max_rates = 2; 5603 5605 SET_IEEE80211_DEV(hw, dev->dev);
+2
drivers/net/wireless/broadcom/b43legacy/main.c
··· 3850 3850 else 3851 3851 SET_IEEE80211_PERM_ADDR(hw, sprom->il0mac); 3852 3852 3853 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 3854 + 3853 3855 /* Get and initialize struct b43legacy_wl */ 3854 3856 wl = hw_to_b43legacy_wl(hw); 3855 3857 memset(wl, 0, sizeof(*wl));
+2
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
··· 1082 1082 * hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD; 1083 1083 */ 1084 1084 1085 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1086 + 1085 1087 hw->rate_control_algorithm = "minstrel_ht"; 1086 1088 1087 1089 hw->sta_data_size = 0;
+2
drivers/net/wireless/intel/iwlegacy/3945-mac.c
··· 3592 3592 3593 3593 il_leds_init(il); 3594 3594 3595 + wiphy_ext_feature_set(il->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 3596 + 3595 3597 ret = ieee80211_register_hw(il->hw); 3596 3598 if (ret) { 3597 3599 IL_ERR("Failed to register hw (error %d)\n", ret);
+2
drivers/net/wireless/intel/iwlegacy/4965-mac.c
··· 5799 5799 5800 5800 il_leds_init(il); 5801 5801 5802 + wiphy_ext_feature_set(il->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 5803 + 5802 5804 ret = ieee80211_register_hw(il->hw); 5803 5805 if (ret) { 5804 5806 IL_ERR("Failed to register hw (error %d)\n", ret);
+2
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
··· 213 213 214 214 iwl_leds_init(priv); 215 215 216 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 217 + 216 218 ret = ieee80211_register_hw(priv->hw); 217 219 if (ret) { 218 220 IWL_ERR(priv, "Failed to register hw (error %d)\n", ret);
+2
drivers/net/wireless/mac80211_hwsim.c
··· 2645 2645 if (param->no_vif) 2646 2646 ieee80211_hw_set(hw, NO_AUTO_VIF); 2647 2647 2648 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 2649 + 2648 2650 err = ieee80211_register_hw(hw); 2649 2651 if (err < 0) { 2650 2652 printk(KERN_DEBUG "mac80211_hwsim: ieee80211_register_hw failed (%d)\n",
+2
drivers/net/wireless/marvell/libertas_tf/main.c
··· 641 641 BIT(NL80211_IFTYPE_ADHOC); 642 642 skb_queue_head_init(&priv->bc_ps_buf); 643 643 644 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 645 + 644 646 SET_IEEE80211_DEV(hw, dmdev); 645 647 646 648 INIT_WORK(&priv->cmd_work, lbtf_cmd_work);
+2
drivers/net/wireless/marvell/mwl8k.c
··· 6144 6144 if (priv->sta_macids_supported || priv->device_info->fw_image_sta) 6145 6145 hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_STATION); 6146 6146 6147 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 6148 + 6147 6149 rc = ieee80211_register_hw(hw); 6148 6150 if (rc) { 6149 6151 wiphy_err(hw->wiphy, "Cannot register device\n");
+2
drivers/net/wireless/mediatek/mt7601u/init.c
··· 615 615 wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR; 616 616 wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); 617 617 618 + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 619 + 618 620 ret = mt76_init_sband_2g(dev); 619 621 if (ret) 620 622 return ret;
+3
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
··· 1384 1384 1385 1385 rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 1386 1386 1387 + wiphy_ext_feature_set(rt2x00dev->hw->wiphy, 1388 + NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1389 + 1387 1390 /* 1388 1391 * Initialize ieee80211 structure. 1389 1392 */
+2
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
··· 1877 1877 else 1878 1878 ieee80211_hw_set(dev, SIGNAL_UNSPEC); 1879 1879 1880 + wiphy_ext_feature_set(dev->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1881 + 1880 1882 rtl8180_eeprom_read(priv); 1881 1883 1882 1884 switch (priv->rf_type) {
+2
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
··· 1609 1609 dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | 1610 1610 BIT(NL80211_IFTYPE_ADHOC) ; 1611 1611 1612 + wiphy_ext_feature_set(dev->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1613 + 1612 1614 if ((id->driver_info == DEVICE_RTL8187) && priv->is_rtl8187b) 1613 1615 printk(KERN_INFO "rtl8187: inconsistency between id with OEM" 1614 1616 " info!\n");
+2
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
··· 6135 6135 ieee80211_hw_set(hw, HAS_RATE_CONTROL); 6136 6136 ieee80211_hw_set(hw, AMPDU_AGGREGATION); 6137 6137 6138 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 6139 + 6138 6140 ret = ieee80211_register_hw(priv->hw); 6139 6141 if (ret) { 6140 6142 dev_err(&udev->dev, "%s: Failed to register: %i\n",
+2
drivers/net/wireless/rsi/rsi_91x_mac80211.c
··· 1261 1261 1262 1262 wiphy->reg_notifier = rsi_reg_notify; 1263 1263 1264 + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1265 + 1264 1266 status = ieee80211_register_hw(hw); 1265 1267 if (status) 1266 1268 return status;
+2
drivers/net/wireless/zydas/zd1211rw/zd_mac.c
··· 1408 1408 BIT(NL80211_IFTYPE_ADHOC) | 1409 1409 BIT(NL80211_IFTYPE_AP); 1410 1410 1411 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 1412 + 1411 1413 hw->max_signal = 100; 1412 1414 hw->queues = 1; 1413 1415 hw->extra_tx_headroom = sizeof(struct zd_ctrlset);