From patchwork Wed Sep 4 15:59:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Stewart X-Patchwork-Id: 272909 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id EF9DE2C00E8 for ; Fri, 6 Sep 2013 01:49:35 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 2E34F9D232; Thu, 5 Sep 2013 11:49:30 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iwcKWJgucHIq; Thu, 5 Sep 2013 11:49:29 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 682239D221; Thu, 5 Sep 2013 11:49:25 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id EF3D89D203 for ; Thu, 5 Sep 2013 11:49:23 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5PVCGPnVN5p8 for ; Thu, 5 Sep 2013 11:49:18 -0400 (EDT) Received: from mail-ve0-f201.google.com (mail-ve0-f201.google.com [209.85.128.201]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id DC9E59D222 for ; Thu, 5 Sep 2013 11:49:18 -0400 (EDT) Received: by mail-ve0-f201.google.com with SMTP id c14so79032vea.0 for ; Thu, 05 Sep 2013 08:49:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:subject:to:message-id; bh=qqUDU/p5PywA4LupebMzclOsZ5NW6ESw0vzkO9T2pzc=; b=IQt1L6hNx7bWtq3Z73Qqvz5UwLds28rh5tUgyXYmjlG5KNg3xY41aHMUxXmtt+xIei Fl13Wsrtv5f7KFH1snVoqDSQ9VzpwwpCEaytFtoQx2RED4SCx5l5wJo8MwgUITU3ahxc lKw9vCVtaTHVEjMOLVdhZzGByOobAxwBsOdjA5AYpB4+p59ib/uqHyIQrzuXCpXF3XB4 dan5Ml6lXuJu8F8W9bPuj4k0s1TiYJFSkLnFLlJbn0UxnA7zUUfGKTnNKYI7sEjtfUkr o9vO+WY7Dg5wV8VEC6XPXSthGUbwRej1MZ059JnEYJ/uUYRskwyb8+g+T29VhBHcx00Q dAZw== X-Gm-Message-State: ALoCoQl/7u5bqPXgqrbjDoOaJafS5y/p+fdWfdKPuHZD9IO4OkLg7KisMuLvNHcht1vjS/gkRR1ojvlXYqIZBvU+0GVu7zagEjfuf5qCHK7WnQ4xSk1EGgVicopedQZABiDAfPB/16gk2Q+XiS0hl9iWoA1HQte8KqbDwzzhucVgy9KKirxLJu3NqVi14QWNdanXEqZq6EWV0euZUV9HZD9i4igfLBlWJyF9+3wTIFOTrjqUBpabN8Y= X-Received: by 10.236.2.5 with SMTP id 5mr3248168yhe.23.1378396158157; Thu, 05 Sep 2013 08:49:18 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id a49si1526271yhc.5.1969.12.31.16.00.00 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Thu, 05 Sep 2013 08:49:18 -0700 (PDT) Received: from clearcreek.mtv.corp.google.com (clearcreek.mtv.corp.google.com [172.22.73.104]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id D49BA31C0F6 for ; Thu, 5 Sep 2013 08:49:17 -0700 (PDT) Received: by clearcreek.mtv.corp.google.com (Postfix, from userid 110058) id 649B120063A; Thu, 5 Sep 2013 08:49:17 -0700 (PDT) From: Paul Stewart Date: Wed, 4 Sep 2013 08:59:52 -0700 Subject: [PATCH] hostapd: Add option to send OBSS scan params To: hostap@lists.shmoo.com Message-Id: <20130905154917.649B120063A@clearcreek.mtv.corp.google.com> X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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 --- hostapd/config_file.c | 2 ++ hostapd/hostapd.conf | 7 +++++++ src/ap/ap_config.h | 1 + src/ap/ieee802_11_ht.c | 16 ++++++++++++++++ src/common/ieee802_11_defs.h | 11 +++++++++++ 5 files changed, 37 insertions(+) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 0b4fd77..bf5f8bd 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -2523,6 +2523,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) { diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 45897ed..4188b17 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -462,6 +462,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 40MHz 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 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index c5531fa..30e44ef 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -520,6 +520,7 @@ struct hostapd_config { int ieee80211n; int secondary_channel; int require_ht; + int obss_interval; u32 vht_capab; int ieee80211ac; int require_vht; diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c index 6483e1c..2d53648 100644 --- a/src/ap/ieee802_11_ht.c +++ b/src/ap/ieee802_11_ht.c @@ -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; } diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 137c309..d2e458d 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -585,6 +585,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 {