]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: cfg80211/mac80211: Add support to get radio index
authorRoopni Devanathan <quic_rdevanat@quicinc.com>
Sun, 15 Jun 2025 08:23:09 +0000 (13:53 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 24 Jun 2025 13:19:27 +0000 (15:19 +0200)
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>
93 files changed:
drivers/net/wireless/admtek/adm8211.c
drivers/net/wireless/ath/ar5523/ar5523.c
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/hw.c
drivers/net/wireless/ath/ath10k/hw.h
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath11k/mac.c
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath5k/mac80211-ops.c
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/ath9k/htc_drv_main.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/carl9170/main.c
drivers/net/wireless/ath/wcn36xx/main.c
drivers/net/wireless/ath/wil6210/cfg80211.c
drivers/net/wireless/atmel/at76c50x-usb.c
drivers/net/wireless/broadcom/b43/main.c
drivers/net/wireless/broadcom/b43legacy/main.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
drivers/net/wireless/intel/iwlegacy/common.c
drivers/net/wireless/intel/iwlegacy/common.h
drivers/net/wireless/intel/iwlwifi/dvm/agn.h
drivers/net/wireless/intel/iwlwifi/dvm/rxon.c
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intersil/p54/main.c
drivers/net/wireless/marvell/libertas_tf/main.c
drivers/net/wireless/marvell/mwifiex/cfg80211.c
drivers/net/wireless/marvell/mwl8k.c
drivers/net/wireless/mediatek/mt76/mac80211.c
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt7603/main.c
drivers/net/wireless/mediatek/mt76/mt7615/main.c
drivers/net/wireless/mediatek/mt76/mt76x0/main.c
drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h
drivers/net/wireless/mediatek/mt76/mt76x02.h
drivers/net/wireless/mediatek/mt76/mt76x02_util.c
drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c
drivers/net/wireless/mediatek/mt76/mt7915/main.c
drivers/net/wireless/mediatek/mt76/mt7921/main.c
drivers/net/wireless/mediatek/mt76/mt7925/main.c
drivers/net/wireless/mediatek/mt76/mt792x.h
drivers/net/wireless/mediatek/mt76/mt792x_core.c
drivers/net/wireless/mediatek/mt76/mt7996/main.c
drivers/net/wireless/mediatek/mt7601u/main.c
drivers/net/wireless/microchip/wilc1000/cfg80211.c
drivers/net/wireless/purelifi/plfxlc/mac.c
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
drivers/net/wireless/ralink/rt2x00/rt2800lib.c
drivers/net/wireless/ralink/rt2x00/rt2800lib.h
drivers/net/wireless/ralink/rt2x00/rt2x00.h
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
drivers/net/wireless/realtek/rtl8xxxu/core.c
drivers/net/wireless/realtek/rtlwifi/core.c
drivers/net/wireless/realtek/rtw88/mac80211.c
drivers/net/wireless/realtek/rtw88/main.h
drivers/net/wireless/realtek/rtw88/rtw8822b.c
drivers/net/wireless/realtek/rtw88/rtw8822c.c
drivers/net/wireless/realtek/rtw89/mac80211.c
drivers/net/wireless/rsi/rsi_91x_mac80211.c
drivers/net/wireless/silabs/wfx/sta.c
drivers/net/wireless/silabs/wfx/sta.h
drivers/net/wireless/st/cw1200/sta.c
drivers/net/wireless/st/cw1200/sta.h
drivers/net/wireless/ti/wl1251/main.c
drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/virtual/mac80211_hwsim.c
drivers/net/wireless/zydas/zd1211rw/zd_mac.c
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
include/net/cfg80211.h
include/net/mac80211.h
include/uapi/linux/nl80211.h
net/mac80211/cfg.c
net/mac80211/chan.c
net/mac80211/driver-ops.h
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/main.c
net/mac80211/mlme.c
net/mac80211/offchannel.c
net/mac80211/pm.c
net/mac80211/trace.h
net/mac80211/tx.c
net/mac80211/util.c
net/wireless/nl80211.c
net/wireless/rdev-ops.h
net/wireless/trace.h
net/wireless/wext-compat.c

index a2d87c3ad196283ac81f21a25f95a8f1c342baa5..e94a6b180314adf581b53ff73b030079708fc657 100644 (file)
@@ -1293,7 +1293,7 @@ static void adm8211_set_bssid(struct ieee80211_hw *dev, const u8 *bssid)
        ADM8211_CSR_WRITE(ABDA1, reg);
 }
 
-static int adm8211_config(struct ieee80211_hw *dev, u32 changed)
+static int adm8211_config(struct ieee80211_hw *dev, int radio_idx, u32 changed)
 {
        struct adm8211_priv *priv = dev->priv;
        struct ieee80211_conf *conf = &dev->conf;
index 343c9de2749c08eea83c7550f9fd82027e5e3166..1230e6278f236b850b1b0ee9f18a8b065cb2da8e 100644 (file)
@@ -1083,7 +1083,8 @@ static void ar5523_stop(struct ieee80211_hw *hw, bool suspend)
        mutex_unlock(&ar->mutex);
 }
 
-static int ar5523_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int ar5523_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                   u32 value)
 {
        struct ar5523 *ar = hw->priv;
        int ret;
@@ -1137,7 +1138,7 @@ static void ar5523_remove_interface(struct ieee80211_hw *hw,
        ar->vif = NULL;
 }
 
-static int ar5523_hwconfig(struct ieee80211_hw *hw, u32 changed)
+static int ar5523_hwconfig(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct ar5523 *ar = hw->priv;
 
index fe3a8f4a1cc1b774ce27112ef7dfe6adb0b4dc2f..52163c2bfe7afb9919c961054f3ddee0f6d83906 100644 (file)
@@ -2606,7 +2606,7 @@ static void ath10k_core_set_coverage_class_work(struct work_struct *work)
                                         set_coverage_class_work);
 
        if (ar->hw_params.hw_ops->set_coverage_class)
-               ar->hw_params.hw_ops->set_coverage_class(ar, -1);
+               ar->hw_params.hw_ops->set_coverage_class(ar, -1, -1);
 }
 
 static int ath10k_core_init_firmware_features(struct ath10k *ar)
index 84b35a22fc23541010aeabcdece6040713298611..59b6cebfdd8f387c957d954106f564e58c6d7d55 100644 (file)
@@ -590,6 +590,7 @@ void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey,
  * function monitors and modifies the corresponding MAC registers.
  */
 static void ath10k_hw_qca988x_set_coverage_class(struct ath10k *ar,
+                                                int radio_idx,
                                                 s16 value)
 {
        u32 slottime_reg;
index 7ffa1fbe2874151f707a33d20419a89f849b16ab..fec56b916497631b58b7f4a720e21c0e21432fa3 100644 (file)
@@ -646,7 +646,7 @@ struct htt_rx_ring_rx_desc_offsets;
 
 /* Defines needed for Rx descriptor abstraction */
 struct ath10k_hw_ops {
-       void (*set_coverage_class)(struct ath10k *ar, s16 value);
+       void (*set_coverage_class)(struct ath10k *ar, int radio_idx, s16 value);
        int (*enable_pll_clk)(struct ath10k *ar);
        int (*tx_data_rssi_pad_bytes)(struct htt_resp *htt);
        int (*is_rssi_enable)(struct htt_resp *resp);
index 07fe05384cdfb13924a956f7d672042b782e166f..590d7a8dd399f83379a68dce6864f4d1dadab997 100644 (file)
@@ -4820,7 +4820,8 @@ void ath10k_halt(struct ath10k *ar)
        spin_unlock_bh(&ar->data_lock);
 }
 
-static int ath10k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+static int ath10k_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                             u32 *tx_ant, u32 *rx_ant)
 {
        struct ath10k *ar = hw->priv;
 
@@ -5067,7 +5068,8 @@ static int __ath10k_set_antenna(struct ath10k *ar, u32 tx_ant, u32 rx_ant)
        return 0;
 }
 
-static int ath10k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+static int ath10k_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                             u32 tx_ant, u32 rx_ant)
 {
        struct ath10k *ar = hw->priv;
        int ret;
@@ -5437,7 +5439,7 @@ static int ath10k_config_ps(struct ath10k *ar)
        return ret;
 }
 
-static int ath10k_config(struct ieee80211_hw *hw, u32 changed)
+static int ath10k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct ath10k *ar = hw->priv;
        struct ieee80211_conf *conf = &hw->conf;
@@ -6336,7 +6338,8 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
        mutex_unlock(&ar->conf_mutex);
 }
 
-static void ath10k_mac_op_set_coverage_class(struct ieee80211_hw *hw, s16 value)
+static void ath10k_mac_op_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
+                                            s16 value)
 {
        struct ath10k *ar = hw->priv;
 
@@ -6347,7 +6350,7 @@ static void ath10k_mac_op_set_coverage_class(struct ieee80211_hw *hw, s16 value)
                WARN_ON_ONCE(1);
                return;
        }
-       ar->hw_params.hw_ops->set_coverage_class(ar, value);
+       ar->hw_params.hw_ops->set_coverage_class(ar, -1, value);
 }
 
 struct ath10k_mac_tdls_iter_data {
@@ -8035,7 +8038,8 @@ static int ath10k_cancel_remain_on_channel(struct ieee80211_hw *hw,
  * in ath10k, but device-specific in mac80211.
  */
 
-static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                   u32 value)
 {
        struct ath10k *ar = hw->priv;
        struct ath10k_vif *arvif;
@@ -8058,7 +8062,8 @@ static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
        return ret;
 }
 
-static int ath10k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
+static int ath10k_mac_op_set_frag_threshold(struct ieee80211_hw *hw,
+                                           int radio_idx, u32 value)
 {
        /* Even though there's a WMI enum for fragmentation threshold no known
         * firmware actually implements it. Moreover it is not possible to rely
index 13301ca317a532b86cc6003d33306672307ea193..758ef6f26432c262343249560edc621c4158519e 100644 (file)
@@ -1283,7 +1283,7 @@ static int ath11k_mac_config_ps(struct ath11k *ar)
        return ret;
 }
 
-static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32 changed)
+static int ath11k_mac_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct ath11k *ar = hw->priv;
        struct ieee80211_conf *conf = &hw->conf;
@@ -7044,7 +7044,8 @@ static void ath11k_mac_op_configure_filter(struct ieee80211_hw *hw,
        mutex_unlock(&ar->conf_mutex);
 }
 
-static int ath11k_mac_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+static int ath11k_mac_op_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                                    u32 *tx_ant, u32 *rx_ant)
 {
        struct ath11k *ar = hw->priv;
 
@@ -7058,7 +7059,8 @@ static int ath11k_mac_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *
        return 0;
 }
 
-static int ath11k_mac_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+static int ath11k_mac_op_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                                    u32 tx_ant, u32 rx_ant)
 {
        struct ath11k *ar = hw->priv;
        int ret;
@@ -8182,7 +8184,8 @@ ath11k_set_vdev_param_to_all_vifs(struct ath11k *ar, int param, u32 value)
 /* mac80211 stores device specific RTS/Fragmentation threshold value,
  * this is set interface specific to firmware from ath11k driver
  */
-static int ath11k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int ath11k_mac_op_set_rts_threshold(struct ieee80211_hw *hw,
+                                          int radio_idx, u32 value)
 {
        struct ath11k *ar = hw->priv;
        int param_id = WMI_VDEV_PARAM_RTS_THRESHOLD;
@@ -8190,7 +8193,8 @@ static int ath11k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
        return ath11k_set_vdev_param_to_all_vifs(ar, param_id, value);
 }
 
-static int ath11k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
+static int ath11k_mac_op_set_frag_threshold(struct ieee80211_hw *hw,
+                                           int radio_idx, u32 value)
 {
        /* Even though there's a WMI vdev param for fragmentation threshold no
         * known firmware actually implements it. Moreover it is not possible to
index 59ec422992d304a5bb3f76cd7c3f0ac0b773da3f..81c6b80fa890c93ea2aced6fb061a3fb145a0494 100644 (file)
@@ -1392,7 +1392,7 @@ err:
        return ret;
 }
 
-static int ath12k_mac_op_config(struct ieee80211_hw *hw, u32 changed)
+static int ath12k_mac_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        return 0;
 }
@@ -9354,7 +9354,8 @@ static void ath12k_mac_op_configure_filter(struct ieee80211_hw *hw,
        ar->filter_flags = *total_flags;
 }
 
-static int ath12k_mac_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+static int ath12k_mac_op_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                                    u32 *tx_ant, u32 *rx_ant)
 {
        struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
        int antennas_rx = 0, antennas_tx = 0;
@@ -9374,7 +9375,8 @@ static int ath12k_mac_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *
        return 0;
 }
 
-static int ath12k_mac_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+static int ath12k_mac_op_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                                    u32 tx_ant, u32 rx_ant)
 {
        struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
        struct ath12k *ar;
@@ -10735,7 +10737,8 @@ ath12k_set_vdev_param_to_all_vifs(struct ath12k *ar, int param, u32 value)
 /* mac80211 stores device specific RTS/Fragmentation threshold value,
  * this is set interface specific to firmware from ath12k driver
  */
-static int ath12k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int ath12k_mac_op_set_rts_threshold(struct ieee80211_hw *hw,
+                                          int radio_idx, u32 value)
 {
        struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
        struct ath12k *ar;
@@ -10760,7 +10763,8 @@ static int ath12k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
        return ret;
 }
 
-static int ath12k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
+static int ath12k_mac_op_set_frag_threshold(struct ieee80211_hw *hw,
+                                           int radio_idx, u32 value)
 {
        /* Even though there's a WMI vdev param for fragmentation threshold no
         * known firmware actually implements it. Moreover it is not possible to
index d81b2ad0b095fc5c2432bc6eb838be488f6b6c9b..eca8145d387491f0c446f41d62f9429bf5f0d813 100644 (file)
@@ -192,7 +192,7 @@ ath5k_remove_interface(struct ieee80211_hw *hw,
  * TODO: Phy disable/diversity etc
  */
 static int
-ath5k_config(struct ieee80211_hw *hw, u32 changed)
+ath5k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct ath5k_hw *ah = hw->priv;
        struct ieee80211_conf *conf = &hw->conf;
@@ -686,6 +686,7 @@ ath5k_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey)
  * ath5k_set_coverage_class - Set IEEE 802.11 coverage class
  *
  * @hw: struct ieee80211_hw pointer
+ * @radio_idx: Radio index
  * @coverage_class: IEEE 802.11 coverage class number
  *
  * Mac80211 callback. Sets slot time, ACK timeout and CTS timeout for given
@@ -693,7 +694,8 @@ ath5k_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey)
  * reset.
  */
 static void
-ath5k_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
+ath5k_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
+                        s16 coverage_class)
 {
        struct ath5k_hw *ah = hw->priv;
 
@@ -704,7 +706,8 @@ ath5k_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
 
 
 static int
-ath5k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+ath5k_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant,
+                 u32 rx_ant)
 {
        struct ath5k_hw *ah = hw->priv;
 
@@ -721,7 +724,8 @@ ath5k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
 
 
 static int
-ath5k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+ath5k_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                 u32 *tx_ant, u32 *rx_ant)
 {
        struct ath5k_hw *ah = hw->priv;
 
index 8c2e8081112e1edb8e6c0ba82a6f34e4243714cc..88f0197fc041a715411484499f11c18be8a6033a 100644 (file)
@@ -1376,7 +1376,8 @@ void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid,
                                     GFP_KERNEL);
 }
 
