OpenWrt Forum Archive

Topic: Change WLAN PCIe card on Router (AR9281 and MR3220)

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I need some help/advice on how to change the PCIe card on a MR3220 router build/target.

MR3220 comes with AR9285 WLAN.

We have a board based on MR3220, but uses AR9281 for WLAN.

The WLAN will not work using the standard MR3220 target as it seems the calibration data on the flash is for AR9281, but the OpenWRT firmware must be assuming it is a AR9285 and therefore does not load correctly.

Can I make changes to OpenWRT to support a different PCIe card with different AR WLAN card using the MR3220 as a baseline target?

Any suggestions would be a big help.

Thank you.

(Last edited by JohnV on 17 Sep 2014, 04:35)

I have some additional information.  I am hoping someone can point me in the right direction with this, I am very stumped.

I have a version of OpenWRT (just .bin, no source) supplied by the board manufacturer.  This firmware I have been told has been modified to support AR9281. When I check the deviceid of the PCIe card, I get this:

# cat device
0x002a
# cat vendor
0x168c

The above is correct, it is saying the device is an AR9281


With a fresh build of OpenWRT, I get this:

# cat device
0x002b
# cat vendor
0x168c

Which incorrectly identifying the PCIe card ar AR9285.


To me, that device ID is coming from the PCIe card, and I cannot for the life of me understand how it can be possible to report 2 different things, ever, regardless of what OpenWRT, what Linux version, anything....

Obviously I am wrong, but I have no idea why.

Why is a compile of OpenWRT changing what the PCIe card identifies itself as?

Im drowning here.....

I wanted to update this thread for anyone in the future that needs to dig around into this.

Based on the ART partiton, OpenWRT changes the deviceID and VendorID of the PCIe card, after the PCIe card is queried itself for the DeviceID and VendorID.  In my situation, the ART partition is not correct and I need to read the calibration data from the EEPROM, not the Flash (ART).

So, when it was loading the ath9k driver, OpenWRT would read in the ART partition and change it to the wrong card.

Once I made the change to force PCIe card to load calibration data from itself, the VendorID and DeviceID were as expected, and the card worked,

Certainly this is not a normal thing people will encounter, but I wanted to document it.

(Last edited by JohnV on 26 Sep 2014, 01:14)

And how do you force ath9k driver to get calibration data from card itself? I have the same problem here.

hmmz..tried to use it as example. But no joy. I'm not too good with C code sad

I see from other threads that you had the same problem : MR3220 running AR9281 wifi instead of AR9285.
Do you still have a patch?

EDIT:
didn't clean up my buildroot correctly. It works now smile Thanks.

(Last edited by jannoke on 25 Oct 2014, 14:56)

The discussion might have continued from here.