mac80211_hwsim: fix fake_hw_scan
authorJohannes Berg <johannes.berg@intel.com>
Fri, 18 Jun 2010 10:31:56 +0000 (12:31 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 18 Jun 2010 19:11:14 +0000 (15:11 -0400)
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.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mac80211_hwsim.c

index 6f8cb3ee6fed57610ed56756982daf4a4497b493..af50895e4bb0756649ebbcf60b9280b0c9f0187f 100644 (file)
@@ -1291,6 +1291,11 @@ static int __init init_mac80211_hwsim(void)
                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 =