On Mon, Jan 21, 2019 at 12:04:41PM +0530, Sarada Prasanna Garnayak wrote: > In case ieee80211b was configured, the short slot time should > not appear in beacon capabilities. Could you please clarify why this change is needed an in which case short slot time could have shown up in configuration in IEEE 802.11b mode? > diff --git a/src/ap/beacon.c b/src/ap/beacon.c > @@ -1332,12 +1332,20 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, > - if (hapd->iface->current_mode && > - hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G) > - params->short_slot_time = > + if (hapd->iface->current_mode) { > + if (hapd->iface->current_mode->mode == > + HOSTAPD_MODE_IEEE80211B) { > + params->short_slot_time = 0; > + } else if (hapd->iface->current_mode->mode == > + HOSTAPD_MODE_IEEE80211G) { > + params->short_slot_time = > hapd->iface->num_sta_no_short_slot_time > 0 ? 0 : 1; > - else > + } else { > + params->short_slot_time = 1; > + } > + } else { > params->short_slot_time = -1; > + } The current behavior here is to set short_slot_time to -1 when IEEE 802.11b mode is used since that -1 is documented as "do not set (e.g., when 802.11g mode is not in use)". This patch would break that expectation by setting the value to 0. Furthermore, this would hard code short_slot_time to 1 for all other modes than 802.11g and 802.11b while the commit message does not explain that change in any way. > diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c > @@ -206,10 +206,16 @@ u16 hostapd_own_capab_info(struct hostapd_data *hapd) > - if (hapd->iface->current_mode && > - hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G && > - hapd->iface->num_sta_no_short_slot_time == 0) > - capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME; > + if (hapd->iface->current_mode) { > + if (hapd->iface->current_mode->mode == > + HOSTAPD_MODE_IEEE80211G) { > + if (hapd->iface->num_sta_no_short_slot_time == 0) > + capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME; > + } else if (hapd->iface->current_mode->mode != > + HOSTAPD_MODE_IEEE80211B) { > + capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME; > + } > + } What is this trying to do? The current code is already checking for 802.11g, i.e., this does not seem to have anything to do with 802.11b either. Instead, this seems to be hardcoding short slot time to be advertised in all other bands other than 2.4 GHz. The commit message has nothing about this either.. The different slot time options apply on the 2.4 GHz band, so it is not really clear what this patch is trying to do. Could you please explain the real purpose of this patch in the commit message in sufficient detail to understand the changes? -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap