ath9k driver on Xavier

Hi,
I built the kernel for the Xavier from source with the ath9k driver enabled. But when I tried loading the driver I get the following error.

modprobe: ERROR: could not insert 'ath9k': Unknown symbol in module, or unknown parameter (see dmesg)

and got the following in dmesg

[   47.863250] ath9k_common: Unknown symbol relay_open (err 0)
[   47.863575] ath9k_common: Unknown symbol relay_buf_full (err 0)
[   47.863760] ath9k_common: Unknown symbol relay_close (err 0)
[   47.863898] ath9k_common: Unknown symbol relay_switch_subbuf (err 0)
[   47.864103] ath9k_common: Unknown symbol relay_file_operations (err 0)

I was able to properly install the driver on a TX2 without any issues. So, I think the issue from the ath9k driver itself. Perhaps there is a bug in it. Was anyone able to load the driver?

Could you try to add CONFIG_RELAY=y to defconfig?

Tried it. Added CONFIG_RELAY=y in arch/arm64/defconfig and it didn’t work.

The one tegra using is “tegra_defconfig”.

Nah that didn’t work.

hmm, Do you have > k4.9 x86 machine to make sure it can work?

I don’t have a x86 but I do have a few x64 desktops and a few TX2s with the driver working. Its just the vanilla ath9k driver. I didn’t make any modification. I have some desktops with k4.1.10, >k4.15.0 and they worked fine.

Could you also share which wireless adapter are you using? (also dmesg)
Need some time to investigate it.

I am using an AR9380 NIC. But then again it shows up from lspci and I am not able to load the driver itself. So, I guess it does not matter which NIC I use for now. And do you want the whole dmesg output?

kalvik,

Could you share what changes have you made in defconfig?

Just appended CONFIG_RELAY=y at the top. And I see the relay.o file in the kernel folder. So, it is being built.

But rel-31 should not have ath9k enabled in defconfig… I was asking about something like “CONFIG_ATH9K=m”. What did you change?

Oh, well yes I used menuconfig to build ath9k as a module with all the options in Atheros 802.11n wireless cards support enabled. I didn’t enable any other atheros related drivers.

Below are necessary for ath9k, could you add it to tegra_defconfig? Then you should not need to enable it with menuconfig anymore.

+CONFIG_ATH9K=m
+CONFIG_ATH9K_DEBUGFS=y
+CONFIG_ATH9K_STATION_STATISTICS=y
+CONFIG_ATH9K_WOW=y
+CONFIG_ATH9K_CHANNEL_CONTEXT=y
+CONFIG_ATH9K_HTC=m
+CONFIG_ATH9K_HTC_DEBUGFS=y

If issue is still, please let me know.

Ok, I started with a fresh install L4T, got the kernel sources, copied the /proc/config.gz, updated the kernel-4.9/arch/arm64/configs/tegra_defconfig by adding the following

+CONFIG_ATH9K=m
+CONFIG_ATH9K_DEBUGFS=y
+CONFIG_ATH9K_STATION_STATISTICS=y
+CONFIG_ATH9K_WOW=y
+CONFIG_ATH9K_CHANNEL_CONTEXT=y
+CONFIG_ATH9K_HTC=m
+CONFIG_ATH9K_HTC_DEBUGFS=y

And I got the same issue.

I see that the ath9k module was built. The Kconfig file in ath9k enables ATH9K_COMMON when ATH9K is built and ATH9K selects RELAY. So, it should be built. I see the RELAY.c and RELAY.o after building the kernel. But I don’t see them in /usr/src/linux-headers… folder. So, is RELAY being built but not installed?

Thanks for report. Still checking.

Hi kalvik,

Following below steps to build ath9k module and modprobe, it’s working without error:

Download R31.1 sources from: https://developer.nvidia.com/embedded/dlc/l4t-sources-31-1-0
$ TEGRA_KERNEL_OUT=<outdir>
$ export CROSS_COMPILE=<crossbin>
Add below to tegra_defconfig
    CONFIG_ATH9K=m
    CONFIG_ATH9K_DEBUGFS=y
    CONFIG_ATH9K_STATION_STATISTICS=y
    CONFIG_ATH9K_WOW=y
    CONFIG_ATH9K_CHANNEL_CONTEXT=y
    CONFIG_ATH9K_HTC=m
    CONFIG_ATH9K_HTC_DEBUGFS=y
cd /public_sources/kernel/kernel-4.9
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j<n>
$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=Linux_for_Tegra/rootfs/
Replace Image and lib/modules

@carolyuu That worked. I was using Jetpack on ubuntu 18 to flash L4T and was building on the Xavier. Not sure what I was doing wrong before but, it works now. Switched to Ubuntu 16 and followed your instructions. Thank you.