From: Shahar Levi Date: Thu, 8 Sep 2011 05:44:05 +0000 (+0300) Subject: mac80211: Update device channel in case of HW channel switch supported X-Git-Tag: MMI-PSA29.97-13-9~18194^2~254^2~35 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1ea57b1f12c045db5fca5d1299963ca1c70983ea;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mac80211: Update device channel in case of HW channel switch supported The hw.conf.channel value is not updated properly for drivers that support HW channel switch. Since the switch is done entirely by the driver and we don't call ieee80211_hw_config(), this value remains untouched. This patch fixes that by setting the new channel directly in ieee80211_chswitch_work(). Signed-off-by: Shahar Levi Signed-off-by: John W. Linville --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index ca97b80b2651..2f92ae2f9706 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -390,6 +390,9 @@ static void ieee80211_chswitch_work(struct work_struct *work) /* call "hw_config" only if doing sw channel switch */ ieee80211_hw_config(sdata->local, IEEE80211_CONF_CHANGE_CHANNEL); + } else { + /* update the device channel directly */ + sdata->local->hw.conf.channel = sdata->local->oper_channel; } /* XXX: shouldn't really modify cfg80211-owned data! */