Skip to contentSkip to conversation

mac80211_hwsim: fix fake_hw_scan

PATCH New Johannes Berg 1 participant 1 message Jun 18, 2010 Networking drivers (wireless)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211_hwsim: fix fake_hw_scan

From: Johannes Berg <[email protected]>

Since mac80211 will not set the max_scan parameters if hw scan is enabled, hwsim needs to do it so that cfg80211 won't reject the scan.

---
 drivers/net/wireless/mac80211_hwsim.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/net/wireless/mac80211_hwsim.c +5 -0
@@ -1291,6 +1291,11 @@ static int __init init_mac80211_hwsim(vo
 		hw->wiphy->n_addresses = 2;
 		hw->wiphy->addresses = data->addresses;
 
+		if (fake_hw_scan) {
+			hw->wiphy->max_scan_ssids = 255;
+			hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;
+		}
+
 		hw->channel_change_time = 1;
 		hw->queues = 4;
 		hw->wiphy->interface_modes =