diff options
author | Jouni Malinen <j@w1.fi> | 2008-06-10 19:27:00 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2008-06-10 19:27:00 +0300 |
commit | badba00bd459e80e9dc558eec475e20d7be7c5a6 (patch) | |
tree | 2561ae9c1bd758fc37469f2e7f10d2a9133f40db /mac80211_hwsim | |
parent | a218a713b8e0174c70871b14639108cd6c58631b (diff) | |
download | external_wpa_supplicant_8_ti-badba00bd459e80e9dc558eec475e20d7be7c5a6.zip external_wpa_supplicant_8_ti-badba00bd459e80e9dc558eec475e20d7be7c5a6.tar.gz external_wpa_supplicant_8_ti-badba00bd459e80e9dc558eec475e20d7be7c5a6.tar.bz2 |
Added start/stop handlers and do not send frames to stopped radios
Diffstat (limited to 'mac80211_hwsim')
-rw-r--r-- | mac80211_hwsim/mac80211_hwsim.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mac80211_hwsim/mac80211_hwsim.c b/mac80211_hwsim/mac80211_hwsim.c index 4421f79..3753421 100644 --- a/mac80211_hwsim/mac80211_hwsim.c +++ b/mac80211_hwsim/mac80211_hwsim.c @@ -80,6 +80,7 @@ struct mac80211_hwsim_data { int radio_enabled; int beacon_int; unsigned int rx_filter; + int started; }; @@ -176,7 +177,8 @@ static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb, if (hwsim_radios[i] == NULL || hwsim_radios[i] == hw) continue; data2 = hwsim_radios[i]->priv; - if (!data2->radio_enabled || data->freq != data2->freq) + if (!data2->started || !data2->radio_enabled || + data->freq != data2->freq) continue; nskb = skb_copy(skb, GFP_ATOMIC); @@ -197,13 +199,17 @@ static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb, static int mac80211_hwsim_start(struct ieee80211_hw *hw) { + struct mac80211_hwsim_data *data = hw->priv; printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__); + data->started = 1; return 0; } static void mac80211_hwsim_stop(struct ieee80211_hw *hw) { + struct mac80211_hwsim_data *data = hw->priv; + data->started = 0; printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__); } |