linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: reset CQM history upon reconfiguration
@ 2015-09-21 12:47 Luca Coelho
  2015-09-22 13:24 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Coelho @ 2015-09-21 12:47 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Sara Sharon, Luca Coelho

From: Sara Sharon <sara.sharon@intel.com>

Current behavior of notifying CQM events is inconsistent.
Upon first configuration there is a cqm event of channel status
according to threshold configured, regardless of signal stability.
When there is reconfiguration no event is sent unless there is
a significant change to the signal level according to the new
configuration.

Since current reconfiguration behavior might cause missing CQM
events in case current signal did not change but is crossing the
new threshold, fix that by resetting latest signal level upon
reconfiguration.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/mac80211/cfg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 390eabf..8873f93 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2471,6 +2471,7 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy,
 
 	bss_conf->cqm_rssi_thold = rssi_thold;
 	bss_conf->cqm_rssi_hyst = rssi_hyst;
+	sdata->u.mgd.last_cqm_event_signal = 0;
 
 	/* tell the driver upon association, unless already associated */
 	if (sdata->u.mgd.associated &&
-- 
2.5.1


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

end of thread, other threads:[~2015-09-22 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 12:47 [PATCH] mac80211: reset CQM history upon reconfiguration Luca Coelho
2015-09-22 13:24 ` Johannes Berg

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).