]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
mac80211: don't queue monitor work for HW_CONNECTION_MONITOR
authorEliad Peller <eliad@wizery.com>
Sun, 19 Feb 2012 13:26:09 +0000 (15:26 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 27 Feb 2012 19:06:31 +0000 (14:06 -0500)
Devices that monitor the connection in the hw don't need
the monitor work in the driver.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index 52133dab9297fc44447704e19b9a7daadd17569f..7ece99a59805f9c2741d7c58209f06d9b99e3a40 100644 (file)
@@ -2974,13 +2974,17 @@ static void ieee80211_sta_monitor_work(struct work_struct *work)
 
 static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
 {
+       u32 flags;
+
        if (sdata->vif.type == NL80211_IFTYPE_STATION) {
                sdata->u.mgd.flags &= ~(IEEE80211_STA_BEACON_POLL |
                                        IEEE80211_STA_CONNECTION_POLL);
 
                /* let's probe the connection once */
-               ieee80211_queue_work(&sdata->local->hw,
-                          &sdata->u.mgd.monitor_work);
+               flags = sdata->local->hw.flags;
+               if (!(flags & IEEE80211_HW_CONNECTION_MONITOR))
+                       ieee80211_queue_work(&sdata->local->hw,
+                                            &sdata->u.mgd.monitor_work);
                /* and do all the other regular work too */
                ieee80211_queue_work(&sdata->local->hw, &sdata->work);
        }