-static int ath6kl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+static int ath6kl_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
+                                           u32 changed)
 {
        struct ath6kl *ar = (struct ath6kl *)wiphy_priv(wiphy);
        struct ath6kl_vif *vif;
@@ -1405,6 +1406,7 @@ static int ath6kl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 
 static int ath6kl_cfg80211_set_txpower(struct wiphy *wiphy,
                                       struct wireless_dev *wdev,
+                                      int radio_idx,
                                       enum nl80211_tx_power_setting type,
                                       int mbm)
 {
@@ -1441,6 +1443,7 @@ static int ath6kl_cfg80211_set_txpower(struct wiphy *wiphy,
 
 static int ath6kl_cfg80211_get_txpower(struct wiphy *wiphy,
                                       struct wireless_dev *wdev,
+                                      int radio_idx,
                                       unsigned int link_id,
                                       int *dbm)
 {
@@ -3242,7 +3245,7 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
                                        wait, buf, len, no_cck);
 }
 
-static int ath6kl_get_antenna(struct wiphy *wiphy,
+static int ath6kl_get_antenna(struct wiphy *wiphy, int radio_idx,
                              u32 *tx_ant, u32 *rx_ant)
 {
        struct ath6kl *ar = wiphy_priv(wiphy);
index 19600018e562cdc17f6ca7bdb9862521ecde1c79..0d6272ac0dac88d5936f1deca0f9350b1a0c3dd4 100644 (file)
@@ -1172,7 +1172,7 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw,
        mutex_unlock(&priv->mutex);
 }
 
-static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed)
+static int ath9k_htc_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct ath9k_htc_priv *priv = hw->priv;
        struct ath_common *common = ath9k_hw_common(priv->ah);
@@ -1737,12 +1737,14 @@ static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw,
        mutex_unlock(&priv->mutex);
 }
 
-static int ath9k_htc_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int ath9k_htc_set_rts_threshold(struct ieee80211_hw *hw,
+                                      int radio_idx, u32 value)
 {
        return 0;
 }
 
 static void ath9k_htc_set_coverage_class(struct ieee80211_hw *hw,
+                                        int radio_idx,
                                         s16 coverage_class)
 {
        struct ath9k_htc_priv *priv = hw->priv;
@@ -1841,8 +1843,8 @@ struct base_eep_header *ath9k_htc_get_eeprom_base(struct ath9k_htc_priv *priv)
 }
 
 
-static int ath9k_htc_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant,
-                                u32 *rx_ant)
+static int ath9k_htc_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                                u32 *tx_ant, u32 *rx_ant)
 {
        struct ath9k_htc_priv *priv = hw->priv;
        struct base_eep_header *pBase = ath9k_htc_get_eeprom_base(priv);
index c56f4f3b89907707ca6efca573a8058632a5be29..740a6fc7b06760ecf79474aa787644339611cd1d 100644 (file)
@@ -1484,7 +1484,7 @@ static void ath9k_disable_ps(struct ath_softc *sc)
        ath_dbg(common, PS, "PowerSave disabled\n");
 }
 
-static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
+static int ath9k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct ath_softc *sc = hw->priv;
        struct ath_hw *ah = sc->sc_ah;
@@ -2114,6 +2114,7 @@ static void ath9k_enable_dynack(struct ath_softc *sc)
 }
 
 static void ath9k_set_coverage_class(struct ieee80211_hw *hw,
+                                    int radio_idx,
                                     s16 coverage_class)
 {
        struct ath_softc *sc = hw->priv;
@@ -2338,7 +2339,8 @@ static bool validate_antenna_mask(struct ath_hw *ah, u32 val)
        }
 }
 
-static int ath9k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+static int ath9k_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                            u32 tx_ant, u32 rx_ant)
 {
        struct ath_softc *sc = hw->priv;
        struct ath_hw *ah = sc->sc_ah;
@@ -2367,7 +2369,8 @@ static int ath9k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
        return 0;
 }
 
-static int ath9k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+static int ath9k_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                            u32 *tx_ant, u32 *rx_ant)
 {
        struct ath_softc *sc = hw->priv;
 
index 755c068e4197b57743106d5f9f500e140b9cba5b..a7a9345f348386687e9611ee9cce68cced32e6ff 100644 (file)
@@ -890,7 +890,7 @@ static void carl9170_stat_work(struct work_struct *work)
                round_jiffies(msecs_to_jiffies(CARL9170_STAT_WORK)));
 }
 
-static int carl9170_op_config(struct ieee80211_hw *hw, u32 changed)
+static int carl9170_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct ar9170 *ar = hw->priv;
        int err = 0;
index 94d08d6ae1a3c2996bb42803c02b0e50a2740870..02a525645bfa421a2be2937a6dbc628a495da7a2 100644 (file)
@@ -361,7 +361,7 @@ static void wcn36xx_change_opchannel(struct wcn36xx *wcn, int ch)
        return;
 }
 
-static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
+static int wcn36xx_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct wcn36xx *wcn = hw->priv;
        int ret;
@@ -965,7 +965,8 @@ out:
 }
 
 /* this is required when using IEEE80211_HW_HAS_RATE_CONTROL */
-static int wcn36xx_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int wcn36xx_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                    u32 value)
 {
        struct wcn36xx *wcn = hw->priv;
        wcn36xx_dbg(WCN36XX_DBG_MAC, "mac set RTS threshold %d\n", value);
index 5473c01cbe6689bcded12b7ef7cc855825f126c8..7703a0933a14fd58666cc11c9465911071954a37 100644 (file)
@@ -1408,7 +1408,8 @@ static int wil_cfg80211_disconnect(struct wiphy *wiphy,
        return rc;
 }
 
-static int wil_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+static int wil_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
+                                        u32 changed)
 {
        struct wil6210_priv *wil = wiphy_to_wil(wiphy);
        int rc;
index 6842c2b02b393f8869e4c27801d07ef9bf85d73b..aa683eacaf38ea4da1804b6d01bcaec835d94858 100644 (file)
@@ -2002,7 +2002,7 @@ exit:
        return 0;
 }
 
-static int at76_config(struct ieee80211_hw *hw, u32 changed)
+static int at76_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct at76_priv *priv = hw->priv;
 
index 7529afd24aed1a30ee0eabcf6591a8ea5b015718..f1a77c4c445faca0842c488aa9718a1c07e9709a 100644 (file)
@@ -3975,7 +3975,7 @@ static void b43_set_retry_limits(struct b43_wldev *dev,
                        long_retry);
 }
 
-static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
+static int b43_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct b43_wl *wl = hw_to_b43_wl(hw);
        struct b43_wldev *dev = wl->current_dev;
@@ -5073,7 +5073,7 @@ static int b43_op_start(struct ieee80211_hw *hw)
         * may hang the system.
         */
        if (!err)
-               b43_op_config(hw, ~0);
+               b43_op_config(hw, -1, ~0);
 
        return err;
 }
@@ -5248,7 +5248,7 @@ out:
        }
 
        /* reload configuration */
-       b43_op_config(wl->hw, ~0);
+       b43_op_config(wl->hw, -1, ~0);
        if (wl->vif)
                b43_op_bss_info_changed(wl->hw, wl->vif, &wl->vif->bss_conf, ~0);
 
index 2370a2e6a2e3cc185fa8eea2a22cfe3f03923125..aada342e0b809bbf437e7580827b4bbe269eccce 100644 (file)
@@ -2662,7 +2662,7 @@ static void b43legacy_set_retry_limits(struct b43legacy_wldev *dev,
        b43legacy_shm_write16(dev, B43legacy_SHM_WIRELESS, 0x0007, long_retry);
 }
 
-static int b43legacy_op_dev_config(struct ieee80211_hw *hw,
+static int b43legacy_op_dev_config(struct ieee80211_hw *hw, int radio_idx,
                                   u32 changed)
 {
        struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
index 5a0b252dfeafeb05f75d10e4afa1e5a8a6ed5329..40a9a8177de64202b6803798d5c6b8fc57cf8be2 100644 (file)
@@ -1637,7 +1637,8 @@ static s32 brcmf_set_retry(struct net_device *ndev, u32 retry, bool l)
        return err;
 }
 
-static s32 brcmf_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+static s32 brcmf_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
+                                          u32 changed)
 {
        struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
        struct net_device *ndev = cfg_to_ndev(cfg);
@@ -2645,7 +2646,8 @@ brcmf_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *ndev,
 
 static s32
 brcmf_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
-                           enum nl80211_tx_power_setting type, s32 mbm)
+                           int radio_idx, enum nl80211_tx_power_setting type,
+                           s32 mbm)
 {
        struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
        struct net_device *ndev = cfg_to_ndev(cfg);
@@ -2696,7 +2698,7 @@ done:
 
 static s32
 brcmf_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
-                           unsigned int link_id, s32 *dbm)
+                           int radio_idx, unsigned int link_id, s32 *dbm)
 {
        struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
        struct brcmf_cfg80211_vif *vif = wdev_to_vif(wdev);
index 1c3d29dca42490668c7d3e70a2951853e4851772..8ab452cf48c45778ef59d1d86396ce90c27bbda6 100644 (file)
@@ -525,7 +525,8 @@ brcms_ops_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
        spin_unlock_bh(&wl->lock);
 }
 
-static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
+static int brcms_ops_config(struct ieee80211_hw *hw, int radio_idx,
+                           u32 changed)
 {
        struct ieee80211_conf *conf = &hw->conf;
        struct brcms_info *wl = hw->priv;
index 9a86688aea67594001f3233cb22d2636537d606b..b7bd3ec4cc50973e9c970b806d4e811e4e6d345b 100644 (file)
@@ -4990,7 +4990,7 @@ il_update_qos(struct il_priv *il)
  * il_mac_config - mac80211 config callback
  */
 int
-il_mac_config(struct ieee80211_hw *hw, u32 changed)
+il_mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct il_priv *il = hw->priv;
        const struct il_channel_info *ch_info;
index 52610f5e57a39f3052e32805267f01e1464ef2cc..4c9836ab11dd4ae0fe75c8c5e2ce8c713f775425 100644 (file)
@@ -1956,7 +1956,7 @@ il_get_hw_mode(struct il_priv *il, enum nl80211_band band)
 }
 
 /* mac80211 handlers */
-int il_mac_config(struct ieee80211_hw *hw, u32 changed);
+int il_mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed);
 void il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
 void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                             struct ieee80211_bss_conf *bss_conf, u64 changes);
index 1ebc7effcc2ad6a804347670dc571ec2a511e308..b39bf401567ffe7fe5fd6d57fdd1610425368310 100644 (file)
@@ -88,7 +88,7 @@ void iwl_connection_init_rx_config(struct iwl_priv *priv,
 int iwlagn_set_pan_params(struct iwl_priv *priv);
 int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx);
 void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx);
-int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed);
+int iwlagn_mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed);
 void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
                             struct ieee80211_vif *vif,
                             struct ieee80211_bss_conf *bss_conf,
index 2d3c1627f283983ca8cc18d224f969f06258704f..e08e44cae43485b04c94327ce04e1b6b303dc4f9 100644 (file)
@@ -1149,7 +1149,7 @@ void iwlagn_config_ht40(struct ieee80211_conf *conf,
        }
 }
 
-int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
+int iwlagn_mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
        struct iwl_rxon_context *ctx;
index 4ba050397632aa273840d13d4570d1534e734f16..76e7e3fa2d13b1b4972783b624f4bdcdf9ea19af 100644 (file)
@@ -574,7 +574,8 @@ void iwl_mld_mac80211_stop(struct ieee80211_hw *hw, bool suspend)
 }
 
 static
-int iwl_mld_mac80211_config(struct ieee80211_hw *hw, u32 changed)
+int iwl_mld_mac80211_config(struct ieee80211_hw *hw, int radio_idx,
+                           u32 changed)
 {
        return 0;
 }
@@ -1102,7 +1103,8 @@ void iwl_mld_unassign_vif_chanctx(struct ieee80211_hw *hw,
 }
 
 static
-int iwl_mld_mac80211_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+int iwl_mld_mac80211_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                      u32 value)
 {
        return 0;
 }
index 956b491ae5a482366c1e7b2cdaee0b899e874e33..619d822efa5b726fe46f0804b147e4f7f5b09b8b 100644 (file)
@@ -298,7 +298,8 @@ static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = {
        },
 };
 
-int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                          u32 *tx_ant, u32 *rx_ant)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
        *tx_ant = iwl_mvm_get_valid_tx_ant(mvm);
@@ -306,7 +307,8 @@ int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
        return 0;
 }
 
-int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant,
+                          u32 rx_ant)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
 
@@ -4249,7 +4251,8 @@ int iwl_mvm_mac_sta_state_common(struct ieee80211_hw *hw,
        return ret;
 }
 
-int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                 u32 value)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
 
index a4f412e750d070d9b9bfeea021cd55ec39670d1d..5c8eaf1eacffef44c3dd0272756036de0100513f 100644 (file)
@@ -2866,13 +2866,16 @@ void iwl_mvm_mac_wake_tx_queue(struct ieee80211_hw *hw,
 int iwl_mvm_mac_ampdu_action(struct ieee80211_hw *hw,
                             struct ieee80211_vif *vif,
                             struct ieee80211_ampdu_params *params);
-int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
-int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
+int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant,
+                          u32 *rx_ant);
+int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant,
+                          u32 rx_ant);
 int iwl_mvm_mac_start(struct ieee80211_hw *hw);
 void iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw,
                                   enum ieee80211_reconfig_type reconfig_type);
 void iwl_mvm_mac_stop(struct ieee80211_hw *hw, bool suspend);
