aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 609c5174d798..b123a9e325b3 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -779,6 +779,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
779 bool going_down) 779 bool going_down)
780{ 780{
781 struct ieee80211_local *local = sdata->local; 781 struct ieee80211_local *local = sdata->local;
782 struct fq *fq = &local->fq;
782 unsigned long flags; 783 unsigned long flags;
783 struct sk_buff *skb, *tmp; 784 struct sk_buff *skb, *tmp;
784 u32 hw_reconf_flags = 0; 785 u32 hw_reconf_flags = 0;
@@ -976,13 +977,10 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
976 977
977 if (sdata->vif.txq) { 978 if (sdata->vif.txq) {
978 struct txq_info *txqi = to_txq_info(sdata->vif.txq); 979 struct txq_info *txqi = to_txq_info(sdata->vif.txq);
979 int n = skb_queue_len(&txqi->queue);
980 980
981 spin_lock_bh(&txqi->queue.lock); 981 spin_lock_bh(&fq->lock);
982 ieee80211_purge_tx_queue(&local->hw, &txqi->queue); 982 ieee80211_txq_purge(local, txqi);
983 atomic_sub(n, &sdata->num_tx_queued); 983 spin_unlock_bh(&fq->lock);
984 txqi->byte_cnt = 0;
985 spin_unlock_bh(&txqi->queue.lock);
986 } 984 }
987 985
988 if (local->open_count == 0) 986 if (local->open_count == 0)
@@ -1792,7 +1790,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
1792 1790
1793 if (txq_size) { 1791 if (txq_size) {
1794 txqi = netdev_priv(ndev) + size; 1792 txqi = netdev_priv(ndev) + size;
1795 ieee80211_init_tx_queue(sdata, NULL, txqi, 0); 1793 ieee80211_txq_init(sdata, NULL, txqi, 0);
1796 } 1794 }
1797 1795
1798 sdata->dev = ndev; 1796 sdata->dev = ndev;