From 1fe56968f23d83f1cd630892f0257ae95bdef29c Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 8 Jul 2008 23:01:52 -0700 Subject: [PATCH] --- yaml --- r: 103397 b: refs/heads/master c: c2aa288548a29d909ec875e81137fb0dbbb420b7 h: refs/heads/master i: 103395: f2713089a203a4bae75a6c1971a81550551ad394 v: v3 --- [refs] | 2 +- trunk/net/mac80211/main.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index f7771c8e7449..7fcb42eba58a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 052979499c767268b912d25031ae524c451679d0 +refs/heads/master: c2aa288548a29d909ec875e81137fb0dbbb420b7 diff --git a/trunk/net/mac80211/main.c b/trunk/net/mac80211/main.c index 12aeaf78ae75..2968baa66b91 100644 --- a/trunk/net/mac80211/main.c +++ b/trunk/net/mac80211/main.c @@ -570,6 +570,7 @@ static int ieee80211_stop(struct net_device *dev) int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) { struct ieee80211_local *local = hw_to_local(hw); + struct netdev_queue *txq; struct sta_info *sta; struct ieee80211_sub_if_data *sdata; u16 start_seq_num = 0; @@ -636,7 +637,8 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) /* ensure that TX flow won't interrupt us * until the end of the call to requeue function */ - spin_lock_bh(&local->mdev->tx_queue.lock); + txq = &local->mdev->tx_queue; + spin_lock_bh(&txq->lock); /* create a new queue for this aggregation */ ret = ieee80211_ht_agg_queue_add(local, sta, tid); @@ -675,7 +677,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) /* Will put all the packets in the new SW queue */ ieee80211_requeue(local, ieee802_1d_to_ac[tid]); - spin_unlock_bh(&local->mdev->tx_queue.lock); + spin_unlock_bh(&txq->lock); spin_unlock_bh(&sta->lock); /* send an addBA request */ @@ -701,7 +703,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) err_unlock_queue: kfree(sta->ampdu_mlme.tid_tx[tid]); sta->ampdu_mlme.tid_tx[tid] = NULL; - spin_unlock_bh(&local->mdev->tx_queue.lock); + spin_unlock_bh(&txq->lock); ret = -EBUSY; err_unlock_sta: spin_unlock_bh(&sta->lock); @@ -826,6 +828,7 @@ EXPORT_SYMBOL(ieee80211_start_tx_ba_cb); void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) { struct ieee80211_local *local = hw_to_local(hw); + struct netdev_queue *txq; struct sta_info *sta; u8 *state; int agg_queue; @@ -875,10 +878,11 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) /* avoid ordering issues: we are the only one that can modify * the content of the qdiscs */ - spin_lock_bh(&local->mdev->tx_queue.lock); + txq = &local->mdev->tx_queue; + spin_lock_bh(&txq->lock); /* remove the queue for this aggregation */ ieee80211_ht_agg_queue_remove(local, sta, tid, 1); - spin_unlock_bh(&local->mdev->tx_queue.lock); + spin_unlock_bh(&txq->lock); /* we just requeued the all the frames that were in the removed * queue, and since we might miss a softirq we do netif_schedule.