Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#13704 closed task (not_a_bug)

Add ath10k support to mac80211 compat-wireless drivers

Reported by: lchish@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: kernel Version: Trunk
Keywords: ath10k, ac, qca9880 Cc:

Description

The recent update to compat wireless now has the ath10k drivers included in it. Then wireless ac will work on the qca9880 pci card that the tp-link archer c7 and other devices use.

The firmware for these devices may also need to be added to linux-firmware for full supprort but I'm happy to do that manually.

Attachments (0)

Change History (6)

comment:1 Changed 5 years ago by anonymous

This should be as simple as adding ath10k to the make targets in package/mac80211/Makefile

comment:2 follow-up: Changed 5 years ago by nbd

  • Resolution set to not_a_bug
  • Status changed from new to closed

ath10k does not currently support the card in archer c7 (because it's v1 and not v2).
as for ath10k support in general, please send patches instead of opening up tickets ;)

comment:3 Changed 5 years ago by anonymous

Here's a quick and dirty patch. I guess Archer C7 users will have to wait for the V1 firmware to be released? Support seems to be in the driver but on their firmware page only the V2 firmware is there

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 9b2f54d..1940166 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -27,7 +27,7 @@ PKG_DRIVERS = \
 	rt2x00-lib rt2x00-pci rt2x00-usb rt2x00-soc rt2800-lib rt2400-pci \
 	rt2500-pci rt2500-usb rt61-pci rt73-usb rt2800-pci rt2800-usb \
 	rtl8180 rtl8187 zd1211rw mac80211-hwsim carl9170 b43 b43legacy \
-	ath9k-common ath9k ath9k-htc ath net-libipw net-ipw2100 net-ipw2200 \
+	ath9k-common ath9k ath9k-htc ath10k ath net-libipw net-ipw2100 net-ipw2200 \
 	mwl8k net-hermes net-hermes-pci net-hermes-plx net-hermes-pcmcia \
 	iwl-legacy iwl3945 iwl4965 iwlagn wl12xx lib80211
 
@@ -448,6 +448,22 @@ This module adds support for wireless adapters based on
 Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
 endef
 
+define KernelPackage/ath10k
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Atheros 802.11ac PCI wireless cards support
+  URL:=http://linuxwireless.org/en/users/Drivers/ath10k
+  DEPENDS+= @PCI_SUPPORT
+  FILES:= \
+	$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \
+	$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
+  AUTOLOAD:=$(call AutoLoad,28,ath10k)
+endef
+
+define KernelPackage/ath10k/description
+This module adds support for wireless adapters based on
+Qualcomm Atheros IEEE 802.11ac QCA9880 family of chipsets.
+endef
+
 define KernelPackage/ath9k-htc
   $(call KernelPackage/mac80211/Default)
   TITLE:=Atheros 802.11n USB device support
@@ -1000,7 +1016,7 @@ define KernelPackage/b43/config
 		default n
 		help
 		  Enable support for using PIO instead of DMA. Unless you have DMA
-		  transfer problems you don't need this.
+		  transfer problems you dont need this.
 
 		  If unsure, say N.
 
@@ -1194,6 +1210,7 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
 	MAC80211_DEBUGFS \
 	ATH9K_DEBUGFS \
 	ATH9K_HTC_DEBUGFS \
+	ATH10K_DEBUGFS \
 	CARL9170_DEBUGFS \
 	ATH5K_DEBUG
 endif
@@ -1204,9 +1221,11 @@ config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
 config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG
 
 config-$(call config_package,ath9k) += ATH9K
+config-$(call config_package,ath10k) += ATH10K
 config-$(call config_package,ath9k-common) += ATH9K_COMMON
 config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB
 config-$(CONFIG_PCI) += ATH9K_PCI
+config-$(CONFIG_PCI) += ATH10K_PCI
 config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD
 
 config-$(call config_package,ath9k-htc) += ATH9K_HTC
@@ -1609,6 +1628,7 @@ $(eval $(call KernelPackage,mac80211-hwsim))
 $(eval $(call KernelPackage,ath9k-common))
 $(eval $(call KernelPackage,ath9k))
 $(eval $(call KernelPackage,ath9k-htc))
+$(eval $(call KernelPackage,ath10k))
 $(eval $(call KernelPackage,ath))
 $(eval $(call KernelPackage,carl9170))
 $(eval $(call KernelPackage,b43))

comment:4 in reply to: ↑ 2 ; follow-up: Changed 5 years ago by chunkeey@…

