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

wifi: cfg80211/mac80211: Add support to get radio index

Currently, per-radio attributes are set on per-phy basis, i.e., all the
radios present in a wiphy will take attributes values sent from user. But
each radio in a wiphy can get different values from userspace based on
its requirement.

To extend support to set per-radio attributes, add support to get radio
index from userspace. Add an NL attribute - NL80211_ATTR_WIPHY_RADIO_INDEX,
to get user specified radio index for which attributes should be changed.
Pass this to individual drivers, so that the drivers can use this radio
index to change per-radio attributes when necessary. Currently, per-radio
attributes identified are:
NL80211_ATTR_WIPHY_TX_POWER_LEVEL
NL80211_ATTR_WIPHY_ANTENNA_TX
NL80211_ATTR_WIPHY_ANTENNA_RX
NL80211_ATTR_WIPHY_RETRY_SHORT
NL80211_ATTR_WIPHY_RETRY_LONG
NL80211_ATTR_WIPHY_FRAG_THRESHOLD
NL80211_ATTR_WIPHY_RTS_THRESHOLD
NL80211_ATTR_WIPHY_COVERAGE_CLASS
NL80211_ATTR_TXQ_LIMIT
NL80211_ATTR_TXQ_MEMORY_LIMIT
NL80211_ATTR_TXQ_QUANTUM

By default, the radio index is set to -1. This means the attribute should
be treated as a global configuration. If the user has not specified any
index, then the radio index passed to individual drivers would be -1. This
would indicate that the attribute applies to all radios in that wiphy.

Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com>
Link: https://patch.msgid.link/20250615082312.619639-2-quic_rdevanat@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Roopni Devanathan and committed by
Johannes Berg
b74947b4 4cb1ce7e

