mac80211_hwsim: Make sure beacon_timer gets deleted
authorJouni Malinen <j@w1.fi>
Thu, 30 Oct 2008 14:59:25 +0000 (16:59 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 Nov 2008 20:17:40 +0000 (15:17 -0500)
It was possible to trigger a kernel panic because beacon_timer may not
have been deleted in all cases when the kernel module was removed while
hostapd was still running.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mac80211_hwsim.c

index 2b07d4b865ae7f44ff5e5e7b5f1890fbb08ba6a1..bc9da9393760c64b9f36b501e32eeb365b292cb6 100644 (file)
@@ -290,6 +290,7 @@ static void mac80211_hwsim_stop(struct ieee80211_hw *hw)
 {
        struct mac80211_hwsim_data *data = hw->priv;
        data->started = 0;
+       del_timer(&data->beacon_timer);
        printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__);
 }