[PATCH] hostapd: Advertise OBSS scan params based on driver capability

Paul Stewart pstew at chromium.org
Tue May 6 11:02:49 EDT 2014


Hi Rajkumar!  This functionality was originally added in order to allow
testing of OBSS functionality in clients of the AP.  In particular, there
wasn't a built in stipulation that the AP hardware / firmware support OBSS
action frames.  I don't mind having hostapd's default behavior being
predicated on the hardware being capable -- for example, you could set
obss_interval to 300 conditional on that hardware capability, but it would
be nice to preserve the ability to manually set this interval in the
configuration file regardless of the underlying hardware capability.



On Tue, May 6, 2014 at 4:35 AM, Rajkumar Manoharan <
rmanohar at qti.qualcomm.com> wrote:

> Advertise OBSS scan params based on driver capabilities and also
> set default value for obss scan interval as defined in IEEE Std
> 802.11-2012, 8.4.2.61 and MIB defval.
>
> Signed-off-by: Rajkumar Manoharan <rmanohar at qti.qualcomm.com>
> ---
>  src/ap/ap_config.c         | 1 +
>  src/ap/ieee802_11_ht.c     | 3 ++-
>  src/ap/ieee802_11_shared.c | 4 ++--
>  3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
> index 9680817..64c9795 100644
> --- a/src/ap/ap_config.c
> +++ b/src/ap/ap_config.c
> @@ -169,6 +169,7 @@ struct hostapd_config * hostapd_config_defaults(void)
>         conf->tx_queue[3] = txq_bk;
>
>         conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED;
> +       conf->obss_interval = 300;
>
>         conf->ap_table_max_size = 255;
>         conf->ap_table_expiration_time = 60;
> diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
> index c0a7cd4..7020858 100644
> --- a/src/ap/ieee802_11_ht.c
> +++ b/src/ap/ieee802_11_ht.c
> @@ -46,7 +46,8 @@ u8 * hostapd_eid_ht_capabilities(struct hostapd_data
> *hapd, u8 *eid)
>
>         pos += sizeof(*cap);
>
> -       if (hapd->iconf->obss_interval) {
> +       if (hapd->iconf->obss_interval &&
> +           (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) {
>                 struct ieee80211_obss_scan_parameters *scan_params;
>
>                 *pos++ = WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS;
> diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
> index 12403f9..2755528 100644
> --- a/src/ap/ieee802_11_shared.c
> +++ b/src/ap/ieee802_11_shared.c
> @@ -170,7 +170,7 @@ 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)
> +               if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)
>                         *pos |= 0x01; /* Bit 0 - Coexistence management */
>                 break;
>         case 1: /* Bits 8-15 */
> @@ -225,7 +225,7 @@ 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)
> +       if (len < 1 && (hapd->iface->drv_flags &
> WPA_DRIVER_FLAGS_HT_2040_COEX))
>                 len = 1;
>         if (len < 7 && hapd->conf->ssid.utf8_ssid)
>                 len = 7;
> --
> 1.9.2
>
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20140506/a8880b64/attachment.htm>


More information about the HostAP mailing list