diff mbox

mac80211: reset CQM history upon reconfiguration

Message ID 1442839660-25790-1-git-send-email-luca@coelho.fi (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Luca Coelho Sept. 21, 2015, 12:47 p.m. UTC
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(+)

Comments

Johannes Berg Sept. 22, 2015, 1:24 p.m. UTC | #1
On Mon, 2015-09-21 at 15:47 +0300, Luca Coelho wrote:
> 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.
> 
Applied.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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 &&