Having looked at the code a little bit today, this commit does however prevent using the value of 0 which cfg80211 uses to indicate driver default, could the condition perhaps be changed to == -1 like other options? (With some type changing?) > On Sun, Jan 6, 2019 at 11:46 AM Jouni Malinen <j@xxxxx> wrote: >> >> On Sun, Jan 06, 2019 at 08:17:05AM -0800, Justin Capella wrote: >> > If i'm not mistaken >> > https://w1.fi/cgit/hostap/commit/?id=18206e02c540f0a379db507b4ecc22c8855c7acf >> > disabled the ability to leave the beacon interval as-is / use the >> > driver default. >> >> No, it did not. It actually made this configurable in cases where >> wpa_supplicant is used to control AP mode operation. Prior to this >> change, the hardcoded default beacon_int=100 from hostapd code was used >> for all cases. >> >> > When attempting to run a card in sta/ap mode I ran into a problem >> > where the ap would not start, failing to set the beacon interval. >> > >> > The card was already connected as a station, and presumably was using >> > a different beacon interval, and looking at "iw phy" one of my >> > available modes: >> > >> > total <= 2, #channels <= 1, STA/AP BI must match >> > >> > From cfg80211: >> > * @beacon_int_infra_match: In this combination, the beacon intervals >> > * between infrastructure and AP types must match. This is required >> > * only in special cases. >> >> I guess hostapd/wpa_supplicant could try to detect this type of >> constraints and decide to use the beacon interval from a station virtual >> interface if there is one and the configuration profile does not specify >> a specific value to be used. >> >> > From: nl80211 / hostapd-2.3/src/drivers/driver.h: >> > * beacon_int - Beacon interval for IBSS or 0 to use driver default >> >> That is for IBSS, not AP mode. >> >> > If not reverting this implicit behavior, perhaps could there be a way >> > to explicitly use the already set beacon interval? >> >> There is nothing to revert here.. With nl80211, there is not even a >> concept of "as-is or default driver beacon interval". The nl80211 >> command to start AP mode requires a specific Beacon interval to be set. >> >> Like I noted above, it might be possible to iterate over all virtual >> interfaces to find the currently used Beacon interval value and try to >> use that when bringing up the AP. That said, it is not clear that this >> would be generic enough solution since the station interface might want >> to roam to another AP that uses a different beacon interval.. Some logic >> and configurable policy would likely be needed to determine what to do >> in such case (reject roaming vs. stop and restart AP with different >> beacon interval). Anyway, that would likely needed for updating channel >> as well in roaming cases. >> >> -- >> Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap