Commit 644e8c07 authored by Thomas Huehn's avatar Thomas Huehn Committed by John W. Linville

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: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarThomas Huehn <thomas@net.t-labs.tu-berlin.de>
Acked-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4a17a50d
...@@ -663,9 +663,6 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi, ...@@ -663,9 +663,6 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
/* patch the first MPDU */ /* patch the first MPDU */
if (count == 1) { if (count == 1) {
u8 plcp0, plcp3, is40, sgi; u8 plcp0, plcp3, is40, sgi;
struct ieee80211_sta *sta;
sta = tx_info->control.sta;
if (rr) { if (rr) {
plcp0 = plcp[0]; plcp0 = plcp[0];
...@@ -1195,8 +1192,8 @@ static bool cb_del_ampdu_pkt(struct sk_buff *mpdu, void *arg_a) ...@@ -1195,8 +1192,8 @@ static bool cb_del_ampdu_pkt(struct sk_buff *mpdu, void *arg_a)
bool rc; bool rc;
rc = tx_info->flags & IEEE80211_TX_CTL_AMPDU ? true : false; rc = tx_info->flags & IEEE80211_TX_CTL_AMPDU ? true : false;
rc = rc && (tx_info->control.sta == NULL || ampdu_pars->sta == NULL || rc = rc && (tx_info->rate_driver_data[0] == NULL || ampdu_pars->sta == NULL ||
tx_info->control.sta == ampdu_pars->sta); tx_info->rate_driver_data[0] == ampdu_pars->sta);
rc = rc && ((u8)(mpdu->priority) == ampdu_pars->tid); rc = rc && ((u8)(mpdu->priority) == ampdu_pars->tid);
return rc; return rc;
} }
...@@ -1210,8 +1207,8 @@ static void dma_cb_fn_ampdu(void *txi, void *arg_a) ...@@ -1210,8 +1207,8 @@ static void dma_cb_fn_ampdu(void *txi, void *arg_a)
struct ieee80211_tx_info *tx_info = (struct ieee80211_tx_info *)txi; struct ieee80211_tx_info *tx_info = (struct ieee80211_tx_info *)txi;
if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) &&
(tx_info->control.sta == sta || sta == NULL)) (tx_info->rate_driver_data[0] == sta || sta == NULL))
tx_info->control.sta = NULL; tx_info->rate_driver_data[0] = NULL;
} }
/* /*
......
...@@ -267,6 +267,7 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br) ...@@ -267,6 +267,7 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb) static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
{ {
struct brcms_info *wl = hw->priv; struct brcms_info *wl = hw->priv;
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
spin_lock_bh(&wl->lock); spin_lock_bh(&wl->lock);
if (!wl->pub->up) { if (!wl->pub->up) {
...@@ -275,6 +276,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -275,6 +276,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
goto done; goto done;
} }
brcms_c_sendpkt_mac80211(wl->wlc, skb, hw); brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
tx_info->rate_driver_data[0] = tx_info->control.sta;
done: done:
spin_unlock_bh(&wl->lock); spin_unlock_bh(&wl->lock);
} }
......
...@@ -893,7 +893,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs) ...@@ -893,7 +893,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
tx_info = IEEE80211_SKB_CB(p); tx_info = IEEE80211_SKB_CB(p);
h = (struct ieee80211_hdr *)((u8 *) (txh + 1) + D11_PHY_HDR_LEN); h = (struct ieee80211_hdr *)((u8 *) (txh + 1) + D11_PHY_HDR_LEN);
if (tx_info->control.sta) if (tx_info->rate_driver_data[0])
scb = &wlc->pri_scb; scb = &wlc->pri_scb;
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment