Virtual vifs issues
Hi,
I'm trying to setup a multiple wifi virtual interface (vifs) configuration, one running as an access point and the other as a station on an AR7240/AR9285 board using trunk version of openWRT with the ath9k driver.
As I was having issues with some devices that were either not connecting (PSP 1000) or disconnecting every few seconds (Iphone 3GS), I made further testing and discovered that when starting the access point (hostapd) after the station vif (default openwrt script order), no beacon frames are sent on the network (both ath beacon_debug and wireshark confirm this behaviour) whereas manually starting hostapd before the station vif will provide beacon frames and said devices will then work properly.
Note that the AP is responding to probes from surrounding stations in both cases.
I added few debug in the ath9k code and my understanding is as follow :
* beacon configuration/initialisation is done through the following calls :
o ath_beacon_config() -> ath_beacon_config_ap() -> ath9k_beacon_init() -> ath9k_hw_beaconinit().
o ath_beacon_config() only calls ath_beacon_config_ap() when vif->type is NL80211_IFTYPE_AP
o However added further debug code in the ath9k_beacon_init() in beacon.c, shows that there's a mismatch between vif->type and sc->sc_ah->opmode since the first one is set to NL80211_IFTYPE_AP (as explained above) whereas sc->sc_ah->opmode is set to NL80211_IFTYPE_STATION, the latter being then used in ath9k_hw_beaconinit() to choose how to apply configuration.
* sc->sc_ah->opmode configuration is done in ath9k_add_interface() but only for the first defined interface thus explaining the above behaviour.
Is my understanding correct ?
Is this the intended behaviour ?
Should the AP interface always be started before the station one ?
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20100224/649d55bb/attachment.htm