<div dir="ltr">Hi Rajkumar! Â This functionality was originally added in order to allow testing of OBSS functionality in clients of the AP. Â In particular, there wasn&#39;t a built in stipulation that the AP hardware / firmware support OBSS action frames. Â I don&#39;t mind having hostapd&#39;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.<div>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 6, 2014 at 4:35 AM, Rajkumar Manoharan <span dir="ltr">&lt;<a href="mailto:rmanohar@qti.qualcomm.com" target="_blank">rmanohar@qti.qualcomm.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Advertise OBSS scan params based on driver capabilities and also<br>
set default value for obss scan interval as defined in IEEE Std<br>
802.11-2012, 8.4.2.61 and MIB defval.<br>
<br>
Signed-off-by: Rajkumar Manoharan &lt;<a href="mailto:rmanohar@qti.qualcomm.com">rmanohar@qti.qualcomm.com</a>&gt;<br>
---<br>
 src/ap/ap_config.c Â  Â  Â  Â  | 1 +<br>
 src/ap/ieee802_11_ht.c Â  Â  | 3 ++-<br>
 src/ap/ieee802_11_shared.c | 4 ++--<br>
 3 files changed, 5 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c<br>
index 9680817..64c9795 100644<br>
--- a/src/ap/ap_config.c<br>
+++ b/src/ap/ap_config.c<br>
@@ -169,6 +169,7 @@ struct hostapd_config * hostapd_config_defaults(void)<br>
  Â  Â  Â  conf-&gt;tx_queue[3] = txq_bk;<br>
<br>
  Â  Â  Â  conf-&gt;ht_capab = HT_CAP_INFO_SMPS_DISABLED;<br>
+ Â  Â  Â  conf-&gt;obss_interval = 300;<br>
<br>
  Â  Â  Â  conf-&gt;ap_table_max_size = 255;<br>
  Â  Â  Â  conf-&gt;ap_table_expiration_time = 60;<br>
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c<br>
index c0a7cd4..7020858 100644<br>
--- a/src/ap/ieee802_11_ht.c<br>
+++ b/src/ap/ieee802_11_ht.c<br>
@@ -46,7 +46,8 @@ u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid)<br>
<br>
  Â  Â  Â  pos += sizeof(*cap);<br>
<br>
- Â  Â  Â  if (hapd-&gt;iconf-&gt;obss_interval) {<br>
+ Â  Â  Â  if (hapd-&gt;iconf-&gt;obss_interval &amp;&amp;<br>
+ Â  Â  Â  Â  Â  (hapd-&gt;iface-&gt;drv_flags &amp; WPA_DRIVER_FLAGS_HT_2040_COEX)) {<br>
  Â  Â  Â  Â  Â  Â  Â  struct ieee80211_obss_scan_parameters *scan_params;<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  *pos++ = WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS;<br>
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c<br>
index 12403f9..2755528 100644<br>
--- a/src/ap/ieee802_11_shared.c<br>
+++ b/src/ap/ieee802_11_shared.c<br>
@@ -170,7 +170,7 @@ static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx)<br>
<br>
  Â  Â  Â  switch (idx) {<br>
  Â  Â  Â  case 0: /* Bits 0-7 */<br>
- Â  Â  Â  Â  Â  Â  Â  if (hapd-&gt;iconf-&gt;obss_interval)<br>
+ Â  Â  Â  Â  Â  Â  Â  if (hapd-&gt;iface-&gt;drv_flags &amp; WPA_DRIVER_FLAGS_HT_2040_COEX)<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  *pos |= 0x01; /* Bit 0 - Coexistence management */<br>
  Â  Â  Â  Â  Â  Â  Â  break;<br>
  Â  Â  Â  case 1: /* Bits 8-15 */<br>
@@ -225,7 +225,7 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid)<br>
  Â  Â  Â  Â  Â  Â  Â  len = 4;<br>
  Â  Â  Â  if (len &lt; 3 &amp;&amp; hapd-&gt;conf-&gt;wnm_sleep_mode)<br>
  Â  Â  Â  Â  Â  Â  Â  len = 3;<br>
- Â  Â  Â  if (len &lt; 1 &amp;&amp; hapd-&gt;iconf-&gt;obss_interval)<br>
+ Â  Â  Â  if (len &lt; 1 &amp;&amp; (hapd-&gt;iface-&gt;drv_flags &amp; WPA_DRIVER_FLAGS_HT_2040_COEX))<br>
  Â  Â  Â  Â  Â  Â  Â  len = 1;<br>
  Â  Â  Â  if (len &lt; 7 &amp;&amp; hapd-&gt;conf-&gt;ssid.utf8_ssid)<br>
  Â  Â  Â  Â  Â  Â  Â  len = 7;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.2<br>
<br>
_______________________________________________<br>
HostAP mailing list<br>
<a href="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</a><br>
<a href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/mailman/listinfo/hostap</a><br>
</font></span></blockquote></div><br></div>