-static inline int iwl_mvm_mac_config(struct ieee80211_hw *hw, u32 changed)
+static inline int iwl_mvm_mac_config(struct ieee80211_hw *hw, int radio_idx,
+                                    u32 changed)
 {
        return 0;
 }
@@ -2905,7 +2908,8 @@ iwl_mvm_mac_release_buffered_frames(struct ieee80211_hw *hw,
                                    int num_frames,
                                    enum ieee80211_frame_release_type reason,
                                    bool more_data);
-int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
+int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                 u32 value);
 void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                           struct ieee80211_link_sta *link_sta, u32 changed);
 void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw *hw,
index 42111bb53f582f02cfec552a8e6a0439b895e35a..2ec3655f1a9c0b0aa70ba4c81c272913afd76648 100644 (file)
@@ -313,7 +313,7 @@ static void p54_reset_stats(struct p54_common *priv)
        priv->survey_raw.tx = 0;
 }
 
-static int p54_config(struct ieee80211_hw *dev, u32 changed)
+static int p54_config(struct ieee80211_hw *dev, int radio_idx, u32 changed)
 {
        int ret = 0;
        struct p54_common *priv = dev->priv;
@@ -692,6 +692,7 @@ static void p54_flush(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
 }
 
 static void p54_set_coverage_class(struct ieee80211_hw *dev,
+                                  int radio_idx,
                                   s16 coverage_class)
 {
        struct p54_common *priv = dev->priv;
index 50c0f6179e2da28d9d22b8acaf44f76031bc599e..d1067874428f4629c289c7a473f25a6d30577aaa 100644 (file)
@@ -337,7 +337,7 @@ static void lbtf_op_remove_interface(struct ieee80211_hw *hw,
        lbtf_deb_leave(LBTF_DEB_MACOPS);
 }
 
-static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed)
+static int lbtf_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct lbtf_private *priv = hw->priv;
        struct ieee80211_conf *conf = &hw->conf;
index 60c12328c2f315ae9b413ca03cebf791d9c536dd..286378770e9e4fb174793a05dc8b1747630d36f8 100644 (file)
@@ -375,6 +375,7 @@ mwifiex_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
 static int
 mwifiex_cfg80211_set_tx_power(struct wiphy *wiphy,
                              struct wireless_dev *wdev,
+                             int radio_idx,
                              enum nl80211_tx_power_setting type,
                              int mbm)
 {
@@ -410,6 +411,7 @@ mwifiex_cfg80211_set_tx_power(struct wiphy *wiphy,
 static int
 mwifiex_cfg80211_get_tx_power(struct wiphy *wiphy,
                              struct wireless_dev *wdev,
+                             int radio_idx,
                              unsigned int link_id, int *dbm)
 {
        struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
@@ -737,7 +739,8 @@ mwifiex_set_rts(struct mwifiex_private *priv, u32 rts_thr)
  * Fragmentation threshold of the driver.
  */
 static int
-mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
+                                 u32 changed)
 {
        struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
        struct mwifiex_private *priv;
@@ -1939,7 +1942,8 @@ mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
 }
 
 static int
-mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
+mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, int radio_idx, u32 tx_ant,
+                            u32 rx_ant)
 {
        struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
        struct mwifiex_private *priv = mwifiex_get_priv(adapter,
@@ -2002,7 +2006,8 @@ mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
 }
 
 static int
-mwifiex_cfg80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant)
+mwifiex_cfg80211_get_antenna(struct wiphy *wiphy, int radio_idx, u32 *tx_ant,
+                            u32 *rx_ant)
 {
        struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
        struct mwifiex_private *priv = mwifiex_get_priv(adapter,
index bab9ef37a1ab80e83e2426b27db842a80f01e413..bc34a025acd6bc94f489085686cde8c8476101b9 100644 (file)
@@ -3369,7 +3369,8 @@ struct mwl8k_cmd_set_rts_threshold {
 } __packed;
 
 static int
-mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int rts_thresh)
+mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                           int rts_thresh)
 {
        struct mwl8k_cmd_set_rts_threshold *cmd;
        int rc;
@@ -4955,7 +4956,7 @@ fail:
        wiphy_err(hw->wiphy, "Firmware restart failed\n");
 }
 
-static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
+static int mwl8k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct ieee80211_conf *conf = &hw->conf;
        struct mwl8k_priv *priv = hw->priv;
@@ -5321,9 +5322,10 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw,
        mwl8k_fw_unlock(hw);
 }
 
-static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                  u32 value)
 {
-       return mwl8k_cmd_set_rts_threshold(hw, value);
+       return mwl8k_cmd_set_rts_threshold(hw, radio_idx, value);
 }
 
 static int mwl8k_sta_remove(struct ieee80211_hw *hw,
@@ -6056,7 +6058,7 @@ static int mwl8k_reload_firmware(struct ieee80211_hw *hw, char *fw_image)
        if (rc)
                goto fail;
 
-       rc = mwl8k_config(hw, ~0);
+       rc = mwl8k_config(hw, -1, ~0);
        if (rc)
                goto fail;
 
index 45c8db939d554671d68f1914f5febb5f5a2af752..3afe4c4cd7bbec5d317be4155f232eec7d41b62e 100644 (file)
@@ -1892,7 +1892,8 @@ void mt76_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 }
 EXPORT_SYMBOL_GPL(mt76_sw_scan_complete);
 
-int mt76_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+int mt76_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant,
+                    u32 *rx_ant)
 {
        struct mt76_phy *phy = hw->priv;
        struct mt76_dev *dev = phy->dev;
index 5f8d81cda6cdb7cbb3fe45535148758d5773affc..14927a92f9d1b313253158c0e53dce8fab9fba18 100644 (file)
@@ -1513,7 +1513,8 @@ int mt76_get_sar_power(struct mt76_phy *phy,
 void mt76_csa_check(struct mt76_dev *dev);
 void mt76_csa_finish(struct mt76_dev *dev);
 
-int mt76_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
+int mt76_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant,
+                    u32 *rx_ant);
 int mt76_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set);
 void mt76_insert_ccmp_hdr(struct sk_buff *skb, u8 key_id);
 int mt76_get_rate(struct mt76_dev *dev,
index 3e8b1ec761691c9410aa43e7b7ee0e09b799711d..0d7c84941cd0a7f701216d034ed1e14bd888a428 100644 (file)
@@ -216,7 +216,7 @@ static int mt7603_set_sar_specs(struct ieee80211_hw *hw,
 }
 
 static int
-mt7603_config(struct ieee80211_hw *hw, u32 changed)
+mt7603_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct mt7603_dev *dev = hw->priv;
        int ret = 0;
@@ -657,7 +657,8 @@ mt7603_sta_rate_tbl_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 }
 
 static void
-mt7603_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
+mt7603_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
+                         s16 coverage_class)
 {
        struct mt7603_dev *dev = hw->priv;
 
index 8a37fb37f77d2488b78ffeb7b3f2c8c03702c646..15fe155ac3f3bcce59bb15568163a2d3809f8d4a 100644 (file)
@@ -420,7 +420,7 @@ static int mt7615_set_sar_specs(struct ieee80211_hw *hw,
        return mt76_update_channel(phy->mt76);
 }
 
-static int mt7615_config(struct ieee80211_hw *hw, u32 changed)
+static int mt7615_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct mt7615_dev *dev = mt7615_hw_dev(hw);
        struct mt7615_phy *phy = mt7615_hw_phy(hw);
@@ -784,7 +784,8 @@ static void mt7615_tx(struct ieee80211_hw *hw,
        mt76_connac_pm_queue_skb(hw, &dev->pm, wcid, skb);
 }
 
-static int mt7615_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
+static int mt7615_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                   u32 val)
 {
        struct mt7615_dev *dev = mt7615_hw_dev(hw);
        struct mt7615_phy *phy = mt7615_hw_phy(hw);
@@ -972,7 +973,8 @@ mt7615_offset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 }
 
 static void
-mt7615_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
+mt7615_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
+                         s16 coverage_class)
 {
        struct mt7615_phy *phy = mt7615_hw_phy(hw);
        struct mt7615_dev *dev = phy->dev;
@@ -984,7 +986,8 @@ mt7615_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
 }
 
 static int
-mt7615_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+mt7615_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                  u32 tx_ant, u32 rx_ant)
 {
        struct mt7615_dev *dev = mt7615_hw_dev(hw);
        struct mt7615_phy *phy = mt7615_hw_phy(hw);
index 4aa2dcedc87448b1324813ec43d39cff51617d91..a5c40d350612be3809e4d3b925003d03c984b0df 100644 (file)
@@ -57,7 +57,7 @@ out:
 }
 EXPORT_SYMBOL_GPL(mt76x0_set_sar_specs);
 
-int mt76x0_config(struct ieee80211_hw *hw, u32 changed)
+int mt76x0_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct mt76x02_dev *dev = hw->priv;
 
index 50f755344968377211dd028de19186c91415e1e8..e5bc14d4c7125396612979917f08094cbf2a03f5 100644 (file)
@@ -48,7 +48,7 @@ void mt76x0_chip_onoff(struct mt76x02_dev *dev, bool enable, bool reset);
 
 void mt76x0_mac_stop(struct mt76x02_dev *dev);
 
-int mt76x0_config(struct ieee80211_hw *hw, u32 changed);
+int mt76x0_config(struct ieee80211_hw *hw, int radio_idx, u32 changed);
 int mt76x0_set_channel(struct mt76_phy *mphy);
 int mt76x0_set_sar_specs(struct ieee80211_hw *hw,
                         const struct cfg80211_sar_specs *sar);
index 4cd63bacd742c506d1f9521d55f88b8e23f85e85..2094c7d2af81b8ae59e48bb029a480a8dacc866d 100644 (file)
@@ -183,8 +183,8 @@ void mt76x02_wdt_work(struct work_struct *work);
 void mt76x02_tx_set_txpwr_auto(struct mt76x02_dev *dev, s8 txpwr);
 void mt76x02_set_tx_ackto(struct mt76x02_dev *dev);
 void mt76x02_set_coverage_class(struct ieee80211_hw *hw,
-                               s16 coverage_class);
-int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, u32 val);
+                               int radio_idx, s16 coverage_class);
+int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val);
 void mt76x02_remove_hdr_pad(struct sk_buff *skb, int len);
 bool mt76x02_tx_status_data(struct mt76_dev *mdev, u8 *update);
 void mt76x02_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
index 4fb30589fa7a098ff0145282329c6fc4d37f0297..7dfcb20c692cfb8cd4d71256f8d35288935b3501 100644 (file)
@@ -548,7 +548,7 @@ void mt76x02_set_tx_ackto(struct mt76x02_dev *dev)
 EXPORT_SYMBOL_GPL(mt76x02_set_tx_ackto);
 
 void mt76x02_set_coverage_class(struct ieee80211_hw *hw,
-                               s16 coverage_class)
+                               int radio_idx, s16 coverage_class)
 {
        struct mt76x02_dev *dev = hw->priv;
 
@@ -559,7 +559,7 @@ void mt76x02_set_coverage_class(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL_GPL(mt76x02_set_coverage_class);
 
-int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
+int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val)
 {
        struct mt76x02_dev *dev = hw->priv;
 
index eb70130d2711ac702158fb6b806717ace65a099d..c5dfb06d81e8e2bdcbb5785fafc15eb14fdaca7b 100644 (file)
@@ -54,7 +54,7 @@ int mt76x2e_set_channel(struct mt76_phy *phy)
 }
 
 static int
-mt76x2_config(struct ieee80211_hw *hw, u32 changed)
+mt76x2_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct mt76x02_dev *dev = hw->priv;
 
@@ -99,8 +99,8 @@ mt76x2_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 {
 }
 
-static int mt76x2_set_antenna(struct ieee80211_hw *hw, u32 tx_ant,
-                             u32 rx_ant)
+static int mt76x2_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                             u32 tx_ant, u32 rx_ant)
 {
        struct mt76x02_dev *dev = hw->priv;
 
index 83e7061b10e2d2b3d8ff28e3d1fe90553c7db71d..6671c53faf9f85f8a0ade10eacc6d5d435e2756a 100644 (file)
@@ -50,7 +50,7 @@ int mt76x2u_set_channel(struct mt76_phy *mphy)
 }
 
 static int
-mt76x2u_config(struct ieee80211_hw *hw, u32 changed)
+mt76x2u_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct mt76x02_dev *dev = hw->priv;
        int err = 0;
index 3aa31c5cefa6a57cced8d5ed34b9fcc8cd02d401..fe0639c14bf9bc6ec934325bd4afa263eb106dcb 100644 (file)
@@ -449,7 +449,8 @@ out:
        return err;
 }
 
-static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
+static int mt7915_config(struct ieee80211_hw *hw, int radio_idx,
+                        u32 changed)
 {
        struct mt7915_dev *dev = mt7915_hw_dev(hw);
        struct mt7915_phy *phy = mt7915_hw_phy(hw);
@@ -906,7 +907,8 @@ static void mt7915_tx(struct ieee80211_hw *hw,
        mt76_tx(mphy, control->sta, wcid, skb);
 }
 
-static int mt7915_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
+static int mt7915_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                   u32 val)
 {
        struct mt7915_dev *dev = mt7915_hw_dev(hw);
        struct mt7915_phy *phy = mt7915_hw_phy(hw);
@@ -1102,7 +1104,8 @@ mt7915_offset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 }
 
 static void
-mt7915_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
+mt7915_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
+                         s16 coverage_class)
 {
        struct mt7915_phy *phy = mt7915_hw_phy(hw);
        struct mt7915_dev *dev = phy->dev;
@@ -1114,7 +1117,7 @@ mt7915_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
 }
 
 static int
-mt7915_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+mt7915_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, u32 rx_ant)
 {
        struct mt7915_dev *dev = mt7915_hw_dev(hw);
        struct mt7915_phy *phy = mt7915_hw_phy(hw);
@@ -1655,7 +1658,7 @@ mt7915_twt_teardown_request(struct ieee80211_hw *hw,
 }
 
 static int
-mt7915_set_frag_threshold(struct ieee80211_hw *hw, u32 val)
+mt7915_set_frag_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val)
 {
        return 0;
 }
