Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mcheha...
[safe/jmp/linux-2.6] / net / mac80211 / offchannel.c
index 2cd880e..c36b191 100644 (file)
@@ -106,10 +106,14 @@ void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local)
                /*
                 * only handle non-STA interfaces here, STA interfaces
                 * are handled in ieee80211_offchannel_stop_station(),
-                * e.g., from the background scan state machine
+                * e.g., from the background scan state machine.
+                *
+                * In addition, do not stop monitor interface to allow it to be
+                * used from user space controlled off-channel operations.
                 */
-               if (sdata->vif.type != NL80211_IFTYPE_STATION)
-                       netif_stop_queue(sdata->dev);
+               if (sdata->vif.type != NL80211_IFTYPE_STATION &&
+                   sdata->vif.type != NL80211_IFTYPE_MONITOR)
+                       netif_tx_stop_all_queues(sdata->dev);
        }
        mutex_unlock(&local->iflist_mtx);
 }
@@ -127,7 +131,7 @@ void ieee80211_offchannel_stop_station(struct ieee80211_local *local)
                        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_offchannel_ps_enable(sdata);
                }
@@ -149,9 +153,11 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
                if (sdata->vif.type == NL80211_IFTYPE_STATION) {
                        if (sdata->u.mgd.associated)
                                ieee80211_offchannel_ps_disable(sdata);
-                       netif_wake_queue(sdata->dev);
                }
 
+               if (sdata->vif.type != NL80211_IFTYPE_MONITOR)
+                       netif_tx_wake_all_queues(sdata->dev);
+
                /* re-enable beaconing */
                if (enable_beaconing &&
                    (sdata->vif.type == NL80211_IFTYPE_AP ||