diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 02:01:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 02:01:52 -0400 |
commit | c2aa288548a29d909ec875e81137fb0dbbb420b7 (patch) | |
tree | 63c27c1ad0e2800ebb3ce948c1adccff584e5d96 /net/mac80211 | |
parent | 052979499c767268b912d25031ae524c451679d0 (diff) |
mac80211: Decrease number of explicit ->tx_queue references.
Accomplish this by using local variables.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/main.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 12aeaf78ae7..2968baa66b9 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -570,6 +570,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
570 | int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) | 570 | int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) |
571 | { | 571 | { |
572 | struct ieee80211_local *local = hw_to_local(hw); | 572 | struct ieee80211_local *local = hw_to_local(hw); |
573 | struct netdev_queue *txq; | ||
573 | struct sta_info *sta; | 574 | struct sta_info *sta; |
574 | struct ieee80211_sub_if_data *sdata; | 575 | struct ieee80211_sub_if_data *sdata; |
575 | u16 start_seq_num = 0; | 576 | u16 start_seq_num = 0; |
@@ -636,7 +637,8 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) | |||
636 | 637 | ||
637 | /* ensure that TX flow won't interrupt us | 638 | /* ensure that TX flow won't interrupt us |
638 | * until the end of the call to requeue function */ | 639 | * until the end of the call to requeue function */ |
639 | spin_lock_bh(&local->mdev->tx_queue.lock); | 640 | txq = &local->mdev->tx_queue; |
641 | spin_lock_bh(&txq->lock); | ||
640 | 642 | ||
641 | /* create a new queue for this aggregation */ | 643 | /* create a new queue for this aggregation */ |
642 | ret = ieee80211_ht_agg_queue_add(local, sta, tid); | 644 | 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) | |||
675 | 677 | ||
676 | /* Will put all the packets in the new SW queue */ | 678 | /* Will put all the packets in the new SW queue */ |
677 | ieee80211_requeue(local, ieee802_1d_to_ac[tid]); | 679 | ieee80211_requeue(local, ieee802_1d_to_ac[tid]); |
678 | spin_unlock_bh(&local->mdev->tx_queue.lock); | 680 | spin_unlock_bh(&txq->lock); |
679 | spin_unlock_bh(&sta->lock); | 681 | spin_unlock_bh(&sta->lock); |
680 | 682 | ||
681 | /* send an addBA request */ | 683 | /* send an addBA request */ |
@@ -701,7 +703,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) | |||
701 | err_unlock_queue: | 703 | err_unlock_queue: |
702 | kfree(sta->ampdu_mlme.tid_tx[tid]); | 704 | kfree(sta->ampdu_mlme.tid_tx[tid]); |
703 | sta->ampdu_mlme.tid_tx[tid] = NULL; | 705 | sta->ampdu_mlme.tid_tx[tid] = NULL; |
704 | spin_unlock_bh(&local->mdev->tx_queue.lock); | 706 | spin_unlock_bh(&txq->lock); |
705 | ret = -EBUSY; | 707 | ret = -EBUSY; |
706 | err_unlock_sta: | 708 | err_unlock_sta: |
707 | spin_unlock_bh(&sta->lock); | 709 | spin_unlock_bh(&sta->lock); |
@@ -826,6 +828,7 @@ EXPORT_SYMBOL(ieee80211_start_tx_ba_cb); | |||
826 | void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) | 828 | void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) |
827 | { | 829 | { |
828 | struct ieee80211_local *local = hw_to_local(hw); | 830 | struct ieee80211_local *local = hw_to_local(hw); |
831 | struct netdev_queue *txq; | ||
829 | struct sta_info *sta; | 832 | struct sta_info *sta; |
830 | u8 *state; | 833 | u8 *state; |
831 | int agg_queue; | 834 | int agg_queue; |
@@ -875,10 +878,11 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) | |||
875 | 878 | ||
876 | /* avoid ordering issues: we are the only one that can modify | 879 | /* avoid ordering issues: we are the only one that can modify |
877 | * the content of the qdiscs */ | 880 | * the content of the qdiscs */ |
878 | spin_lock_bh(&local->mdev->tx_queue.lock); | 881 | txq = &local->mdev->tx_queue; |
882 | spin_lock_bh(&txq->lock); | ||
879 | /* remove the queue for this aggregation */ | 883 | /* remove the queue for this aggregation */ |
880 | ieee80211_ht_agg_queue_remove(local, sta, tid, 1); | 884 | ieee80211_ht_agg_queue_remove(local, sta, tid, 1); |
881 | spin_unlock_bh(&local->mdev->tx_queue.lock); | 885 | spin_unlock_bh(&txq->lock); |
882 | 886 | ||
883 | /* we just requeued the all the frames that were in the removed | 887 | /* we just requeued the all the frames that were in the removed |
884 | * queue, and since we might miss a softirq we do netif_schedule. | 888 | * queue, and since we might miss a softirq we do netif_schedule. |