Replying to nbd:

ath10k does not currently support the card in archer c7 (because it's v1 and not v2).
as for ath10k support in general, please send patches instead of opening up tickets ;)

Well, ath10k is dropping/has already dropped support for v1 cards. But the card in my archer c7 is a v2 :). Too bad it's not possible to load ath10k due to a data bus error (probably related to the MSI problem):

[13363.580000] ath10k_pci 0000:01:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff 64bit]
[13363.590000] ath10k: MSI-X didn't succeed (-1), trying MSI
[13363.600000] ath10k: MSI didn't succeed (-1), trying legacy INTR
[13363.620000] ath10k: legacy interrupt handling
[13363.680000] Data bus error, epc == 873328e0, ra == 873328e0
[13363.680000] Oops[#1]:
[13363.680000] CPU: 0 PID: 949 Comm: insmod Not tainted 3.10.3 #2
[13363.680000] task: 872be5b0 ti: 872fe000 task.ti: 872fe000
[13363.680000] $ 0   : 00000000 80320000 deadc0de 00000000
[13363.680000] $ 4   : b2080000 b2080004 1000fc00 ffff00fe
[13363.680000] $ 8   : 872fffe0 0000fc00 00000000 00000000
[13363.680000] $12   : 00000005 00000000 00000000 00420000
[13363.680000] $16   : 00000009 87159400 87821800 8730c800
[13363.680000] $20   : 00000009 b2080008 87821868 b2080000
[13363.680000] $24   : 00000000 8009d25c                  
[13363.680000] $28   : 872fe000 872ffc58 00000001 873328e0
[13363.680000] Hi    : 00000c27
[13363.680000] Lo    : 79663800
[13363.680000] epc   : 873328e0 0x873328e0
[13363.680000]     Not tainted
[13363.680000] ra    : 873328e0 0x873328e0
[13363.680000] Status: 1000fc03 KERNEL EXL IE 
[13363.680000] Cause : 0080001c
[13363.680000] PrId  : 00019750 (MIPS 74Kc)
[13363.680000] Modules linked in: ath10k_pci(+) ath10k_core...
[13363.680000] Process insmod (pid: 949, threadinfo=872fe000, task=872be5b0, tls=774c0440)
[13363.680000] Stack : 872ffc98 b2080004 1000fc00 ffff00fe 87335538 87159400 872e5ac0 8732d600
[13363.680000]    8785bfc0 8012f4bc 00000000 87821800 10110043 801afbf8 b2000000 b2080004
[13363.680000]    87335a00 87821868 87335a34 87821800 80350000 802e0000 802e0000 873012a8
[13363.680000]    802e0000 80192cdc 802e0000 801b3928 8732db80 8028da14 8732db80 87821868
[13363.680000]    87821868 ffffffed 87335a34 801b3c30 fffffffe 8784ca88 ffffffea 8016ecd8
[13363.680000]    ...
[13363.680000] Call Trace:[<8012f4bc>] 0x8012f4bc
[13363.680000] [<801afbf8>] 0x801afbf8
[13363.680000] [<80192cdc>] 0x80192cdc
[13363.680000] [<801b3928>] 0x801b3928
[13363.680000] [<801b3c30>] 0x801b3c30
[13363.680000] [<8016ecd8>] 0x8016ecd8
[13363.680000] [<801b3dc0>] 0x801b3dc0
[13363.680000] [<801b1ef4>] 0x801b1ef4
[13363.680000] [<801b3d54>] 0x801b3d54
[13363.680000] [<801b2224>] 0x801b2224
[13363.680000] [<8027f3dc>] 0x8027f3dc
[13363.680000] [<801b3238>] 0x801b3238
[13363.680000] [<8008c0f4>] 0x8008c0f4
[13363.680000] [<87337000>] 0x87337000
[13363.680000] [<801b416c>] 0x801b416c
[13363.680000] [<87337000>] 0x87337000
[13363.680000] [<8733702c>] 0x8733702c
[13363.680000] [<800baa70>] 0x800baa70
[13363.680000] [<800d8a84>] 0x800d8a84
[13363.680000] [<87337000>] 0x87337000
[13363.680000] [<80068bd4>] 0x80068bd4
[13363.680000] [<80097e8c>] 0x80097e8c
[13363.680000] [<800abbec>] 0x800abbec
[13363.680000] [<800d794c>] 0x800d794c
[13363.680000] [<800a9190>] 0x800a9190
[13363.680000] [<800d22e0>] 0x800d22e0
[13363.680000] [<800d9058>] 0x800d9058
[13363.680000] [<800abf58>] 0x800abf58
[13363.680000] [<800d5578>] 0x800d5578
[13363.680000] [<80062544>] 0x80062544
[13363.680000] 
[13363.680000] 
[13363.680000] Code: 2410000a  0c061aa0  02e02021 <30420400> 10400006  8fa5003c  24040001  0c020981  2610ffff 
[13364.000000] ---[ end trace 8bd6c1903d19ee30 ]---

(Sorry, no real ksyms... If necessary, I'll provide a better one next weekend)

>>$25; 000000008009d25c <dequeue_task_fair+0/150>

>>RIP; 00000000873328e0 <END_OF_CODE+6fe57b0/????>   <=====

Trace; 000000008012f4bc <sysfs_do_create_link_sd+154/1f4>
Trace; 00000000801afbf8 <get_device+18/28>
Trace; 0000000080192cdc <pci_device_probe+6c/b4>
Trace; 00000000801b3928 <driver_sysfs_add+6c/a0>
Trace; 00000000801b3c30 <driver_probe_device+cc/1f0>
Trace; 000000008016ecd8 <kobject_add_internal+cc/220>
Trace; 00000000801b3dc0 <__driver_attach+6c/a4>
Trace; 00000000801b1ef4 <next_device+10/2c>
Trace; 00000000801b3d54 <__driver_attach+0/a4>
Trace; 00000000801b2224 <bus_for_each_dev+64/a8>
Trace; 000000008027f3dc <klist_add_tail+24/50>
Trace; 00000000801b3238 <bus_add_driver+cc/24c>
Trace; 000000008008c0f4 <queue_work_on+44/68>
Trace; 0000000087337000 <END_OF_CODE+6fe9ed0/????>
Trace; 00000000801b416c <driver_register+c0/188>
Trace; 0000000087337000 <END_OF_CODE+6fe9ed0/????>
Trace; 000000008733702c <END_OF_CODE+6fe9efc/????>
Trace; 00000000800baa70 <free_hot_cold_page+30/130>
Trace; 00000000800d8a84 <remove_vm_area+6c/90>
Trace; 0000000087337000 <END_OF_CODE+6fe9ed0/????>
Trace; 0000000080068bd4 <do_one_initcall+ec/194>
Trace; 0000000080097e8c <blocking_notifier_call_chain+14/20>
Trace; 00000000800abbec <load_module+12a4/1548>
Trace; 00000000800d794c <map_vm_area+38/80>
Trace; 00000000800a9190 <ddebug_dyndbg_module_param_cb+0/3c>
Trace; 00000000800d22e0 <__split_vma.isra.22+128/1a0>
Trace; 00000000800d9058 <__vmalloc_node+30/3c>
Trace; 00000000800abf58 <sys_init_module+c8/d0>
Trace; 00000000800d5578 <sys_mremap+40c/488>
Trace; 0000000080062544 <stack_done+20/40>

Code;  00000000873328d4 <END_OF_CODE+6fe57a4/????>
0000000000000000 <_RIP>:
Code;  00000000873328d4 <END_OF_CODE+6fe57a4/????>
   0:   0a 00                     or     (%rax),%al
Code;  00000000873328d6 <END_OF_CODE+6fe57a6/????>
   2:   10 24 a0                  adc    %ah,(%rax,%riz,4)
Code;  00000000873328d9 <END_OF_CODE+6fe57a9/????>
   5:   1a 06                     sbb    (%rsi),%al
Code;  00000000873328db <END_OF_CODE+6fe57ab/????>
   7:   0c 21                     or     $0x21,%al
Code;  00000000873328dd <END_OF_CODE+6fe57ad/????>
   9:   20 e0                     and    %ah,%al
Code;  00000000873328df <END_OF_CODE+6fe57af/????>   <=====
   b:   02 00                     add    (%rax),%al   <=====
Code;  00000000873328e1 <END_OF_CODE+6fe57b1/????>
   d:   04 42                     add    $0x42,%al
Code;  00000000873328e3 <END_OF_CODE+6fe57b3/????>
   f:   30 06                     xor    %al,(%rsi)

However, I think this will be sorted out in the foreseeable future ;-).

Regards,

Chr

comment:5 Changed 5 years ago by anonymous

Great job!WDR7500 is waiting for your new progress

comment:6 in reply to: ↑ 4 Changed 4 years ago by anonymous

Replying to chunkeey@…:

Replying to nbd:

ath10k does not currently support the card in archer c7 (because it's v1 and not v2).
as for ath10k support in general, please send patches instead of opening up tickets ;)

Well, ath10k is dropping/has already dropped support for v1 cards. But the card in my archer c7 is a v2 :). Too bad it's not possible to load ath10k due to a data bus error (probably related to the MSI problem):