index 1fffa43379b2b20019c268e7612a57924fd6427b..1678204296d702fbb3daea6e8e66f84b4334224a 100644 (file)
@@ -624,7 +624,7 @@ void mt7921_set_runtime_pm(struct mt792x_dev *dev)
        mt76_connac_mcu_set_deep_sleep(&dev->mt76, pm->ds_enable);
 }
 
-static int mt7921_config(struct ieee80211_hw *hw, u32 changed)
+static int mt7921_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
        struct mt792x_phy *phy = mt792x_hw_phy(hw);
@@ -907,7 +907,8 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
 }
 EXPORT_SYMBOL_GPL(mt7921_mac_sta_remove);
 
-static int mt7921_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
+static int mt7921_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                   u32 val)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
 
@@ -1088,7 +1089,8 @@ mt7921_stop_sched_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 }
 
 static int
-mt7921_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+mt7921_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                  u32 tx_ant, u32 rx_ant)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
        struct mt792x_phy *phy = mt792x_hw_phy(hw);
index 94b0099dcd411b6064074135ca00c92a6792f07c..ed7cd75aa6bc1740a03420efacdddf663ef805f8 100644 (file)
@@ -757,7 +757,7 @@ void mt7925_set_runtime_pm(struct mt792x_dev *dev)
        mt7925_mcu_set_deep_sleep(dev, pm->ds_enable);
 }
 
-static int mt7925_config(struct ieee80211_hw *hw, u32 changed)
+static int mt7925_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
        int ret = 0;
@@ -1265,7 +1265,8 @@ void mt7925_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
 }
 EXPORT_SYMBOL_GPL(mt7925_mac_sta_remove);
 
-static int mt7925_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
+static int mt7925_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                   u32 val)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
 
@@ -1507,7 +1508,8 @@ mt7925_stop_sched_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 }
 
 static int
-mt7925_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+mt7925_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                  u32 tx_ant, u32 rx_ant)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
        struct mt792x_phy *phy = mt792x_hw_phy(hw);
index e0359d431eca9696e81963ba322537c651c1f125..443d397d9961c3dd2876b50fb53d0544d186ec7a 100644 (file)
@@ -412,7 +412,8 @@ void mt792x_sta_statistics(struct ieee80211_hw *hw,
                           struct ieee80211_vif *vif,
                           struct ieee80211_sta *sta,
                           struct station_info *sinfo);
-void mt792x_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class);
+void mt792x_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
+                              s16 coverage_class);
 void mt792x_dma_cleanup(struct mt792x_dev *dev);
 int mt792x_dma_enable(struct mt792x_dev *dev);
 int mt792x_wpdma_reset(struct mt792x_dev *dev, bool force);
index a50c1723ca290e001bf31ed1f081684a2ca1b82c..43a7ac0f718e63b9be5498259d7b9a8571efc86c 100644 (file)
@@ -579,7 +579,8 @@ void mt792x_sta_statistics(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL_GPL(mt792x_sta_statistics);
 
-void mt792x_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
+void mt792x_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
+                              s16 coverage_class)
 {
        struct mt792x_phy *phy = mt792x_hw_phy(hw);
        struct mt792x_dev *dev = phy->dev;
index 78ae9f5cb1760ababc088fc21bfc3957cfe02506..5283aee619a9811f2e75fa4434ceced9185991f0 100644 (file)
@@ -591,7 +591,7 @@ static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        return err;
 }
 
-static int mt7996_config(struct ieee80211_hw *hw, u32 changed)
+static int mt7996_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        return 0;
 }
@@ -1251,7 +1251,8 @@ unlock:
        rcu_read_unlock();
 }
 
-static int mt7996_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
+static int mt7996_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                   u32 val)
 {
        struct mt7996_dev *dev = mt7996_hw_dev(hw);
        int i, ret = 0;
@@ -1491,7 +1492,8 @@ unlock:
 }
 
 static void
-mt7996_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
+mt7996_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
+                         s16 coverage_class)
 {
        struct mt7996_dev *dev = mt7996_hw_dev(hw);
        struct mt7996_phy *phy;
@@ -1505,7 +1507,8 @@ mt7996_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
 }
 
 static int
-mt7996_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+mt7996_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                  u32 tx_ant, u32 rx_ant)
 {
        struct mt7996_dev *dev = mt7996_hw_dev(hw);
        int i;
index 7570c6ceecea1b7fd531edb7e963c9b53e445b6a..05ba43e1985c8a7f23f75da2144327e9ca02560c 100644 (file)
@@ -78,7 +78,7 @@ static void mt7601u_remove_interface(struct ieee80211_hw *hw,
        dev->wcid_mask[wcid / BITS_PER_LONG] &= ~BIT(wcid % BITS_PER_LONG);
 }
 
-static int mt7601u_config(struct ieee80211_hw *hw, u32 changed)
+static int mt7601u_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct mt7601u_dev *dev = hw->priv;
        int ret = 0;
@@ -334,7 +334,8 @@ mt7601u_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        return mt76_mac_wcid_set_key(dev, msta->wcid.idx, key);
 }
 
-static int mt7601u_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int mt7601u_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                    u32 value)
 {
        struct mt7601u_dev *dev = hw->priv;
 
index e7aa0f9919232350761d51cbb1b5be87ca39e855..a395829ebadf0964b13bc3c6c5bf16c501ce19ee 100644 (file)
@@ -800,7 +800,7 @@ static int change_bss(struct wiphy *wiphy, struct net_device *dev,
        return 0;
 }
 
-static int set_wiphy_params(struct wiphy *wiphy, u32 changed)
+static int set_wiphy_params(struct wiphy *wiphy, int radio_idx, u32 changed)
 {
        int ret = -EINVAL;
        struct cfg_param_attr cfg_param_val;
@@ -1637,7 +1637,8 @@ static void wilc_set_wakeup(struct wiphy *wiphy, bool enabled)
 }
 
 static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
-                       enum nl80211_tx_power_setting type, int mbm)
+                       int radio_idx, enum nl80211_tx_power_setting type,
+                       int mbm)
 {
        int ret;
        int srcu_idx;
@@ -1669,7 +1670,7 @@ static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
 }
 
 static int get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
-                       unsigned int link_id, int *dbm)
+                       int radio_idx, unsigned int link_id, int *dbm)
 {
        int ret;
        struct wilc_vif *vif = netdev_priv(wdev->netdev);
index 82d1bf7edba20d38a8e53ff236e07fade3a1f7e9..d375ad60167f4674cebd78aea695ac9da7c38069 100644 (file)
@@ -531,7 +531,7 @@ static void plfxlc_op_remove_interface(struct ieee80211_hw *hw,
        mac->vif = NULL;
 }
 
-static int plfxlc_op_config(struct ieee80211_hw *hw, u32 changed)
+static int plfxlc_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        return 0;
 }
@@ -677,7 +677,8 @@ static void plfxlc_get_et_stats(struct ieee80211_hw *hw,
        data[1] = mac->crc_errors;
 }
 
-static int plfxlc_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int plfxlc_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                   u32 value)
 {
        return 0;
 }
index 0b22825283422db0f1944ab01a9aed85d1d5e404..f1188368e66bb4dbe3e16c358fb353d4f63d550c 100644 (file)
@@ -370,7 +370,8 @@ static int qtnf_stop_ap(struct wiphy *wiphy, struct net_device *dev,
        return ret;
 }
 
-static int qtnf_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+static int qtnf_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
+                                u32 changed)
 {
        struct qtnf_wmac *mac = wiphy_priv(wiphy);
        struct qtnf_vif *vif;
@@ -881,7 +882,7 @@ static int qtnf_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
 }
 
 static int qtnf_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
-                            unsigned int link_id, int *dbm)
+                            int radio_idx, unsigned int link_id, int *dbm)
 {
        struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
        int ret;
@@ -894,7 +895,8 @@ static int qtnf_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
 }
 
 static int qtnf_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
-                            enum nl80211_tx_power_setting type, int mbm)
+                            int radio_idx, enum nl80211_tx_power_setting type,
+                            int mbm)
 {
        struct qtnf_vif *vif;
        int ret;
index b7ea606bda08967161de7f098b9f007434edf940..4b5a7c9b6499d8f339f87a64cc86c213fe44b77e 100644 (file)
@@ -12100,7 +12100,7 @@ void rt2800_get_key_seq(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL_GPL(rt2800_get_key_seq);
 
-int rt2800_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+int rt2800_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 value)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
        u32 reg;
index 194de676df8fd37c535bd6bfe74729179072b81d..620a3d9872cec51594c6bfce2f7eefa965a4972a 100644 (file)
@@ -253,7 +253,8 @@ int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev);
 void rt2800_get_key_seq(struct ieee80211_hw *hw,
                        struct ieee80211_key_conf *key,
                        struct ieee80211_key_seq *seq);
-int rt2800_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
+int rt2800_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                            u32 value);
 int rt2800_conf_tx(struct ieee80211_hw *hw,
                   struct ieee80211_vif *vif,
                   unsigned int link_id, u16 queue_idx,
index dfb4bb370f01bceaeb27e6c384b43e997f0794aa..09b9d1f9f793f654be80295aa974100592d55675 100644 (file)
@@ -1457,7 +1457,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
                            struct ieee80211_vif *vif);
 void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
                                struct ieee80211_vif *vif);
-int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed);
+int rt2x00mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed);
 void rt2x00mac_configure_filter(struct ieee80211_hw *hw,
                                unsigned int changed_flags,
                                unsigned int *total_flags,
@@ -1489,8 +1489,10 @@ int rt2x00mac_conf_tx(struct ieee80211_hw *hw,
 void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw);
 void rt2x00mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                     u32 queues, bool drop);
-int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
-int rt2x00mac_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
+int rt2x00mac_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                         u32 tx_ant, u32 rx_ant);
+int rt2x00mac_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                         u32 *tx_ant, u32 *rx_ant);
 void rt2x00mac_get_ringparam(struct ieee80211_hw *hw,
                             u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
 bool rt2x00mac_tx_frames_pending(struct ieee80211_hw *hw);
index 4516324888050f98de1440456a8c904db3c7fac8..3bc0c1c906c91416baae42f6a1af66afc21d58c4 100644 (file)
@@ -304,7 +304,7 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface);
 
-int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
+int rt2x00mac_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
        struct ieee80211_conf *conf = &hw->conf;
@@ -740,7 +740,8 @@ void rt2x00mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_flush);
 
-int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+int rt2x00mac_set_antenna(struct ieee80211_hw *hw, int radio_idx,
+                         u32 tx_ant, u32 rx_ant)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
        struct link_ant *ant = &rt2x00dev->link.ant;
@@ -785,7 +786,8 @@ int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_set_antenna);
 
-int rt2x00mac_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+int rt2x00mac_get_antenna(struct ieee80211_hw *hw, int radio_idx,
+                         u32 *tx_ant, u32 *rx_ant)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
        struct link_ant *ant = &rt2x00dev->link.ant;
index ded8d4d59289c1415f41fe4ffefff756786e2cf3..2905baea62390df0979c87045a2334042e03c710 100644 (file)
@@ -1370,7 +1370,7 @@ static void rtl8180_remove_interface(struct ieee80211_hw *dev,
        priv->vif = NULL;
 }
 
-static int rtl8180_config(struct ieee80211_hw *dev, u32 changed)
+static int rtl8180_config(struct ieee80211_hw *dev, int radio_idx, u32 changed)
 {
        struct rtl8180_priv *priv = dev->priv;
        struct ieee80211_conf *conf = &dev->conf;
index 220ac5bdf279a14da1ae6188ecdf5c3da9f440d5..8857bb542c7fb13c5ffe5df1a552cc3d5f935823 100644 (file)
@@ -1151,7 +1151,7 @@ static void rtl8187_remove_interface(struct ieee80211_hw *dev,
        mutex_unlock(&priv->conf_mutex);
 }
 
-static int rtl8187_config(struct ieee80211_hw *dev, u32 changed)
+static int rtl8187_config(struct ieee80211_hw *dev, int radio_idx, u32 changed)
 {
        struct rtl8187_priv *priv = dev->priv;
        struct ieee80211_conf *conf = &dev->conf;
index 569856ca677f623e4688a0b7387ac3ac84ade23d..496836f716aa127dae4185926adb300ab8ec25c3 100644 (file)
@@ -4552,7 +4552,8 @@ static void rtl8xxxu_cam_write(struct rtl8xxxu_priv *priv,
 }
 
 static
-int rtl8xxxu_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+int rtl8xxxu_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant,
+                        u32 *rx_ant)
 {
        struct rtl8xxxu_priv *priv = hw->priv;
 
@@ -6839,7 +6840,7 @@ static void rtl8xxxu_remove_interface(struct ieee80211_hw *hw,
        priv->vifs[rtlvif->port_num] = NULL;
 }
 
-static int rtl8xxxu_config(struct ieee80211_hw *hw, u32 changed)
+static int rtl8xxxu_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct rtl8xxxu_priv *priv = hw->priv;
        struct device *dev = &priv->udev->dev;
@@ -6988,7 +6989,8 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw,
                         FIF_PROBE_REQ);
 }
 
-static int rtl8xxxu_set_rts_threshold(struct ieee80211_hw *hw, u32 rts)
+static int rtl8xxxu_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                     u32 rts)
 {
        if (rts > 2347 && rts != (u32)-1)
                return -EINVAL;
index 819cf519e66e13c157e512a009adbe4cbe245692..22633c3015642d8de221a8ab62d57ed3eec1671f 100644 (file)
@@ -566,7 +566,7 @@ static int rtl_op_resume(struct ieee80211_hw *hw)
 }
 #endif
 
-static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
+static int rtl_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_phy *rtlphy = &(rtlpriv->phy);
index 77f9fbe1870c66519aac53b6226996f42e64c22a..766f22d31079ee788c8036c22053ea39a53b5a96 100644 (file)
@@ -71,7 +71,7 @@ static void rtw_ops_stop(struct ieee80211_hw *hw, bool suspend)
        mutex_unlock(&rtwdev->mutex);
 }
 
-static int rtw_ops_config(struct ieee80211_hw *hw, u32 changed)
+static int rtw_ops_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct rtw_dev *rtwdev = hw->priv;
        int ret = 0;
