mac80211: remove unused assignment
[cascardo/linux.git] / net / mac80211 / util.c
index 905003f..b6865d8 100644 (file)
@@ -244,6 +244,9 @@ void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue)
        struct ieee80211_sub_if_data *sdata;
        int n_acs = IEEE80211_NUM_ACS;
 
+       if (local->ops->wake_tx_queue)
+               return;
+
        if (local->hw.queues < IEEE80211_NUM_ACS)
                n_acs = 1;
 
@@ -260,11 +263,6 @@ void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue)
                for (ac = 0; ac < n_acs; ac++) {
                        int ac_queue = sdata->vif.hw_queue[ac];
 
-                       if (local->ops->wake_tx_queue &&
-                           (atomic_read(&sdata->txqs_len[ac]) >
-                            local->hw.txq_ac_max_pending))
-                               continue;
-
                        if (ac_queue == queue ||
                            (sdata->vif.cab_queue == queue &&
                             local->queue_stop_reasons[ac_queue] == 0 &&
@@ -352,6 +350,9 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
        if (__test_and_set_bit(reason, &local->queue_stop_reasons[queue]))
                return;
 
+       if (local->ops->wake_tx_queue)
+               return;
+
        if (local->hw.queues < IEEE80211_NUM_ACS)
                n_acs = 1;
 
@@ -597,7 +598,7 @@ static void __iterate_interfaces(struct ieee80211_local *local,
        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
                switch (sdata->vif.type) {
                case NL80211_IFTYPE_MONITOR:
-                       if (!(sdata->u.mntr_flags & MONITOR_FLAG_ACTIVE))
+                       if (!(sdata->u.mntr.flags & MONITOR_FLAG_ACTIVE))
                                continue;
                        break;
                case NL80211_IFTYPE_AP_VLAN:
@@ -2554,7 +2555,6 @@ int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
 
                if (need_basic && basic_rates & BIT(i))
                        basic = 0x80;
-               rate = sband->bitrates[i].bitrate;
                rate = DIV_ROUND_UP(sband->bitrates[i].bitrate,
                                    5 * (1 << shift));
                *pos++ = basic | (u8) rate;
@@ -3388,25 +3388,6 @@ u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo)
        return buf;
 }
 
-void ieee80211_init_tx_queue(struct ieee80211_sub_if_data *sdata,
-                            struct sta_info *sta,
-                            struct txq_info *txqi, int tid)
-{
-       skb_queue_head_init(&txqi->queue);
-       txqi->txq.vif = &sdata->vif;
-
-       if (sta) {
-               txqi->txq.sta = &sta->sta;
-               sta->sta.txq[tid] = &txqi->txq;
-               txqi->txq.tid = tid;
-               txqi->txq.ac = ieee802_1d_to_ac[tid & 7];
-       } else {
-               sdata->vif.txq = &txqi->txq;
-               txqi->txq.tid = 0;
-               txqi->txq.ac = IEEE80211_AC_BE;
-       }
-}
-
 void ieee80211_txq_get_depth(struct ieee80211_txq *txq,
                             unsigned long *frame_cnt,
                             unsigned long *byte_cnt)
@@ -3414,9 +3395,9 @@ void ieee80211_txq_get_depth(struct ieee80211_txq *txq,
        struct txq_info *txqi = to_txq_info(txq);
 
        if (frame_cnt)
-               *frame_cnt = txqi->queue.qlen;
+               *frame_cnt = txqi->tin.backlog_packets;
 
        if (byte_cnt)
-               *byte_cnt = txqi->byte_cnt;
+               *byte_cnt = txqi->tin.backlog_bytes;
 }
 EXPORT_SYMBOL(ieee80211_txq_get_depth);