]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mac80211: pass vif param to conf_tx() callback
authorEliad Peller <eliad@wizery.com>
Sun, 2 Oct 2011 08:15:52 +0000 (10:15 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 3 Oct 2011 19:22:41 +0000 (15:22 -0400)
tx params should be configured per interface.
add ieee80211_vif param to the conf_tx callback,
and change all the drivers that use this callback.

The following spatch was used:
@rule1@
struct ieee80211_ops ops;
identifier conf_tx_op;
@@
ops.conf_tx = conf_tx_op;

@rule2@
identifier rule1.conf_tx_op;
identifier hw, queue, params;
@@
conf_tx_op (
- struct ieee80211_hw *hw,
+ struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u16 queue,
const struct ieee80211_tx_queue_params *params) {...}

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
27 files changed:
drivers/net/wireless/ath/ath5k/mac80211-ops.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/b43/main.c
drivers/net/wireless/b43legacy/main.c
drivers/net/wireless/iwlegacy/iwl-core.c
drivers/net/wireless/iwlegacy/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/mac80211_hwsim.c
drivers/net/wireless/mwl8k.c
drivers/net/wireless/p54/main.c
drivers/net/wireless/rt2x00/rt2400pci.c
drivers/net/wireless/rt2x00/rt2800lib.c
drivers/net/wireless/rt2x00/rt2800lib.h
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00mac.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt73usb.c
drivers/net/wireless/rtl818x/rtl8187/dev.c
drivers/net/wireless/rtlwifi/core.c
drivers/net/wireless/wl1251/main.c
drivers/net/wireless/wl12xx/main.c
drivers/staging/brcm80211/brcmsmac/mac80211_if.c
include/net/mac80211.h
net/mac80211/driver-ops.h

index bba4f6fcf7e2c3641db9fe61cd9c5d05e8fcd09a..6ed4c0717e3e31bbe85ad871ada0c0b0fb11f62e 100644 (file)
@@ -563,7 +563,7 @@ ath5k_get_stats(struct ieee80211_hw *hw,
 
 
 static int
-ath5k_conf_tx(struct ieee80211_hw *hw, u16 queue,
+ath5k_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
              const struct ieee80211_tx_queue_params *params)
 {
        struct ath5k_hw *ah = hw->priv;
index 17dbbd9d2f53c13a2e4366c0dd4da497c83c6711..0b9a0e8a4958cf4dbb58736c940928ffd34d8891 100644 (file)
@@ -1352,7 +1352,8 @@ static int ath9k_htc_sta_remove(struct ieee80211_hw *hw,
        return ret;
 }
 
-static int ath9k_htc_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int ath9k_htc_conf_tx(struct ieee80211_hw *hw,
+                            struct ieee80211_vif *vif, u16 queue,
                             const struct ieee80211_tx_queue_params *params)
 {
        struct ath9k_htc_priv *priv = hw->priv;
index 0ebf7321df123dcbd1f496907f2ea13047ca542b..98831866575832d3e84f34bbce53a90c17248274 100644 (file)
@@ -1842,7 +1842,8 @@ static void ath9k_sta_notify(struct ieee80211_hw *hw,
        }
 }
 
-static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int ath9k_conf_tx(struct ieee80211_hw *hw,
+                        struct ieee80211_vif *vif, u16 queue,
                         const struct ieee80211_tx_queue_params *params)
 {
        struct ath_softc *sc = hw->priv;
index 8b780d6d470f4f4cfb9315382e82811d8cb5c3db..beca71073e9bdd6f786ac0f58e53c42e4e994d8f 100644 (file)
@@ -1305,7 +1305,8 @@ static int carl9170_op_sta_remove(struct ieee80211_hw *hw,
        return 0;
 }
 
-static int carl9170_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int carl9170_op_conf_tx(struct ieee80211_hw *hw,
+                              struct ieee80211_vif *vif, u16 queue,
                               const struct ieee80211_tx_queue_params *param)
 {
        struct ar9170 *ar = hw->priv;
index 43400fb62e1cf5e7b68cec1bebf0c6c892b81908..7cf4125a16241f79d344a365f00f5c4ef0f13421 100644 (file)
@@ -3559,7 +3559,8 @@ static void b43_qos_init(struct b43_wldev *dev)
        b43dbg(dev->wl, "QoS enabled\n");
 }
 
-static int b43_op_conf_tx(struct ieee80211_hw *hw, u16 _queue,
+static int b43_op_conf_tx(struct ieee80211_hw *hw,
+                         struct ieee80211_vif *vif, u16 _queue,
                          const struct ieee80211_tx_queue_params *params)
 {
        struct b43_wl *wl = hw_to_b43_wl(hw);
index 468d1836548eb5ee188cb75051fb39c762c67899..a3b72cd72c6664a12fbf271fe51bd23f78972e43 100644 (file)
@@ -2466,7 +2466,8 @@ out:
        }
 }
 
-static int b43legacy_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int b43legacy_op_conf_tx(struct ieee80211_hw *hw,
+                               struct ieee80211_vif *vif, u16 queue,
                                const struct ieee80211_tx_queue_params *params)
 {
        return 0;
index 8928d47432df95ba1869831c0bfa42d1114de943..2bd5659310d795270abc53a07f5637bb394254c9 100644 (file)
@@ -1250,7 +1250,8 @@ void iwl_legacy_clear_isr_stats(struct iwl_priv *priv)
        memset(&priv->isr_stats, 0, sizeof(priv->isr_stats));
 }
 
-int iwl_legacy_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
+int iwl_legacy_mac_conf_tx(struct ieee80211_hw *hw,
+                          struct ieee80211_vif *vif, u16 queue,
                           const struct ieee80211_tx_queue_params *params)
 {
        struct iwl_priv *priv = hw->priv;
index b2df01c8f8f5d64dc0cab2571742c4de9be0bd0a..d1271fe07d4b85759ba5437232f674cefcb02153 100644 (file)
@@ -286,7 +286,8 @@ struct iwl_cfg {
  ***************************/
 
 struct ieee80211_hw *iwl_legacy_alloc_all(struct iwl_cfg *cfg);
-int iwl_legacy_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
+int iwl_legacy_mac_conf_tx(struct ieee80211_hw *hw,
+                   struct ieee80211_vif *vif, u16 queue,
                    const struct ieee80211_tx_queue_params *params);
 int iwl_legacy_mac_tx_last_beacon(struct ieee80211_hw *hw);
 void iwl_legacy_set_rxon_hwcrypto(struct iwl_priv *priv,
index fc400bb2bdffa8b0c4e646b601a927d608534543..0725603dbf1d12064ddbf80136277b138805afa9 100644 (file)
@@ -1123,8 +1123,9 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear)
                                        &statistics_cmd);
 }
 
-int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
-                          const struct ieee80211_tx_queue_params *params)
+int iwl_mac_conf_tx(struct ieee80211_hw *hw,
+                   struct ieee80211_vif *vif, u16 queue,
+                   const struct ieee80211_tx_queue_params *params)
 {
        struct iwl_priv *priv = hw->priv;
        struct iwl_rxon_context *ctx;
index e55ffad83950110e44326873935b6a1c14a5edcb..db50b650756cb733fdb227201862a829e3dcdcd8 100644 (file)
@@ -236,7 +236,8 @@ struct iwl_cfg {
  *   L i b                 *
  ***************************/
 
-int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
+int iwl_mac_conf_tx(struct ieee80211_hw *hw,
+                   struct ieee80211_vif *vif, u16 queue,
                    const struct ieee80211_tx_queue_params *params);
 int iwl_mac_tx_last_beacon(struct ieee80211_hw *hw);
 void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
index 34b79fc91e39995398f9074fdfcdf4950978a8d4..68455a2307cb54ba99611cb6618ed16169b9f0df 100644 (file)
@@ -970,7 +970,8 @@ static int mac80211_hwsim_set_tim(struct ieee80211_hw *hw,
 }
 
 static int mac80211_hwsim_conf_tx(
-       struct ieee80211_hw *hw, u16 queue,
+       struct ieee80211_hw *hw,
+       struct ieee80211_vif *vif, u16 queue,
        const struct ieee80211_tx_queue_params *params)
 {
        wiphy_debug(hw->wiphy,
index ea1395aafa39104e9f2791242d4fbb8baaefd439..995695c28d5c8d66c9999126e9203392428c24c2 100644 (file)
@@ -4915,7 +4915,8 @@ static int mwl8k_sta_add(struct ieee80211_hw *hw,
        return ret;
 }
 
-static int mwl8k_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int mwl8k_conf_tx(struct ieee80211_hw *hw,
+                        struct ieee80211_vif *vif, u16 queue,
                         const struct ieee80211_tx_queue_params *params)
 {
        struct mwl8k_priv *priv = hw->priv;
@@ -5462,7 +5463,7 @@ static int mwl8k_reload_firmware(struct ieee80211_hw *hw, char *fw_image)
                goto fail;
 
        for (i = 0; i < MWL8K_TX_WMM_QUEUES; i++) {
-               rc = mwl8k_conf_tx(hw, i, &priv->wmm_params[i]);
+               rc = mwl8k_conf_tx(hw, NULL, i, &priv->wmm_params[i]);
                if (rc)
                        goto fail;
        }
index 726a9343f514cb9517f3836617b4354ec30d31fa..ad9ae04d07aaa0666133cb52c8c8930a7683b05b 100644 (file)
@@ -404,7 +404,8 @@ static void p54_configure_filter(struct ieee80211_hw *dev,
                p54_set_groupfilter(priv);
 }
 
-static int p54_conf_tx(struct ieee80211_hw *dev, u16 queue,
+static int p54_conf_tx(struct ieee80211_hw *dev,
+                      struct ieee80211_vif *vif, u16 queue,
                       const struct ieee80211_tx_queue_params *params)
 {
        struct p54_common *priv = dev->priv;
index 7e9272b8f01d8718bc047128f8f0a440563a74b8..3a6b40239bc1473a219921f11b0f5e50a72c7bf7 100644 (file)
@@ -1648,7 +1648,8 @@ static int rt2400pci_probe_hw(struct rt2x00_dev *rt2x00dev)
 /*
  * IEEE80211 stack callback functions.
  */
-static int rt2400pci_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int rt2400pci_conf_tx(struct ieee80211_hw *hw,
+                            struct ieee80211_vif *vif, u16 queue,
                             const struct ieee80211_tx_queue_params *params)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -1661,7 +1662,7 @@ static int rt2400pci_conf_tx(struct ieee80211_hw *hw, u16 queue,
        if (queue != 0)
                return -EINVAL;
 
-       if (rt2x00mac_conf_tx(hw, queue, params))
+       if (rt2x00mac_conf_tx(hw, vif, queue, params))
                return -EINVAL;
 
        /*
index 9688dd0a7ebd1b8d7415b47ca65e85ecd2c88410..3f183a15186e09b5e05a2e296c5c66bd94426b23 100644 (file)
@@ -4398,7 +4398,8 @@ int rt2800_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
 }
 EXPORT_SYMBOL_GPL(rt2800_set_rts_threshold);
 
-int rt2800_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
+int rt2800_conf_tx(struct ieee80211_hw *hw,
+                  struct ieee80211_vif *vif, u16 queue_idx,
                   const struct ieee80211_tx_queue_params *params)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -4414,7 +4415,7 @@ int rt2800_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
         * we are free to update the registers based on the value
         * in the queue parameter.
         */
-       retval = rt2x00mac_conf_tx(hw, queue_idx, params);
+       retval = rt2x00mac_conf_tx(hw, vif, queue_idx, params);
        if (retval)
                return retval;
 
index 6de128e9c612fe6bfc4497b30e4df4286c772d31..8c3c281904fe7f4a08a4e9c16100920ea502e022 100644 (file)
@@ -197,7 +197,8 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev);
 void rt2800_get_tkip_seq(struct ieee80211_hw *hw, u8 hw_key_idx, u32 *iv32,
                         u16 *iv16);
 int rt2800_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
-int rt2800_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
+int rt2800_conf_tx(struct ieee80211_hw *hw,
+                  struct ieee80211_vif *vif, u16 queue_idx,
                   const struct ieee80211_tx_queue_params *params);
 u64 rt2800_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
 int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
index cbf8eb334e96126fa0ec591a7ab8f0a95a33bcdb..2ec5c00235e612941fca457a20a9f16b1b8718b9 100644 (file)
@@ -1299,7 +1299,8 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
                                struct ieee80211_vif *vif,
                                struct ieee80211_bss_conf *bss_conf,
                                u32 changes);
-int rt2x00mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
+int rt2x00mac_conf_tx(struct ieee80211_hw *hw,
+                     struct ieee80211_vif *vif, u16 queue,
                      const struct ieee80211_tx_queue_params *params);
 void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw);
 void rt2x00mac_flush(struct ieee80211_hw *hw, bool drop);
index cef1c878c37ede1775f00278cc0cc58b0bb68bdc..bf0acff07807866f5aa28049a63922ae40ee2ebc 100644 (file)
@@ -713,7 +713,8 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_bss_info_changed);
 
-int rt2x00mac_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
+int rt2x00mac_conf_tx(struct ieee80211_hw *hw,
+                     struct ieee80211_vif *vif, u16 queue_idx,
                      const struct ieee80211_tx_queue_params *params)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
index 6b6a8e2dcddc952aeb61843d60b73e8335369437..bf55b4a311e3708e95cb7872c30486e7e6ad5d65 100644 (file)
@@ -2883,7 +2883,8 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)
 /*
  * IEEE80211 stack callback functions.
  */
-static int rt61pci_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
+static int rt61pci_conf_tx(struct ieee80211_hw *hw,
+                          struct ieee80211_vif *vif, u16 queue_idx,
                           const struct ieee80211_tx_queue_params *params)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -2899,7 +2900,7 @@ static int rt61pci_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
         * we are free to update the registers based on the value
         * in the queue parameter.
         */
-       retval = rt2x00mac_conf_tx(hw, queue_idx, params);
+       retval = rt2x00mac_conf_tx(hw, vif, queue_idx, params);
        if (retval)
                return retval;
 
index 6f51e39f5595ae12a8ff2d3f56760a63e181cae2..cfb19dbb0a67d73fc9ca9f71c09e9a429a452ba8 100644 (file)
@@ -2222,7 +2222,8 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
 /*
  * IEEE80211 stack callback functions.
  */
-static int rt73usb_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
+static int rt73usb_conf_tx(struct ieee80211_hw *hw,
+                          struct ieee80211_vif *vif, u16 queue_idx,
                           const struct ieee80211_tx_queue_params *params)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -2238,7 +2239,7 @@ static int rt73usb_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
         * we are free to update the registers based on the value
         * in the queue parameter.
         */
-       retval = rt2x00mac_conf_tx(hw, queue_idx, params);
+       retval = rt2x00mac_conf_tx(hw, vif, queue_idx, params);
        if (retval)
                return retval;
 
index f5afa155ce9134984db0d521aa8c5e407e18eb4f..24873b55b55c31cd43e5fe7a3d00ff124f62c977 100644 (file)
@@ -1241,7 +1241,8 @@ static void rtl8187_configure_filter(struct ieee80211_hw *dev,
        rtl818x_iowrite32_async(priv, &priv->map->RX_CONF, priv->rx_conf);
 }
 
-static int rtl8187_conf_tx(struct ieee80211_hw *dev, u16 queue,
+static int rtl8187_conf_tx(struct ieee80211_hw *dev,
+                          struct ieee80211_vif *vif, u16 queue,
                           const struct ieee80211_tx_queue_params *params)
 {
        struct rtl8187_priv *priv = dev->priv;
index 21e40f62a8d744a2bead4f190cb72c266028066e..3f0f056fae9cda0a4e232d401dd886f834f4e076 100644 (file)
@@ -504,7 +504,8 @@ static int _rtl_get_hal_qnum(u16 queue)
  *for mac80211 VO=0, VI=1, BE=2, BK=3
  *for rtl819x  BE=0, BK=1, VI=2, VO=3
  */
-static int rtl_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int rtl_op_conf_tx(struct ieee80211_hw *hw,
+                  struct ieee80211_vif *vif, u16 queue,
                   const struct ieee80211_tx_queue_params *param)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
index a14a48c99cdc73ff8e9c6182a2da7078d27c4550..ba3268ea81fe57563c9f0f95a293773c21f68ffe 100644 (file)
@@ -1158,7 +1158,8 @@ static struct ieee80211_channel wl1251_channels[] = {
        { .hw_value = 13, .center_freq = 2472},
 };
 
-static int wl1251_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int wl1251_op_conf_tx(struct ieee80211_hw *hw,
+                            struct ieee80211_vif *vif, u16 queue,
                             const struct ieee80211_tx_queue_params *params)
 {
        enum wl1251_acx_ps_scheme ps_scheme;
index 7d409b0f335753406526e7d1e89a0e234b9fcc55..e2d6edd2fcd2f722af36d8c49409f44adc269c7a 100644 (file)
@@ -3744,7 +3744,8 @@ out:
        mutex_unlock(&wl->mutex);
 }
 
-static int wl1271_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int wl1271_op_conf_tx(struct ieee80211_hw *hw,
+                            struct ieee80211_vif *vif, u16 queue,
                             const struct ieee80211_tx_queue_params *params)
 {
        struct wl1271 *wl = hw->priv;
index 315dd91800b6a7ed09068d8a4f5b03792a8d78bb..6d71cba3a0a5a40b207ce1665038f8dea1f55d79 100644 (file)
@@ -141,8 +141,9 @@ static void brcms_ops_sta_notify(struct ieee80211_hw *hw,
                              struct ieee80211_vif *vif,
                              enum sta_notify_cmd cmd,
                              struct ieee80211_sta *sta);
-static int brcms_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
-                         const struct ieee80211_tx_queue_params *params);
+static int brcms_ops_conf_tx(struct ieee80211_hw *hw,
+                            struct ieee80211_vif *vif, u16 queue,
+                            const struct ieee80211_tx_queue_params *params);
 static u64 brcms_ops_get_tsf(struct ieee80211_hw *hw,
                             struct ieee80211_vif *vif);
 static int brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
@@ -556,7 +557,7 @@ brcms_ops_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 }
 
 static int
-brcms_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
+brcms_ops_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
               const struct ieee80211_tx_queue_params *params)
 {
        struct brcms_info *wl = hw->priv;
index 135e897b61c79170c0f4cafd39fbeb8b1aaa0b2b..cd108dfa195210ced69a3b622b76e117f458f3b5 100644 (file)
@@ -2152,7 +2152,8 @@ struct ieee80211_ops {
                          struct ieee80211_sta *sta);
        void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                        enum sta_notify_cmd, struct ieee80211_sta *sta);
-       int (*conf_tx)(struct ieee80211_hw *hw, u16 queue,
+       int (*conf_tx)(struct ieee80211_hw *hw,
+                      struct ieee80211_vif *vif, u16 queue,
                       const struct ieee80211_tx_queue_params *params);
        u64 (*get_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
        void (*set_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
index 68721d379fe1adc1173268ae025891d99ef2546b..5f165d7eb2db4c22c3411129c4f93b72216a2794 100644 (file)
@@ -423,7 +423,8 @@ static inline int drv_conf_tx(struct ieee80211_local *local,
 
        trace_drv_conf_tx(local, sdata, queue, params);
        if (local->ops->conf_tx)
-               ret = local->ops->conf_tx(&local->hw, queue, params);
+               ret = local->ops->conf_tx(&local->hw, &sdata->vif,
+                                         queue, params);
        trace_drv_return_int(local, ret);
        return ret;
 }