mac80211: Update device channel in case of HW channel switch supported
authorShahar Levi <shahar_levi@ti.com>
Thu, 8 Sep 2011 05:44:05 +0000 (08:44 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 14 Sep 2011 17:56:52 +0000 (13:56 -0400)
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 <shahar_levi@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index ca97b80b2651cce2a0ad91965484ba1ede8064c5..2f92ae2f9706c30ad0ddb3fa53cdd3193a9b1b51 100644 (file)
@@ -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! */