i.MX6Q SABRE SD - How to porting ath9k PCIe driver and WIFI HAL

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX6Q SABRE SD - How to porting ath9k PCIe driver and WIFI HAL

3,955 Views
petertseng
Contributor III

Hello,

We using Atheros ath9k AR9462/AR9482 PCI-e module in our's  i.MX6Q custom board.

I downloaded a compat-drivers-3.9-rc1-3 from Linux-Wireless, and generate ath9k driver modules.

These modules are loaded sequentially by:

     compat.ko

     cfg80211.ko

     mac80211.ko

     ath.ko

     ath9k_hw.ko

     ath9k_common.ko

     ath9k.ko

Then download libnl and iw tools scan and connected to WIFI AP.

I can find and ping WIFI AP but the browser can not connect to the network.

Does this mean that ath9k driver modules have been ready?

About the ath9k HAL and frameworks without any reference resources.

How to modify android wifi HAL and frameworks?

init.rc also need to modify it?

Thank you for anyone that will give us some hints.

Tags (4)
5 Replies

136 Views
mrleo
Contributor IV

Hi, Peter

I also want to apply ar9462 pcie module to our's  i.MX6Q custom board in android 4.2.2 platform.

Have you solve this problem later?

Would you please give me any suggestion ?

Thank you a lot.

Leo

0 Kudos

136 Views
billbluesceen
Contributor II

Hello Leo,

were you able to run the ar9462 pcie module with your imx6 board? I am currently facing problems with ath9k and imx6

0 Kudos

136 Views
bohanlu
Contributor I

Hi, Leo

The method posted by byungchul should work.

I can bring up WLAN by system UI with compat-wireless driver by similar way.

As for the HAL and private lib for wpa_supplicant, you can refer to the source code of Android-x86.

However, I still have some problems on suspend/resume. I am not sure if this results from the difference of kernel version or not because we use v3.4

Good luck.

0 Kudos

136 Views
bohanlu
Contributor I

Hi, Peter

Have you solved this issue ?

I am handling the similar issue. Would you please give me any suggestion ?

Thank you a lot.

0 Kudos

136 Views
byungchul
Contributor II

Hi, peter.

This a my build methods.

I hope this tips will help you.

0. Kernel configuration

CONFIG_WIRELESS_EXT=y
CONFIG_NET_SCHED=y

CONFIG_CFG80211=m
CONFIG_CFG80211_WEXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
CONFIG_LIB80211=y
CONFIG_MAC80211=m

CONFIG_ATH_COMMON=m
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_RATE_CONTROL=y

1. select drivers (compat-wireless-3.6.8-1)

./scripts/driver-select ath9k

2. comile driver

make ARCH=arm CROSS_COMPILE=arm-linux- KLIB=/opt/mx6/linux-3.0.35 KLIB_BUILD=/opt/mx6/linux-3.0.35

3. install modules

sudo ./install.sh

4. connection test

1) WEP128, ASCII key
ifconfig wlan0 up
iwconfig wlan0 essid "SoftAP-E1" key s:0123456789012

2) WAP/WPA2
You need to edit the /etc/wpa_supplicant.conf file as described in WPA_Supplicant and according to what you got from #Access point discovery. Then, issue this command:

wpa_supplicant -i wlan0 -B -c /etc/wpa_supplicant.conf
or
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf &

</etc/wpa_supplicant.conf>
ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="SoftAP-E0"
        psk="1234567890"
        key_mgmt=WPA-PSK
        proto=WPA2
        pairwise=CCMP
        group=CCMP
}

3) ping test

route add default gw 192.168.0.1
ping ftp.kernel.org

4) speed test

<client>
iperf -c 10.11.12.232

<server>
iperf -s

<install.sh>

#!/bin/sh

MODPATH=/opt/mx6/rootfs/lib/modules/3.0.35-2310-gc27cb38/kernel
MODROOT=/opt/mx6/rootfs/lib/modules

cp -vrf ../net/rfkill/rfkill-regulator.ko $MODPATH/net/rfkill/rfkill-regulator.ko
cp -vrf ./net/mac80211/mac80211.ko $MODPATH/net/mac80211/
cp -vrf ./net/wireless/cfg80211.ko $MODPATH/net/wireless/
cp -vrf ./drivers/net/wireless/ath/ath.ko $MODPATH/drivers/net/wireless/ath/
cp -vrf ./drivers/net/wireless/ath/ath9k/ath9k.ko $MODPATH/drivers/net/wireless/ath/ath9k/
cp -vrf ./drivers/net/wireless/ath/ath9k/ath9k_htc.ko $MODPATH/drivers/net/wireless/ath/ath9k/
cp -vrf ./drivers/net/wireless/ath/ath9k/ath9k_hw.ko $MODPATH/drivers/net/wireless/ath/ath9k/
cp -vrf ./drivers/net/wireless/ath/ath9k/ath9k_common.ko $MODPATH/drivers/net/wireless/ath/ath9k/
mkdir -p $MODROOT/compat
cp -vrf ./compat/sch_fq_codel.ko $MODROOT/compat/
cp -vrf ./compat/sch_codel.ko $MODROOT/compat/
cp -vrf ./compat/compat.ko $MODROOT/compat/