@@ -708,7 +708,8 @@ static void rtw_ops_mgd_prepare_tx(struct ieee80211_hw *hw,
        mutex_unlock(&rtwdev->mutex);
 }
 
-static int rtw_ops_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int rtw_ops_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                    u32 value)
 {
        struct rtw_dev *rtwdev = hw->priv;
 
@@ -797,6 +798,7 @@ static int rtw_ops_set_bitrate_mask(struct ieee80211_hw *hw,
 }
 
 static int rtw_ops_set_antenna(struct ieee80211_hw *hw,
+                              int radio_idx,
                               u32 tx_antenna,
                               u32 rx_antenna)
 {
@@ -808,13 +810,14 @@ static int rtw_ops_set_antenna(struct ieee80211_hw *hw,
                return -EOPNOTSUPP;
 
        mutex_lock(&rtwdev->mutex);
-       ret = chip->ops->set_antenna(rtwdev, tx_antenna, rx_antenna);
+       ret = chip->ops->set_antenna(rtwdev, -1, tx_antenna, rx_antenna);
        mutex_unlock(&rtwdev->mutex);
 
        return ret;
 }
 
 static int rtw_ops_get_antenna(struct ieee80211_hw *hw,
+                              int radio_idx,
                               u32 *tx_antenna,
                               u32 *rx_antenna)
 {
index b0f1fabe95545e3926a0c43e611c3502268cca12..7ae67143e909132e50cf43f182cd919fcd266935 100644 (file)
@@ -873,7 +873,7 @@ struct rtw_chip_ops {
        void (*set_tx_power_index)(struct rtw_dev *rtwdev);
        int (*rsvd_page_dump)(struct rtw_dev *rtwdev, u8 *buf, u32 offset,
                              u32 size);
-       int (*set_antenna)(struct rtw_dev *rtwdev,
+       int (*set_antenna)(struct rtw_dev *rtwdev, int radio_idx,
                           u32 antenna_tx,
                           u32 antenna_rx);
        void (*cfg_ldo25)(struct rtw_dev *rtwdev, bool enable);
index ab199eaea3c7641a06331950ce8e7866d7f91829..710126379e7719286ae779b7f1d88968cca2f3ea 100644 (file)
@@ -983,6 +983,7 @@ static bool rtw8822b_check_rf_path(u8 antenna)
 }
 
 static int rtw8822b_set_antenna(struct rtw_dev *rtwdev,
+                               int radio_idx,
                                u32 antenna_tx,
                                u32 antenna_rx)
 {
index 017d959de3ce70e50b90dbd304d3417e5c23109e..0ce6aa10493edcf2cbfc4ba14a72389cacc88ffd 100644 (file)
@@ -2767,6 +2767,7 @@ static void rtw8822c_set_tx_power_index(struct rtw_dev *rtwdev)
 }
 
 static int rtw8822c_set_antenna(struct rtw_dev *rtwdev,
+                               int radio_idx,
                                u32 antenna_tx,
                                u32 antenna_rx)
 {
index a47971003bd422f3bc093c03b3e90ea6fed9a9e4..b9e04620842464ae7e8fa5c3416c76b46f0d2445 100644 (file)
@@ -72,7 +72,7 @@ static void rtw89_ops_stop(struct ieee80211_hw *hw, bool suspend)
        rtw89_core_stop(rtwdev);
 }
 
-static int rtw89_ops_config(struct ieee80211_hw *hw, u32 changed)
+static int rtw89_ops_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct rtw89_dev *rtwdev = hw->priv;
 
@@ -1007,7 +1007,8 @@ static int rtw89_ops_ampdu_action(struct ieee80211_hw *hw,
        return 0;
 }
 
-static int rtw89_ops_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int rtw89_ops_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                      u32 value)
 {
        struct rtw89_dev *rtwdev = hw->priv;
 
@@ -1119,7 +1120,7 @@ static int rtw89_ops_set_bitrate_mask(struct ieee80211_hw *hw,
 }
 
 static
-int rtw89_ops_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
+int rtw89_ops_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, u32 rx_ant)
 {
        struct rtw89_dev *rtwdev = hw->priv;
        struct rtw89_hal *hal = &rtwdev->hal;
@@ -1142,7 +1143,8 @@ int rtw89_ops_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
 }
 
 static
-int rtw89_ops_get_antenna(struct ieee80211_hw *hw,  u32 *tx_ant, u32 *rx_ant)
+int rtw89_ops_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant,
+                         u32 *rx_ant)
 {
        struct rtw89_dev *rtwdev = hw->priv;
        struct rtw89_hal *hal = &rtwdev->hal;
index 0e115b428f96f1e9a71d2d3cf8cc5c72de5033ff..f3a853edfc11df37de83a4af4971408f3e4c2e79 100644 (file)
@@ -656,11 +656,13 @@ static int rsi_config_power(struct ieee80211_hw *hw)
  *                        requests. The stack calls this function to
  *                        change hardware configuration, e.g., channel.
  * @hw: Pointer to the ieee80211_hw structure.
+ * @radio_idx: Radio index.
  * @changed: Changed flags set.
  *
  * Return: 0 on success, negative error code on failure.
  */
 static int rsi_mac80211_config(struct ieee80211_hw *hw,
+                              int radio_idx,
                               u32 changed)
 {
        struct rsi_hw *adapter = hw->priv;
@@ -1201,12 +1203,13 @@ unlock:
 /**
  * rsi_mac80211_set_rts_threshold() - This function sets rts threshold value.
  * @hw: Pointer to the ieee80211_hw structure.
+ * @radio_idx: Radio index.
  * @value: Rts threshold value.
  *
  * Return: 0 on success.
  */
 static int rsi_mac80211_set_rts_threshold(struct ieee80211_hw *hw,
-                                         u32 value)
+                                         int radio_idx, u32 value)
 {
        struct rsi_hw *adapter = hw->priv;
        struct rsi_common *common = adapter->priv;
@@ -1583,12 +1586,14 @@ static int rsi_mac80211_sta_remove(struct ieee80211_hw *hw,
  * rsi_mac80211_set_antenna() - This function is used to configure
  *                             tx and rx antennas.
  * @hw: Pointer to the ieee80211_hw structure.
+ * @radio_idx: Radio index
  * @tx_ant: Bitmap for tx antenna
  * @rx_ant: Bitmap for rx antenna
  *
  * Return: 0 on success, Negative error code on failure.
  */
 static int rsi_mac80211_set_antenna(struct ieee80211_hw *hw,
+                                   int radio_idx,
                                    u32 tx_ant, u32 rx_ant)
 {
        struct rsi_hw *adapter = hw->priv;
@@ -1634,12 +1639,14 @@ fail_set_antenna:
  *                             tx and rx antennas.
  *
  * @hw: Pointer to the ieee80211_hw structure.
+ * @radio_idx: Radio index
  * @tx_ant: Bitmap for tx antenna
  * @rx_ant: Bitmap for rx antenna
  * 
  * Return: 0 on success, negative error codes on failure.
  */
 static int rsi_mac80211_get_antenna(struct ieee80211_hw *hw,
+                                   int radio_idx,
                                    u32 *tx_ant, u32 *rx_ant)
 {
        struct rsi_hw *adapter = hw->priv;
index e95b9ded17d9d7973841d27eec62a093dbfb5674..d12fcc7557015584338703b4a7f844d2a4ed8cbd 100644 (file)
@@ -220,7 +220,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
        return 0;
 }
 
-int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+int wfx_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 value)
 {
        struct wfx_dev *wdev = hw->priv;
        struct wfx_vif *wvif = NULL;
@@ -706,7 +706,7 @@ void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif
        wvif->channel = NULL;
 }
 
-int wfx_config(struct ieee80211_hw *hw, u32 changed)
+int wfx_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        return 0;
 }
index 8702eed5267f839e4dba413989aab04c0a2dbc8d..b4812b294f3cd3897246499938dd7660557ae80b 100644 (file)
@@ -21,8 +21,8 @@ struct wfx_sta_priv {
 /* mac80211 interface */
 int wfx_start(struct ieee80211_hw *hw);
 void wfx_stop(struct ieee80211_hw *hw, bool suspend);
-int wfx_config(struct ieee80211_hw *hw, u32 changed);
-int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
+int wfx_config(struct ieee80211_hw *hw, int radio_idx, u32 changed);
+int wfx_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 value);
 void wfx_set_default_unicast_key(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int idx);
 void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
                          unsigned int *total_flags, u64 unused);
index 5dd7f6a389006db4f15ec8c2b757ee9b5487e12d..b1dd76e8aecbfe1812ee6c492d77f0bd7fc397fd 100644 (file)
@@ -321,7 +321,7 @@ int cw1200_change_interface(struct ieee80211_hw *dev,
        return ret;
 }
 
-int cw1200_config(struct ieee80211_hw *dev, u32 changed)
+int cw1200_config(struct ieee80211_hw *dev, int radio_idx, u32 changed)
 {
        int ret = 0;
        struct cw1200_common *priv = dev->priv;
@@ -857,7 +857,8 @@ void cw1200_wep_key_work(struct work_struct *work)
        wsm_unlock_tx(priv);
 }
 
-int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+int cw1200_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                            u32 value)
 {
        int ret = 0;
        __le32 val32;
index b955b92cfd732c1e8074e5e018ea901762912316..b4f04371668d9cd7defb979502dcd60be37b6299 100644 (file)
@@ -22,7 +22,7 @@ int cw1200_change_interface(struct ieee80211_hw *dev,
                            struct ieee80211_vif *vif,
                            enum nl80211_iftype new_type,
                            bool p2p);
-int cw1200_config(struct ieee80211_hw *dev, u32 changed);
+int cw1200_config(struct ieee80211_hw *dev, int radio_idx, u32 changed);
 void cw1200_configure_filter(struct ieee80211_hw *dev,
                             unsigned int changed_flags,
                             unsigned int *total_flags,
@@ -36,7 +36,8 @@ int cw1200_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
                   struct ieee80211_vif *vif, struct ieee80211_sta *sta,
                   struct ieee80211_key_conf *key);
 
-int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
+int cw1200_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                            u32 value);
 
 void cw1200_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                  u32 queues, bool drop);
index bb53d681c11bab6aac0edb2ac3add218e43d9d85..69fc51f183adabd7854c15a9455622e779097827 100644 (file)
@@ -589,7 +589,7 @@ static bool wl1251_can_do_pm(struct ieee80211_conf *conf, struct wl1251 *wl)
        return (conf->flags & IEEE80211_CONF_PS) && !wl->monitor_present;
 }
 
-static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
+static int wl1251_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct wl1251 *wl = hw->priv;
        struct ieee80211_conf *conf = &hw->conf;
@@ -1051,7 +1051,8 @@ out:
        return ret;
 }
 
-static int wl1251_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int wl1251_op_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                      u32 value)
 {
        struct wl1251 *wl = hw->priv;
        int ret;
index f93c95edd9915e0c8f83a61065911806f9961e56..6116a8522d960a29932cb2454c1d639c887baea9 100644 (file)
@@ -3166,7 +3166,7 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif,
        return 0;
 }
 
-static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
+static int wl1271_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct wl1271 *wl = hw->priv;
        struct wl12xx_vif *wlvif;
@@ -3895,7 +3895,8 @@ out:
        return 0;
 }
 
-static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
+static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw,
+                                       int radio_idx, u32 value)
 {
        struct wl1271 *wl = hw->priv;
        int ret = 0;
@@ -3924,7 +3925,8 @@ out:
        return ret;
 }
 
-static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
+                                      u32 value)
 {
        struct wl1271 *wl = hw->priv;
        struct wl12xx_vif *wlvif;
index f6add19d1da1cba3b7c36d288c8cded6cffa810c..eefe8da3b14db665fd08b79c6d41adb9629d8332 100644 (file)
@@ -2381,7 +2381,8 @@ static const char * const hwsim_chanwidths[] = {
        [NL80211_CHAN_WIDTH_320] = "eht320",
 };
 
-static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed)
+static int mac80211_hwsim_config(struct ieee80211_hw *hw, int radio_idx,
+                                u32 changed)
 {
        struct mac80211_hwsim_data *data = hw->priv;
        struct ieee80211_conf *conf = &hw->conf;
@@ -3338,7 +3339,8 @@ static int mac80211_hwsim_tx_last_beacon(struct ieee80211_hw *hw)
        return 1;
 }
 
-static int mac80211_hwsim_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int mac80211_hwsim_set_rts_threshold(struct ieee80211_hw *hw,
+                                           int radio_idx, u32 value)
 {
        return -EOPNOTSUPP;
 }
index 9653dbaac3c0590338f340e134146c7ca62ff2e8..f7c56174424d6882dffbabfbf35de3f652269fac 100644 (file)
@@ -1133,7 +1133,7 @@ static void zd_op_remove_interface(struct ieee80211_hw *hw,
        zd_mac_free_cur_beacon(mac);
 }
 
-static int zd_op_config(struct ieee80211_hw *hw, u32 changed)
+static int zd_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 {
        struct zd_mac *mac = zd_hw_mac(hw);
        struct ieee80211_conf *conf = &hw->conf;
index 7fcc46a0bb48fbd9c8ce2df1dffe227a3717a2dd..4e29652f8ee703ed0a1f8426354a7abfb200521a 100644 (file)
@@ -1298,7 +1298,8 @@ exit:
        return ret;
 }
 
-static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
+                                        u32 changed)
 {
        return 0;
 }
@@ -1795,7 +1796,7 @@ static int cfg80211_rtw_disconnect(struct wiphy *wiphy, struct net_device *ndev,
 }
 
 static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