+525 -296
+1 -1
drivers/net/wireless/admtek/adm8211.c
··· 1293 1293 ADM8211_CSR_WRITE(ABDA1, reg); 1294 1294 } 1295 1295 1296 - static int adm8211_config(struct ieee80211_hw *dev, u32 changed) 1296 + static int adm8211_config(struct ieee80211_hw *dev, int radio_idx, u32 changed) 1297 1297 { 1298 1298 struct adm8211_priv *priv = dev->priv; 1299 1299 struct ieee80211_conf *conf = &dev->conf;
+3 -2
drivers/net/wireless/ath/ar5523/ar5523.c
··· 1083 1083 mutex_unlock(&ar->mutex); 1084 1084 } 1085 1085 1086 - static int ar5523_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 1086 + static int ar5523_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 1087 + u32 value) 1087 1088 { 1088 1089 struct ar5523 *ar = hw->priv; 1089 1090 int ret; ··· 1138 1137 ar->vif = NULL; 1139 1138 } 1140 1139 1141 - static int ar5523_hwconfig(struct ieee80211_hw *hw, u32 changed) 1140 + static int ar5523_hwconfig(struct ieee80211_hw *hw, int radio_idx, u32 changed) 1142 1141 { 1143 1142 struct ar5523 *ar = hw->priv; 1144 1143
+1 -1
drivers/net/wireless/ath/ath10k/core.c
··· 2606 2606 set_coverage_class_work); 2607 2607 2608 2608 if (ar->hw_params.hw_ops->set_coverage_class) 2609 - ar->hw_params.hw_ops->set_coverage_class(ar, -1); 2609 + ar->hw_params.hw_ops->set_coverage_class(ar, -1, -1); 2610 2610 } 2611 2611 2612 2612 static int ath10k_core_init_firmware_features(struct ath10k *ar)
+1
drivers/net/wireless/ath/ath10k/hw.c
··· 590 590 * function monitors and modifies the corresponding MAC registers. 591 591 */ 592 592 static void ath10k_hw_qca988x_set_coverage_class(struct ath10k *ar, 593 + int radio_idx, 593 594 s16 value) 594 595 { 595 596 u32 slottime_reg;
+1 -1
drivers/net/wireless/ath/ath10k/hw.h
··· 646 646 647 647 /* Defines needed for Rx descriptor abstraction */ 648 648 struct ath10k_hw_ops { 649 - void (*set_coverage_class)(struct ath10k *ar, s16 value); 649 + void (*set_coverage_class)(struct ath10k *ar, int radio_idx, s16 value); 650 650 int (*enable_pll_clk)(struct ath10k *ar); 651 651 int (*tx_data_rssi_pad_bytes)(struct htt_resp *htt); 652 652 int (*is_rssi_enable)(struct htt_resp *resp);
+12 -7
drivers/net/wireless/ath/ath10k/mac.c
··· 4820 4820 spin_unlock_bh(&ar->data_lock); 4821 4821 } 4822 4822 4823 - static int ath10k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 4823 + static int ath10k_get_antenna(struct ieee80211_hw *hw, int radio_idx, 4824 + u32 *tx_ant, u32 *rx_ant) 4824 4825 { 4825 4826 struct ath10k *ar = hw->priv; 4826 4827 ··· 5068 5067 return 0; 5069 5068 } 5070 5069 5071 - static int ath10k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 5070 + static int ath10k_set_antenna(struct ieee80211_hw *hw, int radio_idx, 5071 + u32 tx_ant, u32 rx_ant) 5072 5072 { 5073 5073 struct ath10k *ar = hw->priv; 5074 5074 int ret; ··· 5439 5437 return ret; 5440 5438 } 5441 5439 5442 - static int ath10k_config(struct ieee80211_hw *hw, u32 changed) 5440 + static int ath10k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 5443 5441 { 5444 5442 struct ath10k *ar = hw->priv; 5445 5443 struct ieee80211_conf *conf = &hw->conf; ··· 6338 6336 mutex_unlock(&ar->conf_mutex); 6339 6337 } 6340 6338 6341 - static void ath10k_mac_op_set_coverage_class(struct ieee80211_hw *hw, s16 value) 6339 + static void ath10k_mac_op_set_coverage_class(struct ieee80211_hw *hw, int radio_idx, 6340 + s16 value) 6342 6341 { 6343 6342 struct ath10k *ar = hw->priv; 6344 6343 ··· 6350 6347 WARN_ON_ONCE(1); 6351 6348 return; 6352 6349 } 6353 - ar->hw_params.hw_ops->set_coverage_class(ar, value); 6350 + ar->hw_params.hw_ops->set_coverage_class(ar, -1, value); 6354 6351 } 6355 6352 6356 6353 struct ath10k_mac_tdls_iter_data { ··· 8038 8035 * in ath10k, but device-specific in mac80211. 8039 8036 */ 8040 8037 8041 - static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 8038 + static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 8039 + u32 value) 8042 8040 { 8043 8041 struct ath10k *ar = hw->priv; 8044 8042 struct ath10k_vif *arvif; ··· 8062 8058 return ret; 8063 8059 } 8064 8060 8065 - static int ath10k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value) 8061 + static int ath10k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, 8062 + int radio_idx, u32 value) 8066 8063 { 8067 8064 /* Even though there's a WMI enum for fragmentation threshold no known 8068 8065 * firmware actually implements it. Moreover it is not possible to rely
+9 -5
drivers/net/wireless/ath/ath11k/mac.c
··· 1283 1283 return ret; 1284 1284 } 1285 1285 1286 - static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32 changed) 1286 + static int ath11k_mac_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 1287 1287 { 1288 1288 struct ath11k *ar = hw->priv; 1289 1289 struct ieee80211_conf *conf = &hw->conf; ··· 7044 7044 mutex_unlock(&ar->conf_mutex); 7045 7045 } 7046 7046 7047 - static int ath11k_mac_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 7047 + static int ath11k_mac_op_get_antenna(struct ieee80211_hw *hw, int radio_idx, 7048 + u32 *tx_ant, u32 *rx_ant) 7048 7049 { 7049 7050 struct ath11k *ar = hw->priv; 7050 7051 ··· 7059 7058 return 0; 7060 7059 } 7061 7060 7062 - static int ath11k_mac_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 7061 + static int ath11k_mac_op_set_antenna(struct ieee80211_hw *hw, int radio_idx, 7062 + u32 tx_ant, u32 rx_ant) 7063 7063 { 7064 7064 struct ath11k *ar = hw->priv; 7065 7065 int ret; ··· 8184 8182 /* mac80211 stores device specific RTS/Fragmentation threshold value, 8185 8183 * this is set interface specific to firmware from ath11k driver 8186 8184 */ 8187 - static int ath11k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 8185 + static int ath11k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, 8186 + int radio_idx, u32 value) 8188 8187 { 8189 8188 struct ath11k *ar = hw->priv; 8190 8189 int param_id = WMI_VDEV_PARAM_RTS_THRESHOLD; ··· 8193 8190 return ath11k_set_vdev_param_to_all_vifs(ar, param_id, value); 8194 8191 } 8195 8192 8196 - static int ath11k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value) 8193 + static int ath11k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, 8194 + int radio_idx, u32 value) 8197 8195 { 8198 8196 /* Even though there's a WMI vdev param for fragmentation threshold no 8199 8197 * known firmware actually implements it. Moreover it is not possible to
+9 -5
drivers/net/wireless/ath/ath12k/mac.c
··· 1392 1392 return ret; 1393 1393 } 1394 1394 1395 - static int ath12k_mac_op_config(struct ieee80211_hw *hw, u32 changed) 1395 + static int ath12k_mac_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 1396 1396 { 1397 1397 return 0; 1398 1398 } ··· 9354 9354 ar->filter_flags = *total_flags; 9355 9355 } 9356 9356 9357 - static int ath12k_mac_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 9357 + static int ath12k_mac_op_get_antenna(struct ieee80211_hw *hw, int radio_idx, 9358 + u32 *tx_ant, u32 *rx_ant) 9358 9359 { 9359 9360 struct ath12k_hw *ah = ath12k_hw_to_ah(hw); 9360 9361 int antennas_rx = 0, antennas_tx = 0; ··· 9375 9374 return 0; 9376 9375 } 9377 9376 9378 - static int ath12k_mac_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 9377 + static int ath12k_mac_op_set_antenna(struct ieee80211_hw *hw, int radio_idx, 9378 + u32 tx_ant, u32 rx_ant) 9379 9379 { 9380 9380 struct ath12k_hw *ah = ath12k_hw_to_ah(hw); 9381 9381 struct ath12k *ar; ··· 10737 10735 /* mac80211 stores device specific RTS/Fragmentation threshold value, 10738 10736 * this is set interface specific to firmware from ath12k driver 10739 10737 */ 10740 - static int ath12k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 10738 + static int ath12k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, 10739 + int radio_idx, u32 value) 10741 10740 { 10742 10741 struct ath12k_hw *ah = ath12k_hw_to_ah(hw); 10743 10742 struct ath12k *ar; ··· 10763 10760 return ret; 10764 10761 } 10765 10762 10766 - static int ath12k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value) 10763 + static int ath12k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, 10764 + int radio_idx, u32 value) 10767 10765 { 10768 10766 /* Even though there's a WMI vdev param for fragmentation threshold no 10769 10767 * known firmware actually implements it. Moreover it is not possible to
+8 -4
drivers/net/wireless/ath/ath5k/mac80211-ops.c
··· 192 192 * TODO: Phy disable/diversity etc 193 193 */ 194 194 static int 195 - ath5k_config(struct ieee80211_hw *hw, u32 changed) 195 + ath5k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 196 196 { 197 197 struct ath5k_hw *ah = hw->priv; 198 198 struct ieee80211_conf *conf = &hw->conf; ··· 686 686 * ath5k_set_coverage_class - Set IEEE 802.11 coverage class 687 687 * 688 688 * @hw: struct ieee80211_hw pointer 689 + * @radio_idx: Radio index 689 690 * @coverage_class: IEEE 802.11 coverage class number 690 691 * 691 692 * Mac80211 callback. Sets slot time, ACK timeout and CTS timeout for given ··· 694 693 * reset. 695 694 */ 696 695 static void 697 - ath5k_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class) 696 + ath5k_set_coverage_class(struct ieee80211_hw *hw, int radio_idx, 697 + s16 coverage_class) 698 698 { 699 699 struct ath5k_hw *ah = hw->priv; 700 700 ··· 706 704 707 705 708 706 static int 709 - ath5k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 707 + ath5k_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, 708 + u32 rx_ant) 710 709 { 711 710 struct ath5k_hw *ah = hw->priv; 712 711 ··· 724 721 725 722 726 723 static int 727 - ath5k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 724 + ath5k_get_antenna(struct ieee80211_hw *hw, int radio_idx, 725 + u32 *tx_ant, u32 *rx_ant) 728 726 { 729 727 struct ath5k_hw *ah = hw->priv; 730 728
+5 -2
drivers/net/wireless/ath/ath6kl/cfg80211.c
··· 1376 1376 GFP_KERNEL); 1377 1377 } 1378 1378 1379 - static int ath6kl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) 1379 + static int ath6kl_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx, 1380 + u32 changed) 1380 1381 { 1381 1382 struct ath6kl *ar = (struct ath6kl *)wiphy_priv(wiphy); 1382 1383 struct ath6kl_vif *vif; ··· 1406 1405 1407 1406 static int ath6kl_cfg80211_set_txpower(struct wiphy *wiphy, 1408 1407 struct wireless_dev *wdev, 1408 + int radio_idx, 1409 1409 enum nl80211_tx_power_setting type, 1410 1410 int mbm) 1411 1411 { ··· 1443 1441 1444 1442 static int ath6kl_cfg80211_get_txpower(struct wiphy *wiphy, 1445 1443 struct wireless_dev *wdev, 1444 + int radio_idx, 1446 1445 unsigned int link_id, 1447 1446 int *dbm) 1448 1447 { ··· 3245 3242 wait, buf, len, no_cck); 3246 3243 } 3247 3244 3248 - static int ath6kl_get_antenna(struct wiphy *wiphy, 3245 + static int ath6kl_get_antenna(struct wiphy *wiphy, int radio_idx, 3249 3246 u32 *tx_ant, u32 *rx_ant) 3250 3247 { 3251 3248 struct ath6kl *ar = wiphy_priv(wiphy);
+6 -4
drivers/net/wireless/ath/ath9k/htc_drv_main.c
··· 1172 1172 mutex_unlock(&priv->mutex); 1173 1173 } 1174 1174 1175 - static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed) 1175 + static int ath9k_htc_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 1176 1176 { 1177 1177 struct ath9k_htc_priv *priv = hw->priv; 1178 1178 struct ath_common *common = ath9k_hw_common(priv->ah); ··· 1737 1737 mutex_unlock(&priv->mutex); 1738 1738 } 1739 1739 1740 - static int ath9k_htc_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 1740 + static int ath9k_htc_set_rts_threshold(struct ieee80211_hw *hw, 1741 + int radio_idx, u32 value) 1741 1742 { 1742 1743 return 0; 1743 1744 } 1744 1745 1745 1746 static void ath9k_htc_set_coverage_class(struct ieee80211_hw *hw, 1747 + int radio_idx, 1746 1748 s16 coverage_class) 1747 1749 { 1748 1750 struct ath9k_htc_priv *priv = hw->priv; ··· 1843 1841 } 1844 1842 1845 1843 1846 - static int ath9k_htc_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, 1847 - u32 *rx_ant) 1844 + static int ath9k_htc_get_antenna(struct ieee80211_hw *hw, int radio_idx, 1845 + u32 *tx_ant, u32 *rx_ant) 1848 1846 { 1849 1847 struct ath9k_htc_priv *priv = hw->priv; 1850 1848 struct base_eep_header *pBase = ath9k_htc_get_eeprom_base(priv);
+6 -3
drivers/net/wireless/ath/ath9k/main.c
··· 1484 1484 ath_dbg(common, PS, "PowerSave disabled\n"); 1485 1485 } 1486 1486 1487 - static int ath9k_config(struct ieee80211_hw *hw, u32 changed) 1487 + static int ath9k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 1488 1488 { 1489 1489 struct ath_softc *sc = hw->priv; 1490 1490 struct ath_hw *ah = sc->sc_ah; ··· 2114 2114 } 2115 2115 2116 2116 static void ath9k_set_coverage_class(struct ieee80211_hw *hw, 2117 + int radio_idx, 2117 2118 s16 coverage_class) 2118 2119 { 2119 2120 struct ath_softc *sc = hw->priv; ··· 2339 2338 } 2340 2339 } 2341 2340 2342 - static int ath9k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 2341 + static int ath9k_set_antenna(struct ieee80211_hw *hw, int radio_idx, 2342 + u32 tx_ant, u32 rx_ant) 2343 2343 { 2344 2344 struct ath_softc *sc = hw->priv; 2345 2345 struct ath_hw *ah = sc->sc_ah; ··· 2369 2367 return 0; 2370 2368 } 2371 2369 2372 - static int ath9k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 2370 + static int ath9k_get_antenna(struct ieee80211_hw *hw, int radio_idx, 2371 + u32 *tx_ant, u32 *rx_ant) 2373 2372 { 2374 2373 struct ath_softc *sc = hw->priv; 2375 2374
+1 -1
drivers/net/wireless/ath/carl9170/main.c
··· 890 890 round_jiffies(msecs_to_jiffies(CARL9170_STAT_WORK))); 891 891 } 892 892 893 - static int carl9170_op_config(struct ieee80211_hw *hw, u32 changed) 893 + static int carl9170_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 894 894 { 895 895 struct ar9170 *ar = hw->priv; 896 896 int err = 0;
+3 -2
drivers/net/wireless/ath/wcn36xx/main.c
··· 361 361 return; 362 362 } 363 363 364 - static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed) 364 + static int wcn36xx_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 365 365 { 366 366 struct wcn36xx *wcn = hw->priv; 367 367 int ret; ··· 965 965 } 966 966 967 967 /* this is required when using IEEE80211_HW_HAS_RATE_CONTROL */ 968 - static int wcn36xx_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 968 + static int wcn36xx_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 969 + u32 value) 969 970 { 970 971 struct wcn36xx *wcn = hw->priv; 971 972 wcn36xx_dbg(WCN36XX_DBG_MAC, "mac set RTS threshold %d\n", value);
+2 -1
drivers/net/wireless/ath/wil6210/cfg80211.c
··· 1408 1408 return rc; 1409 1409 } 1410 1410 1411 - static int wil_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) 1411 + static int wil_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx, 1412 + u32 changed) 1412 1413 { 1413 1414 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 1414 1415 int rc;
+1 -1
drivers/net/wireless/atmel/at76c50x-usb.c
··· 2002 2002 return 0; 2003 2003 } 2004 2004 2005 - static int at76_config(struct ieee80211_hw *hw, u32 changed) 2005 + static int at76_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 2006 2006 { 2007 2007 struct at76_priv *priv = hw->priv; 2008 2008
+3 -3
drivers/net/wireless/broadcom/b43/main.c
··· 3975 3975 long_retry); 3976 3976 } 3977 3977 3978 - static int b43_op_config(struct ieee80211_hw *hw, u32 changed) 3978 + static int b43_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 3979 3979 { 3980 3980 struct b43_wl *wl = hw_to_b43_wl(hw); 3981 3981 struct b43_wldev *dev = wl->current_dev; ··· 5073 5073 * may hang the system. 5074 5074 */ 5075 5075 if (!err) 5076 - b43_op_config(hw, ~0); 5076 + b43_op_config(hw, -1, ~0); 5077 5077 5078 5078 return err; 5079 5079 } ··· 5248 5248 } 5249 5249 5250 5250 /* reload configuration */ 5251 - b43_op_config(wl->hw, ~0); 5251 + b43_op_config(wl->hw, -1, ~0); 5252 5252 if (wl->vif) 5253 5253 b43_op_bss_info_changed(wl->hw, wl->vif, &wl->vif->bss_conf, ~0); 5254 5254
+1 -1
drivers/net/wireless/broadcom/b43legacy/main.c
··· 2662 2662 b43legacy_shm_write16(dev, B43legacy_SHM_WIRELESS, 0x0007, long_retry); 2663 2663 } 2664 2664 2665 - static int b43legacy_op_dev_config(struct ieee80211_hw *hw, 2665 + static int b43legacy_op_dev_config(struct ieee80211_hw *hw, int radio_idx, 2666 2666 u32 changed) 2667 2667 { 2668 2668 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
+5 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
··· 1637 1637 return err; 1638 1638 } 1639 1639 1640 - static s32 brcmf_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) 1640 + static s32 brcmf_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx, 1641 + u32 changed) 1641 1642 { 1642 1643 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); 1643 1644 struct net_device *ndev = cfg_to_ndev(cfg); ··· 2646 2645 2647 2646 static s32 2648 2647 brcmf_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, 2649 - enum nl80211_tx_power_setting type, s32 mbm) 2648 + int radio_idx, enum nl80211_tx_power_setting type, 2649 + s32 mbm) 2650 2650 { 2651 2651 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); 2652 2652 struct net_device *ndev = cfg_to_ndev(cfg); ··· 2698 2696 2699 2697 static s32 2700 2698 brcmf_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, 2701 - unsigned int link_id, s32 *dbm) 2699 + int radio_idx, unsigned int link_id, s32 *dbm) 2702 2700 { 2703 2701 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); 2704 2702 struct brcmf_cfg80211_vif *vif = wdev_to_vif(wdev);
+2 -1
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
··· 525 525 spin_unlock_bh(&wl->lock); 526 526 } 527 527 528 - static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed) 528 + static int brcms_ops_config(struct ieee80211_hw *hw, int radio_idx, 529 + u32 changed) 529 530 { 530 531 struct ieee80211_conf *conf = &hw->conf; 531 532 struct brcms_info *wl = hw->priv;
+1 -1
drivers/net/wireless/intel/iwlegacy/common.c
··· 4990 4990 * il_mac_config - mac80211 config callback 4991 4991 */ 4992 4992 int 4993 - il_mac_config(struct ieee80211_hw *hw, u32 changed) 4993 + il_mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 4994 4994 { 4995 4995 struct il_priv *il = hw->priv; 4996 4996 const struct il_channel_info *ch_info;
+1 -1
drivers/net/wireless/intel/iwlegacy/common.h
··· 1956 1956 } 1957 1957 1958 1958 /* mac80211 handlers */ 1959 - int il_mac_config(struct ieee80211_hw *hw, u32 changed); 1959 + int il_mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed); 1960 1960 void il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif); 1961 1961 void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1962 1962 struct ieee80211_bss_conf *bss_conf, u64 changes);
+1 -1
drivers/net/wireless/intel/iwlwifi/dvm/agn.h
··· 88 88 int iwlagn_set_pan_params(struct iwl_priv *priv); 89 89 int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx); 90 90 void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx); 91 - int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed); 91 + int iwlagn_mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed); 92 92 void iwlagn_bss_info_changed(struct ieee80211_hw *hw, 93 93 struct ieee80211_vif *vif, 94 94 struct ieee80211_bss_conf *bss_conf,
+1 -1
drivers/net/wireless/intel/iwlwifi/dvm/rxon.c
··· 1149 1149 } 1150 1150 } 1151 1151 1152 - int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) 1152 + int iwlagn_mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 1153 1153 { 1154 1154 struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); 1155 1155 struct iwl_rxon_context *ctx;
+4 -2
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
··· 574 574 } 575 575 576 576 static 577 - int iwl_mld_mac80211_config(struct ieee80211_hw *hw, u32 changed) 577 + int iwl_mld_mac80211_config(struct ieee80211_hw *hw, int radio_idx, 578 + u32 changed) 578 579 { 579 580 return 0; 580 581 } ··· 1103 1102 } 1104 1103 1105 1104 static 1106 - int iwl_mld_mac80211_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 1105 + int iwl_mld_mac80211_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 1106 + u32 value) 1107 1107 { 1108 1108 return 0; 1109 1109 }
+6 -3
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
··· 298 298 }, 299 299 }; 300 300 301 - int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 301 + int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, int radio_idx, 302 + u32 *tx_ant, u32 *rx_ant) 302 303 { 303 304 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 304 305 *tx_ant = iwl_mvm_get_valid_tx_ant(mvm); ··· 307 306 return 0; 308 307 } 309 308 310 - int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 309 + int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, 310 + u32 rx_ant) 311 311 { 312 312 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 313 313 ··· 4251 4249 return ret; 4252 4250 } 4253 4251 4254 - int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 4252 + int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 4253 + u32 value) 4255 4254 { 4256 4255 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 4257 4256
+8 -4
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
··· 2866 2866 int iwl_mvm_mac_ampdu_action(struct ieee80211_hw *hw, 2867 2867 struct ieee80211_vif *vif, 2868 2868 struct ieee80211_ampdu_params *params); 2869 - int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); 2870 - int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); 2869 + int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant, 2870 + u32 *rx_ant); 2871 + int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, 2872 + u32 rx_ant); 2871 2873 int iwl_mvm_mac_start(struct ieee80211_hw *hw); 2872 2874 void iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw, 2873 2875 enum ieee80211_reconfig_type reconfig_type); 2874 2876 void iwl_mvm_mac_stop(struct ieee80211_hw *hw, bool suspend); 2875 - static inline int iwl_mvm_mac_config(struct ieee80211_hw *hw, u32 changed) 2877 + static inline int iwl_mvm_mac_config(struct ieee80211_hw *hw, int radio_idx, 2878 + u32 changed) 2876 2879 { 2877 2880 return 0; 2878 2881 } ··· 2908 2905 int num_frames, 2909 2906 enum ieee80211_frame_release_type reason, 2910 2907 bool more_data); 2911 - int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, u32 value); 2908 + int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 2909 + u32 value); 2912 2910 void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2913 2911 struct ieee80211_link_sta *link_sta, u32 changed); 2914 2912 void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw *hw,
+2 -1
drivers/net/wireless/intersil/p54/main.c
··· 313 313 priv->survey_raw.tx = 0; 314 314 } 315 315 316 - static int p54_config(struct ieee80211_hw *dev, u32 changed) 316 + static int p54_config(struct ieee80211_hw *dev, int radio_idx, u32 changed) 317 317 { 318 318 int ret = 0; 319 319 struct p54_common *priv = dev->priv; ··· 692 692 } 693 693 694 694 static void p54_set_coverage_class(struct ieee80211_hw *dev, 695 + int radio_idx, 695 696 s16 coverage_class) 696 697 { 697 698 struct p54_common *priv = dev->priv;
+1 -1
drivers/net/wireless/marvell/libertas_tf/main.c
··· 337 337 lbtf_deb_leave(LBTF_DEB_MACOPS); 338 338 } 339 339 340 - static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed) 340 + static int lbtf_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 341 341 { 342 342 struct lbtf_private *priv = hw->priv; 343 343 struct ieee80211_conf *conf = &hw->conf;
+8 -3
drivers/net/wireless/marvell/mwifiex/cfg80211.c
··· 375 375 static int 376 376 mwifiex_cfg80211_set_tx_power(struct wiphy *wiphy, 377 377 struct wireless_dev *wdev, 378 + int radio_idx, 378 379 enum nl80211_tx_power_setting type, 379 380 int mbm) 380 381 { ··· 411 410 static int 412 411 mwifiex_cfg80211_get_tx_power(struct wiphy *wiphy, 413 412 struct wireless_dev *wdev, 413 + int radio_idx, 414 414 unsigned int link_id, int *dbm) 415 415 { 416 416 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy); ··· 739 737 * Fragmentation threshold of the driver. 740 738 */ 741 739 static int 742 - mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) 740 + mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx, 741 + u32 changed) 743 742 { 744 743 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy); 745 744 struct mwifiex_private *priv; ··· 1942 1939 } 1943 1940 1944 1941 static int 1945 - mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) 1942 + mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, int radio_idx, u32 tx_ant, 1943 + u32 rx_ant) 1946 1944 { 1947 1945 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy); 1948 1946 struct mwifiex_private *priv = mwifiex_get_priv(adapter, ··· 2006 2002 } 2007 2003 2008 2004 static int 2009 - mwifiex_cfg80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant) 2005 + mwifiex_cfg80211_get_antenna(struct wiphy *wiphy, int radio_idx, u32 *tx_ant, 2006 + u32 *rx_ant) 2010 2007 { 2011 2008 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy); 2012 2009 struct mwifiex_private *priv = mwifiex_get_priv(adapter,
+7 -5
drivers/net/wireless/marvell/mwl8k.c
··· 3369 3369 } __packed; 3370 3370 3371 3371 static int 3372 - mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int rts_thresh) 3372 + mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 3373 + int rts_thresh) 3373 3374 { 3374 3375 struct mwl8k_cmd_set_rts_threshold *cmd; 3375 3376 int rc; ··· 4956 4955 wiphy_err(hw->wiphy, "Firmware restart failed\n"); 4957 4956 } 4958 4957 4959 - static int mwl8k_config(struct ieee80211_hw *hw, u32 changed) 4958 + static int mwl8k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 4960 4959 { 4961 4960 struct ieee80211_conf *conf = &hw->conf; 4962 4961 struct mwl8k_priv *priv = hw->priv; ··· 5322 5321 mwl8k_fw_unlock(hw); 5323 5322 } 5324 5323 5325 - static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 5324 + static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 5325 + u32 value) 5326 5326 { 5327 - return mwl8k_cmd_set_rts_threshold(hw, value); 5327 + return mwl8k_cmd_set_rts_threshold(hw, radio_idx, value); 5328 5328 } 5329 5329 5330 5330 static int mwl8k_sta_remove(struct ieee80211_hw *hw, ··· 6058 6056 if (rc) 6059 6057 goto fail; 6060 6058 6061 - rc = mwl8k_config(hw, ~0); 6059 + rc = mwl8k_config(hw, -1, ~0); 6062 6060 if (rc) 6063 6061 goto fail; 6064 6062
+2 -1
drivers/net/wireless/mediatek/mt76/mac80211.c
··· 1892 1892 } 1893 1893 EXPORT_SYMBOL_GPL(mt76_sw_scan_complete); 1894 1894 1895 - int mt76_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 1895 + int mt76_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant, 1896 + u32 *rx_ant) 1896 1897 { 1897 1898 struct mt76_phy *phy = hw->priv; 1898 1899 struct mt76_dev *dev = phy->dev;
+2 -1
drivers/net/wireless/mediatek/mt76/mt76.h
··· 1513 1513 void mt76_csa_check(struct mt76_dev *dev); 1514 1514 void mt76_csa_finish(struct mt76_dev *dev); 1515 1515 1516 - int mt76_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); 1516 + int mt76_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant, 1517 + u32 *rx_ant); 1517 1518 int mt76_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set); 1518 1519 void mt76_insert_ccmp_hdr(struct sk_buff *skb, u8 key_id); 1519 1520 int mt76_get_rate(struct mt76_dev *dev,
+3 -2
drivers/net/wireless/mediatek/mt76/mt7603/main.c
··· 216 216 } 217 217 218 218 static int 219 - mt7603_config(struct ieee80211_hw *hw, u32 changed) 219 + mt7603_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 220 220 { 221 221 struct mt7603_dev *dev = hw->priv; 222 222 int ret = 0; ··· 657 657 } 658 658 659 659 static void 660 - mt7603_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class) 660 + mt7603_set_coverage_class(struct ieee80211_hw *hw, int radio_idx, 661 + s16 coverage_class) 661 662 { 662 663 struct mt7603_dev *dev = hw->priv; 663 664
+7 -4
drivers/net/wireless/mediatek/mt76/mt7615/main.c
··· 420 420 return mt76_update_channel(phy->mt76); 421 421 } 422 422 423 - static int mt7615_config(struct ieee80211_hw *hw, u32 changed) 423 + static int mt7615_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 424 424 { 425 425 struct mt7615_dev *dev = mt7615_hw_dev(hw); 426 426 struct mt7615_phy *phy = mt7615_hw_phy(hw); ··· 784 784 mt76_connac_pm_queue_skb(hw, &dev->pm, wcid, skb); 785 785 } 786 786 787 - static int mt7615_set_rts_threshold(struct ieee80211_hw *hw, u32 val) 787 + static int mt7615_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 788 + u32 val) 788 789 { 789 790 struct mt7615_dev *dev = mt7615_hw_dev(hw); 790 791 struct mt7615_phy *phy = mt7615_hw_phy(hw); ··· 973 972 } 974 973 975 974 static void 976 - mt7615_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class) 975 + mt7615_set_coverage_class(struct ieee80211_hw *hw, int radio_idx, 976 + s16 coverage_class) 977 977 { 978 978 struct mt7615_phy *phy = mt7615_hw_phy(hw); 979 979 struct mt7615_dev *dev = phy->dev; ··· 986 984 } 987 985 988 986 static int 989 - mt7615_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 987 + mt7615_set_antenna(struct ieee80211_hw *hw, int radio_idx, 988 + u32 tx_ant, u32 rx_ant) 990 989 { 991 990 struct mt7615_dev *dev = mt7615_hw_dev(hw); 992 991 struct mt7615_phy *phy = mt7615_hw_phy(hw);
+1 -1
drivers/net/wireless/mediatek/mt76/mt76x0/main.c
··· 57 57 } 58 58 EXPORT_SYMBOL_GPL(mt76x0_set_sar_specs); 59 59 60 - int mt76x0_config(struct ieee80211_hw *hw, u32 changed) 60 + int mt76x0_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 61 61 { 62 62 struct mt76x02_dev *dev = hw->priv; 63 63
+1 -1
drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h
··· 48 48 49 49 void mt76x0_mac_stop(struct mt76x02_dev *dev); 50 50 51 - int mt76x0_config(struct ieee80211_hw *hw, u32 changed); 51 + int mt76x0_config(struct ieee80211_hw *hw, int radio_idx, u32 changed); 52 52 int mt76x0_set_channel(struct mt76_phy *mphy); 53 53 int mt76x0_set_sar_specs(struct ieee80211_hw *hw, 54 54 const struct cfg80211_sar_specs *sar);
+2 -2
drivers/net/wireless/mediatek/mt76/mt76x02.h
··· 183 183 void mt76x02_tx_set_txpwr_auto(struct mt76x02_dev *dev, s8 txpwr); 184 184 void mt76x02_set_tx_ackto(struct mt76x02_dev *dev); 185 185 void mt76x02_set_coverage_class(struct ieee80211_hw *hw, 186 - s16 coverage_class); 187 - int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, u32 val); 186 + int radio_idx, s16 coverage_class); 187 + int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val); 188 188 void mt76x02_remove_hdr_pad(struct sk_buff *skb, int len); 189 189 bool mt76x02_tx_status_data(struct mt76_dev *mdev, u8 *update); 190 190 void mt76x02_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
+2 -2
drivers/net/wireless/mediatek/mt76/mt76x02_util.c
··· 548 548 EXPORT_SYMBOL_GPL(mt76x02_set_tx_ackto); 549 549 550 550 void mt76x02_set_coverage_class(struct ieee80211_hw *hw, 551 - s16 coverage_class) 551 + int radio_idx, s16 coverage_class) 552 552 { 553 553 struct mt76x02_dev *dev = hw->priv; 554 554 ··· 559 559 } 560 560 EXPORT_SYMBOL_GPL(mt76x02_set_coverage_class); 561 561 562 - int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, u32 val) 562 + int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val) 563 563 { 564 564 struct mt76x02_dev *dev = hw->priv; 565 565
+3 -3
drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
··· 54 54 } 55 55 56 56 static int 57 - mt76x2_config(struct ieee80211_hw *hw, u32 changed) 57 + mt76x2_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 58 58 { 59 59 struct mt76x02_dev *dev = hw->priv; 60 60 ··· 99 99 { 100 100 } 101 101 102 - static int mt76x2_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, 103 - u32 rx_ant) 102 + static int mt76x2_set_antenna(struct ieee80211_hw *hw, int radio_idx, 103 + u32 tx_ant, u32 rx_ant) 104 104 { 105 105 struct mt76x02_dev *dev = hw->priv; 106 106
+1 -1
drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c
··· 50 50 } 51 51 52 52 static int 53 - mt76x2u_config(struct ieee80211_hw *hw, u32 changed) 53 + mt76x2u_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 54 54 { 55 55 struct mt76x02_dev *dev = hw->priv; 56 56 int err = 0;
+8 -5
drivers/net/wireless/mediatek/mt76/mt7915/main.c
··· 449 449 return err; 450 450 } 451 451 452 - static int mt7915_config(struct ieee80211_hw *hw, u32 changed) 452 + static int mt7915_config(struct ieee80211_hw *hw, int radio_idx, 453 + u32 changed) 453 454 { 454 455 struct mt7915_dev *dev = mt7915_hw_dev(hw); 455 456 struct mt7915_phy *phy = mt7915_hw_phy(hw); ··· 907 906 mt76_tx(mphy, control->sta, wcid, skb); 908 907 } 909 908 910 - static int mt7915_set_rts_threshold(struct ieee80211_hw *hw, u32 val) 909 + static int mt7915_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 910 + u32 val) 911 911 { 912 912 struct mt7915_dev *dev = mt7915_hw_dev(hw); 913 913 struct mt7915_phy *phy = mt7915_hw_phy(hw); ··· 1104 1102 } 1105 1103 1106 1104 static void 1107 - mt7915_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class) 1105 + mt7915_set_coverage_class(struct ieee80211_hw *hw, int radio_idx, 1106 + s16 coverage_class) 1108 1107 { 1109 1108 struct mt7915_phy *phy = mt7915_hw_phy(hw); 1110 1109 struct mt7915_dev *dev = phy->dev; ··· 1117 1114 } 1118 1115 1119 1116 static int 1120 - mt7915_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 1117 + mt7915_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, u32 rx_ant) 1121 1118 { 1122 1119 struct mt7915_dev *dev = mt7915_hw_dev(hw); 1123 1120 struct mt7915_phy *phy = mt7915_hw_phy(hw); ··· 1658 1655 } 1659 1656 1660 1657 static int 1661 - mt7915_set_frag_threshold(struct ieee80211_hw *hw, u32 val) 1658 + mt7915_set_frag_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val) 1662 1659 { 1663 1660 return 0; 1664 1661 }
+5 -3
drivers/net/wireless/mediatek/mt76/mt7921/main.c
··· 624 624 mt76_connac_mcu_set_deep_sleep(&dev->mt76, pm->ds_enable); 625 625 } 626 626 627 - static int mt7921_config(struct ieee80211_hw *hw, u32 changed) 627 + static int mt7921_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 628 628 { 629 629 struct mt792x_dev *dev = mt792x_hw_dev(hw); 630 630 struct mt792x_phy *phy = mt792x_hw_phy(hw); ··· 907 907 } 908 908 EXPORT_SYMBOL_GPL(mt7921_mac_sta_remove); 909 909 910 - static int mt7921_set_rts_threshold(struct ieee80211_hw *hw, u32 val) 910 + static int mt7921_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 911 + u32 val) 911 912 { 912 913 struct mt792x_dev *dev = mt792x_hw_dev(hw); 913 914 ··· 1089 1088 } 1090 1089 1091 1090 static int 1092 - mt7921_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 1091 + mt7921_set_antenna(struct ieee80211_hw *hw, int radio_idx, 1092 + u32 tx_ant, u32 rx_ant) 1093 1093 { 1094 1094 struct mt792x_dev *dev = mt792x_hw_dev(hw); 1095 1095 struct mt792x_phy *phy = mt792x_hw_phy(hw);
+5 -3
drivers/net/wireless/mediatek/mt76/mt7925/main.c
··· 757 757 mt7925_mcu_set_deep_sleep(dev, pm->ds_enable); 758 758 } 759 759 760 - static int mt7925_config(struct ieee80211_hw *hw, u32 changed) 760 + static int mt7925_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 761 761 { 762 762 struct mt792x_dev *dev = mt792x_hw_dev(hw); 763 763 int ret = 0; ··· 1265 1265 } 1266 1266 EXPORT_SYMBOL_GPL(mt7925_mac_sta_remove); 1267 1267 1268 - static int mt7925_set_rts_threshold(struct ieee80211_hw *hw, u32 val) 1268 + static int mt7925_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 1269 + u32 val) 1269 1270 { 1270 1271 struct mt792x_dev *dev = mt792x_hw_dev(hw); 1271 1272 ··· 1508 1507 } 1509 1508 1510 1509 static int 1511 - mt7925_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 1510 + mt7925_set_antenna(struct ieee80211_hw *hw, int radio_idx, 1511 + u32 tx_ant, u32 rx_ant) 1512 1512 { 1513 1513 struct mt792x_dev *dev = mt792x_hw_dev(hw); 1514 1514 struct mt792x_phy *phy = mt792x_hw_phy(hw);
+2 -1
drivers/net/wireless/mediatek/mt76/mt792x.h
··· 412 412 struct ieee80211_vif *vif, 413 413 struct ieee80211_sta *sta, 414 414 struct station_info *sinfo); 415 - void mt792x_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class); 415 + void mt792x_set_coverage_class(struct ieee80211_hw *hw, int radio_idx, 416 + s16 coverage_class); 416 417 void mt792x_dma_cleanup(struct mt792x_dev *dev); 417 418 int mt792x_dma_enable(struct mt792x_dev *dev); 418 419 int mt792x_wpdma_reset(struct mt792x_dev *dev, bool force);
+2 -1
drivers/net/wireless/mediatek/mt76/mt792x_core.c
··· 579 579 } 580 580 EXPORT_SYMBOL_GPL(mt792x_sta_statistics); 581 581 582 - void mt792x_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class) 582 + void mt792x_set_coverage_class(struct ieee80211_hw *hw, int radio_idx, 583 + s16 coverage_class) 583 584 { 584 585 struct mt792x_phy *phy = mt792x_hw_phy(hw); 585 586 struct mt792x_dev *dev = phy->dev;
+7 -4
drivers/net/wireless/mediatek/mt76/mt7996/main.c
··· 591 591 return err; 592 592 } 593 593 594 - static int mt7996_config(struct ieee80211_hw *hw, u32 changed) 594 + static int mt7996_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 595 595 { 596 596 return 0; 597 597 } ··· 1251 1251 rcu_read_unlock(); 1252 1252 } 1253 1253 1254 - static int mt7996_set_rts_threshold(struct ieee80211_hw *hw, u32 val) 1254 + static int mt7996_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 1255 + u32 val) 1255 1256 { 1256 1257 struct mt7996_dev *dev = mt7996_hw_dev(hw); 1257 1258 int i, ret = 0; ··· 1492 1491 } 1493 1492 1494 1493 static void 1495 - mt7996_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class) 1494 + mt7996_set_coverage_class(struct ieee80211_hw *hw, int radio_idx, 1495 + s16 coverage_class) 1496 1496 { 1497 1497 struct mt7996_dev *dev = mt7996_hw_dev(hw); 1498 1498 struct mt7996_phy *phy; ··· 1507 1505 } 1508 1506 1509 1507 static int 1510 - mt7996_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 1508 + mt7996_set_antenna(struct ieee80211_hw *hw, int radio_idx, 1509 + u32 tx_ant, u32 rx_ant) 1511 1510 { 1512 1511 struct mt7996_dev *dev = mt7996_hw_dev(hw); 1513 1512 int i;
+3 -2
drivers/net/wireless/mediatek/mt7601u/main.c
··· 78 78 dev->wcid_mask[wcid / BITS_PER_LONG] &= ~BIT(wcid % BITS_PER_LONG); 79 79 } 80 80 81 - static int mt7601u_config(struct ieee80211_hw *hw, u32 changed) 81 + static int mt7601u_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 82 82 { 83 83 struct mt7601u_dev *dev = hw->priv; 84 84 int ret = 0; ··· 334 334 return mt76_mac_wcid_set_key(dev, msta->wcid.idx, key); 335 335 } 336 336 337 - static int mt7601u_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 337 + static int mt7601u_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 338 + u32 value) 338 339 { 339 340 struct mt7601u_dev *dev = hw->priv; 340 341
+4 -3
drivers/net/wireless/microchip/wilc1000/cfg80211.c
··· 800 800 return 0; 801 801 } 802 802 803 - static int set_wiphy_params(struct wiphy *wiphy, u32 changed) 803 + static int set_wiphy_params(struct wiphy *wiphy, int radio_idx, u32 changed) 804 804 { 805 805 int ret = -EINVAL; 806 806 struct cfg_param_attr cfg_param_val; ··· 1637 1637 } 1638 1638 1639 1639 static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, 1640 - enum nl80211_tx_power_setting type, int mbm) 1640 + int radio_idx, enum nl80211_tx_power_setting type, 1641 + int mbm) 1641 1642 { 1642 1643 int ret; 1643 1644 int srcu_idx; ··· 1670 1669 } 1671 1670 1672 1671 static int get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, 1673 - unsigned int link_id, int *dbm) 1672 + int radio_idx, unsigned int link_id, int *dbm) 1674 1673 { 1675 1674 int ret; 1676 1675 struct wilc_vif *vif = netdev_priv(wdev->netdev);
+3 -2
drivers/net/wireless/purelifi/plfxlc/mac.c
··· 531 531 mac->vif = NULL; 532 532 } 533 533 534 - static int plfxlc_op_config(struct ieee80211_hw *hw, u32 changed) 534 + static int plfxlc_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 535 535 { 536 536 return 0; 537 537 } ··· 677 677 data[1] = mac->crc_errors; 678 678 } 679 679 680 - static int plfxlc_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 680 + static int plfxlc_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 681 + u32 value) 681 682 { 682 683 return 0; 683 684 }
+5 -3
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
··· 370 370 return ret; 371 371 } 372 372 373 - static int qtnf_set_wiphy_params(struct wiphy *wiphy, u32 changed) 373 + static int qtnf_set_wiphy_params(struct wiphy *wiphy, int radio_idx, 374 + u32 changed) 374 375 { 375 376 struct qtnf_wmac *mac = wiphy_priv(wiphy); 376 377 struct qtnf_vif *vif; ··· 882 881 } 883 882 884 883 static int qtnf_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, 885 - unsigned int link_id, int *dbm) 884 + int radio_idx, unsigned int link_id, int *dbm) 886 885 { 887 886 struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev); 888 887 int ret; ··· 895 894 } 896 895 897 896 static int qtnf_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, 898 - enum nl80211_tx_power_setting type, int mbm) 897 + int radio_idx, enum nl80211_tx_power_setting type, 898 + int mbm) 899 899 { 900 900 struct qtnf_vif *vif; 901 901 int ret;
+1 -1
drivers/net/wireless/ralink/rt2x00/rt2800lib.c
··· 12100 12100 } 12101 12101 EXPORT_SYMBOL_GPL(rt2800_get_key_seq); 12102 12102 12103 - int rt2800_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 12103 + int rt2800_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 value) 12104 12104 { 12105 12105 struct rt2x00_dev *rt2x00dev = hw->priv; 12106 12106 u32 reg;
+2 -1
drivers/net/wireless/ralink/rt2x00/rt2800lib.h
··· 253 253 void rt2800_get_key_seq(struct ieee80211_hw *hw, 254 254 struct ieee80211_key_conf *key, 255 255 struct ieee80211_key_seq *seq); 256 - int rt2800_set_rts_threshold(struct ieee80211_hw *hw, u32 value); 256 + int rt2800_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 257 + u32 value); 257 258 int rt2800_conf_tx(struct ieee80211_hw *hw, 258 259 struct ieee80211_vif *vif, 259 260 unsigned int link_id, u16 queue_idx,
+5 -3
drivers/net/wireless/ralink/rt2x00/rt2x00.h
··· 1457 1457 struct ieee80211_vif *vif); 1458 1458 void rt2x00mac_remove_interface(struct ieee80211_hw *hw, 1459 1459 struct ieee80211_vif *vif); 1460 - int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed); 1460 + int rt2x00mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed); 1461 1461 void rt2x00mac_configure_filter(struct ieee80211_hw *hw, 1462 1462 unsigned int changed_flags, 1463 1463 unsigned int *total_flags, ··· 1489 1489 void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw); 1490 1490 void rt2x00mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1491 1491 u32 queues, bool drop); 1492 - int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); 1493 - int rt2x00mac_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); 1492 + int rt2x00mac_set_antenna(struct ieee80211_hw *hw, int radio_idx, 1493 + u32 tx_ant, u32 rx_ant); 1494 + int rt2x00mac_get_antenna(struct ieee80211_hw *hw, int radio_idx, 1495 + u32 *tx_ant, u32 *rx_ant); 1494 1496 void rt2x00mac_get_ringparam(struct ieee80211_hw *hw, 1495 1497 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); 1496 1498 bool rt2x00mac_tx_frames_pending(struct ieee80211_hw *hw);
+5 -3
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
··· 304 304 } 305 305 EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface); 306 306 307 - int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) 307 + int rt2x00mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 308 308 { 309 309 struct rt2x00_dev *rt2x00dev = hw->priv; 310 310 struct ieee80211_conf *conf = &hw->conf; ··· 740 740 } 741 741 EXPORT_SYMBOL_GPL(rt2x00mac_flush); 742 742 743 - int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 743 + int rt2x00mac_set_antenna(struct ieee80211_hw *hw, int radio_idx, 744 + u32 tx_ant, u32 rx_ant) 744 745 { 745 746 struct rt2x00_dev *rt2x00dev = hw->priv; 746 747 struct link_ant *ant = &rt2x00dev->link.ant; ··· 786 785 } 787 786 EXPORT_SYMBOL_GPL(rt2x00mac_set_antenna); 788 787 789 - int rt2x00mac_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 788 + int rt2x00mac_get_antenna(struct ieee80211_hw *hw, int radio_idx, 789 + u32 *tx_ant, u32 *rx_ant) 790 790 { 791 791 struct rt2x00_dev *rt2x00dev = hw->priv; 792 792 struct link_ant *ant = &rt2x00dev->link.ant;
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
··· 1370 1370 priv->vif = NULL; 1371 1371 } 1372 1372 1373 - static int rtl8180_config(struct ieee80211_hw *dev, u32 changed) 1373 + static int rtl8180_config(struct ieee80211_hw *dev, int radio_idx, u32 changed) 1374 1374 { 1375 1375 struct rtl8180_priv *priv = dev->priv; 1376 1376 struct ieee80211_conf *conf = &dev->conf;
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
··· 1151 1151 mutex_unlock(&priv->conf_mutex); 1152 1152 } 1153 1153 1154 - static int rtl8187_config(struct ieee80211_hw *dev, u32 changed) 1154 + static int rtl8187_config(struct ieee80211_hw *dev, int radio_idx, u32 changed) 1155 1155 { 1156 1156 struct rtl8187_priv *priv = dev->priv; 1157 1157 struct ieee80211_conf *conf = &dev->conf;
+5 -3
drivers/net/wireless/realtek/rtl8xxxu/core.c
··· 4552 4552 } 4553 4553 4554 4554 static 4555 - int rtl8xxxu_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 4555 + int rtl8xxxu_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant, 4556 + u32 *rx_ant) 4556 4557 { 4557 4558 struct rtl8xxxu_priv *priv = hw->priv; 4558 4559 ··· 6840 6839 priv->vifs[rtlvif->port_num] = NULL; 6841 6840 } 6842 6841 6843 - static int rtl8xxxu_config(struct ieee80211_hw *hw, u32 changed) 6842 + static int rtl8xxxu_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 6844 6843 { 6845 6844 struct rtl8xxxu_priv *priv = hw->priv; 6846 6845 struct device *dev = &priv->udev->dev; ··· 6989 6988 FIF_PROBE_REQ); 6990 6989 } 6991 6990 6992 - static int rtl8xxxu_set_rts_threshold(struct ieee80211_hw *hw, u32 rts) 6991 + static int rtl8xxxu_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 6992 + u32 rts) 6993 6993 { 6994 6994 if (rts > 2347 && rts != (u32)-1) 6995 6995 return -EINVAL;
+1 -1
drivers/net/wireless/realtek/rtlwifi/core.c
··· 566 566 } 567 567 #endif 568 568 569 - static int rtl_op_config(struct ieee80211_hw *hw, u32 changed) 569 + static int rtl_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 570 570 { 571 571 struct rtl_priv *rtlpriv = rtl_priv(hw); 572 572 struct rtl_phy *rtlphy = &(rtlpriv->phy);
+6 -3
drivers/net/wireless/realtek/rtw88/mac80211.c
··· 71 71 mutex_unlock(&rtwdev->mutex); 72 72 } 73 73 74 - static int rtw_ops_config(struct ieee80211_hw *hw, u32 changed) 74 + static int rtw_ops_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 75 75 { 76 76 struct rtw_dev *rtwdev = hw->priv; 77 77 int ret = 0; ··· 708 708 mutex_unlock(&rtwdev->mutex); 709 709 } 710 710 711 - static int rtw_ops_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 711 + static int rtw_ops_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 712 + u32 value) 712 713 { 713 714 struct rtw_dev *rtwdev = hw->priv; 714 715 ··· 798 797 } 799 798 800 799 static int rtw_ops_set_antenna(struct ieee80211_hw *hw, 800 + int radio_idx, 801 801 u32 tx_antenna, 802 802 u32 rx_antenna) 803 803 { ··· 810 808 return -EOPNOTSUPP; 811 809 812 810 mutex_lock(&rtwdev->mutex); 813 - ret = chip->ops->set_antenna(rtwdev, tx_antenna, rx_antenna); 811 + ret = chip->ops->set_antenna(rtwdev, -1, tx_antenna, rx_antenna); 814 812 mutex_unlock(&rtwdev->mutex); 815 813 816 814 return ret; 817 815 } 818 816 819 817 static int rtw_ops_get_antenna(struct ieee80211_hw *hw, 818 + int radio_idx, 820 819 u32 *tx_antenna, 821 820 u32 *rx_antenna) 822 821 {
+1 -1
drivers/net/wireless/realtek/rtw88/main.h
··· 873 873 void (*set_tx_power_index)(struct rtw_dev *rtwdev); 874 874 int (*rsvd_page_dump)(struct rtw_dev *rtwdev, u8 *buf, u32 offset, 875 875 u32 size); 876 - int (*set_antenna)(struct rtw_dev *rtwdev, 876 + int (*set_antenna)(struct rtw_dev *rtwdev, int radio_idx, 877 877 u32 antenna_tx, 878 878 u32 antenna_rx); 879 879 void (*cfg_ldo25)(struct rtw_dev *rtwdev, bool enable);
+1
drivers/net/wireless/realtek/rtw88/rtw8822b.c
··· 983 983 } 984 984 985 985 static int rtw8822b_set_antenna(struct rtw_dev *rtwdev, 986 + int radio_idx, 986 987 u32 antenna_tx, 987 988 u32 antenna_rx) 988 989 {
+1
drivers/net/wireless/realtek/rtw88/rtw8822c.c
··· 2767 2767 } 2768 2768 2769 2769 static int rtw8822c_set_antenna(struct rtw_dev *rtwdev, 2770 + int radio_idx, 2770 2771 u32 antenna_tx, 2771 2772 u32 antenna_rx) 2772 2773 {
+6 -4
drivers/net/wireless/realtek/rtw89/mac80211.c
··· 72 72 rtw89_core_stop(rtwdev); 73 73 } 74 74 75 - static int rtw89_ops_config(struct ieee80211_hw *hw, u32 changed) 75 + static int rtw89_ops_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 76 76 { 77 77 struct rtw89_dev *rtwdev = hw->priv; 78 78 ··· 1007 1007 return 0; 1008 1008 } 1009 1009 1010 - static int rtw89_ops_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 1010 + static int rtw89_ops_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 1011 + u32 value) 1011 1012 { 1012 1013 struct rtw89_dev *rtwdev = hw->priv; 1013 1014 ··· 1120 1119 } 1121 1120 1122 1121 static 1123 - int rtw89_ops_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) 1122 + int rtw89_ops_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, u32 rx_ant) 1124 1123 { 1125 1124 struct rtw89_dev *rtwdev = hw->priv; 1126 1125 struct rtw89_hal *hal = &rtwdev->hal; ··· 1143 1142 } 1144 1143 1145 1144 static 1146 - int rtw89_ops_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) 1145 + int rtw89_ops_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant, 1146 + u32 *rx_ant) 1147 1147 { 1148 1148 struct rtw89_dev *rtwdev = hw->priv; 1149 1149 struct rtw89_hal *hal = &rtwdev->hal;
+8 -1
drivers/net/wireless/rsi/rsi_91x_mac80211.c
··· 656 656 * requests. The stack calls this function to 657 657 * change hardware configuration, e.g., channel. 658 658 * @hw: Pointer to the ieee80211_hw structure. 659 + * @radio_idx: Radio index. 659 660 * @changed: Changed flags set. 660 661 * 661 662 * Return: 0 on success, negative error code on failure. 662 663 */ 663 664 static int rsi_mac80211_config(struct ieee80211_hw *hw, 665 + int radio_idx, 664 666 u32 changed) 665 667 { 666 668 struct rsi_hw *adapter = hw->priv; ··· 1203 1201 /** 1204 1202 * rsi_mac80211_set_rts_threshold() - This function sets rts threshold value. 1205 1203 * @hw: Pointer to the ieee80211_hw structure. 1204 + * @radio_idx: Radio index. 1206 1205 * @value: Rts threshold value. 1207 1206 * 1208 1207 * Return: 0 on success. 1209 1208 */ 1210 1209 static int rsi_mac80211_set_rts_threshold(struct ieee80211_hw *hw, 1211 - u32 value) 1210 + int radio_idx, u32 value) 1212 1211 { 1213 1212 struct rsi_hw *adapter = hw->priv; 1214 1213 struct rsi_common *common = adapter->priv; ··· 1586 1583 * rsi_mac80211_set_antenna() - This function is used to configure 1587 1584 * tx and rx antennas. 1588 1585 * @hw: Pointer to the ieee80211_hw structure. 1586 + * @radio_idx: Radio index 1589 1587 * @tx_ant: Bitmap for tx antenna 1590 1588 * @rx_ant: Bitmap for rx antenna 1591 1589 * 1592 1590 * Return: 0 on success, Negative error code on failure. 1593 1591 */ 1594 1592 static int rsi_mac80211_set_antenna(struct ieee80211_hw *hw, 1593 + int radio_idx, 1595 1594 u32 tx_ant, u32 rx_ant) 1596 1595 { 1597 1596 struct rsi_hw *adapter = hw->priv; ··· 1639 1634 * tx and rx antennas. 1640 1635 * 1641 1636 * @hw: Pointer to the ieee80211_hw structure. 1637 + * @radio_idx: Radio index 1642 1638 * @tx_ant: Bitmap for tx antenna 1643 1639 * @rx_ant: Bitmap for rx antenna 1644 1640 * 1645 1641 * Return: 0 on success, negative error codes on failure. 1646 1642 */ 1647 1643 static int rsi_mac80211_get_antenna(struct ieee80211_hw *hw, 1644 + int radio_idx, 1648 1645 u32 *tx_ant, u32 *rx_ant) 1649 1646 { 1650 1647 struct rsi_hw *adapter = hw->priv;
+2 -2
drivers/net/wireless/silabs/wfx/sta.c
··· 220 220 return 0; 221 221 } 222 222 223 - int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 223 + int wfx_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 value) 224 224 { 225 225 struct wfx_dev *wdev = hw->priv; 226 226 struct wfx_vif *wvif = NULL; ··· 706 706 wvif->channel = NULL; 707 707 } 708 708 709 - int wfx_config(struct ieee80211_hw *hw, u32 changed) 709 + int wfx_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 710 710 { 711 711 return 0; 712 712 }
+2 -2
drivers/net/wireless/silabs/wfx/sta.h
··· 21 21 /* mac80211 interface */ 22 22 int wfx_start(struct ieee80211_hw *hw); 23 23 void wfx_stop(struct ieee80211_hw *hw, bool suspend); 24 - int wfx_config(struct ieee80211_hw *hw, u32 changed); 25 - int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value); 24 + int wfx_config(struct ieee80211_hw *hw, int radio_idx, u32 changed); 25 + int wfx_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 value); 26 26 void wfx_set_default_unicast_key(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int idx); 27 27 void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, 28 28 unsigned int *total_flags, u64 unused);
+3 -2
drivers/net/wireless/st/cw1200/sta.c
··· 321 321 return ret; 322 322 } 323 323 324 - int cw1200_config(struct ieee80211_hw *dev, u32 changed) 324 + int cw1200_config(struct ieee80211_hw *dev, int radio_idx, u32 changed) 325 325 { 326 326 int ret = 0; 327 327 struct cw1200_common *priv = dev->priv; ··· 857 857 wsm_unlock_tx(priv); 858 858 } 859 859 860 - int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 860 + int cw1200_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 861 + u32 value) 861 862 { 862 863 int ret = 0; 863 864 __le32 val32;
+3 -2
drivers/net/wireless/st/cw1200/sta.h
··· 22 22 struct ieee80211_vif *vif, 23 23 enum nl80211_iftype new_type, 24 24 bool p2p); 25 - int cw1200_config(struct ieee80211_hw *dev, u32 changed); 25 + int cw1200_config(struct ieee80211_hw *dev, int radio_idx, u32 changed); 26 26 void cw1200_configure_filter(struct ieee80211_hw *dev, 27 27 unsigned int changed_flags, 28 28 unsigned int *total_flags, ··· 36 36 struct ieee80211_vif *vif, struct ieee80211_sta *sta, 37 37 struct ieee80211_key_conf *key); 38 38 39 - int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value); 39 + int cw1200_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 40 + u32 value); 40 41 41 42 void cw1200_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 42 43 u32 queues, bool drop);
+3 -2
drivers/net/wireless/ti/wl1251/main.c
··· 589 589 return (conf->flags & IEEE80211_CONF_PS) && !wl->monitor_present; 590 590 } 591 591 592 - static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) 592 + static int wl1251_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 593 593 { 594 594 struct wl1251 *wl = hw->priv; 595 595 struct ieee80211_conf *conf = &hw->conf; ··· 1051 1051 return ret; 1052 1052 } 1053 1053 1054 - static int wl1251_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 1054 + static int wl1251_op_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 1055 + u32 value) 1055 1056 { 1056 1057 struct wl1251 *wl = hw->priv; 1057 1058 int ret;
+5 -3
drivers/net/wireless/ti/wlcore/main.c
··· 3166 3166 return 0; 3167 3167 } 3168 3168 3169 - static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed) 3169 + static int wl1271_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 3170 3170 { 3171 3171 struct wl1271 *wl = hw->priv; 3172 3172 struct wl12xx_vif *wlvif; ··· 3895 3895 return 0; 3896 3896 } 3897 3897 3898 - static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value) 3898 + static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, 3899 + int radio_idx, u32 value) 3899 3900 { 3900 3901 struct wl1271 *wl = hw->priv; 3901 3902 int ret = 0; ··· 3925 3924 return ret; 3926 3925 } 3927 3926 3928 - static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 3927 + static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, 3928 + u32 value) 3929 3929 { 3930 3930 struct wl1271 *wl = hw->priv; 3931 3931 struct wl12xx_vif *wlvif;
+4 -2
drivers/net/wireless/virtual/mac80211_hwsim.c
··· 2381 2381 [NL80211_CHAN_WIDTH_320] = "eht320", 2382 2382 }; 2383 2383 2384 - static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed) 2384 + static int mac80211_hwsim_config(struct ieee80211_hw *hw, int radio_idx, 2385 + u32 changed) 2385 2386 { 2386 2387 struct mac80211_hwsim_data *data = hw->priv; 2387 2388 struct ieee80211_conf *conf = &hw->conf; ··· 3339 3338 return 1; 3340 3339 } 3341 3340 3342 - static int mac80211_hwsim_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 3341 + static int mac80211_hwsim_set_rts_threshold(struct ieee80211_hw *hw, 3342 + int radio_idx, u32 value) 3343 3343 { 3344 3344 return -EOPNOTSUPP; 3345 3345 }
+1 -1
drivers/net/wireless/zydas/zd1211rw/zd_mac.c
··· 1133 1133 zd_mac_free_cur_beacon(mac); 1134 1134 } 1135 1135 1136 - static int zd_op_config(struct ieee80211_hw *hw, u32 changed) 1136 + static int zd_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed) 1137 1137 { 1138 1138 struct zd_mac *mac = zd_hw_mac(hw); 1139 1139 struct ieee80211_conf *conf = &hw->conf;
+4 -2
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
··· 1298 1298 return ret; 1299 1299 } 1300 1300 1301 - static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed) 1301 + static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, int radio_idx, 1302 + u32 changed) 1302 1303 { 1303 1304 return 0; 1304 1305 } ··· 1796 1795 } 1797 1796 1798 1797 static int cfg80211_rtw_set_txpower(struct wiphy *wiphy, 1799 - struct wireless_dev *wdev, 1798 + struct wireless_dev *wdev, int radio_idx, 1800 1799 enum nl80211_tx_power_setting type, int mbm) 1801 1800 { 1802 1801 return 0; ··· 1804 1803 1805 1804 static int cfg80211_rtw_get_txpower(struct wiphy *wiphy, 1806 1805 struct wireless_dev *wdev, 1806 + int radio_idx, 1807 1807 unsigned int link_id, int *dbm) 1808 1808 { 1809 1809 *dbm = (12);
+8 -4
include/net/cfg80211.h
··· 4853 4853 int (*set_mcast_rate)(struct wiphy *wiphy, struct net_device *dev, 4854 4854 int rate[NUM_NL80211_BANDS]); 4855 4855 4856 - int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); 4856 + int (*set_wiphy_params)(struct wiphy *wiphy, int radio_idx, 4857 + u32 changed); 4857 4858 4858 4859 int (*set_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, 4860 + int radio_idx, 4859 4861 enum nl80211_tx_power_setting type, int mbm); 4860 4862 int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, 4861 - unsigned int link_id, int *dbm); 4863 + int radio_idx, unsigned int link_id, int *dbm); 4862 4864 4863 4865 void (*rfkill_poll)(struct wiphy *wiphy); 4864 4866 ··· 4922 4920 struct wireless_dev *wdev, 4923 4921 struct mgmt_frame_regs *upd); 4924 4922 4925 - int (*set_antenna)(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant); 4926 - int (*get_antenna)(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant); 4923 + int (*set_antenna)(struct wiphy *wiphy, int radio_idx, 4924 + u32 tx_ant, u32 rx_ant); 4925 + int (*get_antenna)(struct wiphy *wiphy, int radio_idx, 4926 + u32 *tx_ant, u32 *rx_ant); 4927 4927 4928 4928 int (*sched_scan_start)(struct wiphy *wiphy, 4929 4929 struct net_device *dev,
+11 -6
include/net/mac80211.h
··· 4517 4517 enum nl80211_iftype new_type, bool p2p); 4518 4518 void (*remove_interface)(struct ieee80211_hw *hw, 4519 4519 struct ieee80211_vif *vif); 4520 - int (*config)(struct ieee80211_hw *hw, u32 changed); 4520 + int (*config)(struct ieee80211_hw *hw, int radio_idx, u32 changed); 4521 4521 void (*bss_info_changed)(struct ieee80211_hw *hw, 4522 4522 struct ieee80211_vif *vif, 4523 4523 struct ieee80211_bss_conf *info, ··· 4580 4580 void (*get_key_seq)(struct ieee80211_hw *hw, 4581 4581 struct ieee80211_key_conf *key, 4582 4582 struct ieee80211_key_seq *seq); 4583 - int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value); 4584 - int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value); 4583 + int (*set_frag_threshold)(struct ieee80211_hw *hw, int radio_idx, 4584 + u32 value); 4585 + int (*set_rts_threshold)(struct ieee80211_hw *hw, int radio_idx, 4586 + u32 value); 4585 4587 int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 4586 4588 struct ieee80211_sta *sta); 4587 4589 int (*sta_remove)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ··· 4680 4678 int (*get_survey)(struct ieee80211_hw *hw, int idx, 4681 4679 struct survey_info *survey); 4682 4680 void (*rfkill_poll)(struct ieee80211_hw *hw); 4683 - void (*set_coverage_class)(struct ieee80211_hw *hw, s16 coverage_class); 4681 + void (*set_coverage_class)(struct ieee80211_hw *hw, int radio_idx, 4682 + s16 coverage_class); 4684 4683 #ifdef CONFIG_NL80211_TESTMODE 4685 4684 int (*testmode_cmd)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 4686 4685 void *data, int len); ··· 4696 4693 void (*channel_switch)(struct ieee80211_hw *hw, 4697 4694 struct ieee80211_vif *vif, 4698 4695 struct ieee80211_channel_switch *ch_switch); 4699 - int (*set_antenna)(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); 4700 - int (*get_antenna)(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); 4696 + int (*set_antenna)(struct ieee80211_hw *hw, int radio_idx, 4697 + u32 tx_ant, u32 rx_ant); 4698 + int (*get_antenna)(struct ieee80211_hw *hw, int radio_idx, 4699 + u32 *tx_ant, u32 *rx_ant); 4701 4700 4702 4701 int (*remain_on_channel)(struct ieee80211_hw *hw, 4703 4702 struct ieee80211_vif *vif,
+10
include/uapi/linux/nl80211.h
··· 2907 2907 * APs Support". Drivers may set additional flags that they support 2908 2908 * in the kernel or device. 2909 2909 * 2910 + * @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index 2911 + * of the radio in interest. Internally a value of -1 is used to 2912 + * indicate that the radio id is not given in user-space. This means 2913 + * that all the attributes are applicable to all the radios. If there is 2914 + * a radio index provided in user-space, the attributes will be 2915 + * applicable to that specific radio only. If the radio id is greater 2916 + * thank the number of radios, error denoting invalid value is returned. 2917 + * 2910 2918 * @NUM_NL80211_ATTR: total number of nl80211_attrs available 2911 2919 * @NL80211_ATTR_MAX: highest attribute number currently defined 2912 2920 * @__NL80211_ATTR_AFTER_LAST: internal use ··· 3471 3463 NL80211_ATTR_EPCS, 3472 3464 3473 3465 NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS, 3466 + 3467 + NL80211_ATTR_WIPHY_RADIO_INDEX, 3474 3468 3475 3469 /* add attributes here, update the policy in nl80211.c */ 3476 3470
+19 -11
net/mac80211/cfg.c
··· 3045 3045 return 0; 3046 3046 } 3047 3047 3048 - static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) 3048 + static int ieee80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx, 3049 + u32 changed) 3049 3050 { 3050 3051 struct ieee80211_local *local = wiphy_priv(wiphy); 3051 3052 int err; ··· 3054 3053 if (changed & WIPHY_PARAM_FRAG_THRESHOLD) { 3055 3054 ieee80211_check_fast_xmit_all(local); 3056 3055 3057 - err = drv_set_frag_threshold(local, wiphy->frag_threshold); 3056 + err = drv_set_frag_threshold(local, radio_idx, 3057 + wiphy->frag_threshold); 3058 3058 3059 3059 if (err) { 3060 3060 ieee80211_check_fast_xmit_all(local); ··· 3069 3067 3070 3068 coverage_class = changed & WIPHY_PARAM_COVERAGE_CLASS ? 3071 3069 wiphy->coverage_class : -1; 3072 - err = drv_set_coverage_class(local, coverage_class); 3070 + err = drv_set_coverage_class(local, radio_idx, 3071 + coverage_class); 3073 3072 3074 3073 if (err) 3075 3074 return err; 3076 3075 } 3077 3076 3078 3077 if (changed & WIPHY_PARAM_RTS_THRESHOLD) { 3079 - err = drv_set_rts_threshold(local, wiphy->rts_threshold); 3078 + err = drv_set_rts_threshold(local, radio_idx, 3079 + wiphy->rts_threshold); 3080 3080 3081 3081 if (err) 3082 3082 return err; ··· 3096 3092 } 3097 3093 if (changed & 3098 3094 (WIPHY_PARAM_RETRY_SHORT | WIPHY_PARAM_RETRY_LONG)) 3099 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_RETRY_LIMITS); 3095 + ieee80211_hw_config(local, radio_idx, 3096 + IEEE80211_CONF_CHANGE_RETRY_LIMITS); 3100 3097 3101 3098 if (changed & (WIPHY_PARAM_TXQ_LIMIT | 3102 3099 WIPHY_PARAM_TXQ_MEMORY_LIMIT | 3103 3100 WIPHY_PARAM_TXQ_QUANTUM)) 3104 - ieee80211_txq_set_params(local); 3101 + ieee80211_txq_set_params(local, radio_idx); 3105 3102 3106 3103 return 0; 3107 3104 } 3108 3105 3109 3106 static int ieee80211_set_tx_power(struct wiphy *wiphy, 3110 - struct wireless_dev *wdev, 3107 + struct wireless_dev *wdev, int radio_idx, 3111 3108 enum nl80211_tx_power_setting type, int mbm) 3112 3109 { 3113 3110 struct ieee80211_local *local = wiphy_priv(wiphy); ··· 3236 3231 3237 3232 static int ieee80211_get_tx_power(struct wiphy *wiphy, 3238 3233 struct wireless_dev *wdev, 3234 + int radio_idx, 3239 3235 unsigned int link_id, 3240 3236 int *dbm) 3241 3237 { ··· 3415 3409 } 3416 3410 3417 3411 if (ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS)) 3418 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 3412 + ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS); 3419 3413 3420 3414 ieee80211_recalc_ps(local); 3421 3415 ieee80211_recalc_ps_vif(sdata); ··· 4311 4305 ieee80211_configure_filter(local); 4312 4306 } 4313 4307 4314 - static int ieee80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) 4308 + static int ieee80211_set_antenna(struct wiphy *wiphy, int radio_idx, 4309 + u32 tx_ant, u32 rx_ant) 4315 4310 { 4316 4311 struct ieee80211_local *local = wiphy_priv(wiphy); 4317 4312 int ret; ··· 4328 4321 return 0; 4329 4322 } 4330 4323 4331 - static int ieee80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant) 4324 + static int ieee80211_get_antenna(struct wiphy *wiphy, int radio_idx, 4325 + u32 *tx_ant, u32 *rx_ant) 4332 4326 { 4333 4327 struct ieee80211_local *local = wiphy_priv(wiphy); 4334 4328 4335 - return drv_get_antenna(local, tx_ant, rx_ant); 4329 + return drv_get_antenna(local, radio_idx, tx_ant, rx_ant); 4336 4330 } 4337 4331 4338 4332 static int ieee80211_set_rekey_data(struct wiphy *wiphy,
+1 -1
net/mac80211/chan.c
··· 744 744 /* turn idle off *before* setting channel -- some drivers need that */ 745 745 changed = ieee80211_idle_off(local); 746 746 if (changed) 747 - ieee80211_hw_config(local, changed); 747 + ieee80211_hw_config(local, -1, changed); 748 748 749 749 err = drv_add_chanctx(local, ctx); 750 750 if (err) {
+20 -16
net/mac80211/driver-ops.h
··· 143 143 void drv_remove_interface(struct ieee80211_local *local, 144 144 struct ieee80211_sub_if_data *sdata); 145 145 146 - static inline int drv_config(struct ieee80211_local *local, u32 changed) 146 + static inline int drv_config(struct ieee80211_local *local, int radio_idx, 147 + u32 changed) 147 148 { 148 149 int ret; 149 150 150 151 might_sleep(); 151 152 lockdep_assert_wiphy(local->hw.wiphy); 152 153 153 - trace_drv_config(local, changed); 154 - ret = local->ops->config(&local->hw, changed); 154 + trace_drv_config(local, radio_idx, changed); 155 + ret = local->ops->config(&local->hw, radio_idx, changed); 155 156 trace_drv_return_int(local, ret); 156 157 return ret; 157 158 } ··· 388 387 } 389 388 390 389 static inline int drv_set_frag_threshold(struct ieee80211_local *local, 391 - u32 value) 390 + int radio_idx, u32 value) 392 391 { 393 392 int ret = 0; 394 393 395 394 might_sleep(); 396 395 lockdep_assert_wiphy(local->hw.wiphy); 397 396 398 - trace_drv_set_frag_threshold(local, value); 397 + trace_drv_set_frag_threshold(local, radio_idx, value); 399 398 if (local->ops->set_frag_threshold) 400 - ret = local->ops->set_frag_threshold(&local->hw, value); 399 + ret = local->ops->set_frag_threshold(&local->hw, radio_idx, 400 + value); 401 401 trace_drv_return_int(local, ret); 402 402 return ret; 403 403 } 404 404 405 405 static inline int drv_set_rts_threshold(struct ieee80211_local *local, 406 - u32 value) 406 + int radio_idx, u32 value) 407 407 { 408 408 int ret = 0; 409 409 410 410 might_sleep(); 411 411 lockdep_assert_wiphy(local->hw.wiphy); 412 412 413 - trace_drv_set_rts_threshold(local, value); 413 + trace_drv_set_rts_threshold(local, radio_idx, value); 414 414 if (local->ops->set_rts_threshold) 415 - ret = local->ops->set_rts_threshold(&local->hw, value); 415 + ret = local->ops->set_rts_threshold(&local->hw, radio_idx, 416 + value); 416 417 trace_drv_return_int(local, ret); 417 418 return ret; 418 419 } 419 420 420 421 static inline int drv_set_coverage_class(struct ieee80211_local *local, 421 - s16 value) 422 + int radio_idx, s16 value) 422 423 { 423 424 int ret = 0; 424 425 might_sleep(); 425 426 lockdep_assert_wiphy(local->hw.wiphy); 426 427 427 - trace_drv_set_coverage_class(local, value); 428 + trace_drv_set_coverage_class(local, radio_idx, value); 428 429 if (local->ops->set_coverage_class) 429 - local->ops->set_coverage_class(&local->hw, value); 430 + local->ops->set_coverage_class(&local->hw, radio_idx, value); 430 431 else 431 432 ret = -EOPNOTSUPP; 432 433 ··· 775 772 might_sleep(); 776 773 lockdep_assert_wiphy(local->hw.wiphy); 777 774 if (local->ops->set_antenna) 778 - ret = local->ops->set_antenna(&local->hw, tx_ant, rx_ant); 775 + ret = local->ops->set_antenna(&local->hw, -1, tx_ant, rx_ant); 779 776 trace_drv_set_antenna(local, tx_ant, rx_ant, ret); 780 777 return ret; 781 778 } 782 779 783 - static inline int drv_get_antenna(struct ieee80211_local *local, 780 + static inline int drv_get_antenna(struct ieee80211_local *local, int radio_idx, 784 781 u32 *tx_ant, u32 *rx_ant) 785 782 { 786 783 int ret = -EOPNOTSUPP; 787 784 might_sleep(); 788 785 lockdep_assert_wiphy(local->hw.wiphy); 789 786 if (local->ops->get_antenna) 790 - ret = local->ops->get_antenna(&local->hw, tx_ant, rx_ant); 791 - trace_drv_get_antenna(local, *tx_ant, *rx_ant, ret); 787 + ret = local->ops->get_antenna(&local->hw, radio_idx, 788 + tx_ant, rx_ant); 789 + trace_drv_get_antenna(local, radio_idx, *tx_ant, *rx_ant, ret); 792 790 return ret; 793 791 } 794 792
+3 -2
net/mac80211/ieee80211_i.h
··· 1872 1872 struct ieee80211_rx_status *status, 1873 1873 unsigned int mpdu_len, 1874 1874 unsigned int mpdu_offset); 1875 - int ieee80211_hw_config(struct ieee80211_local *local, u32 changed); 1875 + int ieee80211_hw_config(struct ieee80211_local *local, int radio_idx, 1876 + u32 changed); 1876 1877 int ieee80211_hw_conf_chan(struct ieee80211_local *local); 1877 1878 void ieee80211_hw_conf_init(struct ieee80211_local *local); 1878 1879 void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx); ··· 2543 2542 } 2544 2543 2545 2544 int ieee80211_txq_setup_flows(struct ieee80211_local *local); 2546 - void ieee80211_txq_set_params(struct ieee80211_local *local); 2545 + void ieee80211_txq_set_params(struct ieee80211_local *local, int radio_idx); 2547 2546 void ieee80211_txq_teardown_flows(struct ieee80211_local *local); 2548 2547 void ieee80211_txq_init(struct ieee80211_sub_if_data *sdata, 2549 2548 struct sta_info *sta,
+3 -3
net/mac80211/iface.c
··· 146 146 { 147 147 u32 change = __ieee80211_recalc_idle(local, false); 148 148 if (change) 149 - ieee80211_hw_config(local, change); 149 + ieee80211_hw_config(local, -1, change); 150 150 } 151 151 152 152 static int ieee80211_verify_mac(struct ieee80211_sub_if_data *sdata, u8 *addr, ··· 726 726 727 727 /* do after stop to avoid reconfiguring when we stop anyway */ 728 728 ieee80211_configure_filter(local); 729 - ieee80211_hw_config(local, hw_reconf_flags); 729 + ieee80211_hw_config(local, -1, hw_reconf_flags); 730 730 731 731 if (local->virt_monitors == local->open_count) 732 732 ieee80211_add_virtual_monitor(local); ··· 1491 1491 if (local->open_count == 1) 1492 1492 ieee80211_hw_conf_init(local); 1493 1493 else if (hw_reconf_flags) 1494 - ieee80211_hw_config(local, hw_reconf_flags); 1494 + ieee80211_hw_config(local, -1, hw_reconf_flags); 1495 1495 1496 1496 ieee80211_recalc_ps(local); 1497 1497
+5 -4
net/mac80211/main.c
··· 190 190 return changed; 191 191 } 192 192 193 - int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) 193 + int ieee80211_hw_config(struct ieee80211_local *local, int radio_idx, 194 + u32 changed) 194 195 { 195 196 int ret = 0; 196 197 ··· 202 201 IEEE80211_CONF_CHANGE_SMPS)); 203 202 204 203 if (changed && local->open_count) { 205 - ret = drv_config(local, changed); 204 + ret = drv_config(local, radio_idx, changed); 206 205 /* 207 206 * Goal: 208 207 * HW reconfiguration should never fail, the driver has told ··· 236 235 if (!changed) 237 236 return 0; 238 237 239 - return drv_config(local, changed); 238 + return drv_config(local, -1, changed); 240 239 } 241 240 242 241 int ieee80211_hw_conf_chan(struct ieee80211_local *local) ··· 270 269 ctx ? &ctx->conf : NULL); 271 270 } 272 271 273 - WARN_ON(drv_config(local, changed)); 272 + WARN_ON(drv_config(local, -1, changed)); 274 273 } 275 274 276 275 int ieee80211_emulate_add_chanctx(struct ieee80211_hw *hw,
+6 -6
net/mac80211/mlme.c
··· 3181 3181 return; 3182 3182 3183 3183 conf->flags |= IEEE80211_CONF_PS; 3184 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 3184 + ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS); 3185 3185 } 3186 3186 } 3187 3187 ··· 3193 3193 ieee80211_enable_ps(local, local->ps_sdata); 3194 3194 } else if (conf->flags & IEEE80211_CONF_PS) { 3195 3195 conf->flags &= ~IEEE80211_CONF_PS; 3196 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 3196 + ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS); 3197 3197 timer_delete_sync(&local->dynamic_ps_timer); 3198 3198 wiphy_work_cancel(local->hw.wiphy, 3199 3199 &local->dynamic_ps_enable_work); ··· 3302 3302 3303 3303 if (local->hw.conf.flags & IEEE80211_CONF_PS) { 3304 3304 local->hw.conf.flags &= ~IEEE80211_CONF_PS; 3305 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 3305 + ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS); 3306 3306 } 3307 3307 3308 3308 ieee80211_wake_queues_by_reason(&local->hw, ··· 3377 3377 (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) { 3378 3378 ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED; 3379 3379 local->hw.conf.flags |= IEEE80211_CONF_PS; 3380 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 3380 + ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS); 3381 3381 } 3382 3382 } 3383 3383 ··· 3986 3986 */ 3987 3987 if (local->hw.conf.flags & IEEE80211_CONF_PS) { 3988 3988 local->hw.conf.flags &= ~IEEE80211_CONF_PS; 3989 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 3989 + ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS); 3990 3990 } 3991 3991 local->ps_sdata = NULL; 3992 3992 ··· 7340 7340 if (local->hw.conf.dynamic_ps_timeout > 0) { 7341 7341 if (local->hw.conf.flags & IEEE80211_CONF_PS) { 7342 7342 local->hw.conf.flags &= ~IEEE80211_CONF_PS; 7343 - ieee80211_hw_config(local, 7343 + ieee80211_hw_config(local, -1, 7344 7344 IEEE80211_CONF_CHANGE_PS); 7345 7345 } 7346 7346 ieee80211_send_nullfunc(local, sdata, false);
+1 -1
net/mac80211/offchannel.c
··· 39 39 if (local->hw.conf.flags & IEEE80211_CONF_PS) { 40 40 offchannel_ps_enabled = true; 41 41 local->hw.conf.flags &= ~IEEE80211_CONF_PS; 42 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 42 + ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS); 43 43 } 44 44 45 45 if (!offchannel_ps_enabled ||
+1 -1
net/mac80211/pm.c
··· 108 108 sdata->u.mgd.powersave && 109 109 !(local->hw.conf.flags & IEEE80211_CONF_PS)) { 110 110 local->hw.conf.flags |= IEEE80211_CONF_PS; 111 - ieee80211_hw_config(local, 111 + ieee80211_hw_config(local, -1, 112 112 IEEE80211_CONF_CHANGE_PS); 113 113 } 114 114 }
+66 -22
net/mac80211/trace.h
··· 384 384 385 385 TRACE_EVENT(drv_config, 386 386 TP_PROTO(struct ieee80211_local *local, 387 + int radio_idx, 387 388 u32 changed), 388 389 389 - TP_ARGS(local, changed), 390 + TP_ARGS(local, radio_idx, changed), 390 391 391 392 TP_STRUCT__entry( 392 393 LOCAL_ENTRY 394 + __field(int, radio_idx) 393 395 __field(u32, changed) 394 396 __field(u32, flags) 395 397 __field(int, power_level) ··· 405 403 406 404 TP_fast_assign( 407 405 LOCAL_ASSIGN; 406 + __entry->radio_idx = radio_idx; 408 407 __entry->changed = changed; 409 408 __entry->flags = local->hw.conf.flags; 410 409 __entry->power_level = local->hw.conf.power_level; ··· 420 417 ), 421 418 422 419 TP_printk( 423 - LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT, 424 - LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG 420 + LOCAL_PR_FMT " radio_idx:%d ch:%#x" CHANDEF_PR_FMT, 421 + LOCAL_PR_ARG, __entry->radio_idx, __entry->changed, CHANDEF_PR_ARG 425 422 ) 426 423 ); 427 424 ··· 821 818 ) 822 819 ); 823 820 824 - DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold, 825 - TP_PROTO(struct ieee80211_local *local, u32 value), 826 - TP_ARGS(local, value) 827 - ); 821 + TRACE_EVENT(drv_set_frag_threshold, 822 + TP_PROTO(struct ieee80211_local *local, int radio_idx, u32 value), 828 823 829 - DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold, 830 - TP_PROTO(struct ieee80211_local *local, u32 value), 831 - TP_ARGS(local, value) 832 - ); 833 - 834 - TRACE_EVENT(drv_set_coverage_class, 835 - TP_PROTO(struct ieee80211_local *local, s16 value), 836 - 837 - TP_ARGS(local, value), 824 + TP_ARGS(local, radio_idx, value), 838 825 839 826 TP_STRUCT__entry( 840 827 LOCAL_ENTRY 828 + __field(int, radio_idx) 829 + __field(u32, value) 830 + ), 831 + 832 + TP_fast_assign( 833 + LOCAL_ASSIGN; 834 + __entry->radio_idx = radio_idx; 835 + __entry->value = value; 836 + ), 837 + 838 + TP_printk( 839 + LOCAL_PR_FMT " radio_id:%d value:%u", 840 + LOCAL_PR_ARG, __entry->radio_idx, __entry->value 841 + ) 842 + ); 843 + 844 + TRACE_EVENT(drv_set_rts_threshold, 845 + TP_PROTO(struct ieee80211_local *local, int radio_idx, u32 value), 846 + 847 + TP_ARGS(local, radio_idx, value), 848 + 849 + TP_STRUCT__entry( 850 + LOCAL_ENTRY 851 + __field(int, radio_idx) 852 + __field(u32, value) 853 + ), 854 + TP_fast_assign( 855 + LOCAL_ASSIGN; 856 + __entry->radio_idx = radio_idx; 857 + __entry->value = value; 858 + ), 859 + 860 + TP_printk( 861 + LOCAL_PR_FMT " radio_id:%d value:%u", 862 + LOCAL_PR_ARG, __entry->radio_idx, __entry->value 863 + ) 864 + ); 865 + 866 + TRACE_EVENT(drv_set_coverage_class, 867 + TP_PROTO(struct ieee80211_local *local, int radio_idx, s16 value), 868 + 869 + TP_ARGS(local, radio_idx, value), 870 + 871 + TP_STRUCT__entry( 872 + LOCAL_ENTRY 873 + __field(int, radio_idx) 841 874 __field(s16, value) 842 875 ), 843 876 844 877 TP_fast_assign( 845 878 LOCAL_ASSIGN; 879 + __entry->radio_idx = radio_idx; 846 880 __entry->value = value; 847 881 ), 848 882 849 883 TP_printk( 850 - LOCAL_PR_FMT " value:%d", 851 - LOCAL_PR_ARG, __entry->value 884 + LOCAL_PR_FMT " radio_id:%d value:%d", 885 + LOCAL_PR_ARG, __entry->radio_idx, __entry->value 852 886 ) 853 887 ); 854 888 ··· 1358 1318 ); 1359 1319 1360 1320 TRACE_EVENT(drv_get_antenna, 1361 - TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), 1321 + TP_PROTO(struct ieee80211_local *local, int radio_idx, u32 tx_ant, 1322 + u32 rx_ant, int ret), 1362 1323 1363 - TP_ARGS(local, tx_ant, rx_ant, ret), 1324 + TP_ARGS(local, radio_idx, tx_ant, rx_ant, ret), 1364 1325 1365 1326 TP_STRUCT__entry( 1366 1327 LOCAL_ENTRY 1328 + __field(int, radio_idx) 1367 1329 __field(u32, tx_ant) 1368 1330 __field(u32, rx_ant) 1369 1331 __field(int, ret) ··· 1373 1331 1374 1332 TP_fast_assign( 1375 1333 LOCAL_ASSIGN; 1334 + __entry->radio_idx = radio_idx; 1376 1335 __entry->tx_ant = tx_ant; 1377 1336 __entry->rx_ant = rx_ant; 1378 1337 __entry->ret = ret; 1379 1338 ), 1380 1339 1381 1340 TP_printk( 1382 - LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", 1383 - LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret 1341 + LOCAL_PR_FMT " radio_idx:%d tx_ant:%d rx_ant:%d ret:%d", 1342 + LOCAL_PR_ARG, __entry->radio_idx, __entry->tx_ant, 1343 + __entry->rx_ant, __entry->ret 1384 1344 ) 1385 1345 ); 1386 1346
+2 -2
net/mac80211/tx.c
··· 1541 1541 spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]); 1542 1542 } 1543 1543 1544 - void ieee80211_txq_set_params(struct ieee80211_local *local) 1544 + void ieee80211_txq_set_params(struct ieee80211_local *local, int radio_idx) 1545 1545 { 1546 1546 if (local->hw.wiphy->txq_limit) 1547 1547 local->fq.limit = local->hw.wiphy->txq_limit; ··· 1605 1605 for (i = 0; i < fq->flows_cnt; i++) 1606 1606 codel_vars_init(&local->cvars[i]); 1607 1607 1608 - ieee80211_txq_set_params(local); 1608 + ieee80211_txq_set_params(local, -1); 1609 1609 1610 1610 return 0; 1611 1611 }
+8 -8
net/mac80211/util.c
··· 1826 1826 } 1827 1827 1828 1828 /* setup fragmentation threshold */ 1829 - drv_set_frag_threshold(local, hw->wiphy->frag_threshold); 1829 + drv_set_frag_threshold(local, -1, hw->wiphy->frag_threshold); 1830 1830 1831 1831 /* setup RTS threshold */ 1832 - drv_set_rts_threshold(local, hw->wiphy->rts_threshold); 1832 + drv_set_rts_threshold(local, -1, hw->wiphy->rts_threshold); 1833 1833 1834 1834 /* reset coverage class */ 1835 - drv_set_coverage_class(local, hw->wiphy->coverage_class); 1835 + drv_set_coverage_class(local, -1, hw->wiphy->coverage_class); 1836 1836 1837 1837 ieee80211_led_radio(local, true); 1838 1838 ieee80211_mod_tpt_led_trig(local, ··· 1890 1890 ieee80211_assign_chanctx(local, sdata, &sdata->deflink); 1891 1891 1892 1892 /* reconfigure hardware */ 1893 - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_LISTEN_INTERVAL | 1894 - IEEE80211_CONF_CHANGE_MONITOR | 1895 - IEEE80211_CONF_CHANGE_PS | 1896 - IEEE80211_CONF_CHANGE_RETRY_LIMITS | 1897 - IEEE80211_CONF_CHANGE_IDLE); 1893 + ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_LISTEN_INTERVAL | 1894 + IEEE80211_CONF_CHANGE_MONITOR | 1895 + IEEE80211_CONF_CHANGE_PS | 1896 + IEEE80211_CONF_CHANGE_RETRY_LIMITS | 1897 + IEEE80211_CONF_CHANGE_IDLE); 1898 1898 1899 1899 ieee80211_configure_filter(local); 1900 1900
+20 -6
net/wireless/nl80211.c
··· 854 854 [NL80211_ATTR_MLO_RECONF_REM_LINKS] = { .type = NLA_U16 }, 855 855 [NL80211_ATTR_EPCS] = { .type = NLA_FLAG }, 856 856 [NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS] = { .type = NLA_U16 }, 857 + [NL80211_ATTR_WIPHY_RADIO_INDEX] = { .type = NLA_U8 }, 857 858 }; 858 859 859 860 /* policy for the key attributes */ ··· 2640 2639 u32 tx_ant = 0, rx_ant = 0; 2641 2640 int res; 2642 2641 2643 - res = rdev_get_antenna(rdev, &tx_ant, &rx_ant); 2642 + res = rdev_get_antenna(rdev, -1, &tx_ant, &rx_ant); 2644 2643 if (!res) { 2645 2644 if (nla_put_u32(msg, 2646 2645 NL80211_ATTR_WIPHY_ANTENNA_TX, ··· 3621 3620 u32 frag_threshold = 0, rts_threshold = 0; 3622 3621 u8 coverage_class = 0; 3623 3622 u32 txq_limit = 0, txq_memory_limit = 0, txq_quantum = 0; 3623 + int radio_idx = -1; 3624 3624 3625 3625 rtnl_lock(); 3626 3626 /* ··· 3671 3669 3672 3670 if (result) 3673 3671 return result; 3672 + 3673 + if (info->attrs[NL80211_ATTR_WIPHY_RADIO_INDEX]) { 3674 + /* Radio idx is not expected for non-multi radio wiphy */ 3675 + if (rdev->wiphy.n_radio <= 0) 3676 + return -EINVAL; 3677 + 3678 + radio_idx = nla_get_u8( 3679 + info->attrs[NL80211_ATTR_WIPHY_RADIO_INDEX]); 3680 + if (radio_idx >= rdev->wiphy.n_radio) 3681 + return -EINVAL; 3682 + } 3674 3683 3675 3684 if (info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS]) { 3676 3685 struct ieee80211_txq_params txq_params; ··· 3772 3759 mbm = nla_get_u32(info->attrs[idx]); 3773 3760 } 3774 3761 3775 - result = rdev_set_tx_power(rdev, txp_wdev, type, mbm); 3762 + result = rdev_set_tx_power(rdev, txp_wdev, radio_idx, type, 3763 + mbm); 3776 3764 if (result) 3777 3765 return result; 3778 3766 } ··· 3799 3785 tx_ant = tx_ant & rdev->wiphy.available_antennas_tx; 3800 3786 rx_ant = rx_ant & rdev->wiphy.available_antennas_rx; 3801 3787 3802 - result = rdev_set_antenna(rdev, tx_ant, rx_ant); 3788 + result = rdev_set_antenna(rdev, radio_idx, tx_ant, rx_ant); 3803 3789 if (result) 3804 3790 return result; 3805 3791 } ··· 3925 3911 if (changed & WIPHY_PARAM_TXQ_QUANTUM) 3926 3912 rdev->wiphy.txq_quantum = txq_quantum; 3927 3913 3928 - result = rdev_set_wiphy_params(rdev, changed); 3914 + result = rdev_set_wiphy_params(rdev, radio_idx, changed); 3929 3915 if (result) { 3930 3916 rdev->wiphy.retry_short = old_retry_short; 3931 3917 rdev->wiphy.retry_long = old_retry_long; ··· 4026 4012 if (rdev->ops->get_tx_power && !wdev->valid_links) { 4027 4013 int dbm, ret; 4028 4014 4029 - ret = rdev_get_tx_power(rdev, wdev, 0, &dbm); 4015 + ret = rdev_get_tx_power(rdev, wdev, -1, 0, &dbm); 4030 4016 if (ret == 0 && 4031 4017 nla_put_u32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL, 4032 4018 DBM_TO_MBM(dbm))) ··· 4098 4084 if (rdev->ops->get_tx_power) { 4099 4085 int dbm, ret; 4100 4086 4101 - ret = rdev_get_tx_power(rdev, wdev, link_id, &dbm); 4087 + ret = rdev_get_tx_power(rdev, wdev, -1, link_id, &dbm); 4102 4088 if (ret == 0 && 4103 4089 nla_put_u32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL, 4104 4090 DBM_TO_MBM(dbm)))
+22 -17
net/wireless/rdev-ops.h
··· 577 577 } 578 578 579 579 static inline int 580 - rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed) 580 + rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, int radio_idx, 581 + u32 changed) 581 582 { 582 583 int ret = -EOPNOTSUPP; 583 584 584 - trace_rdev_set_wiphy_params(&rdev->wiphy, changed); 585 + trace_rdev_set_wiphy_params(&rdev->wiphy, radio_idx, changed); 585 586 if (rdev->ops->set_wiphy_params) 586 - ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed); 587 + ret = rdev->ops->set_wiphy_params(&rdev->wiphy, radio_idx, 588 + changed); 587 589 trace_rdev_return_int(&rdev->wiphy, ret); 588 590 return ret; 589 591 } 590 592 591 593 static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev, 592 - struct wireless_dev *wdev, 593 - enum nl80211_tx_power_setting type, int mbm) 594 + struct wireless_dev *wdev, int radio_idx, 595 + enum nl80211_tx_power_setting type, 596 + int mbm) 594 597 { 595 598 int ret; 596 - trace_rdev_set_tx_power(&rdev->wiphy, wdev, type, mbm); 597 - ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, type, mbm); 599 + trace_rdev_set_tx_power(&rdev->wiphy, wdev, radio_idx, type, mbm); 600 + ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, radio_idx, type, 601 + mbm); 598 602 trace_rdev_return_int(&rdev->wiphy, ret); 599 603 return ret; 600 604 } 601 605 602 606 static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev, 603 - struct wireless_dev *wdev, unsigned int link_id, 604 - int *dbm) 607 + struct wireless_dev *wdev, int radio_idx, 608 + unsigned int link_id, int *dbm) 605 609 { 606 610 int ret; 607 - trace_rdev_get_tx_power(&rdev->wiphy, wdev, link_id); 608 - ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, link_id, dbm); 611 + trace_rdev_get_tx_power(&rdev->wiphy, wdev, radio_idx, link_id); 612 + ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, radio_idx, link_id, 613 + dbm); 609 614 trace_rdev_return_int_int(&rdev->wiphy, ret, *dbm); 610 615 return ret; 611 616 } ··· 862 857 } 863 858 864 859 static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev, 865 - u32 tx_ant, u32 rx_ant) 860 + int radio_idx, u32 tx_ant, u32 rx_ant) 866 861 { 867 862 int ret; 868 - trace_rdev_set_antenna(&rdev->wiphy, tx_ant, rx_ant); 869 - ret = rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant); 863 + trace_rdev_set_antenna(&rdev->wiphy, radio_idx, tx_ant, rx_ant); 864 + ret = rdev->ops->set_antenna(&rdev->wiphy, -1, tx_ant, rx_ant); 870 865 trace_rdev_return_int(&rdev->wiphy, ret); 871 866 return ret; 872 867 } 873 868 874 869 static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev, 875 - u32 *tx_ant, u32 *rx_ant) 870 + int radio_idx, u32 *tx_ant, u32 *rx_ant) 876 871 { 877 872 int ret; 878 - trace_rdev_get_antenna(&rdev->wiphy); 879 - ret = rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant); 873 + trace_rdev_get_antenna(&rdev->wiphy, radio_idx); 874 + ret = rdev->ops->get_antenna(&rdev->wiphy, radio_idx, tx_ant, rx_ant); 880 875 if (ret) 881 876 trace_rdev_return_int(&rdev->wiphy, ret); 882 877 else
+55 -24
net/wireless/trace.h
··· 406 406 TP_ARGS(wiphy) 407 407 ); 408 408 409 - DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna, 410 - TP_PROTO(struct wiphy *wiphy), 411 - TP_ARGS(wiphy) 409 + TRACE_EVENT(rdev_get_antenna, 410 + TP_PROTO(struct wiphy *wiphy, int radio_idx), 411 + TP_ARGS(wiphy, radio_idx), 412 + TP_STRUCT__entry( 413 + WIPHY_ENTRY 414 + __field(int, radio_idx) 415 + ), 416 + TP_fast_assign( 417 + WIPHY_ASSIGN; 418 + __entry->radio_idx = radio_idx; 419 + ), 420 + TP_printk(WIPHY_PR_FMT ", radio_idx: %d", 421 + WIPHY_PR_ARG, __entry->radio_idx) 412 422 ); 413 423 414 424 DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll, ··· 1688 1678 ); 1689 1679 1690 1680 TRACE_EVENT(rdev_set_wiphy_params, 1691 - TP_PROTO(struct wiphy *wiphy, u32 changed), 1692 - TP_ARGS(wiphy, changed), 1681 + TP_PROTO(struct wiphy *wiphy, int radio_idx, u32 changed), 1682 + TP_ARGS(wiphy, radio_idx, changed), 1693 1683 TP_STRUCT__entry( 1694 1684 WIPHY_ENTRY 1685 + __field(int, radio_idx) 1695 1686 __field(u32, changed) 1696 1687 ), 1697 1688 TP_fast_assign( 1698 1689 WIPHY_ASSIGN; 1690 + __entry->radio_idx = radio_idx; 1699 1691 __entry->changed = changed; 1700 1692 ), 1701 - TP_printk(WIPHY_PR_FMT ", changed: %u", 1702 - WIPHY_PR_ARG, __entry->changed) 1693 + TP_printk(WIPHY_PR_FMT ", radio_idx: %d, changed: %u", 1694 + WIPHY_PR_ARG, __entry->radio_idx, __entry->changed) 1703 1695 ); 1704 1696 1705 1697 DECLARE_EVENT_CLASS(wiphy_wdev_link_evt, ··· 1722 1710 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->link_id) 1723 1711 ); 1724 1712 1725 - DEFINE_EVENT(wiphy_wdev_link_evt, rdev_get_tx_power, 1713 + TRACE_EVENT(rdev_get_tx_power, 1726 1714 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1727 - unsigned int link_id), 1728 - TP_ARGS(wiphy, wdev, link_id) 1715 + int radio_idx, unsigned int link_id), 1716 + TP_ARGS(wiphy, wdev, radio_idx, link_id), 1717 + TP_STRUCT__entry( 1718 + WIPHY_ENTRY 1719 + WDEV_ENTRY 1720 + __field(int, radio_idx) 1721 + __field(unsigned int, link_id) 1722 + ), 1723 + TP_fast_assign( 1724 + WIPHY_ASSIGN; 1725 + WDEV_ASSIGN; 1726 + __entry->radio_idx = radio_idx; 1727 + __entry->link_id = link_id; 1728 + ), 1729 + TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT 1730 + ", radio_idx: %d, link_id: %u", 1731 + WIPHY_PR_ARG, WDEV_PR_ARG, 1732 + __entry->radio_idx, __entry->link_id) 1729 1733 ); 1730 1734 1731 1735 TRACE_EVENT(rdev_set_tx_power, 1732 1736 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1733 - enum nl80211_tx_power_setting type, int mbm), 1734 - TP_ARGS(wiphy, wdev, type, mbm), 1737 + int radio_idx, enum nl80211_tx_power_setting type, 1738 + int mbm), 1739 + TP_ARGS(wiphy, wdev, radio_idx, type, mbm), 1735 1740 TP_STRUCT__entry( 1736 1741 WIPHY_ENTRY 1737 1742 WDEV_ENTRY 1743 + __field(int, radio_idx) 1738 1744 __field(enum nl80211_tx_power_setting, type) 1739 1745 __field(int, mbm) 1740 1746 ), 1741 1747 TP_fast_assign( 1742 1748 WIPHY_ASSIGN; 1743 1749 WDEV_ASSIGN; 1750 + __entry->radio_idx = radio_idx; 1744 1751 __entry->type = type; 1745 1752 __entry->mbm = mbm; 1746 1753 ), 1747 - TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d", 1748 - WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm) 1754 + TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT 1755 + ", radio_idx: %d, type: %u, mbm: %d", 1756 + WIPHY_PR_ARG, WDEV_PR_ARG, 1757 + __entry->radio_idx, __entry->type, __entry->mbm) 1749 1758 ); 1750 1759 1751 1760 TRACE_EVENT(rdev_return_int_int, ··· 1899 1866 __entry->rx_max) 1900 1867 ); 1901 1868 1902 - DECLARE_EVENT_CLASS(tx_rx_evt, 1903 - TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), 1904 - TP_ARGS(wiphy, tx, rx), 1869 + TRACE_EVENT(rdev_set_antenna, 1870 + TP_PROTO(struct wiphy *wiphy, int radio_idx, u32 tx, u32 rx), 1871 + TP_ARGS(wiphy, radio_idx, tx, rx), 1905 1872 TP_STRUCT__entry( 1906 1873 WIPHY_ENTRY 1874 + __field(int, radio_idx) 1907 1875 __field(u32, tx) 1908 1876 __field(u32, rx) 1909 1877 ), 1910 1878 TP_fast_assign( 1911 1879 WIPHY_ASSIGN; 1880 + __entry->radio_idx = radio_idx; 1912 1881 __entry->tx = tx; 1913 1882 __entry->rx = rx; 1914 1883 ), 1915 - TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ", 1916 - WIPHY_PR_ARG, __entry->tx, __entry->rx) 1917 - ); 1918 - 1919 - DEFINE_EVENT(tx_rx_evt, rdev_set_antenna, 1920 - TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), 1921 - TP_ARGS(wiphy, tx, rx) 1884 + TP_printk(WIPHY_PR_FMT ", radio_idx: %d, tx: %u, rx: %u ", 1885 + WIPHY_PR_ARG, __entry->radio_idx, 1886 + __entry->tx, __entry->rx) 1922 1887 ); 1923 1888 1924 1889 DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
+5 -5
net/wireless/wext-compat.c
··· 263 263 else 264 264 wdev->wiphy->rts_threshold = rts->value; 265 265 266 - err = rdev_set_wiphy_params(rdev, WIPHY_PARAM_RTS_THRESHOLD); 266 + err = rdev_set_wiphy_params(rdev, -1, WIPHY_PARAM_RTS_THRESHOLD); 267 267 if (err) 268 268 wdev->wiphy->rts_threshold = orts; 269 269 return err; ··· 304 304 wdev->wiphy->frag_threshold = frag->value & ~0x1; 305 305 } 306 306 307 - err = rdev_set_wiphy_params(rdev, WIPHY_PARAM_FRAG_THRESHOLD); 307 + err = rdev_set_wiphy_params(rdev, -1, WIPHY_PARAM_FRAG_THRESHOLD); 308 308 if (err) 309 309 wdev->wiphy->frag_threshold = ofrag; 310 310 return err; ··· 355 355 changed |= WIPHY_PARAM_RETRY_SHORT; 356 356 } 357 357 358 - err = rdev_set_wiphy_params(rdev, changed); 358 + err = rdev_set_wiphy_params(rdev, -1, changed); 359 359 if (err) { 360 360 wdev->wiphy->retry_short = oshort; 361 361 wdev->wiphy->retry_long = olong; ··· 890 890 891 891 guard(wiphy)(&rdev->wiphy); 892 892 893 - return rdev_set_tx_power(rdev, wdev, type, DBM_TO_MBM(dbm)); 893 + return rdev_set_tx_power(rdev, wdev, -1, type, DBM_TO_MBM(dbm)); 894 894 } 895 895 896 896 static int cfg80211_wext_giwtxpower(struct net_device *dev, ··· 910 910 return -EOPNOTSUPP; 911 911 912 912 scoped_guard(wiphy, &rdev->wiphy) { 913 - err = rdev_get_tx_power(rdev, wdev, 0, &val); 913 + err = rdev_get_tx_power(rdev, wdev, -1, 0, &val); 914 914 } 915 915 if (err) 916 916 return err;