aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac
diff options
context:
space:
mode:
authorThomas Huehn <thomas@net.t-labs.tu-berlin.de>2012-07-10 08:01:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-12 15:27:17 -0400
commit644e8c07391c0190b806d5001cbee82ebe2615b3 (patch)
tree14c9cf35b15b931e373f0eb9393bd7994bf20027 /drivers/net/wireless/brcm80211/brcmsmac
parent4a17a50d8d458db747c6b3e164cc6a0148398ced (diff)
brcmsmac: restructure info->control.sta handling as it is goning to be removed soon.
brcmsmac uses info->control.sta while doing ampdu aggregation. This patch changes the usage of the structure info->control.sta, as it is going to be removed soon from struct ieee80211_tx_info. This patch is a pre-requisit in order to add transmission power control (TPC) to the mac80211 subsystem. Suggested-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/ampdu.c11
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c2
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c2
3 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index 01b190a25d94..be5bcfb9153b 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -663,9 +663,6 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
663 /* patch the first MPDU */ 663 /* patch the first MPDU */
664 if (count == 1) { 664 if (count == 1) {
665 u8 plcp0, plcp3, is40, sgi; 665 u8 plcp0, plcp3, is40, sgi;
666 struct ieee80211_sta *sta;
667
668 sta = tx_info->control.sta;
669 666
670 if (rr) { 667 if (rr) {
671 plcp0 = plcp[0]; 668 plcp0 = plcp[0];
@@ -1195,8 +1192,8 @@ static bool cb_del_ampdu_pkt(struct sk_buff *mpdu, void *arg_a)
1195 bool rc; 1192 bool rc;
1196 1193
1197 rc = tx_info->flags & IEEE80211_TX_CTL_AMPDU ? true : false; 1194 rc = tx_info->flags & IEEE80211_TX_CTL_AMPDU ? true : false;
1198 rc = rc && (tx_info->control.sta == NULL || ampdu_pars->sta == NULL || 1195 rc = rc && (tx_info->rate_driver_data[0] == NULL || ampdu_pars->sta == NULL ||
1199 tx_info->control.sta == ampdu_pars->sta); 1196 tx_info->rate_driver_data[0] == ampdu_pars->sta);
1200 rc = rc && ((u8)(mpdu->priority) == ampdu_pars->tid); 1197 rc = rc && ((u8)(mpdu->priority) == ampdu_pars->tid);
1201 return rc; 1198 return rc;
1202} 1199}
@@ -1210,8 +1207,8 @@ static void dma_cb_fn_ampdu(void *txi, void *arg_a)
1210 struct ieee80211_tx_info *tx_info = (struct ieee80211_tx_info *)txi; 1207 struct ieee80211_tx_info *tx_info = (struct ieee80211_tx_info *)txi;
1211 1208
1212 if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && 1209 if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) &&
1213 (tx_info->control.sta == sta || sta == NULL)) 1210 (tx_info->rate_driver_data[0] == sta || sta == NULL))
1214 tx_info->control.sta = NULL; 1211 tx_info->rate_driver_data[0] = NULL;
1215} 1212}
1216 1213
1217/* 1214/*
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 2b57f57a7927..9e79d47e077f 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -267,6 +267,7 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
267static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 267static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
268{ 268{
269 struct brcms_info *wl = hw->priv; 269 struct brcms_info *wl = hw->priv;
270 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
270 271
271 spin_lock_bh(&wl->lock); 272 spin_lock_bh(&wl->lock);
272 if (!wl->pub->up) { 273 if (!wl->pub->up) {
@@ -275,6 +276,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
275 goto done; 276 goto done;
276 } 277 }
277 brcms_c_sendpkt_mac80211(wl->wlc, skb, hw); 278 brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
279 tx_info->rate_driver_data[0] = tx_info->control.sta;
278 done: 280 done:
279 spin_unlock_bh(&wl->lock); 281 spin_unlock_bh(&wl->lock);
280} 282}
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index d39f7d041e0b..f36dabcea3cd 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -893,7 +893,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
893 tx_info = IEEE80211_SKB_CB(p); 893 tx_info = IEEE80211_SKB_CB(p);
894 h = (struct ieee80211_hdr *)((u8 *) (txh + 1) + D11_PHY_HDR_LEN); 894 h = (struct ieee80211_hdr *)((u8 *) (txh + 1) + D11_PHY_HDR_LEN);
895 895
896 if (tx_info->control.sta) 896 if (tx_info->rate_driver_data[0])
897 scb = &wlc->pri_scb; 897 scb = &wlc->pri_scb;
898 898
899 if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { 899 if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {