]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Supply default parameters for OBSS scan
authorPaul Stewart <pstew@chromium.org>
Wed, 12 Mar 2014 22:28:39 +0000 (15:28 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 14 Mar 2014 19:49:08 +0000 (21:49 +0200)
For some client OBSS implementations that are performed in
firmware, all OBSS parameters need to be set to valid values.
Do this, as well as supplying the "20/40 Coex Mgmt Support"
flag in the extended capabilities IE.

Signed-hostap: Paul Stewart <pstew@chromium.org>

src/ap/ieee802_11_ht.c
src/ap/ieee802_11_shared.c

index a16617833607072f8fe8f0a6d06c565248468b73..138d049730507beb37d043079108250d9f2710b6 100644 (file)
@@ -54,7 +54,20 @@ u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid)
                scan_params->width_trigger_scan_interval =
                        host_to_le16(hapd->iconf->obss_interval);
 
-               /* TODO: Fill in more parameters (supplicant ignores them) */
+               /* Fill in default values for remaining parameters
+                * (IEEE Std 802.11-2012, 8.4.2.61 and MIB defval) */
+               scan_params->scan_passive_dwell =
+                       host_to_le16(20);
+               scan_params->scan_active_dwell =
+                       host_to_le16(10);
+               scan_params->scan_passive_total_per_channel =
+                       host_to_le16(200);
+               scan_params->scan_active_total_per_channel =
+                       host_to_le16(20);
+               scan_params->channel_transition_delay_factor =
+                       host_to_le16(5);
+               scan_params->scan_activity_threshold =
+                       host_to_le16(25);
 
                pos += sizeof(*scan_params);
        }
index b78fd010eb55c60153aad5739df2890ddccc15bf..12403f99a8b3ba46c9e4ba6fff3a604cada8b64b 100644 (file)
@@ -170,6 +170,8 @@ static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx)
 
        switch (idx) {
        case 0: /* Bits 0-7 */
+               if (hapd->iconf->obss_interval)
+                       *pos |= 0x01; /* Bit 0 - Coexistence management */
                break;
        case 1: /* Bits 8-15 */
                break;
@@ -223,6 +225,8 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid)
                len = 4;
        if (len < 3 && hapd->conf->wnm_sleep_mode)
                len = 3;
+       if (len < 1 && hapd->iconf->obss_interval)
+               len = 1;
        if (len < 7 && hapd->conf->ssid.utf8_ssid)
                len = 7;
 #ifdef CONFIG_WNM