-                                   struct wireless_dev *wdev,
+                                   struct wireless_dev *wdev, int radio_idx,
                                    enum nl80211_tx_power_setting type, int mbm)
 {
        return 0;
@@ -1803,6 +1804,7 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
 
 static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
                                    struct wireless_dev *wdev,
+                                   int radio_idx,
                                    unsigned int link_id, int *dbm)
 {
        *dbm = (12);
index eec066f4738a4b86da0ae922cdf261acd2bc12b4..ffd9564fc840eacde79ade0f51e06e7a559acd2b 100644 (file)
@@ -4853,12 +4853,14 @@ struct cfg80211_ops {
        int     (*set_mcast_rate)(struct wiphy *wiphy, struct net_device *dev,
                                  int rate[NUM_NL80211_BANDS]);
 
-       int     (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
+       int     (*set_wiphy_params)(struct wiphy *wiphy, int radio_idx,
+                                   u32 changed);
 
        int     (*set_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
+                               int radio_idx,
                                enum nl80211_tx_power_setting type, int mbm);
        int     (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
-                               unsigned int link_id, int *dbm);
+                               int radio_idx, unsigned int link_id, int *dbm);
 
        void    (*rfkill_poll)(struct wiphy *wiphy);
 
@@ -4920,8 +4922,10 @@ struct cfg80211_ops {
                                                   struct wireless_dev *wdev,
                                                   struct mgmt_frame_regs *upd);
 
-       int     (*set_antenna)(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
-       int     (*get_antenna)(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant);
+       int     (*set_antenna)(struct wiphy *wiphy, int radio_idx,
+                              u32 tx_ant, u32 rx_ant);
+       int     (*get_antenna)(struct wiphy *wiphy, int radio_idx,
+                              u32 *tx_ant, u32 *rx_ant);
 
        int     (*sched_scan_start)(struct wiphy *wiphy,
                                struct net_device *dev,
index fa2325692abf94ffe312acaf431c99d4c793cac3..a0de0da4d79bb9c1a269fcce0e3df5ab18803cc7 100644 (file)
@@ -4517,7 +4517,7 @@ struct ieee80211_ops {
                                enum nl80211_iftype new_type, bool p2p);
        void (*remove_interface)(struct ieee80211_hw *hw,
                                 struct ieee80211_vif *vif);
-       int (*config)(struct ieee80211_hw *hw, u32 changed);
+       int (*config)(struct ieee80211_hw *hw, int radio_idx, u32 changed);
        void (*bss_info_changed)(struct ieee80211_hw *hw,
                                 struct ieee80211_vif *vif,
                                 struct ieee80211_bss_conf *info,
@@ -4580,8 +4580,10 @@ struct ieee80211_ops {
        void (*get_key_seq)(struct ieee80211_hw *hw,
                            struct ieee80211_key_conf *key,
                            struct ieee80211_key_seq *seq);
-       int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value);
-       int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value);
+       int (*set_frag_threshold)(struct ieee80211_hw *hw, int radio_idx,
+                                 u32 value);
+       int (*set_rts_threshold)(struct ieee80211_hw *hw, int radio_idx,
+                                u32 value);
        int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                       struct ieee80211_sta *sta);
        int (*sta_remove)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
@@ -4678,7 +4680,8 @@ struct ieee80211_ops {
        int (*get_survey)(struct ieee80211_hw *hw, int idx,
                struct survey_info *survey);
        void (*rfkill_poll)(struct ieee80211_hw *hw);
-       void (*set_coverage_class)(struct ieee80211_hw *hw, s16 coverage_class);
+       void (*set_coverage_class)(struct ieee80211_hw *hw, int radio_idx,
+                                  s16 coverage_class);
 #ifdef CONFIG_NL80211_TESTMODE
        int (*testmode_cmd)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                            void *data, int len);
@@ -4693,8 +4696,10 @@ struct ieee80211_ops {
        void (*channel_switch)(struct ieee80211_hw *hw,
                               struct ieee80211_vif *vif,
                               struct ieee80211_channel_switch *ch_switch);
-       int (*set_antenna)(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
-       int (*get_antenna)(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
+       int (*set_antenna)(struct ieee80211_hw *hw, int radio_idx,
+                          u32 tx_ant, u32 rx_ant);
+       int (*get_antenna)(struct ieee80211_hw *hw, int radio_idx,
+                          u32 *tx_ant, u32 *rx_ant);
 
        int (*remain_on_channel)(struct ieee80211_hw *hw,
                                 struct ieee80211_vif *vif,
index a289014abe37df882e8c63ca3c41b0e8dff3f030..2a71149c3065dda74350a5f8f37d018c781f52c8 100644 (file)
@@ -2907,6 +2907,14 @@ enum nl80211_commands {
  *     APs Support". Drivers may set additional flags that they support
  *     in the kernel or device.
  *
+ * @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index
+ *     of the radio in interest. Internally a value of -1 is used to
+ *     indicate that the radio id is not given in user-space. This means
+ *     that all the attributes are applicable to all the radios. If there is
+ *     a radio index provided in user-space, the attributes will be
+ *     applicable to that specific radio only. If the radio id is greater
+ *     thank the number of radios, error denoting invalid value is returned.
+ *
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3464,6 +3472,8 @@ enum nl80211_attrs {
 
        NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS,
 
+       NL80211_ATTR_WIPHY_RADIO_INDEX,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
index 1a17d66dfa75db0e7a6ed4b484d72ba8b85a6362..72cecc304658aff955727aad1cd9ba820a4f1c76 100644 (file)
@@ -3045,7 +3045,8 @@ static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,
        return 0;
 }
 
-static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+static int ieee80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
+                                     u32 changed)
 {
        struct ieee80211_local *local = wiphy_priv(wiphy);
        int err;
@@ -3053,7 +3054,8 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
        if (changed & WIPHY_PARAM_FRAG_THRESHOLD) {
                ieee80211_check_fast_xmit_all(local);
 
-               err = drv_set_frag_threshold(local, wiphy->frag_threshold);
+               err = drv_set_frag_threshold(local, radio_idx,
+                                            wiphy->frag_threshold);
 
                if (err) {
                        ieee80211_check_fast_xmit_all(local);
@@ -3067,14 +3069,16 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 
                coverage_class = changed & WIPHY_PARAM_COVERAGE_CLASS ?
                                        wiphy->coverage_class : -1;
-               err = drv_set_coverage_class(local, coverage_class);
+               err = drv_set_coverage_class(local, radio_idx,
+                                            coverage_class);
 
                if (err)
                        return err;
        }
 
        if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
-               err = drv_set_rts_threshold(local, wiphy->rts_threshold);
+               err = drv_set_rts_threshold(local, radio_idx,
+                                           wiphy->rts_threshold);
 
                if (err)
                        return err;
@@ -3092,18 +3096,19 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
        }
        if (changed &
            (WIPHY_PARAM_RETRY_SHORT | WIPHY_PARAM_RETRY_LONG))
-               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_RETRY_LIMITS);
+               ieee80211_hw_config(local, radio_idx,
+                                   IEEE80211_CONF_CHANGE_RETRY_LIMITS);
 
        if (changed & (WIPHY_PARAM_TXQ_LIMIT |
                       WIPHY_PARAM_TXQ_MEMORY_LIMIT |
                       WIPHY_PARAM_TXQ_QUANTUM))
-               ieee80211_txq_set_params(local);
+               ieee80211_txq_set_params(local, radio_idx);
 
        return 0;
 }
 
 static int ieee80211_set_tx_power(struct wiphy *wiphy,
-                                 struct wireless_dev *wdev,
+                                 struct wireless_dev *wdev, int radio_idx,
                                  enum nl80211_tx_power_setting type, int mbm)
 {
        struct ieee80211_local *local = wiphy_priv(wiphy);
@@ -3231,6 +3236,7 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
 
 static int ieee80211_get_tx_power(struct wiphy *wiphy,
                                  struct wireless_dev *wdev,
+                                 int radio_idx,
                                  unsigned int link_id,
                                  int *dbm)
 {
@@ -3409,7 +3415,7 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
        }
 
        if (ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS))
-               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+               ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS);
 
        ieee80211_recalc_ps(local);
        ieee80211_recalc_ps_vif(sdata);
@@ -4305,7 +4311,8 @@ ieee80211_update_mgmt_frame_registrations(struct wiphy *wiphy,
                ieee80211_configure_filter(local);
 }
 
-static int ieee80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
+static int ieee80211_set_antenna(struct wiphy *wiphy, int radio_idx,
+                                u32 tx_ant, u32 rx_ant)
 {
        struct ieee80211_local *local = wiphy_priv(wiphy);
        int ret;
@@ -4321,11 +4328,12 @@ static int ieee80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
        return 0;
 }
 
-static int ieee80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant)
+static int ieee80211_get_antenna(struct wiphy *wiphy, int radio_idx,
+                                u32 *tx_ant, u32 *rx_ant)
 {
        struct ieee80211_local *local = wiphy_priv(wiphy);
 
-       return drv_get_antenna(local, tx_ant, rx_ant);
+       return drv_get_antenna(local, radio_idx, tx_ant, rx_ant);
 }
 
 static int ieee80211_set_rekey_data(struct wiphy *wiphy,
index d62f91656a1953b71439dad7ea2bcda89949df34..4bcbcf9d98b55a7d6243707e5304cf1ee44b5673 100644 (file)
@@ -744,7 +744,7 @@ static int ieee80211_add_chanctx(struct ieee80211_local *local,
        /* turn idle off *before* setting channel -- some drivers need that */
        changed = ieee80211_idle_off(local);
        if (changed)
-               ieee80211_hw_config(local, changed);
+               ieee80211_hw_config(local, -1, changed);
 
        err = drv_add_chanctx(local, ctx);
        if (err) {
index ba017bf3fd15b8e70e779c37367a8376cf41d691..8baebb5636ec494d6d8355415e71effce69d5404 100644 (file)
@@ -143,15 +143,16 @@ int drv_change_interface(struct ieee80211_local *local,
 void drv_remove_interface(struct ieee80211_local *local,
                          struct ieee80211_sub_if_data *sdata);
 
-static inline int drv_config(struct ieee80211_local *local, u32 changed)
+static inline int drv_config(struct ieee80211_local *local, int radio_idx,
+                            u32 changed)
 {
        int ret;
 
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
 
-       trace_drv_config(local, changed);
-       ret = local->ops->config(&local->hw, changed);
+       trace_drv_config(local, radio_idx, changed);
+       ret = local->ops->config(&local->hw, radio_idx, changed);
        trace_drv_return_int(local, ret);
        return ret;
 }
@@ -387,45 +388,47 @@ static inline void drv_get_key_seq(struct ieee80211_local *local,
 }
 
 static inline int drv_set_frag_threshold(struct ieee80211_local *local,
-                                       u32 value)
+                                        int radio_idx, u32 value)
 {
        int ret = 0;
 
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
 
-       trace_drv_set_frag_threshold(local, value);
+       trace_drv_set_frag_threshold(local, radio_idx, value);
        if (local->ops->set_frag_threshold)
-               ret = local->ops->set_frag_threshold(&local->hw, value);
+               ret = local->ops->set_frag_threshold(&local->hw, radio_idx,
+                                                    value);
        trace_drv_return_int(local, ret);
        return ret;
 }
 
 static inline int drv_set_rts_threshold(struct ieee80211_local *local,
-                                       u32 value)
+                                       int radio_idx, u32 value)
 {
        int ret = 0;
 
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
 
-       trace_drv_set_rts_threshold(local, value);
+       trace_drv_set_rts_threshold(local, radio_idx, value);
        if (local->ops->set_rts_threshold)
-               ret = local->ops->set_rts_threshold(&local->hw, value);
+               ret = local->ops->set_rts_threshold(&local->hw, radio_idx,
+                                                   value);
        trace_drv_return_int(local, ret);
        return ret;
 }
 
 static inline int drv_set_coverage_class(struct ieee80211_local *local,
-                                        s16 value)
+                                        int radio_idx, s16 value)
 {
        int ret = 0;
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
 
-       trace_drv_set_coverage_class(local, value);
+       trace_drv_set_coverage_class(local, radio_idx, value);
        if (local->ops->set_coverage_class)
-               local->ops->set_coverage_class(&local->hw, value);
+               local->ops->set_coverage_class(&local->hw, radio_idx, value);
        else
                ret = -EOPNOTSUPP;
 
@@ -772,20 +775,21 @@ static inline int drv_set_antenna(struct ieee80211_local *local,
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
        if (local->ops->set_antenna)
-               ret = local->ops->set_antenna(&local->hw, tx_ant, rx_ant);
+               ret = local->ops->set_antenna(&local->hw, -1, tx_ant, rx_ant);
        trace_drv_set_antenna(local, tx_ant, rx_ant, ret);
        return ret;
 }
 
-static inline int drv_get_antenna(struct ieee80211_local *local,
+static inline int drv_get_antenna(struct ieee80211_local *local, int radio_idx,
                                  u32 *tx_ant, u32 *rx_ant)
 {
        int ret = -EOPNOTSUPP;
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
        if (local->ops->get_antenna)
-               ret = local->ops->get_antenna(&local->hw, tx_ant, rx_ant);
-       trace_drv_get_antenna(local, *tx_ant, *rx_ant, ret);
+               ret = local->ops->get_antenna(&local->hw, radio_idx,
+                                             tx_ant, rx_ant);
+       trace_drv_get_antenna(local, radio_idx, *tx_ant, *rx_ant, ret);
        return ret;
 }
 
index 9b9c7209878b076c5c3c09a78d067cf54d2d95a6..f59a5b38e6f2c223668450c810184fa596a0a6aa 100644 (file)
@@ -1872,7 +1872,8 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
                                     struct ieee80211_rx_status *status,
                                     unsigned int mpdu_len,
                                     unsigned int mpdu_offset);
-int ieee80211_hw_config(struct ieee80211_local *local, u32 changed);
+int ieee80211_hw_config(struct ieee80211_local *local, int radio_idx,
+                       u32 changed);
 int ieee80211_hw_conf_chan(struct ieee80211_local *local);
 void ieee80211_hw_conf_init(struct ieee80211_local *local);
 void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx);
@@ -2542,7 +2543,7 @@ static inline bool ieee80211_can_run_worker(struct ieee80211_local *local)
 }
 
 int ieee80211_txq_setup_flows(struct ieee80211_local *local);
-void ieee80211_txq_set_params(struct ieee80211_local *local);
+void ieee80211_txq_set_params(struct ieee80211_local *local, int radio_idx);
 void ieee80211_txq_teardown_flows(struct ieee80211_local *local);
 void ieee80211_txq_init(struct ieee80211_sub_if_data *sdata,
                        struct sta_info *sta,
index 7c27f3cd841c3cad37e91f62c04d2a75048ae7cf..7b2baebb86444d7888fe71a6afc6d223c14f962d 100644 (file)
@@ -146,7 +146,7 @@ void ieee80211_recalc_idle(struct ieee80211_local *local)
 {
        u32 change = __ieee80211_recalc_idle(local, false);
        if (change)
-               ieee80211_hw_config(local, change);
+               ieee80211_hw_config(local, -1, change);
 }
 
 static int ieee80211_verify_mac(struct ieee80211_sub_if_data *sdata, u8 *addr,
@@ -726,7 +726,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
 
        /* do after stop to avoid reconfiguring when we stop anyway */
        ieee80211_configure_filter(local);
-       ieee80211_hw_config(local, hw_reconf_flags);
+       ieee80211_hw_config(local, -1, hw_reconf_flags);
 
        if (local->virt_monitors == local->open_count)
                ieee80211_add_virtual_monitor(local);
@@ -1491,7 +1491,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
        if (local->open_count == 1)
                ieee80211_hw_conf_init(local);
        else if (hw_reconf_flags)
-               ieee80211_hw_config(local, hw_reconf_flags);
+               ieee80211_hw_config(local, -1, hw_reconf_flags);
 
        ieee80211_recalc_ps(local);
 
index 6b6de43d9420ac9dbc44a69e1d5d50839dc49eb2..c1c758e76d2edddce71efa5a0242e9a696d576cc 100644 (file)
@@ -190,7 +190,8 @@ static u32 ieee80211_calc_hw_conf_chan(struct ieee80211_local *local,
        return changed;
 }
 
-int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
+int ieee80211_hw_config(struct ieee80211_local *local, int radio_idx,
+                       u32 changed)
 {
        int ret = 0;
 
@@ -201,7 +202,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
                           IEEE80211_CONF_CHANGE_SMPS));
 
        if (changed && local->open_count) {
-               ret = drv_config(local, changed);
+               ret = drv_config(local, radio_idx, changed);
                /*
                 * Goal:
                 * HW reconfiguration should never fail, the driver has told
@@ -235,7 +236,7 @@ static int _ieee80211_hw_conf_chan(struct ieee80211_local *local,
        if (!changed)
                return 0;
 
-       return drv_config(local, changed);
+       return drv_config(local, -1, changed);
 }
 
 int ieee80211_hw_conf_chan(struct ieee80211_local *local)
@@ -269,7 +270,7 @@ void ieee80211_hw_conf_init(struct ieee80211_local *local)
                                                       ctx ? &ctx->conf : NULL);
        }
 
-       WARN_ON(drv_config(local, changed));
+       WARN_ON(drv_config(local, -1, changed));
 }
 
 int ieee80211_emulate_add_chanctx(struct ieee80211_hw *hw,
index 2d46d4af60d7bdc96b25d6e92a68271802deedd3..d526f2fe9fe50874939dc49fffa04f622b53072d 100644 (file)
@@ -3181,7 +3181,7 @@ static void ieee80211_enable_ps(struct ieee80211_local *local,
                        return;
 
                conf->flags |= IEEE80211_CONF_PS;
-               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+               ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS);
        }
 }
 
@@ -3193,7 +3193,7 @@ static void ieee80211_change_ps(struct ieee80211_local *local)
                ieee80211_enable_ps(local, local->ps_sdata);
        } else if (conf->flags & IEEE80211_CONF_PS) {
                conf->flags &= ~IEEE80211_CONF_PS;
-               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+               ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS);
                timer_delete_sync(&local->dynamic_ps_timer);
                wiphy_work_cancel(local->hw.wiphy,
                                  &local->dynamic_ps_enable_work);
@@ -3302,7 +3302,7 @@ void ieee80211_dynamic_ps_disable_work(struct wiphy *wiphy,
 
        if (local->hw.conf.flags & IEEE80211_CONF_PS) {
                local->hw.conf.flags &= ~IEEE80211_CONF_PS;
-               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+               ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS);
        }
 
        ieee80211_wake_queues_by_reason(&local->hw,
@@ -3377,7 +3377,7 @@ void ieee80211_dynamic_ps_enable_work(struct wiphy *wiphy,
            (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) {
                ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
                local->hw.conf.flags |= IEEE80211_CONF_PS;
-               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+               ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS);
        }
 }
 
@@ -3986,7 +3986,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
         */
        if (local->hw.conf.flags & IEEE80211_CONF_PS) {
                local->hw.conf.flags &= ~IEEE80211_CONF_PS;
-               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+               ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS);
        }
        local->ps_sdata = NULL;
 
@@ -7340,7 +7340,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link,
                if (local->hw.conf.dynamic_ps_timeout > 0) {
                        if (local->hw.conf.flags & IEEE80211_CONF_PS) {
                                local->hw.conf.flags &= ~IEEE80211_CONF_PS;
-                               ieee80211_hw_config(local,
+                               ieee80211_hw_config(local, -1,
                                                    IEEE80211_CONF_CHANGE_PS);
                        }
                        ieee80211_send_nullfunc(local, sdata, false);
index 686d9f6e9b527acaa3500e8d99d5ca513bb1025e..13df6321634debd3fb777b08f55a8bafef805022 100644 (file)
@@ -39,7 +39,7 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata)
        if (local->hw.conf.flags & IEEE80211_CONF_PS) {
                offchannel_ps_enabled = true;
                local->hw.conf.flags &= ~IEEE80211_CONF_PS;
-               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+               ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS);
        }
 
        if (!offchannel_ps_enabled ||
index a9cc832240a549d9d07a45d088bbab3857c2d09d..5a508d99e84f73cc97e1378b7a298b715200ccf1 100644 (file)
@@ -108,7 +108,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
                            sdata->u.mgd.powersave &&
                             !(local->hw.conf.flags & IEEE80211_CONF_PS)) {
                                local->hw.conf.flags |= IEEE80211_CONF_PS;
-                               ieee80211_hw_config(local,
+                               ieee80211_hw_config(local, -1,
                                                    IEEE80211_CONF_CHANGE_PS);
                        }
                }
index 8215ca58ce5e31acc98de21f312e825a09324128..0bfbce1574862b5a6a2ca39794abea7fe9a3f34a 100644 (file)
@@ -384,12 +384,14 @@ DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
 
 TRACE_EVENT(drv_config,
        TP_PROTO(struct ieee80211_local *local,
+                int radio_idx,
                 u32 changed),
 
-       TP_ARGS(local, changed),
+       TP_ARGS(local, radio_idx, changed),
 
        TP_STRUCT__entry(
                LOCAL_ENTRY
+               __field(int, radio_idx)
                __field(u32, changed)
                __field(u32, flags)
                __field(int, power_level)
@@ -403,6 +405,7 @@ TRACE_EVENT(drv_config,
 
        TP_fast_assign(
                LOCAL_ASSIGN;
+               __entry->radio_idx = radio_idx;
                __entry->changed = changed;
                __entry->flags = local->hw.conf.flags;
                __entry->power_level = local->hw.conf.power_level;
@@ -417,8 +420,8 @@ TRACE_EVENT(drv_config,
        ),
 
        TP_printk(
-               LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
-               LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
+               LOCAL_PR_FMT " radio_idx:%d ch:%#x" CHANDEF_PR_FMT,
+               LOCAL_PR_ARG, __entry->radio_idx, __entry->changed, CHANDEF_PR_ARG
        )
 );
 
@@ -818,34 +821,71 @@ TRACE_EVENT(drv_get_key_seq,
        )
 );
 
-DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
-       TP_PROTO(struct ieee80211_local *local, u32 value),
-       TP_ARGS(local, value)
+TRACE_EVENT(drv_set_frag_threshold,
+       TP_PROTO(struct ieee80211_local *local, int radio_idx, u32 value),
+
+       TP_ARGS(local, radio_idx, value),
+
+       TP_STRUCT__entry(
+               LOCAL_ENTRY
+               __field(int, radio_idx)
+               __field(u32, value)
+       ),
+
+       TP_fast_assign(
+               LOCAL_ASSIGN;
+               __entry->radio_idx = radio_idx;
+               __entry->value = value;
+       ),
+
+       TP_printk(
+               LOCAL_PR_FMT " radio_id:%d value:%u",
+               LOCAL_PR_ARG, __entry->radio_idx, __entry->value
+       )
 );
 
-DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
-       TP_PROTO(struct ieee80211_local *local, u32 value),
-       TP_ARGS(local, value)
+TRACE_EVENT(drv_set_rts_threshold,
+       TP_PROTO(struct ieee80211_local *local, int radio_idx, u32 value),
+
+       TP_ARGS(local, radio_idx, value),
+
+       TP_STRUCT__entry(
+               LOCAL_ENTRY
+               __field(int, radio_idx)
+               __field(u32, value)
+       ),
+       TP_fast_assign(
+               LOCAL_ASSIGN;
+               __entry->radio_idx = radio_idx;
+               __entry->value = value;
+       ),
+
+       TP_printk(
+               LOCAL_PR_FMT " radio_id:%d value:%u",
+               LOCAL_PR_ARG, __entry->radio_idx, __entry->value
+       )
 );
 
 TRACE_EVENT(drv_set_coverage_class,
-       TP_PROTO(struct ieee80211_local *local, s16 value),
+       TP_PROTO(struct ieee80211_local *local, int radio_idx, s16 value),
 
-       TP_ARGS(local, value),
+       TP_ARGS(local, radio_idx, value),
 
        TP_STRUCT__entry(
                LOCAL_ENTRY
+               __field(int, radio_idx)
                __field(s16, value)
        ),
 
        TP_fast_assign(
                LOCAL_ASSIGN;
+               __entry->radio_idx = radio_idx;
                __entry->value = value;
        ),
 
        TP_printk(
-               LOCAL_PR_FMT " value:%d",
-               LOCAL_PR_ARG, __entry->value
+               LOCAL_PR_FMT " radio_id:%d value:%d",
+               LOCAL_PR_ARG, __entry->radio_idx, __entry->value
        )
 );
 
@@ -1318,12 +1358,14 @@ TRACE_EVENT(drv_set_antenna,
 );
 
 TRACE_EVENT(drv_get_antenna,
-       TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
+       TP_PROTO(struct ieee80211_local *local, int radio_idx, u32 tx_ant,
+                u32 rx_ant, int ret),
 
-       TP_ARGS(local, tx_ant, rx_ant, ret),
+       TP_ARGS(local, radio_idx, tx_ant, rx_ant, ret),
 
        TP_STRUCT__entry(
                LOCAL_ENTRY
+               __field(int, radio_idx)
                __field(u32, tx_ant)
                __field(u32, rx_ant)
                __field(int, ret)
@@ -1331,14 +1373,16 @@ TRACE_EVENT(drv_get_antenna,
 
        TP_fast_assign(
                LOCAL_ASSIGN;
+               __entry->radio_idx = radio_idx;
                __entry->tx_ant = tx_ant;
                __entry->rx_ant = rx_ant;
                __entry->ret = ret;
        ),
 
        TP_printk(
-               LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
-               LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
+               LOCAL_PR_FMT " radio_idx:%d tx_ant:%d rx_ant:%d ret:%d",
+               LOCAL_PR_ARG, __entry->radio_idx, __entry->tx_ant,
+               __entry->rx_ant, __entry->ret
        )
 );
 
index d58b80813bdd785a449c41cf92089e8859389353..6278d55aeb2ef1f6f16f6c0730d6d87a3d306677 100644 (file)
@@ -1541,7 +1541,7 @@ void ieee80211_txq_purge(struct ieee80211_local *local,
        spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
 }
 
-void ieee80211_txq_set_params(struct ieee80211_local *local)
+void ieee80211_txq_set_params(struct ieee80211_local *local, int radio_idx)
 {
        if (local->hw.wiphy->txq_limit)
                local->fq.limit = local->hw.wiphy->txq_limit;
@@ -1605,7 +1605,7 @@ int ieee80211_txq_setup_flows(struct ieee80211_local *local)
        for (i = 0; i < fq->flows_cnt; i++)
                codel_vars_init(&local->cvars[i]);
 
-       ieee80211_txq_set_params(local);
+       ieee80211_txq_set_params(local, -1);
 
        return 0;
 }
index 24c43a1ef2aadc46be7f4b23b885c431a482c612..773c8da0acc97eaa1542ed6f2a6a2f4a2e1ef10a 100644 (file)
@@ -1826,13 +1826,13 @@ int ieee80211_reconfig(struct ieee80211_local *local)
        }
 
        /* setup fragmentation threshold */
-       drv_set_frag_threshold(local, hw->wiphy->frag_threshold);
+       drv_set_frag_threshold(local, -1, hw->wiphy->frag_threshold);
 
        /* setup RTS threshold */
-       drv_set_rts_threshold(local, hw->wiphy->rts_threshold);
+       drv_set_rts_threshold(local, -1, hw->wiphy->rts_threshold);
 
        /* reset coverage class */
-       drv_set_coverage_class(local, hw->wiphy->coverage_class);
+       drv_set_coverage_class(local, -1, hw->wiphy->coverage_class);
 
        ieee80211_led_radio(local, true);
        ieee80211_mod_tpt_led_trig(local,
@@ -1890,11 +1890,11 @@ int ieee80211_reconfig(struct ieee80211_local *local)
                ieee80211_assign_chanctx(local, sdata, &sdata->deflink);
 
        /* reconfigure hardware */
-       ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_LISTEN_INTERVAL |
-                                  IEEE80211_CONF_CHANGE_MONITOR |
-                                  IEEE80211_CONF_CHANGE_PS |
-                                  IEEE80211_CONF_CHANGE_RETRY_LIMITS |
-                                  IEEE80211_CONF_CHANGE_IDLE);
+       ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_LISTEN_INTERVAL |
+                                      IEEE80211_CONF_CHANGE_MONITOR |
+                                      IEEE80211_CONF_CHANGE_PS |
+                                      IEEE80211_CONF_CHANGE_RETRY_LIMITS |
+                                      IEEE80211_CONF_CHANGE_IDLE);
 
        ieee80211_configure_filter(local);
 
index 9ef618baac9e7c5aaca065cd0b99e09aa54774e3..b409785497905892410bfec678ce09a0d2dba217 100644 (file)
@@ -854,6 +854,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
        [NL80211_ATTR_MLO_RECONF_REM_LINKS] = { .type = NLA_U16 },
        [NL80211_ATTR_EPCS] = { .type = NLA_FLAG },
        [NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS] = { .type = NLA_U16 },
+       [NL80211_ATTR_WIPHY_RADIO_INDEX] = { .type = NLA_U8 },
 };
 
 /* policy for the key attributes */
@@ -2639,7 +2640,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                        u32 tx_ant = 0, rx_ant = 0;
                        int res;
 
-                       res = rdev_get_antenna(rdev, &tx_ant, &rx_ant);
+                       res = rdev_get_antenna(rdev, -1, &tx_ant, &rx_ant);
                        if (!res) {
                                if (nla_put_u32(msg,
                                                NL80211_ATTR_WIPHY_ANTENNA_TX,
@@ -3620,6 +3621,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
        u32 frag_threshold = 0, rts_threshold = 0;
        u8 coverage_class = 0;
        u32 txq_limit = 0, txq_memory_limit = 0, txq_quantum = 0;
+       int radio_idx = -1;
 
        rtnl_lock();
        /*
@@ -3670,6 +3672,17 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
        if (result)
                return result;
 
+       if (info->attrs[NL80211_ATTR_WIPHY_RADIO_INDEX]) {
+               /* Radio idx is not expected for non-multi radio wiphy */
+               if (rdev->wiphy.n_radio <= 0)
+                       return -EINVAL;
+
+               radio_idx = nla_get_u8(
+                               info->attrs[NL80211_ATTR_WIPHY_RADIO_INDEX]);
+               if (radio_idx >= rdev->wiphy.n_radio)
+                       return -EINVAL;
+       }
+
        if (info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS]) {
                struct ieee80211_txq_params txq_params;
                struct nlattr *tb[NL80211_TXQ_ATTR_MAX + 1];
@@ -3759,7 +3772,8 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
                        mbm = nla_get_u32(info->attrs[idx]);
                }
 
-               result = rdev_set_tx_power(rdev, txp_wdev, type, mbm);
+               result = rdev_set_tx_power(rdev, txp_wdev, radio_idx, type,
+                                          mbm);
                if (result)
                        return result;
        }
@@ -3785,7 +3799,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
                tx_ant = tx_ant & rdev->wiphy.available_antennas_tx;
                rx_ant = rx_ant & rdev->wiphy.available_antennas_rx;
 
-               result = rdev_set_antenna(rdev, tx_ant, rx_ant);
+               result = rdev_set_antenna(rdev, radio_idx, tx_ant, rx_ant);
                if (result)
                        return result;
        }
@@ -3911,7 +3925,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
                if (changed & WIPHY_PARAM_TXQ_QUANTUM)
                        rdev->wiphy.txq_quantum = txq_quantum;
 
-               result = rdev_set_wiphy_params(rdev, changed);
+               result = rdev_set_wiphy_params(rdev, radio_idx, changed);
                if (result) {
                        rdev->wiphy.retry_short = old_retry_short;
                        rdev->wiphy.retry_long = old_retry_long;
@@ -4012,7 +4026,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
        if (rdev->ops->get_tx_power && !wdev->valid_links) {
                int dbm, ret;
 
-               ret = rdev_get_tx_power(rdev, wdev, 0, &dbm);
+               ret = rdev_get_tx_power(rdev, wdev, -1, 0, &dbm);
                if (ret == 0 &&
                    nla_put_u32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL,
                                DBM_TO_MBM(dbm)))
@@ -4084,7 +4098,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
                        if (rdev->ops->get_tx_power) {
                                int dbm, ret;
 
-                               ret = rdev_get_tx_power(rdev, wdev, link_id, &dbm);
+                               ret = rdev_get_tx_power(rdev, wdev, -1, link_id, &dbm);
                                if (ret == 0 &&
                                    nla_put_u32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL,
                                                DBM_TO_MBM(dbm)))
index 9f4783c2354c948318ba31c1d2d2c67045f5e60d..803b39c2658759baac710d43bc14bacd970c72ae 100644 (file)
@@ -577,35 +577,40 @@ static inline int rdev_leave_ibss(struct cfg80211_registered_device *rdev,
 }
 
 static inline int
-rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed)
+rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, int radio_idx,
+                     u32 changed)
 {
        int ret = -EOPNOTSUPP;
 
-       trace_rdev_set_wiphy_params(&rdev->wiphy, changed);
+       trace_rdev_set_wiphy_params(&rdev->wiphy, radio_idx, changed);
        if (rdev->ops->set_wiphy_params)
-               ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed);
+               ret = rdev->ops->set_wiphy_params(&rdev->wiphy, radio_idx,
+                                                 changed);
        trace_rdev_return_int(&rdev->wiphy, ret);
        return ret;
 }
 
 static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev,
-                                   struct wireless_dev *wdev,
-                                   enum nl80211_tx_power_setting type, int mbm)
+                                   struct wireless_dev *wdev, int radio_idx,
+                                   enum nl80211_tx_power_setting type,
+                                   int mbm)
 {
        int ret;
-       trace_rdev_set_tx_power(&rdev->wiphy, wdev, type, mbm);
-       ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, type, mbm);
+       trace_rdev_set_tx_power(&rdev->wiphy, wdev, radio_idx, type, mbm);
+       ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, radio_idx, type,
+                                     mbm);
        trace_rdev_return_int(&rdev->wiphy, ret);
        return ret;
 }
 
 static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev,