[13363.580000] ath10k_pci 0000:01:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff 64bit]
[13363.590000] ath10k: MSI-X didn't succeed (-1), trying MSI
[13363.600000] ath10k: MSI didn't succeed (-1), trying legacy INTR
[13363.620000] ath10k: legacy interrupt handling
[13363.680000] Data bus error, epc == 873328e0, ra == 873328e0
[13363.680000] Oops[#1]:
[13363.680000] CPU: 0 PID: 949 Comm: insmod Not tainted 3.10.3 #2
[13363.680000] task: 872be5b0 ti: 872fe000 task.ti: 872fe000
[13363.680000] $ 0   : 00000000 80320000 deadc0de 00000000
[13363.680000] $ 4   : b2080000 b2080004 1000fc00 ffff00fe
[13363.680000] $ 8   : 872fffe0 0000fc00 00000000 00000000
[13363.680000] $12   : 00000005 00000000 00000000 00420000
[13363.680000] $16   : 00000009 87159400 87821800 8730c800
[13363.680000] $20   : 00000009 b2080008 87821868 b2080000
[13363.680000] $24   : 00000000 8009d25c                  
[13363.680000] $28   : 872fe000 872ffc58 00000001 873328e0
[13363.680000] Hi    : 00000c27
[13363.680000] Lo    : 79663800
[13363.680000] epc   : 873328e0 0x873328e0
[13363.680000]     Not tainted
[13363.680000] ra    : 873328e0 0x873328e0
[13363.680000] Status: 1000fc03 KERNEL EXL IE 
[13363.680000] Cause : 0080001c
[13363.680000] PrId  : 00019750 (MIPS 74Kc)
[13363.680000] Modules linked in: ath10k_pci(+) ath10k_core...
[13363.680000] Process insmod (pid: 949, threadinfo=872fe000, task=872be5b0, tls=774c0440)
[13363.680000] Stack : 872ffc98 b2080004 1000fc00 ffff00fe 87335538 87159400 872e5ac0 8732d600
[13363.680000]    8785bfc0 8012f4bc 00000000 87821800 10110043 801afbf8 b2000000 b2080004
[13363.680000]    87335a00 87821868 87335a34 87821800 80350000 802e0000 802e0000 873012a8
[13363.680000]    802e0000 80192cdc 802e0000 801b3928 8732db80 8028da14 8732db80 87821868
[13363.680000]    87821868 ffffffed 87335a34 801b3c30 fffffffe 8784ca88 ffffffea 8016ecd8
[13363.680000]    ...
[13363.680000] Call Trace:[<8012f4bc>] 0x8012f4bc
[13363.680000] [<801afbf8>] 0x801afbf8
[13363.680000] [<80192cdc>] 0x80192cdc
[13363.680000] [<801b3928>] 0x801b3928
[13363.680000] [<801b3c30>] 0x801b3c30
[13363.680000] [<8016ecd8>] 0x8016ecd8
[13363.680000] [<801b3dc0>] 0x801b3dc0
[13363.680000] [<801b1ef4>] 0x801b1ef4
[13363.680000] [<801b3d54>] 0x801b3d54
[13363.680000] [<801b2224>] 0x801b2224
[13363.680000] [<8027f3dc>] 0x8027f3dc
[13363.680000] [<801b3238>] 0x801b3238
[13363.680000] [<8008c0f4>] 0x8008c0f4
[13363.680000] [<87337000>] 0x87337000
[13363.680000] [<801b416c>] 0x801b416c
[13363.680000] [<87337000>] 0x87337000
[13363.680000] [<8733702c>] 0x8733702c
[13363.680000] [<800baa70>] 0x800baa70
[13363.680000] [<800d8a84>] 0x800d8a84
[13363.680000] [<87337000>] 0x87337000
[13363.680000] [<80068bd4>] 0x80068bd4
[13363.680000] [<80097e8c>] 0x80097e8c
[13363.680000] [<800abbec>] 0x800abbec
[13363.680000] [<800d794c>] 0x800d794c
[13363.680000] [<800a9190>] 0x800a9190
[13363.680000] [<800d22e0>] 0x800d22e0
[13363.680000] [<800d9058>] 0x800d9058
[13363.680000] [<800abf58>] 0x800abf58
[13363.680000] [<800d5578>] 0x800d5578
[13363.680000] [<80062544>] 0x80062544
[13363.680000] 
[13363.680000] 
[13363.680000] Code: 2410000a  0c061aa0  02e02021 <30420400> 10400006  8fa5003c  24040001  0c020981  2610ffff 
[13364.000000] ---[ end trace 8bd6c1903d19ee30 ]---

(Sorry, no real ksyms... If necessary, I'll provide a better one next weekend)

>>$25; 000000008009d25c <dequeue_task_fair+0/150>

>>RIP; 00000000873328e0 <END_OF_CODE+6fe57b0/????>   <=====

Trace; 000000008012f4bc <sysfs_do_create_link_sd+154/1f4>
Trace; 00000000801afbf8 <get_device+18/28>
Trace; 0000000080192cdc <pci_device_probe+6c/b4>
Trace; 00000000801b3928 <driver_sysfs_add+6c/a0>
Trace; 00000000801b3c30 <driver_probe_device+cc/1f0>
Trace; 000000008016ecd8 <kobject_add_internal+cc/220>
Trace; 00000000801b3dc0 <__driver_attach+6c/a4>
Trace; 00000000801b1ef4 <next_device+10/2c>
Trace; 00000000801b3d54 <__driver_attach+0/a4>
Trace; 00000000801b2224 <bus_for_each_dev+64/a8>
Trace; 000000008027f3dc <klist_add_tail+24/50>
Trace; 00000000801b3238 <bus_add_driver+cc/24c>
Trace; 000000008008c0f4 <queue_work_on+44/68>
Trace; 0000000087337000 <END_OF_CODE+6fe9ed0/????>
Trace; 00000000801b416c <driver_register+c0/188>
Trace; 0000000087337000 <END_OF_CODE+6fe9ed0/????>
Trace; 000000008733702c <END_OF_CODE+6fe9efc/????>
Trace; 00000000800baa70 <free_hot_cold_page+30/130>
Trace; 00000000800d8a84 <remove_vm_area+6c/90>
Trace; 0000000087337000 <END_OF_CODE+6fe9ed0/????>
Trace; 0000000080068bd4 <do_one_initcall+ec/194>
Trace; 0000000080097e8c <blocking_notifier_call_chain+14/20>
Trace; 00000000800abbec <load_module+12a4/1548>
Trace; 00000000800d794c <map_vm_area+38/80>
Trace; 00000000800a9190 <ddebug_dyndbg_module_param_cb+0/3c>
Trace; 00000000800d22e0 <__split_vma.isra.22+128/1a0>
Trace; 00000000800d9058 <__vmalloc_node+30/3c>
Trace; 00000000800abf58 <sys_init_module+c8/d0>
Trace; 00000000800d5578 <sys_mremap+40c/488>
Trace; 0000000080062544 <stack_done+20/40>

Code;  00000000873328d4 <END_OF_CODE+6fe57a4/????>
0000000000000000 <_RIP>:
Code;  00000000873328d4 <END_OF_CODE+6fe57a4/????>
   0:   0a 00                     or     (%rax),%al
Code;  00000000873328d6 <END_OF_CODE+6fe57a6/????>
   2:   10 24 a0                  adc    %ah,(%rax,%riz,4)
Code;  00000000873328d9 <END_OF_CODE+6fe57a9/????>
   5:   1a 06                     sbb    (%rsi),%al
Code;  00000000873328db <END_OF_CODE+6fe57ab/????>
   7:   0c 21                     or     $0x21,%al
Code;  00000000873328dd <END_OF_CODE+6fe57ad/????>
   9:   20 e0                     and    %ah,%al
Code;  00000000873328df <END_OF_CODE+6fe57af/????>   <=====
   b:   02 00                     add    (%rax),%al   <=====
Code;  00000000873328e1 <END_OF_CODE+6fe57b1/????>
   d:   04 42                     add    $0x42,%al
Code;  00000000873328e3 <END_OF_CODE+6fe57b3/????>
   f:   30 06                     xor    %al,(%rsi)

However, I think this will be sorted out in the foreseeable future ;-).

Regards,

Chr

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.