diff mbox

mac80211_hwsim: Fix initial beacon timer configuration

Message ID 20090926193015.GA27296@jm.kir.nu (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jouni Malinen Sept. 26, 2009, 7:30 p.m. UTC
mac80211_hwsim does not start transmitting Beacon frames when hostapd
is started for the first time and restarting hostapd fixes this. The
issue is caused by the config() handler not being able to start
beacon_timer when beacon interval is not yet known and
bss_info_changed() handler not starting the timer. This can be fixed by
making the bss_info_changed() update the timer.

Signed-off-by: Jouni Malinen <j@w1.fi>

---
 drivers/net/wireless/mac80211_hwsim.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

--- uml.orig/drivers/net/wireless/mac80211_hwsim.c	2009-09-26 21:36:08.000000000 +0300
+++ uml/drivers/net/wireless/mac80211_hwsim.c	2009-09-26 22:21:58.000000000 +0300
@@ -639,6 +639,9 @@  static void mac80211_hwsim_bss_info_chan
 		data->beacon_int = 1024 * info->beacon_int / 1000 * HZ / 1000;
 		if (WARN_ON(!data->beacon_int))
 			data->beacon_int = 1;
+		if (data->started)
+			mod_timer(&data->beacon_timer,
+				  jiffies + data->beacon_int);
 	}
 
 	if (changed & BSS_CHANGED_ERP_CTS_PROT) {