[RFC] nl80211: set NLMODE correctly for AP interface
j at w1.fi
Mon May 12 11:37:18 EDT 2014
On Fri, May 02, 2014 at 06:48:36PM +0530, Avinash Patil wrote:
> During supplicant/hostapd initialization, current implementation
> sets NLMODE as AP only when hostapd has been started or for dynamically
> created interfaces.
> If supplicant is used for AP operations on statically created AP
> interfaces, this also should also set NLMODE as AP.
Could you please clarify how exactly this configuration is done
(configuration file details and how the interface is added and
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> @@ -4698,7 +4698,7 @@ wpa_driver_nl80211_finish_drv_init(struct
> - if (drv->hostapd)
> + if (drv->hostapd || nl80211_get_ifmode(bss) == NL80211_IFTYPE_AP)
> nlmode = NL80211_IFTYPE_AP;
This breaks the case of something first setting wlan0 to non-station
mode (e.g., "iw wlan0 set type __ap") followed by wpa_supplicant started
on wlan0. The expectation there is that wpa_supplicant runs operations
in station mode until requested to something else (e.g., start AP mode).
Why would this change be needed in the first place? Doesn't
wpa_supplicant set the interface to AP mode when the AP mode network is
Jouni Malinen PGP id EFC895FA
More information about the HostAP