-                                   struct wireless_dev *wdev, unsigned int link_id,
-                                   int *dbm)
+                                   struct wireless_dev *wdev, int radio_idx,
+                                   unsigned int link_id, int *dbm)
 {
        int ret;
-       trace_rdev_get_tx_power(&rdev->wiphy, wdev, link_id);
-       ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, link_id, dbm);
+       trace_rdev_get_tx_power(&rdev->wiphy, wdev, radio_idx, link_id);
+       ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, radio_idx, link_id,
+                                     dbm);
        trace_rdev_return_int_int(&rdev->wiphy, ret, *dbm);
        return ret;
 }
@@ -857,21 +862,21 @@ rdev_update_mgmt_frame_registrations(struct cfg80211_registered_device *rdev,
 }
 
 static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev,
-                                  u32 tx_ant, u32 rx_ant)
+                                  int radio_idx, u32 tx_ant, u32 rx_ant)
 {
        int ret;
-       trace_rdev_set_antenna(&rdev->wiphy, tx_ant, rx_ant);
-       ret = rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant);
+       trace_rdev_set_antenna(&rdev->wiphy, radio_idx, tx_ant, rx_ant);
+       ret = rdev->ops->set_antenna(&rdev->wiphy, -1, tx_ant, rx_ant);
        trace_rdev_return_int(&rdev->wiphy, ret);
        return ret;
 }
 
 static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev,
