Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am pretty convinced that there's no existing Linux kernel driver for the built-in WLAN adapter on my laptop, having been tried both CentOS and Debian, esp that I haven't seen my Vendor/Product code here.
So..I decided to be a kernel driver programmer! lol
Where should I start? Here's what I know so far.
* Programming language is C - need to learn that
* Device specification needs to be provided by Manufacturer
yes, you will need c, and also you need to know how to build something (I mean the build tools, like make), and also you need to know the kernel, need to know how to make a kernel module and need to know what is a driver.
Would there be a distribution of choice? I know some distributions such as CentOS provide less drivers support on "non server" hardware, so might they be providing less development support/tools also? So I guess I will be better off not using CentOS? Debian maybe?
It looks like your adapter uses a patched (or fixed) ath10k driver in Ubuntu. I'm not sure how if the same steps (in terms of installation) would work in Debian, though.
Regards....
Last edited by ardvark71; 03-15-2016 at 03:23 PM.
Reason: Correction.
Three ways to get a driver in linux. One is a built in module. Two is you add it in. Three is to use ndiswrapper. I'd think that both of those two nic's should be supported in linux. May have to blacklist or as above, use a modified driver.
Notes.
Generally when you wish to make a new driver you look for similar driver sources and see if you can edit the changes. Making a driver from scratch is quite involved. In some cases all you have to do is add in a pci id using some binary editor. They put those numbers in sometimes in reverse order.
So one day I was looking at my adapters on my Windows 8.1 and I noticed that the WIFI adapter has a label "QCA9377", something that didn't show up from all the commands I entered when troubleshooting in debian. So i went ahead and searched for Linux drivers and got a hit. So once again, I ended up with the ath10k driver and the linux kernel drivers page which didn't list QCA9377, but out of desperation, I tried the steps anyway. Here are all the steps.
Code:
apt-get update
apt-get install linux-headers-generic build-essential
wget https://www.kernel.org/pub/linux/ker...0151120.tar.gz
tar -zxvf backports-20151120.tar.gz
cd backports-20151120
make defconfig-ath10k
make
make install
Output of make install:
Code:
root@debianpc:/home/myuser/backports-20151120# make install
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
Building modules, stage 2.
MODPOST 6 modules
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
INSTALL /home/myuser/backports-20151120/compat/compat.ko
INSTALL /home/myuser/backports-20151120/drivers/net/wireless/ath/ath.ko
INSTALL /home/myuser/backports-20151120/drivers/net/wireless/ath/ath10k/ath10k_core.ko
INSTALL /home/myuser/backports-20151120/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
INSTALL /home/myuser/backports-20151120/net/mac80211/mac80211.ko
INSTALL /home/myuser/backports-20151120/net/wireless/cfg80211.ko
DEPMOD 3.16.0-4-amd64
depmod will prefer updates/ over kernel/ -- OK!
Note:
You may or may not need to update your initramfs, you should if
any of the modules installed are part of your initramfs. To add
support for your distribution to do this automatically send a
patch against "update-initramfs.sh". If your distribution does not
require this send a patch with the '/usr/bin/lsb_release -i -s'
("Debian GNU/Linux") tag for your distribution to avoid this warning.
Your backported driver modules should be installed now.
Reboot.
After rebooting, still no working WLAN. Checked dmesg:
Code:
[ 15.809650] ath10k_pci 0000:03:00.0: irq 70 for MSI/MSI-X
[ 15.809660] ath10k_pci 0000:03:00.0: irq 71 for MSI/MSI-X
[ 15.809666] ath10k_pci 0000:03:00.0: irq 72 for MSI/MSI-X
[ 15.809671] ath10k_pci 0000:03:00.0: irq 73 for MSI/MSI-X
[ 15.809677] ath10k_pci 0000:03:00.0: irq 74 for MSI/MSI-X
[ 15.809682] ath10k_pci 0000:03:00.0: irq 75 for MSI/MSI-X
[ 15.809687] ath10k_pci 0000:03:00.0: irq 76 for MSI/MSI-X
[ 15.809693] ath10k_pci 0000:03:00.0: irq 77 for MSI/MSI-X
[ 15.809713] ath10k_pci 0000:03:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0
[ 16.070521] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/cal-pci-0000:03:00.0.bin (-2)
[ 16.070562] ath10k_pci 0000:03:00.0: Direct firmware load failed with error -2
[ 16.070564] ath10k_pci 0000:03:00.0: Falling back to user helper
[ 16.071044] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/QCA9377/hw1.0/firmware-5.bin (-2)
[ 16.071082] ath10k_pci 0000:03:00.0: Direct firmware load failed with error -2
[ 16.071083] ath10k_pci 0000:03:00.0: Falling back to user helper
[ 16.071453] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-5.bin': -12
[ 16.071506] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/QCA9377/hw1.0/firmware-4.bin (-2)
[ 16.071571] ath10k_pci 0000:03:00.0: Direct firmware load failed with error -2
[ 16.071573] ath10k_pci 0000:03:00.0: Falling back to user helper
[ 16.071919] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-4.bin': -12
[ 16.071973] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/QCA9377/hw1.0/firmware-3.bin (-2)
[ 16.072039] ath10k_pci 0000:03:00.0: Direct firmware load failed with error -2
[ 16.072041] ath10k_pci 0000:03:00.0: Falling back to user helper
[ 16.072356] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-3.bin': -12
[ 16.072405] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/QCA9377/hw1.0/firmware-2.bin (-2)
[ 16.072457] ath10k_pci 0000:03:00.0: Direct firmware load failed with error -2
[ 16.072459] ath10k_pci 0000:03:00.0: Falling back to user helper
[ 16.072772] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-2.bin': -12
[ 16.072818] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/QCA9377/hw1.0/firmware.bin (-2)
[ 16.072866] ath10k_pci 0000:03:00.0: Direct firmware load failed with error -2
[ 16.072868] ath10k_pci 0000:03:00.0: Falling back to user helper
[ 16.073180] ath10k_pci 0000:03:00.0: could not fetch firmware (-12)
[ 16.073212] ath10k_pci 0000:03:00.0: could not fetch firmware files (-12)
[ 16.073239] ath10k_pci 0000:03:00.0: could not probe fw (-12)
Before I close out this thread, I wish to have the below questions answered first, having little knowledge on kernel drivers right now.
1. Why did I need to copy a firmware file over the internet (from a git repo) when I already had to compile and install ath10k manually? Was it not supposed to contain the necessary firmware files already?
2. It appears that QCA9377 is a newer device so understandably it is not listed in kernel.org's list of supported devices for ath10k, here and here, but it just works on my device. Why is that?
3. Jessie currently does not include any Qualcomm Atheros QCA* firmware in its firmware-atheros package. Jessie-backports up to sid already has Qualcomm Atheros QCA* firmware, unfortunately, still no firmware for QCA9377. Is there any way the firmware will be included to the upcoming stable releases, or at least to Jessie-backports?
Apparently, the development happens here, where I downloaded the firmware files, but QCA9377/ is not yet pushed to the ath10k tree in the kernel. Once the QCA9377 is pushed to the kernel.org git tree, distributions such as Debian will start to add the firmware files to the stable and succeeding releases. Is this correct?
It looks like your adapter uses a patched (or fixed) ath10k driver in Ubuntu. I'm not sure how if the same steps (in terms of installation) would work in Debian, though.
Regards....
Now that I understood the commands in the link you shared, I realized this was it :'( The steps are almost the same, I guess, because I had to compile the source from backports, though I had to use defconfig-ath10k instead of defconfig-wifi. Thanks anyway.
Now that I understood the commands in the link you shared, I realized this was it :'( The steps are almost the same, I guess, because I had to compile the source from backports, though I had to use defconfig-ath10k instead of defconfig-wifi. Thanks anyway.
Hi...
Your welcome, I'm glad you were able to get it working after quite an effort!
Quote:
1. Why did I need to copy a firmware file over the internet (from a git repo) when I already had to compile and install ath10k manually? Was it not supposed to contain the necessary firmware files already?
While I don't know the details, I think this has to do with licensing/legal issues. Please see this page from Debian's website.
3. Jessie currently does not include any Qualcomm Atheros QCA* firmware in its firmware-atheros package. Jessie-backports up to sid already has Qualcomm Atheros QCA* firmware, unfortunately, still no firmware for QCA9377. Is there any way the firmware will be included to the upcoming stable releases, or at least to Jessie-backports?
As an idea, you might want to talk to the folks at Debian about this. You can either post at their forum or email them using, I'm guessing, the "Developers' database administrators" address here.
Regards...
Last edited by ardvark71; 03-27-2016 at 03:19 AM.
Reason: Added link.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.