diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-17 06:08:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-24 16:28:17 -0400 |
commit | 2b2d7795371df85bb106513d1b5fec077a29176e (patch) | |
tree | 8575270322f922aeb842375a457b3bfc50d47d7b /drivers/net/wireless/mac80211_hwsim.c | |
parent | 352de5573f60af0ab054859931cfb68eecb1832b (diff) |
mac80211-hwsim: allow configuring IBSS
It will not look standard-compliant in a sniffer
because because it doesn't
* sync TSF
* adjust the TSF in beacons
* send beacons at TBTT
* cancel beacons when another phy sends
However, it does allow testing the configuration
and parts of the mac80211 code for IBSS and as
such is still useful.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 01ad7f77383a..d9dd9f9d3040 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -9,7 +9,8 @@ | |||
9 | 9 | ||
10 | /* | 10 | /* |
11 | * TODO: | 11 | * TODO: |
12 | * - IBSS mode simulation (Beacon transmission with competition for "air time") | 12 | * - Add TSF sync and fix IBSS beacon transmission by adding |
13 | * competition for "air time" at TBTT | ||
13 | * - RX filtering based on filter configuration (data->rx_filter) | 14 | * - RX filtering based on filter configuration (data->rx_filter) |
14 | */ | 15 | */ |
15 | 16 | ||
@@ -620,7 +621,8 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac, | |||
620 | hwsim_check_magic(vif); | 621 | hwsim_check_magic(vif); |
621 | 622 | ||
622 | if (vif->type != NL80211_IFTYPE_AP && | 623 | if (vif->type != NL80211_IFTYPE_AP && |
623 | vif->type != NL80211_IFTYPE_MESH_POINT) | 624 | vif->type != NL80211_IFTYPE_MESH_POINT && |
625 | vif->type != NL80211_IFTYPE_ADHOC) | ||
624 | return; | 626 | return; |
625 | 627 | ||
626 | skb = ieee80211_beacon_get(hw, vif); | 628 | skb = ieee80211_beacon_get(hw, vif); |
@@ -1295,6 +1297,7 @@ static int __init init_mac80211_hwsim(void) | |||
1295 | hw->wiphy->interface_modes = | 1297 | hw->wiphy->interface_modes = |
1296 | BIT(NL80211_IFTYPE_STATION) | | 1298 | BIT(NL80211_IFTYPE_STATION) | |
1297 | BIT(NL80211_IFTYPE_AP) | | 1299 | BIT(NL80211_IFTYPE_AP) | |
1300 | BIT(NL80211_IFTYPE_ADHOC) | | ||
1298 | BIT(NL80211_IFTYPE_MESH_POINT); | 1301 | BIT(NL80211_IFTYPE_MESH_POINT); |
1299 | 1302 | ||
1300 | hw->flags = IEEE80211_HW_MFP_CAPABLE | | 1303 | hw->flags = IEEE80211_HW_MFP_CAPABLE | |