-                                  u32 *tx_ant, u32 *rx_ant)
+                                  int radio_idx, u32 *tx_ant, u32 *rx_ant)
 {
        int ret;
-       trace_rdev_get_antenna(&rdev->wiphy);
-       ret = rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant);
+       trace_rdev_get_antenna(&rdev->wiphy, radio_idx);
+       ret = rdev->ops->get_antenna(&rdev->wiphy, radio_idx, tx_ant, rx_ant);
        if (ret)
                trace_rdev_return_int(&rdev->wiphy, ret);
        else
index 61a5eca9c513753be5fc9bac065f78dd2f722197..7e43ab9de92305b64c14da19cc1b241033e206aa 100644 (file)
@@ -406,9 +406,19 @@ DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
        TP_ARGS(wiphy)
 );
 
-DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
-       TP_PROTO(struct wiphy *wiphy),
-       TP_ARGS(wiphy)
+TRACE_EVENT(rdev_get_antenna,
+       TP_PROTO(struct wiphy *wiphy, int radio_idx),
+       TP_ARGS(wiphy, radio_idx),
+       TP_STRUCT__entry(
+               WIPHY_ENTRY
+               __field(int, radio_idx)
+       ),
+       TP_fast_assign(
+               WIPHY_ASSIGN;
+               __entry->radio_idx = radio_idx;
+       ),
+       TP_printk(WIPHY_PR_FMT ", radio_idx: %d",
+                 WIPHY_PR_ARG, __entry->radio_idx)
 );
 
 DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
@@ -1678,18 +1688,20 @@ TRACE_EVENT(rdev_join_ocb,
 );
 
 TRACE_EVENT(rdev_set_wiphy_params,
-       TP_PROTO(struct wiphy *wiphy, u32 changed),
-       TP_ARGS(wiphy, changed),
+       TP_PROTO(struct wiphy *wiphy, int radio_idx, u32 changed),
+       TP_ARGS(wiphy, radio_idx, changed),
        TP_STRUCT__entry(
                WIPHY_ENTRY
+               __field(int, radio_idx)
                __field(u32, changed)
        ),
        TP_fast_assign(
                WIPHY_ASSIGN;
+               __entry->radio_idx = radio_idx;
                __entry->changed = changed;
        ),
-       TP_printk(WIPHY_PR_FMT ", changed: %u",
-                 WIPHY_PR_ARG, __entry->changed)
+       TP_printk(WIPHY_PR_FMT ", radio_idx: %d, changed: %u",
+                 WIPHY_PR_ARG, __entry->radio_idx, __entry->changed)
 );
 
 DECLARE_EVENT_CLASS(wiphy_wdev_link_evt,
@@ -1710,30 +1722,51 @@ DECLARE_EVENT_CLASS(wiphy_wdev_link_evt,
                  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->link_id)
 );
 
-DEFINE_EVENT(wiphy_wdev_link_evt, rdev_get_tx_power,
+TRACE_EVENT(rdev_get_tx_power,
        TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
-                unsigned int link_id),
-       TP_ARGS(wiphy, wdev, link_id)
+                int radio_idx, unsigned int link_id),
+       TP_ARGS(wiphy, wdev, radio_idx, link_id),
+       TP_STRUCT__entry(
+               WIPHY_ENTRY
+               WDEV_ENTRY
+               __field(int, radio_idx)
+               __field(unsigned int, link_id)
+       ),
+       TP_fast_assign(
+               WIPHY_ASSIGN;
+               WDEV_ASSIGN;
+               __entry->radio_idx = radio_idx;
+               __entry->link_id = link_id;
+       ),
+       TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
+                 ", radio_idx: %d, link_id: %u",
+                 WIPHY_PR_ARG, WDEV_PR_ARG,
+                 __entry->radio_idx, __entry->link_id)
 );
 
 TRACE_EVENT(rdev_set_tx_power,
        TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
-                enum nl80211_tx_power_setting type, int mbm),
-       TP_ARGS(wiphy, wdev, type, mbm),
+                int radio_idx, enum nl80211_tx_power_setting type,
+                int mbm),
+       TP_ARGS(wiphy, wdev, radio_idx, type, mbm),
        TP_STRUCT__entry(
                WIPHY_ENTRY
                WDEV_ENTRY
+               __field(int, radio_idx)
                __field(enum nl80211_tx_power_setting, type)
                __field(int, mbm)
        ),
        TP_fast_assign(
                WIPHY_ASSIGN;
                WDEV_ASSIGN;
+               __entry->radio_idx = radio_idx;
                __entry->type = type;
                __entry->mbm = mbm;
        ),
-       TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
-                 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
+       TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
+                 ", radio_idx: %d, type: %u, mbm: %d",
+                 WIPHY_PR_ARG, WDEV_PR_ARG,
+                 __entry->radio_idx, __entry->type, __entry->mbm)
 );
 
 TRACE_EVENT(rdev_return_int_int,
@@ -1866,26 +1899,24 @@ TRACE_EVENT(rdev_return_void_tx_rx,
                  __entry->rx_max)
 );
 
-DECLARE_EVENT_CLASS(tx_rx_evt,
-       TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
-       TP_ARGS(wiphy, tx, rx),
+TRACE_EVENT(rdev_set_antenna,
+       TP_PROTO(struct wiphy *wiphy, int radio_idx, u32 tx, u32 rx),
+       TP_ARGS(wiphy, radio_idx, tx, rx),
        TP_STRUCT__entry(
                WIPHY_ENTRY
+               __field(int, radio_idx)
                __field(u32, tx)
                __field(u32, rx)
        ),
        TP_fast_assign(
                WIPHY_ASSIGN;
+               __entry->radio_idx = radio_idx;
                __entry->tx = tx;
                __entry->rx = rx;
        ),
-       TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
-                 WIPHY_PR_ARG, __entry->tx, __entry->rx)
-);
-
-DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
-       TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
-       TP_ARGS(wiphy, tx, rx)
+       TP_printk(WIPHY_PR_FMT ", radio_idx: %d, tx: %u, rx: %u ",
+                 WIPHY_PR_ARG, __entry->radio_idx,
+                 __entry->tx, __entry->rx)
 );
 
 DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
index a74b1afc594e5e339c63998ea06e37903f80db75..1241fda78a68c4746f2e6ae6f8de5ebc9bca8fb8 100644 (file)
@@ -263,7 +263,7 @@ int cfg80211_wext_siwrts(struct net_device *dev,
        else
                wdev->wiphy->rts_threshold = rts->value;
 
-       err = rdev_set_wiphy_params(rdev, WIPHY_PARAM_RTS_THRESHOLD);
+       err = rdev_set_wiphy_params(rdev, -1, WIPHY_PARAM_RTS_THRESHOLD);
        if (err)
                wdev->wiphy->rts_threshold = orts;
        return err;
@@ -304,7 +304,7 @@ int cfg80211_wext_siwfrag(struct net_device *dev,
                wdev->wiphy->frag_threshold = frag->value & ~0x1;
        }
 
-       err = rdev_set_wiphy_params(rdev, WIPHY_PARAM_FRAG_THRESHOLD);
+       err = rdev_set_wiphy_params(rdev, -1, WIPHY_PARAM_FRAG_THRESHOLD);
        if (err)
                wdev->wiphy->frag_threshold = ofrag;
        return err;
@@ -355,7 +355,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
                changed |= WIPHY_PARAM_RETRY_SHORT;
        }
 
-       err = rdev_set_wiphy_params(rdev, changed);
+       err = rdev_set_wiphy_params(rdev, -1, changed);
        if (err) {
                wdev->wiphy->retry_short = oshort;
                wdev->wiphy->retry_long = olong;
@@ -890,7 +890,7 @@ static int cfg80211_wext_siwtxpower(struct net_device *dev,
 
        guard(wiphy)(&rdev->wiphy);
 
-       return rdev_set_tx_power(rdev, wdev, type, DBM_TO_MBM(dbm));
+       return rdev_set_tx_power(rdev, wdev, -1, type, DBM_TO_MBM(dbm));
 }
 
 static int cfg80211_wext_giwtxpower(struct net_device *dev,
@@ -910,7 +910,7 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
                return -EOPNOTSUPP;
 
        scoped_guard(wiphy, &rdev->wiphy) {
-               err = rdev_get_tx_power(rdev, wdev, 0, &val);
+               err = rdev_get_tx_power(rdev, wdev, -1, 0, &val);
        }
        if (err)
                return err;