summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/tx.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ee1b77f..b909e40 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1084,9 +1084,10 @@ static int ieee80211_tx_prepare(struct ieee80211_local *local,
}
static int __ieee80211_tx(struct ieee80211_local *local,
- struct ieee80211_tx_data *tx)
+ struct sk_buff **skbp,
+ struct sta_info *sta)
{
- struct sk_buff *skb = tx->skb, *next;
+ struct sk_buff *skb = *skbp, *next;
struct ieee80211_tx_info *info;
int ret;
bool fragm = false;
@@ -1111,23 +1112,23 @@ static int __ieee80211_tx(struct ieee80211_local *local,
* We will later move this down into the only driver that
* needs it, iwlwifi.
*/
- if (tx->sta && local->hw.ampdu_queues &&
+ if (sta && local->hw.ampdu_queues &&
info->flags & IEEE80211_TX_CTL_AMPDU) {
unsigned long flags;
u8 *qc = ieee80211_get_qos_ctl((void *) skb->data);
int tid = *qc & IEEE80211_QOS_CTL_TID_MASK;
- spin_lock_irqsave(&tx->sta->lock, flags);
+ spin_lock_irqsave(&sta->lock, flags);
skb_set_queue_mapping(skb, local->hw.queues +
- tx->sta->tid_to_tx_q[tid]);
- spin_unlock_irqrestore(&tx->sta->lock, flags);
+ sta->tid_to_tx_q[tid]);
+ spin_unlock_irqrestore(&sta->lock, flags);
}
next = skb->next;
ret = local->ops->tx(local_to_hw(local), skb);
if (ret != NETDEV_TX_OK)
return IEEE80211_TX_AGAIN;
- tx->skb = skb = next;
+ *skbp = skb = next;
ieee80211_led_tx(local, 1);
fragm = true;
}
@@ -1223,7 +1224,7 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb)
retries = 0;
retry:
- ret = __ieee80211_tx(local, &tx);
+ ret = __ieee80211_tx(local, &tx.skb, tx.sta);
switch (ret) {
case IEEE80211_TX_OK:
break;
@@ -1831,7 +1832,6 @@ void ieee80211_tx_pending(unsigned long data)
struct net_device *dev = local->mdev;
struct ieee80211_hdr *hdr;
unsigned long flags;
- struct ieee80211_tx_data tx;
int i, ret;
bool next;
@@ -1862,14 +1862,15 @@ void ieee80211_tx_pending(unsigned long data)
netif_start_subqueue(local->mdev, i);
while (!skb_queue_empty(&local->pending[i])) {
- tx.flags = 0;
- tx.skb = skb_dequeue(&local->pending[i]);
- hdr = (struct ieee80211_hdr *)tx.skb->data;
- tx.sta = sta_info_get(local, hdr->addr1);
+ struct sk_buff *skb = skb_dequeue(&local->pending[i]);
+ struct sta_info *sta;
+
+ hdr = (struct ieee80211_hdr *)skb->data;
+ sta = sta_info_get(local, hdr->addr1);
- ret = __ieee80211_tx(local, &tx);
+ ret = __ieee80211_tx(local, &skb, sta);
if (ret != IEEE80211_TX_OK) {
- skb_queue_head(&local->pending[i], tx.skb);
+ skb_queue_head(&local->pending[i], skb);
break;
}
}
OpenPOWER on IntegriCloud