From: Sujith Date: Fri, 27 Feb 2009 04:14:00 +0000 (+0530) Subject: mac80211: Notify the driver only when the beacon interval changes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e31ae0508315ebf5d8b1b8a1fca8550737fb3996;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git mac80211: Notify the driver only when the beacon interval changes Currently, the driver is unconditionally notified of beacon interval. This is a problem in AP mode, because the driver has to know that the beacon interval has actualy changed to recalculate TBTT and reset the HW TSF. Fix this to make mac80211 notify the driver only when the beacon interval has been reconfigured to a new value. Signed-off-by: Sujith Signed-off-by: John W. Linville --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index c43129efc3bf..58693e52d458 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -451,7 +451,8 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata, * This is a kludge. beacon interval should really be part * of the beacon information. */ - if (params->interval) { + if (params->interval && (sdata->local->hw.conf.beacon_int != + params->interval)) { sdata->local->hw.conf.beacon_int = params->interval; err = ieee80211_hw_config(sdata->local, IEEE80211_CONF_CHANGE_BEACON_INTERVAL);