linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mac80211: don't queue monitor work for HW_CONNECTION_MONITOR
@ 2012-02-19 13:26 Eliad Peller
  2012-02-19 13:26 ` [PATCH 2/2] mac80211: remove redundant monitor_work enqueueing Eliad Peller
  0 siblings, 1 reply; 2+ messages in thread
From: Eliad Peller @ 2012-02-19 13:26 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

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>
---
 net/mac80211/mlme.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 52133da..7ece99a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -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);
 	}
-- 
1.7.6.401.g6a319


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] mac80211: remove redundant monitor_work enqueueing
  2012-02-19 13:26 [PATCH 1/2] mac80211: don't queue monitor work for HW_CONNECTION_MONITOR Eliad Peller
@ 2012-02-19 13:26 ` Eliad Peller
  0 siblings, 0 replies; 2+ messages in thread
From: Eliad Peller @ 2012-02-19 13:26 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

ieee80211_restart_sta_timer() takes care for enqueueing
monitor_work if needed, so no need to do it again.

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
 net/mac80211/mlme.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7ece99a..586d4fb 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3048,7 +3048,6 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata)
 		add_timer(&ifmgd->chswitch_timer);
 	ieee80211_sta_reset_beacon_monitor(sdata);
 	ieee80211_restart_sta_timer(sdata);
-	ieee80211_queue_work(&sdata->local->hw, &sdata->u.mgd.monitor_work);
 }
 #endif
 
-- 
1.7.6.401.g6a319


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-19 13:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-19 13:26 [PATCH 1/2] mac80211: don't queue monitor work for HW_CONNECTION_MONITOR Eliad Peller
2012-02-19 13:26 ` [PATCH 2/2] mac80211: remove redundant monitor_work enqueueing Eliad Peller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).