[OpenWrt-Devel] How to initialize multiple phy radios
David Hutchison
dhutchison at bluemesh.net
Fri Apr 22 04:03:01 EDT 2016
Hello,
I have been working on a board port and have everything working except
for the 2nd radio. This board has a QCA9531 CPU and 2 WiFi Radios:
AR9531 and a QCA9887 ( http://routerboard.com/RB952Ui-5ac2nD for more
details ).
The 2.4GHz radio works great, and I have acquired the correct calibration data:
[ 23.440000] ath: EEPROM regdomain: 0x0
[ 23.440000] ath: EEPROM indicates default country code should be used
[ 23.440000] ath: doing EEPROM country->regdmn map search
[ 23.440000] ath: country maps to regdmn code: 0x3a
[ 23.440000] ath: Country alpha2 being used: US
[ 23.440000] ath: Regpair used: 0x3a
[ 23.450000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 23.450000] Registered led device: ath9k-phy0
[ 23.460000] ieee80211 phy0: Atheros AR9531 Rev:0 mem=0xb8100000, irq=47
[ 23.630000] cfg80211: Regulatory domain changed to country: US
[ 23.630000] cfg80211: DFS Master region: FCC
[ 23.640000] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 23.650000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz),
(N/A, 3000 mBm), (N/A)
[ 23.650000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
160000 KHz AUTO), (N/A, 2300 mBm), (N/A)
[ 23.660000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
[ 23.670000] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
(N/A, 2300 mBm), (0 s)
[ 23.680000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz),
(N/A, 3000 mBm), (N/A)
[ 23.690000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000
KHz), (N/A, 4000 mBm), (N/A)
That is being done with the following code snippet:
void __init rbhap_wlan_init(u16 id)
{
char *caldata;
u8 wlan_mac[ETH_ALEN];
caldata = rb_get_ext_wlan_data(id);
if (caldata == NULL) {
pr_err("caldata is NULL\n");
return;
}
ath79_init_mac(wlan_mac, ath79_mac_base, 2);
ath79_register_wmac(caldata + 0x1000, wlan_mac);
kfree(caldata);
}
This particular architecture i'm working on adds kernel support for
the hAP as well as the hAP AC Lite. I'm passing "1" or "0" to
rbhap_wlan_init() based on the board:
flags = rbhap_get_flags(info);
if (flags & RB95X_FLAG_80211AC) {
rbhap_wlan_init(1);
ath79_register_pci();
} else {
rbhap_wlan_init(0);
}
I saw the "get_flags" example from mach-rb91x.c as the "board=" in the
bootloader were the same for both the Mikrotik hAP and Mikrotik hAP AC
Lite.
Anyway, the Mikrotik hAP only has one radio and is 100% working.
However the hAP AC Lite has an additional radio ( QCA988X )... I've
compiled in ath10k, and added "ath79_register_pci()" but it doesn't
find the radio. I've looked at ap91_pci_init() as well as
ap94_pci_init() and haven't had any luck.
What is the normal way for initializing a platform with multiple
radio's? Of course I don't know the exact wiring with this board, but
I believe the QCA988X 802.11ac radio is on a PCI bus of some sort. I'm
not entirely sure, but every example I have seen it appears to be.
Any insight as to what to try, to initialize this 2nd radio would be
much appreciated!
QCA9531 + AR9531 + QCA988x
Thank you!!
-- Davey
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list