Skip to contentSkip to conversation

mac80211-hwsim: allow configuring IBSS

PATCH New Johannes Berg 1 participant 1 message Apr 20, 2009 Networking drivers (wireless)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211-hwsim: allow configuring IBSS

It will not work properly, because it doesn't
* adjust the TSF in beacons
* cancel beacons when another phy sends

However, it does allow testing the configuration
interfaces and as such was useful for me.

---
If you prefer to not have a "broken" implementation that's fine with me too, I don't really need this patch in now.

 drivers/net/wireless/mac80211_hwsim.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +4 -2
@@ -9,7 +9,7 @@
 
 /*
  * TODO:
- * - IBSS mode simulation (Beacon transmission with competition for "air time")
+ * - Fix IBSS beacon transmission for "air time" competition
  * - RX filtering based on filter configuration (data->rx_filter)
  */
 
@@ -518,7 +518,8 @@ static void mac80211_hwsim_beacon_tx(voi
 	hwsim_check_magic(vif);
 
 	if (vif->type != NL80211_IFTYPE_AP &&
-	    vif->type != NL80211_IFTYPE_MESH_POINT)
+	    vif->type != NL80211_IFTYPE_MESH_POINT &&
+	    vif->type != NL80211_IFTYPE_ADHOC)
 		return;
 
 	skb = ieee80211_beacon_get(hw, vif);
@@ -932,6 +933,7 @@ static int __init init_mac80211_hwsim(vo
 		hw->wiphy->interface_modes =
 			BIT(NL80211_IFTYPE_STATION) |
 			BIT(NL80211_IFTYPE_AP) |
+			BIT(NL80211_IFTYPE_ADHOC) |
 			BIT(NL80211_IFTYPE_MESH_POINT);
 
 		hw->flags = IEEE80211_HW_MFP_CAPABLE;