diff options
author | Thomas Huehn <thomas@net.t-labs.tu-berlin.de> | 2012-07-23 15:33:42 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-31 10:18:39 -0400 |
commit | 36323f817af0376c78612cfdab714b0feb05fea5 (patch) | |
tree | 9821c1805175a79006799e458f1efa238af671f7 /drivers/net/wireless/mwl8k.c | |
parent | ab09587740fddf6b4116be7b6716ab47f34d2634 (diff) |
mac80211: move TX station pointer and restructure TX
Remove the control.sta pointer from ieee80211_tx_info to free up
sufficient space in the TX skb control buffer for the upcoming
Transmit Power Control (TPC).
Instead, the pointer is now on the stack in a new control struct
that is passed as a function parameter to the drivers' tx method.
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[reworded commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 224e03ade145..5099e5375cb3 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -1830,12 +1830,14 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid) | |||
1830 | } | 1830 | } |
1831 | 1831 | ||
1832 | static void | 1832 | static void |
1833 | mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) | 1833 | mwl8k_txq_xmit(struct ieee80211_hw *hw, |
1834 | int index, | ||
1835 | struct ieee80211_sta *sta, | ||
1836 | struct sk_buff *skb) | ||
1834 | { | 1837 | { |
1835 | struct mwl8k_priv *priv = hw->priv; | 1838 | struct mwl8k_priv *priv = hw->priv; |
1836 | struct ieee80211_tx_info *tx_info; | 1839 | struct ieee80211_tx_info *tx_info; |
1837 | struct mwl8k_vif *mwl8k_vif; | 1840 | struct mwl8k_vif *mwl8k_vif; |
1838 | struct ieee80211_sta *sta; | ||
1839 | struct ieee80211_hdr *wh; | 1841 | struct ieee80211_hdr *wh; |
1840 | struct mwl8k_tx_queue *txq; | 1842 | struct mwl8k_tx_queue *txq; |
1841 | struct mwl8k_tx_desc *tx; | 1843 | struct mwl8k_tx_desc *tx; |
@@ -1867,7 +1869,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) | |||
1867 | wh = &((struct mwl8k_dma_data *)skb->data)->wh; | 1869 | wh = &((struct mwl8k_dma_data *)skb->data)->wh; |
1868 | 1870 | ||
1869 | tx_info = IEEE80211_SKB_CB(skb); | 1871 | tx_info = IEEE80211_SKB_CB(skb); |
1870 | sta = tx_info->control.sta; | ||
1871 | mwl8k_vif = MWL8K_VIF(tx_info->control.vif); | 1872 | mwl8k_vif = MWL8K_VIF(tx_info->control.vif); |
1872 | 1873 | ||
1873 | if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | 1874 | if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { |
@@ -2019,8 +2020,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) | |||
2019 | tx->pkt_phys_addr = cpu_to_le32(dma); | 2020 | tx->pkt_phys_addr = cpu_to_le32(dma); |
2020 | tx->pkt_len = cpu_to_le16(skb->len); | 2021 | tx->pkt_len = cpu_to_le16(skb->len); |
2021 | tx->rate_info = 0; | 2022 | tx->rate_info = 0; |
2022 | if (!priv->ap_fw && tx_info->control.sta != NULL) | 2023 | if (!priv->ap_fw && sta != NULL) |
2023 | tx->peer_id = MWL8K_STA(tx_info->control.sta)->peer_id; | 2024 | tx->peer_id = MWL8K_STA(sta)->peer_id; |
2024 | else | 2025 | else |
2025 | tx->peer_id = 0; | 2026 | tx->peer_id = 0; |
2026 | 2027 | ||
@@ -4364,7 +4365,9 @@ static void mwl8k_rx_poll(unsigned long data) | |||
4364 | /* | 4365 | /* |
4365 | * Core driver operations. | 4366 | * Core driver operations. |
4366 | */ | 4367 | */ |
4367 | static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 4368 | static void mwl8k_tx(struct ieee80211_hw *hw, |
4369 | struct ieee80211_tx_control *control, | ||
4370 | struct sk_buff *skb) | ||
4368 | { | 4371 | { |
4369 | struct mwl8k_priv *priv = hw->priv; | 4372 | struct mwl8k_priv *priv = hw->priv; |
4370 | int index = skb_get_queue_mapping(skb); | 4373 | int index = skb_get_queue_mapping(skb); |
@@ -4376,7 +4379,7 @@ static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
4376 | return; | 4379 | return; |
4377 | } | 4380 | } |
4378 | 4381 | ||
4379 | mwl8k_txq_xmit(hw, index, skb); | 4382 | mwl8k_txq_xmit(hw, index, control->sta, skb); |
4380 | } | 4383 | } |
4381 | 4384 | ||
4382 | static int mwl8k_start(struct ieee80211_hw *hw) | 4385 | static int mwl8k_start(struct ieee80211_hw *hw) |