AR6003 concurrent AP+STA

Rostyslav Khudolii rkhudolii at airtame.com
Thu Mar 24 01:13:21 PDT 2016


Hi all,

I'm trying to use an AR6003 in a concurrent AP+STA mode. 
“Programmer’s guide” claims that AR6003 supports AP+STA mode, 
however the upstream ath6kl driver doesn’t seem to support it from scratch, 
so I added the following modifications:

+static const struct ieee80211_iface_limit if_limits[] = {
+       { .max = 2, .types = BIT(NL80211_IFTYPE_STATION), },
+       { .max = 1, .types = BIT(NL80211_IFTYPE_AP), },
+};
+static const struct ieee80211_iface_combination if_comb[] = {
+       {
+               .limits = if_limits,
+               .n_limits = ARRAY_SIZE(if_limits),
+               .max_interfaces = 2,
+               .num_different_channels = 1,
+       },
+};

int ath6kl_cfg80211_init(struct ath6kl *ar)
 {
….
+       wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
+       wiphy->iface_combinations = if_comb;

After this I was able to create an additional interface on the same phy, using the following command:

iw phy0 interface add wlan2 type managed

To run the AP functionality I’ve tried both hostapd and wpa_supplicant,
 which, I don’t think, makes any difference, since they share the same codebase.

wpa_supplicant config:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=lighttpd
update_config=1
ap_scan=1
fast_reauth=1
network={
	ssid=“TestAP"
	mode=2
	frequency=5200
	psk="P8Lh2gyA"
	key_mgmt=WPA-PSK
} 

Now the problem:
In, let’s say 90% of cases, 5.2GHz AP doesn’t go up - verified with a sniffer (no beacons, control frames, nothing).
 After I enabled WMI debug level, in the logs I see this:

640 [  427.946172] ath6kl: ath6kl_wmi_ap_profile_commit: nw_type=16 auth_mode=16 ch=5240 ctrl_flags=0x0-> res=0
 642 [  427.948258] ath6kl: wmi rx id 4112 len 1496
 643 [  427.948267] ath6kl: WMI_EXTENSION_EVENTID
 644 [  427.948271] ath6kl: wmi event dbglog len 1492
 645 [  427.948868] ath6kl: wmi rx id 4102 len 4
 646 [  427.948874] ath6kl: WMI_REGDOMAIN_EVENTID
 647 [  427.948895] ath6kl: Country alpha2 being used: DK
 648 [  427.948926] cfg80211: Calling CRDA for country: DK
 649 [  427.949123] ath6kl: wmi rx id 4101 len 3
 650 [  427.949129] ath6kl: WMI_CMDERROR_EVENTID
 651 [  427.949134] ath6kl: programming error, cmd=61455 unknown error
 652 [  427.949263] ath6kl: wmi rx id 4099 len 11
 653 [  427.949274] ath6kl: WMI_DISCONNECT_EVENTID
 654 [  427.949282] ath6kl: wmi event disconnect proto_reason 107 bssid ff:ff:ff:ff:ff:ff wmi_reason 4 assoc_resp_len 0

It seems that I’m experiencing some issues in the AR6003 FW, which I don’t have an access to, so I can’t debug it. 
Command which fails is WMI_AP_CONFIG_COMMIT_CMDID, which is (I believe), is the final command in the process of AP creation.
Maybe it is somehow connected with that REGDOMAIN event, which is seen in the logs, but it’s just my guess.

Sometimes, if I try again, let’s say 2-3 times, I may succeed - but it’s not reliable like this.
It’s worth mentioning, that it doesn’t matter if the station interface is connected or not - problem appears in both cases.

I’m using Linux Kernel 3.10.58 + ath6kl from here https://github.com/kvalo/ath 
(I took only bug fixes and modifications, which are not connected with cfg80211 subsystem) + the latest (I believe) AR6003 FW-4.

Any feedback or help would be appreciated!

Regards,
Rostyslav Khudolii




More information about the ath6kl mailing list