mac80211: merge some further fixes to the queue stop patch
authorFelix Fietkau <nbd@openwrt.org>
Wed, 6 Jan 2010 18:43:01 +0000 (18:43 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 6 Jan 2010 18:43:01 +0000 (18:43 +0000)
SVN-Revision: 19056

package/mac80211/patches/550-queue_stop_fix.patch

index 44b4719a2aeaee6f2c829a76120f710bafa5f768..8625fe38ba5834f97f85f4dce975326515ca7f01 100644 (file)
  
  /**
   * DOC: Interface list locking
+@@ -314,7 +316,7 @@ static int ieee80211_open(struct net_dev
+       if (sdata->vif.type == NL80211_IFTYPE_STATION)
+               ieee80211_queue_work(&local->hw, &sdata->u.mgd.work);
+-      netif_start_queue(dev);
++      netif_tx_start_all_queues(dev);
+       return 0;
+  err_del_interface:
+@@ -343,7 +345,7 @@ static int ieee80211_stop(struct net_dev
+       /*
+        * Stop TX on this interface first.
+        */
+-      netif_stop_queue(dev);
++      netif_tx_stop_all_queues(dev);
+       /*
+        * Now delete all active aggregation sessions.
 @@ -644,6 +646,37 @@ static void ieee80211_teardown_sdata(str
        WARN_ON(flushed);
  }
@@ -57,7 +75,7 @@
        .ndo_set_multicast_list = ieee80211_set_multicast_list,
        .ndo_change_mtu         = ieee80211_change_mtu,
        .ndo_set_mac_address    = eth_mac_addr,
-+      .ndo_select_queue       = ieee80211_monitor_select_queue,
++      .ndo_select_queue       = ieee80211_netdev_select_queue,
  };
  
  static const struct net_device_ops ieee80211_monitorif_ops = {
 -      if (0 /* injected */) {
 -              /* use AC from radiotap */
 +      if (!sta && ra && !is_multicast_ether_addr(ra)) {
-+              sta = sta_info_get(sdata, ra);
++              sta = sta_info_get(sdata->local, ra);
 +              if (sta)
 +                      sta_flags = get_sta_flags(sta);
        }
 +
  
  #endif /* _WME_H */
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -934,7 +934,7 @@ static void ieee80211_set_associated(str
+       ieee80211_recalc_ps(local, -1);
+       mutex_unlock(&local->iflist_mtx);
+-      netif_start_queue(sdata->dev);
++      netif_tx_start_all_queues(sdata->dev);
+       netif_carrier_on(sdata->dev);
+ }
+@@ -1066,7 +1066,7 @@ static void ieee80211_set_disassoc(struc
+        * time -- we don't want the scan code to enable queues.
+        */
+-      netif_stop_queue(sdata->dev);
++      netif_tx_stop_all_queues(sdata->dev);
+       netif_carrier_off(sdata->dev);
+       rcu_read_lock();
+--- a/net/mac80211/scan.c
++++ b/net/mac80211/scan.c
+@@ -399,7 +399,7 @@ static int ieee80211_start_sw_scan(struc
+                * are handled in the scan state machine
+                */
+               if (sdata->vif.type != NL80211_IFTYPE_STATION)
+-                      netif_stop_queue(sdata->dev);
++                      netif_tx_stop_all_queues(sdata->dev);
+       }
+       mutex_unlock(&local->iflist_mtx);
+@@ -563,7 +563,7 @@ static void ieee80211_scan_state_leave_o
+                       continue;
+               if (sdata->vif.type == NL80211_IFTYPE_STATION) {
+-                      netif_stop_queue(sdata->dev);
++                      netif_tx_stop_all_queues(sdata->dev);
+                       if (sdata->u.mgd.associated)
+                               ieee80211_scan_ps_enable(sdata);
+               }