]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Add option to send OBSS scan params
authorPaul Stewart <pstew@chromium.org>
Wed, 4 Sep 2013 15:59:52 +0000 (08:59 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 7 Nov 2013 12:05:41 +0000 (14:05 +0200)
Add a parameter to send the overlapping BSS scan parameter
information element. This will require clients to perform
background scans to check for neigbors overlapping this
HT40 BSS. Since the implementation is incomplete it should
only be used for testing.

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

hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h
src/ap/ieee802_11_ht.c
src/common/ieee802_11_defs.h

index ef0d647e68aac54fa0fdae8bfe4541fc4f4ac1b9..ae059176e6698381c38811f9fda9437e27f9d1fa 100644 (file)
@@ -2422,6 +2422,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
                        }
                } else if (os_strcmp(buf, "require_ht") == 0) {
                        conf->require_ht = atoi(pos);
+               } else if (os_strcmp(buf, "obss_interval") == 0) {
+                       conf->obss_interval = atoi(pos);
 #endif /* CONFIG_IEEE80211N */
 #ifdef CONFIG_IEEE80211AC
                } else if (os_strcmp(buf, "ieee80211ac") == 0) {
index eeb005513b2302bc29f2bcaa01295866efee70cf..9b70d0fbe8321a8d9d181bade178de40dc652937 100644 (file)
@@ -468,6 +468,13 @@ wmm_ac_vo_acm=0
 # Require stations to support HT PHY (reject association if they do not)
 #require_ht=1
 
+# If set non-zero, require stations to perform scans of overlapping
+# channels to test for stations which would be affected by 40 MHz traffic.
+# This parameter sets the interval in seconds between these scans. This
+# is useful only for testing that stations properly set the OBSS interval,
+# since the other parameters in the OBSS scan parameters IE are set to 0.
+#obss_interval=0
+
 ##### IEEE 802.11ac related configuration #####################################
 
 # ieee80211ac: Whether IEEE 802.11ac (VHT) is enabled
index 8b7372482340304ff6baae9d7f8e9d8d1f686566..09b2778e0ddb9cdbbb17e6036e6598ca322c6398 100644 (file)
@@ -530,6 +530,7 @@ struct hostapd_config {
        int ieee80211n;
        int secondary_channel;
        int require_ht;
+       int obss_interval;
        u32 vht_capab;
        int ieee80211ac;
        int require_vht;
index 6483e1c30047b86f73db3141c2be08a669cfd57f..2d53648c687bbe9f9f2cc5f51c0e6d481a1a0b4e 100644 (file)
@@ -50,6 +50,22 @@ u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid)
 
        pos += sizeof(*cap);
 
+       if (hapd->iconf->obss_interval) {
+               struct ieee80211_obss_scan_parameters *scan_params;
+
+               *pos++ = WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS;
+               *pos++ = sizeof(*scan_params);
+
+               scan_params = (struct ieee80211_obss_scan_parameters *) pos;
+               os_memset(scan_params, 0, sizeof(*scan_params));
+               scan_params->width_trigger_scan_interval =
+                       host_to_le16(hapd->iconf->obss_interval);
+
+               /* TODO: Fill in more parameters (supplicant ignores them) */
+
+               pos += sizeof(*scan_params);
+       }
+
        return pos;
 }
 
index 8ce1bfb25e821d436cd343996529b2e9b224d097..ca122d933a1fb8986c24a4bcd5f13ca8692025a6 100644 (file)
@@ -587,6 +587,17 @@ struct ieee80211_ht_operation {
 } STRUCT_PACKED;
 
 
+struct ieee80211_obss_scan_parameters {
+       le16 scan_passive_dwell;
+       le16 scan_active_dwell;
+       le16 width_trigger_scan_interval;
+       le16 scan_passive_total_per_channel;
+       le16 scan_active_total_per_channel;
+       le16 channel_transition_delay_factor;
+       le16 scan_activity_threshold;
+} STRUCT_PACKED;
+
+
 struct ieee80211_vht_capabilities {
        le32 vht_capabilities_info;
        struct {