-
Notifications
You must be signed in to change notification settings - Fork 2
/
001-nss-qca-ax6-ax3600-ax9000.patch
16783 lines (16747 loc) · 527 KB
/
001-nss-qca-ax6-ax3600-ax9000.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/feeds.conf.default b/feeds.conf.default
index fc67933..e87a46d 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -2,6 +2,7 @@ src-git packages https://git.openwrt.org/feed/packages.git
src-git luci https://git.openwrt.org/project/luci.git
src-git routing https://git.openwrt.org/feed/routing.git
src-git telephony https://git.openwrt.org/feed/telephony.git
+src-git nss_packages https://github.com/1715173329/nss-packages.git;nss-crypto
#src-git video https://github.com/openwrt/video.git
#src-git targets https://github.com/openwrt/targets.git
#src-git oldpackages http://git.openwrt.org/packages.git
diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 8fbf6f2..fb08082 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -179,9 +179,6 @@ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
rsync --version </dev/null))
-$(eval $(call SetupHostCommand,which,Please install 'which', \
- which which | grep which))
-
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
mkdir -p $(dir $@)
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x
new file mode 100644
index 0000000..5611b6f
--- /dev/null
+++ b/package/boot/uboot-envtools/files/ipq807x
@@ -0,0 +1,23 @@
+[ -e /etc/config/ubootenv ] && exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(board_name)
+
+case "$board" in
+redmi,ax6|\
+xiaomi,ax3600|\
+xiaomi,ax9000)
+ idx="$(find_mtd_index 0:appsblenv)"
+ [ -n "$idx" ] && \
+ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0
diff --git a/package/firmware/ath11k-firmware/Makefile b/package/firmware/ath11k-firmware/Makefile
new file mode 100644
index 0000000..a682bb0
--- /dev/null
+++ b/package/firmware/ath11k-firmware/Makefile
@@ -0,0 +1,93 @@
+#
+# Copyright (C) 2021 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ath11k-firmware
+PKG_SOURCE_DATE:=2021-07-20
+PKG_SOURCE_VERSION:=d4003c1921810adcc455d46f17776a3392b29436
+PKG_MIRROR_HASH:=6839081bafbc56d3b8e41d30790b20813c349cbc1732e887347ef5ed3ea717e4
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/kvalo/ath11k-firmware.git
+
+PKG_MAINTAINER:=Robert Marko <[email protected]>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ath11k-firmware-default
+ SECTION:=firmware
+ CATEGORY:=Firmware
+ URL:=$(PKG_SOURCE_URL)
+ DEPENDS:=
+endef
+
+define Package/ath11k-firmware-ipq6018
+$(Package/ath11k-firmware-default)
+ TITLE:=ath11k firmware for IPQ6018 devices
+endef
+
+define Package/ath11k-firmware-ipq8074
+$(Package/ath11k-firmware-default)
+ TITLE:=ath11k firmware for IPQ8074 devices
+endef
+
+define Package/ath11k-firmware-qca6390
+$(Package/ath11k-firmware-default)
+ TITLE:=ath11k firmware for QCA6390 devices
+endef
+
+define Package/ath11k-firmware-qcn9074
+$(Package/ath11k-firmware-default)
+ TITLE:=ath11k firmware for QCN9074 devices
+endef
+
+define Build/Compile
+
+endef
+
+define Package/ath11k-firmware-ipq6018/install
+ $(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0
+ $(INSTALL_DIR) $(1)/lib/firmware/IPQ6018
+ $(INSTALL_DATA) \
+ $(PKG_BUILD_DIR)/IPQ6018/hw1.0/board-2.bin \
+ $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
+ $(INSTALL_DATA) \
+ $(PKG_BUILD_DIR)/IPQ6018/hw1.0/2.5.0.1/WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1/* \
+ $(1)/lib/firmware/IPQ6018/
+endef
+
+define Package/ath11k-firmware-ipq8074/install
+ $(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ8074/hw2.0
+ $(INSTALL_DIR) $(1)/lib/firmware/IPQ8074
+ $(INSTALL_DATA) \
+ $(PKG_BUILD_DIR)/IPQ8074/hw2.0/board-2.bin \
+ $(1)/lib/firmware/ath11k/IPQ8074/hw2.0/
+ $(INSTALL_DATA) \
+ $(PKG_BUILD_DIR)/IPQ8074/hw2.0/2.5.0.1/WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1/* \
+ $(1)/lib/firmware/IPQ8074/
+endef
+
+define Package/ath11k-firmware-qca6390/install
+ $(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCA6390/hw2.0
+ $(INSTALL_DATA) \
+ $(PKG_BUILD_DIR)/QCA6390/hw2.0/1.0.1/WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1/* \
+ $(1)/lib/firmware/ath11k/QCA6390/hw2.0/
+endef
+
+define Package/ath11k-firmware-qcn9074/install
+ $(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0
+ $(INSTALL_DATA) \
+ $(PKG_BUILD_DIR)/QCN9074/hw1.0/2.5.0.1/WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1/* \
+ $(1)/lib/firmware/ath11k/QCN9074/hw1.0/
+endef
+
+$(eval $(call BuildPackage,ath11k-firmware-ipq6018))
+$(eval $(call BuildPackage,ath11k-firmware-ipq8074))
+$(eval $(call BuildPackage,ath11k-firmware-qca6390))
+$(eval $(call BuildPackage,ath11k-firmware-qcn9074))
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index e63e3b3..2ab43fd 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -46,11 +46,15 @@ ALLWIFIBOARDS:= \
mikrotik_hap-ac2 \
mikrotik_sxtsq-5-ac \
mobipromo_cm520-79f \
+ p2w_r619ac \
nec_wg2600hp3 \
netgear_wac510 \
plasmacloud_pa1200 \
plasmacloud_pa2200 \
- qxwlan_e2600ac
+ qxwlan_e2600ac \
+ redmi_ax6 \
+ xiaomi_ax3600 \
+ xiaomi_ax9000
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
@@ -58,7 +62,7 @@ define Package/ipq-wifi-default
SUBMENU:=ath10k Board-Specific Overrides
SECTION:=firmware
CATEGORY:=Firmware
- DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x)
+ DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x||TARGET_ipq807x)
TITLE:=Custom Board
endef
@@ -67,6 +71,11 @@ define ipq-wifi-install-one-to
$(INSTALL_DATA) $(1) $(2)/lib/firmware/ath10k/$(3)/board-2.bin
endef
+define ipq-wifi-install-ath11-one-to
+ $(INSTALL_DIR) $(2)/lib/firmware/ath11k/$(3)/
+ $(INSTALL_DATA) $(1) $(2)/lib/firmware/ath11k/$(3)/board-2.bin
+endef
+
define ipq-wifi-install-one
$(if $(filter $(suffix $(1)),.QCA4019 .qca4019),\
$(call ipq-wifi-install-one-to,$(1),$(2),QCA4019/hw1.0),\
@@ -74,8 +83,12 @@ define ipq-wifi-install-one
$(call ipq-wifi-install-one-to,$(1),$(2),QCA9888/hw2.0),\
$(if $(filter $(suffix $(1)),.QCA9984 .qca9984),\
$(call ipq-wifi-install-one-to,$(1),$(2),QCA9984/hw1.0),\
+ $(if $(filter $(suffix $(1)),.QCA9889 .qca9889),\
+ $(call ipq-wifi-install-one-to,$(1),$(2),QCA9887/hw1.0),\
+ $(if $(filter $(suffix $(1)),.IPQ8074 .ipq8074),\
+ $(call ipq-wifi-install-ath11-one-to,$(1),$(2),IPQ8074/hw2.0),\
$(error Unrecognized board-file suffix '$(suffix $(1))' for '$(1)')\
- )))
+ )))))
endef
# Blank line required at end of above define due to foreach context
@@ -132,10 +145,14 @@ $(eval $(call generate-ipq-wifi-package,luma_wrtq-329acn,Luma WRTQ-329ACN))
$(eval $(call generate-ipq-wifi-package,mikrotik_hap-ac2,Mikrotik hAP ac2))
$(eval $(call generate-ipq-wifi-package,mikrotik_sxtsq-5-ac,MikroTik SXTsq 5 ac))
$(eval $(call generate-ipq-wifi-package,mobipromo_cm520-79f,MobiPromo CM520-79F))
+$(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC))
$(eval $(call generate-ipq-wifi-package,nec_wg2600hp3,NEC Platforms WG2600HP3))
$(eval $(call generate-ipq-wifi-package,netgear_wac510,Netgear WAC510))
$(eval $(call generate-ipq-wifi-package,plasmacloud_pa1200,Plasma Cloud PA1200))
$(eval $(call generate-ipq-wifi-package,plasmacloud_pa2200,Plasma Cloud PA2200))
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
+$(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
+$(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
+$(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
diff --git a/package/firmware/ipq-wifi/board-redmi_ax6.ipq8074 b/package/firmware/ipq-wifi/board-redmi_ax6.ipq8074
new file mode 100644
index 0000000..98ed9c6
Binary files /dev/null and b/package/firmware/ipq-wifi/board-redmi_ax6.ipq8074 differ
diff --git a/package/firmware/ipq-wifi/board-xiaomi_ax3600.ipq8074 b/package/firmware/ipq-wifi/board-xiaomi_ax3600.ipq8074
new file mode 100644
index 0000000..db8ef4c
Binary files /dev/null and b/package/firmware/ipq-wifi/board-xiaomi_ax3600.ipq8074 differ
diff --git a/package/firmware/ipq-wifi/board-xiaomi_ax3600.qca9889 b/package/firmware/ipq-wifi/board-xiaomi_ax3600.qca9889
new file mode 100644
index 0000000..af4405c
Binary files /dev/null and b/package/firmware/ipq-wifi/board-xiaomi_ax3600.qca9889 differ
diff --git a/package/firmware/ipq-wifi/board-xiaomi_ax9000.ipq8074 b/package/firmware/ipq-wifi/board-xiaomi_ax9000.ipq8074
new file mode 100644
index 0000000..babfaa2
Binary files /dev/null and b/package/firmware/ipq-wifi/board-xiaomi_ax9000.ipq8074 differ
diff --git a/package/firmware/ipq-wifi/board-xiaomi_ax9000.qca9889 b/package/firmware/ipq-wifi/board-xiaomi_ax9000.qca9889
new file mode 100644
index 0000000..abccf93
Binary files /dev/null and b/package/firmware/ipq-wifi/board-xiaomi_ax9000.qca9889 differ
diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk
index a39a891..fe82cb0 100644
--- a/package/kernel/linux/modules/hwmon.mk
+++ b/package/kernel/linux/modules/hwmon.mk
@@ -122,6 +122,22 @@ endef
$(eval $(call KernelPackage,hwmon-drivetemp))
+define KernelPackage/hwmon-emc2305
+ TITLE:=SMSC EMC2305 fan support
+ KCONFIG:=CONFIG_SENSORS_EMC2305
+ FILES:= \
+ $(LINUX_DIR)/drivers/hwmon/emc2305.ko
+ AUTOLOAD:=$(call AutoProbe,emc2305)
+ $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c)
+endef
+
+define KernelPackage/hwmon-emc2305/description
+ SMSC SMSC EMC2301/2/3/5 fan controllers support
+endef
+
+$(eval $(call KernelPackage,hwmon-emc2305))
+
+
define KernelPackage/hwmon-gpiofan
TITLE:=Generic GPIO FAN support
KCONFIG:=CONFIG_SENSORS_GPIO_FAN
diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 3249b85..8cbbc63 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -477,7 +477,7 @@ $(eval $(call KernelPackage,usb-dwc3))
define KernelPackage/usb-dwc3-qcom
TITLE:=DWC3 Qualcomm USB driver
- DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3
+ DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x||TARGET_ipq807x) +kmod-usb-dwc3
KCONFIG:= CONFIG_USB_DWC3_QCOM
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko
AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1)
@@ -1123,6 +1123,7 @@ endef
define KernelPackage/usb-net-aqc111
TITLE:=Support for USB-to-Ethernet Aquantia AQtion 5/2.5GbE
+ DEPENDS:=+kmod-libphy
KCONFIG:=CONFIG_USB_NET_AQC111
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/aqc111.ko
AUTOLOAD:=$(call AutoProbe,aqc111)
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index dd39c2d..0391aa2 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -38,6 +38,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_CFG80211_TESTMODE \
CONFIG_PACKAGE_MAC80211_DEBUGFS \
CONFIG_PACKAGE_MAC80211_MESH \
+ CONFIG_PACKAGE_MAC80211_NSS_SUPPORT \
CONFIG_PACKAGE_MAC80211_TRACING \
CONFIG_PACKAGE_IWLWIFI_DEBUG \
CONFIG_PACKAGE_IWLWIFI_DEBUGFS \
@@ -84,6 +85,7 @@ config-$(CONFIG_PACKAGE_CFG80211_TESTMODE) += NL80211_TESTMODE
config-$(call config_package,mac80211) += MAC80211
config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
+config-$(CONFIG_PACKAGE_MAC80211_NSS_SUPPORT) += MAC80211_NSS_SUPPORT
include ath.mk
include broadcom.mk
@@ -127,7 +129,7 @@ define KernelPackage/mac80211
$(call KernelPackage/mac80211/Default)
TITLE:=Linux 802.11 Wireless Networking Stack
# +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c
- DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common
+ DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common +PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
KCONFIG:=\
CONFIG_AVERAGE=y
FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
@@ -159,6 +161,14 @@ define KernelPackage/mac80211/config
bool "Enable 802.11s mesh support"
default y
+ if PACKAGE_kmod-qca-nss-drv
+ config PACKAGE_MAC80211_NSS_SUPPORT
+ bool "Enable NSS support for IPQ platform"
+ default y
+ help
+ This option enables support for NSS in boards.
+ endif
+
endif
endef
@@ -436,7 +446,8 @@ config-$(CONFIG_LEDS_TRIGGERS) += MAC80211_LEDS
MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
$(KERNEL_MAKE_FLAGS) \
- EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS)" \
+ EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) \
+ -I$(STAGING_DIR)/usr/include/qca-nss-drv" \
KLIB_BUILD="$(LINUX_DIR)" \
MODPROBE=true \
KLIB=$(TARGET_MODULES_DIR) \
diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk
index ba03ae1..411cf9c 100644
--- a/package/kernel/mac80211/ath.mk
+++ b/package/kernel/mac80211/ath.mk
@@ -1,6 +1,6 @@
PKG_DRIVERS += \
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \
- carl9170 owl-loader ar5523 wil6210
+ ath11k ath11k-ahb ath11k-pci carl9170 owl-loader ar5523 wil6210
PKG_CONFIG_DEPENDS += \
CONFIG_PACKAGE_ATH_DEBUG \
@@ -12,6 +12,7 @@ PKG_CONFIG_DEPENDS += \
CONFIG_ATH9K_TX99 \
CONFIG_ATH10K_LEDS \
CONFIG_ATH10K_THERMAL \
+ CONFIG_ATH11K_MEM_PROFILE_512M \
CONFIG_ATH_USER_REGD
ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
@@ -19,6 +20,7 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
ATH9K_DEBUGFS \
ATH9K_HTC_DEBUGFS \
ATH10K_DEBUGFS \
+ ATH11K_DEBUGFS \
CARL9170_DEBUGFS \
ATH5K_DEBUG \
ATH6KL_DEBUG \
@@ -28,6 +30,7 @@ endif
ifdef CONFIG_PACKAGE_MAC80211_TRACING
config-y += \
ATH10K_TRACING \
+ ATH11K_TRACING \
ATH6KL_TRACING \
ATH_TRACEPOINTS \
ATH5K_TRACER \
@@ -35,9 +38,9 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING
endif
config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
-config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS
+config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH9K_STATION_STATISTICS
config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
-config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL
+config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL ATH11K_SPECTRAL
config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
config-$(call config_package,ath9k) += ATH9K
config-$(call config_package,ath9k-common) += ATH9K_COMMON
@@ -52,9 +55,13 @@ config-$(CONFIG_ATH9K_TX99) += ATH9K_TX99
config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
config-$(CONFIG_ATH10K_LEDS) += ATH10K_LEDS
config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
+config-$(CONFIG_ATH11K_MEM_PROFILE_512M) += ATH11K_MEM_PROFILE_512M
config-$(call config_package,ath9k-htc) += ATH9K_HTC
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
+config-$(call config_package,ath11k) += ATH11K
+config-$(call config_package,ath11k-ahb) += ATH11K_AHB
+config-$(call config_package,ath11k-pci) += ATH11K_PCI
config-$(call config_package,ath5k) += ATH5K
ifdef CONFIG_TARGET_ath25
@@ -277,10 +284,68 @@ define KernelPackage/ath10k/config
config ATH10K_THERMAL
bool "Enable thermal sensors and throttling support"
+ default y
depends on PACKAGE_kmod-ath10k
endef
+define KernelPackage/ath11k
+ $(call KernelPackage/mac80211/Default)
+ TITLE:=Qualcomm 802.11ax wireless chipset support (common code)
+ URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
+ DEPENDS+= +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT \
+ +kmod-crypto-michael-mic +ATH11K_THERMAL:kmod-hwmon-core +ATH11K_THERMAL:kmod-thermal
+ FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko
+ AUTOLOAD:=$(call AutoProbe,ath11k)
+endef
+
+define KernelPackage/ath11k/description
+This module adds support for Qualcomm Technologies 802.11ax family of
+chipsets.
+endef
+
+define KernelPackage/ath11k/config
+
+ config ATH11K_THERMAL
+ bool "Enable thermal sensors and throttling support"
+ depends on PACKAGE_kmod-ath11k
+ default y if TARGET_ipq807x
+
+ config ATH11K_MEM_PROFILE_512M
+ bool "Enable 512MB profile"
+ depends on PACKAGE_kmod-ath11k
+ default y if TARGET_ipq807x_generic_DEVICE_redmi_ax6 || TARGET_ipq807x_generic_DEVICE_xiaomi_ax3600
+
+endef
+
+define KernelPackage/ath11k-ahb
+ $(call KernelPackage/mac80211/Default)
+ TITLE:=Qualcomm 802.11ax AHB wireless chipset support
+ URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
+ DEPENDS+= @TARGET_ipq807x +kmod-ath11k
+ FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_ahb.ko
+ AUTOLOAD:=$(call AutoProbe,ath11k_ahb)
+endef
+
+define KernelPackage/ath11k-ahb/description
+This module adds support for Qualcomm Technologies 802.11ax family of
+chipsets with AHB bus.
+endef
+
+define KernelPackage/ath11k-pci
+ $(call KernelPackage/mac80211/Default)
+ TITLE:=Qualcomm 802.11ax PCI wireless chipset support
+ URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
+ DEPENDS+= @PCI_SUPPORT @TARGET_ipq807x +kmod-ath11k
+ FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko
+ AUTOLOAD:=$(call AutoProbe,ath11k_pci)
+endef
+
+define KernelPackage/ath11k-pci/description
+This module adds support for Qualcomm Technologies 802.11ax family of
+chipsets with PCI bus.
+endef
+
define KernelPackage/carl9170
$(call KernelPackage/mac80211/Default)
TITLE:=Driver for Atheros AR9170 USB sticks
diff --git a/package/kernel/mac80211/broadcom.mk b/package/kernel/mac80211/broadcom.mk
index 473bbf5..85911b6 100644
--- a/package/kernel/mac80211/broadcom.mk
+++ b/package/kernel/mac80211/broadcom.mk
@@ -450,6 +450,7 @@ define KernelPackage/brcmfmac/config
config BRCMFMAC_SDIO
bool "Enable SDIO bus interface support"
default y if TARGET_bcm27xx
+ default y if TARGET_rockchip
default y if TARGET_sunxi
default n
help
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 0b7a84d..a27b0e1 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -135,7 +135,7 @@ mac80211_hostapd_setup_base() {
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
append base_cfg "acs_exclude_dfs=1" "$N"
- json_get_vars noscan ht_coex
+ json_get_vars noscan ht_coex vendor_vht
json_get_values ht_capab_list ht_capab tx_burst
json_get_values channel_list channels
@@ -280,7 +280,7 @@ mac80211_hostapd_setup_base() {
}
[ "$hwmode" = "a" ] || enable_ac=0
- if [ "$enable_ac" != "0" ]; then
+ if [ "$enable_ac" != "0" -o "$vendor_vht" = "1" ]; then
json_get_vars \
rxldpc:1 \
short_gi_80:1 \
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index 6aa46b0..6f20f74 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -174,7 +174,7 @@ detect_mac80211() {
set wireless.radio${devidx}.channel=${channel}
set wireless.radio${devidx}.band=${mode_band}
set wireless.radio${devidx}.htmode=$htmode
- set wireless.radio${devidx}.disabled=1
+ set wireless.radio${devidx}.disabled=0
set wireless.default_radio${devidx}=wifi-iface
set wireless.default_radio${devidx}.device=radio${devidx}
diff --git a/package/kernel/mac80211/patches/ath10k/983-ath10k-allow-vht-on-2g.patch b/package/kernel/mac80211/patches/ath10k/983-ath10k-allow-vht-on-2g.patch
new file mode 100644
index 0000000..eeca88a
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath10k/983-ath10k-allow-vht-on-2g.patch
@@ -0,0 +1,10 @@
+--- a/drivers/net/wireless/ath/ath10k/mac.c
++++ b/drivers/net/wireless/ath/ath10k/mac.c
+@@ -4718,6 +4718,7 @@ static void ath10k_mac_setup_ht_vht_cap(
+ if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) {
+ band = &ar->mac.sbands[NL80211_BAND_2GHZ];
+ band->ht_cap = ht_cap;
++ band->vht_cap = vht_cap;
+ }
+ if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) {
+ band = &ar->mac.sbands[NL80211_BAND_5GHZ];
diff --git a/package/kernel/mac80211/patches/ath11k/001-v5.11-ath11k-search-DT-for-qcom-ath11k-calibration-variant.patch b/package/kernel/mac80211/patches/ath11k/001-v5.11-ath11k-search-DT-for-qcom-ath11k-calibration-variant.patch
new file mode 100644
index 0000000..d71ba40
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath11k/001-v5.11-ath11k-search-DT-for-qcom-ath11k-calibration-variant.patch
@@ -0,0 +1,144 @@
+From da4ccc477bb46cc518991828ae8ac79e856f92ab Mon Sep 17 00:00:00 2001
+From: Sven Eckelmann <[email protected]>
+Date: Thu, 15 Oct 2020 15:15:01 +0200
+Subject: [PATCH] ath11k: search DT for qcom,ath11k-calibration-variant
+
+Board Data File (BDF) is loaded upon driver boot-up procedure. The right
+board data file is identified on IPQ6018 using bus, qmi-chip-id and
+qmi-board-id.
+
+The problem, however, can occur when the (default) board data file cannot
+fulfill with the vendor requirements and it is necessary to use a different
+board data file.
+
+This problem was already solved on ath10k by adding a ",variant=.*" at the
+end of the board name. The same functionality must also be provided for
+ath11k.
+
+The device tree requires an additional string to define the variant name
+
+ wifi@c000000 {
+ status = "okay";
+ qcom,ath11k-calibration-variant = "Cigtech-WF-188";
+ };
+
+This would create the boarddata identifier for the board-2.bin search
+
+ * bus=ahb,qmi-chip-id=0,qmi-board-id=18,variant=Cigtech-WF-188
+
+Signed-off-by: Sven Eckelmann <[email protected]>
+Signed-off-by: Kalle Valo <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+---
+ drivers/net/wireless/ath/ath11k/core.c | 35 ++++++++++++++++++++++++--
+ drivers/net/wireless/ath/ath11k/core.h | 1 +
+ drivers/net/wireless/ath/ath11k/qmi.c | 5 ++++
+ drivers/net/wireless/ath/ath11k/qmi.h | 2 ++
+ 4 files changed, 41 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath11k/core.c
++++ b/drivers/net/wireless/ath/ath11k/core.c
+@@ -7,6 +7,7 @@
+ #include <linux/slab.h>
+ #include <linux/remoteproc.h>
+ #include <linux/firmware.h>
++#include <linux/of.h>
+ #include "core.h"
+ #include "dp_tx.h"
+ #include "dp_rx.h"
+@@ -141,14 +142,44 @@ static const struct ath11k_hw_params ath
+ },
+ };
+
++int ath11k_core_check_dt(struct ath11k_base *ab)
++{
++ size_t max_len = sizeof(ab->qmi.target.bdf_ext);
++ const char *variant = NULL;
++ struct device_node *node;
++
++ node = ab->dev->of_node;
++ if (!node)
++ return -ENOENT;
++
++ of_property_read_string(node, "qcom,ath11k-calibration-variant",
++ &variant);
++ if (!variant)
++ return -ENODATA;
++
++ if (strscpy(ab->qmi.target.bdf_ext, variant, max_len) < 0)
++ ath11k_dbg(ab, ATH11K_DBG_BOOT,
++ "bdf variant string is longer than the buffer can accommodate (variant: %s)\n",
++ variant);
++
++ return 0;
++}
++
+ static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
+ size_t name_len)
+ {
++ /* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */
++ char variant[9 + ATH11K_QMI_BDF_EXT_STR_LENGTH] = { 0 };
++
++ if (ab->qmi.target.bdf_ext[0] != '\0')
++ scnprintf(variant, sizeof(variant), ",variant=%s",
++ ab->qmi.target.bdf_ext);
++
+ scnprintf(name, name_len,
+- "bus=%s,qmi-chip-id=%d,qmi-board-id=%d",
++ "bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s",
+ ath11k_bus_str(ab->hif.bus),
+ ab->qmi.target.chip_id,
+- ab->qmi.target.board_id);
++ ab->qmi.target.board_id, variant);
+
+ ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot using board name '%s'\n", name);
+
+--- a/drivers/net/wireless/ath/ath11k/core.h
++++ b/drivers/net/wireless/ath/ath11k/core.h
+@@ -886,6 +886,7 @@ void ath11k_core_free(struct ath11k_base
+ int ath11k_core_fetch_bdf(struct ath11k_base *ath11k,
+ struct ath11k_board_data *bd);
+ void ath11k_core_free_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd);
++int ath11k_core_check_dt(struct ath11k_base *ath11k);
+
+ void ath11k_core_halt(struct ath11k *ar);
+
+--- a/drivers/net/wireless/ath/ath11k/qmi.c
++++ b/drivers/net/wireless/ath/ath11k/qmi.c
+@@ -1815,6 +1815,7 @@ static int ath11k_qmi_request_target_cap
+ struct qmi_wlanfw_cap_resp_msg_v01 resp;
+ struct qmi_txn txn = {};
+ int ret = 0;
++ int r;
+
+ memset(&req, 0, sizeof(req));
+ memset(&resp, 0, sizeof(resp));
+@@ -1880,6 +1881,10 @@ static int ath11k_qmi_request_target_cap
+ ab->qmi.target.fw_build_timestamp,
+ ab->qmi.target.fw_build_id);
+
++ r = ath11k_core_check_dt(ab);
++ if (r)
++ ath11k_dbg(ab, ATH11K_DBG_QMI, "DT bdf variant name not set.\n");
++
+ out:
+ return ret;
+ }
+--- a/drivers/net/wireless/ath/ath11k/qmi.h
++++ b/drivers/net/wireless/ath/ath11k/qmi.h
+@@ -24,6 +24,7 @@
+ #define ATH11K_QMI_RESP_LEN_MAX 8192
+ #define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01 32
+ #define ATH11K_QMI_CALDB_SIZE 0x480000
++#define ATH11K_QMI_BDF_EXT_STR_LENGTH 0x20
+
+ #define QMI_WLFW_REQUEST_MEM_IND_V01 0x0035
+ #define QMI_WLFW_FW_MEM_READY_IND_V01 0x0037
+@@ -101,6 +102,7 @@ struct target_info {
+ u32 fw_version;
+ char fw_build_timestamp[ATH11K_QMI_WLANFW_MAX_TIMESTAMP_LEN_V01 + 1];
+ char fw_build_id[ATH11K_QMI_WLANFW_MAX_BUILD_ID_LEN_V01 + 1];
++ char bdf_ext[ATH11K_QMI_BDF_EXT_STR_LENGTH];
+ };
+
+ struct m3_mem_region {
diff --git a/package/kernel/mac80211/patches/ath11k/002-v5.12-ath11k-Update-tx-descriptor-search-index-properly.patch b/package/kernel/mac80211/patches/ath11k/002-v5.12-ath11k-Update-tx-descriptor-search-index-properly.patch
new file mode 100644
index 0000000..a6351e5
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath11k/002-v5.12-ath11k-Update-tx-descriptor-search-index-properly.patch
@@ -0,0 +1,151 @@
+From 4b965be536eefdd16ca0a88120fee23f5b92cd16 Mon Sep 17 00:00:00 2001
+From: Karthikeyan Periyasamy <[email protected]>
+Date: Mon, 8 Feb 2021 13:32:11 +0200
+Subject: ath11k: Update tx descriptor search index properly
+
+Tx descriptor search index field should be updated with hw peer id
+and not by AST Hash as per the HW/FW recommendation. Incorrect search
+index causes throughput degradation in all scenario for all the
+platforms. so updated the search index field with hw peer id, which
+is a common change applicable for all the platforms. Also no need of these
+configuration for non station type. seen 10% throughput increase in WDS
+traffic with this change.
+
+Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1
+
+Signed-off-by: Karthikeyan Periyasamy <[email protected]>
+Signed-off-by: Kalle Valo <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+---
+ drivers/net/wireless/ath/ath11k/core.h | 1 +
+ drivers/net/wireless/ath/ath11k/dp_rx.c | 8 ++++++--
+ drivers/net/wireless/ath/ath11k/dp_tx.c | 1 +
+ drivers/net/wireless/ath/ath11k/hal_tx.c | 2 ++
+ drivers/net/wireless/ath/ath11k/hal_tx.h | 1 +
+ drivers/net/wireless/ath/ath11k/peer.c | 9 +++++++--
+ drivers/net/wireless/ath/ath11k/peer.h | 3 ++-
+ 7 files changed, 20 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath11k/core.h
++++ b/drivers/net/wireless/ath/ath11k/core.h
+@@ -193,6 +193,7 @@ struct ath11k_vif {
+ u32 beacon_interval;
+ u32 dtim_period;
+ u16 ast_hash;
++ u16 ast_idx;
+ u16 tcl_metadata;
+ u8 hal_addr_search_flags;
+ u8 search_type;
+--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
++++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
+@@ -1648,6 +1648,7 @@ void ath11k_dp_htt_htc_t2h_msg_handler(s
+ u8 mac_addr[ETH_ALEN];
+ u16 peer_mac_h16;
+ u16 ast_hash;
++ u16 hw_peer_id;
+
+ ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "dp_htt rx msg type :0x%0x\n", type);
+
+@@ -1668,7 +1669,7 @@ void ath11k_dp_htt_htc_t2h_msg_handler(s
+ resp->peer_map_ev.info1);
+ ath11k_dp_get_mac_addr(resp->peer_map_ev.mac_addr_l32,
+ peer_mac_h16, mac_addr);
+- ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, 0);
++ ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, 0, 0);
+ break;
+ case HTT_T2H_MSG_TYPE_PEER_MAP2:
+ vdev_id = FIELD_GET(HTT_T2H_PEER_MAP_INFO_VDEV_ID,
+@@ -1681,7 +1682,10 @@ void ath11k_dp_htt_htc_t2h_msg_handler(s
+ peer_mac_h16, mac_addr);
+ ast_hash = FIELD_GET(HTT_T2H_PEER_MAP_INFO2_AST_HASH_VAL,
+ resp->peer_map_ev.info2);
+- ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, ast_hash);
++ hw_peer_id = FIELD_GET(HTT_T2H_PEER_MAP_INFO1_HW_PEER_ID,
++ resp->peer_map_ev.info1);
++ ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, ast_hash,
++ hw_peer_id);
+ break;
+ case HTT_T2H_MSG_TYPE_PEER_UNMAP:
+ case HTT_T2H_MSG_TYPE_PEER_UNMAP2:
+--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
++++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
+@@ -165,6 +165,7 @@ tcl_ring_sel:
+ ti.pkt_offset = 0;
+ ti.lmac_id = ar->lmac_id;
+ ti.bss_ast_hash = arvif->ast_hash;
++ ti.bss_ast_idx = arvif->ast_idx;
+ ti.dscp_tid_tbl_idx = 0;
+
+ if (skb->ip_summed == CHECKSUM_PARTIAL &&
+--- a/drivers/net/wireless/ath/ath11k/hal_tx.c
++++ b/drivers/net/wireless/ath/ath11k/hal_tx.c
+@@ -71,6 +71,8 @@ void ath11k_hal_tx_cmd_desc_setup(struct
+ tcl_cmd->info3 = FIELD_PREP(HAL_TCL_DATA_CMD_INFO3_DSCP_TID_TABLE_IDX,
+ ti->dscp_tid_tbl_idx) |
+ FIELD_PREP(HAL_TCL_DATA_CMD_INFO3_SEARCH_INDEX,
++ ti->bss_ast_idx) |
++ FIELD_PREP(HAL_TCL_DATA_CMD_INFO3_CACHE_SET_NUM,
+ ti->bss_ast_hash);
+ tcl_cmd->info4 = 0;
+ }
+--- a/drivers/net/wireless/ath/ath11k/hal_tx.h
++++ b/drivers/net/wireless/ath/ath11k/hal_tx.h
+@@ -29,6 +29,7 @@ struct hal_tx_info {
+ u32 flags1; /* %HAL_TCL_DATA_CMD_INFO2_ */
+ u16 addr_search_flags; /* %HAL_TCL_DATA_CMD_INFO0_ADDR(X/Y)_ */
+ u16 bss_ast_hash;
++ u16 bss_ast_idx;
+ u8 tid;
+ u8 search_type; /* %HAL_TX_ADDR_SEARCH_ */
+ u8 lmac_id;
+--- a/drivers/net/wireless/ath/ath11k/peer.c
++++ b/drivers/net/wireless/ath/ath11k/peer.c
+@@ -118,7 +118,7 @@ exit:
+ }
+
+ void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,
+- u8 *mac_addr, u16 ast_hash)
++ u8 *mac_addr, u16 ast_hash, u16 hw_peer_id)
+ {
+ struct ath11k_peer *peer;
+
+@@ -132,6 +132,7 @@ void ath11k_peer_map_event(struct ath11k
+ peer->vdev_id = vdev_id;
+ peer->peer_id = peer_id;
+ peer->ast_hash = ast_hash;
++ peer->hw_peer_id = hw_peer_id;
+ ether_addr_copy(peer->addr, mac_addr);
+ list_add(&peer->list, &ab->peers);
+ wake_up(&ab->peer_mapping_wq);
+@@ -309,7 +310,11 @@ int ath11k_peer_create(struct ath11k *ar
+
+ peer->pdev_idx = ar->pdev_idx;
+ peer->sta = sta;
+- arvif->ast_hash = peer->ast_hash;
++
++ if (arvif->vif->type == NL80211_IFTYPE_STATION) {
++ arvif->ast_hash = peer->ast_hash;
++ arvif->ast_idx = peer->hw_peer_id;
++ }
+
+ peer->sec_type = HAL_ENCRYPT_TYPE_OPEN;
+ peer->sec_type_grp = HAL_ENCRYPT_TYPE_OPEN;
+--- a/drivers/net/wireless/ath/ath11k/peer.h
++++ b/drivers/net/wireless/ath/ath11k/peer.h
+@@ -14,6 +14,7 @@ struct ath11k_peer {
+ int peer_id;
+ u16 ast_hash;
+ u8 pdev_idx;
++ u16 hw_peer_id;
+
+ /* protected by ab->data_lock */
+ struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];
+@@ -31,7 +32,7 @@ struct ath11k_peer {
+
+ void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id);
+ void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,
+- u8 *mac_addr, u16 ast_hash);
++ u8 *mac_addr, u16 ast_hash, u16 hw_peer_id);
+ struct ath11k_peer *ath11k_peer_find(struct ath11k_base *ab, int vdev_id,
+ const u8 *addr);
+ struct ath11k_peer *ath11k_peer_find_by_addr(struct ath11k_base *ab,
diff --git a/package/kernel/mac80211/patches/ath11k/003-v5.12-ath11k-remove-duplicate-function-declaration.patch b/package/kernel/mac80211/patches/ath11k/003-v5.12-ath11k-remove-duplicate-function-declaration.patch
new file mode 100644
index 0000000..1522273
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath11k/003-v5.12-ath11k-remove-duplicate-function-declaration.patch
@@ -0,0 +1,36 @@
+From cf8480d338a1b9156121e5e035e6b9721db4332a Mon Sep 17 00:00:00 2001
+From: Karthikeyan Periyasamy <[email protected]>
+Date: Mon, 11 Jan 2021 19:49:30 +0200
+Subject: ath11k: remove duplicate function declaration
+
+Removed the duplicated peer related function declaration
+from core.h since those functions are already declared in peer.h
+
+Founded in code review.
+
+Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1
+
+Signed-off-by: Karthikeyan Periyasamy <[email protected]>
+Signed-off-by: Kalle Valo <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+---
+ drivers/net/wireless/ath/ath11k/core.h | 8 --------
+ 1 file changed, 8 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath11k/core.h
++++ b/drivers/net/wireless/ath/ath11k/core.h
+@@ -868,14 +868,6 @@ extern const struct service_to_pipe ath1
+ extern const struct ce_pipe_config ath11k_target_ce_config_wlan_qca6390[];
+ extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qca6390[];
+
+-void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id);
+-void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,
+- u8 *mac_addr, u16 ast_hash);
+-struct ath11k_peer *ath11k_peer_find(struct ath11k_base *ab, int vdev_id,
+- const u8 *addr);
+-struct ath11k_peer *ath11k_peer_find_by_addr(struct ath11k_base *ab,
+- const u8 *addr);
+-struct ath11k_peer *ath11k_peer_find_by_id(struct ath11k_base *ab, int peer_id);
+ int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab);
+ int ath11k_core_pre_init(struct ath11k_base *ab);
+ int ath11k_core_init(struct ath11k_base *ath11k);
diff --git a/package/kernel/mac80211/patches/ath11k/004-v5.13-ath11k-Update-signal-filled-flag-during-sta_statisti.patch b/package/kernel/mac80211/patches/ath11k/004-v5.13-ath11k-Update-signal-filled-flag-during-sta_statisti.patch
new file mode 100644
index 0000000..6cfa1d3
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath11k/004-v5.13-ath11k-Update-signal-filled-flag-during-sta_statisti.patch
@@ -0,0 +1,35 @@
+From f277eb0500b4ee1cbe9db8615761f19b5a5520c9 Mon Sep 17 00:00:00 2001
+From: Sriram R <[email protected]>
+Date: Wed, 24 Feb 2021 14:32:41 +0530
+Subject: [PATCH] ath11k: Update signal filled flag during sta_statistics drv
+ op
+
+Currently, though the peer rssi information is updated to station dump
+from driver sta_statistics mac op, the info doesn't get updated
+since the NL80211_STA_INFO_SIGNAL filled flag is not set in station
+info. Hence update this flag while filling the rssi info.
+
+Tested on: IPQ8074 WLAN.HK.2.1.0.1-01213-QCAHKSWPL_SILICONZ-1
+
+Signed-off-by: Sriram R <[email protected]>
+Signed-off-by: Kalle Valo <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+---
+ drivers/net/wireless/ath/ath11k/mac.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
+index 3c1f35a204ba..32c7687d9ac2 100644
+--- a/drivers/net/wireless/ath/ath11k/mac.c
++++ b/drivers/net/wireless/ath/ath11k/mac.c
+@@ -6082,6 +6082,7 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
+
+ /* TODO: Use real NF instead of default one. */
+ sinfo->signal = arsta->rssi_comb + ATH11K_DEFAULT_NOISE_FLOOR;
++ sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
+ }
+
+ static const struct ieee80211_ops ath11k_ops = {
+--
+2.25.1
+
diff --git a/package/kernel/mac80211/patches/ath11k/005-v5.11-ath11k-fix-ZERO-address-in-probe-request.patch b/package/kernel/mac80211/patches/ath11k/005-v5.11-ath11k-fix-ZERO-address-in-probe-request.patch
new file mode 100644
index 0000000..729aaca
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath11k/005-v5.11-ath11k-fix-ZERO-address-in-probe-request.patch
@@ -0,0 +1,38 @@
+From fa7572c2cfe081dff82f884fa05f1b067d4beaaa Mon Sep 17 00:00:00 2001
+From: Carl Huang <[email protected]>
+Date: Fri, 6 Nov 2020 08:55:48 +0200
+Subject: [PATCH] ath11k: fix ZERO address in probe request
+
+Host needs to pass at least on bssid with all 0xff to firmware in
+WMI_START_SCAN_CMDID, otherwise the bssid and receiver address
+in probe requeste are all ZEROs.
+
+This also fixed some hidden AP connection issue because some AP
+doesn't respond to probe request which receiver address are all
+ZEROs.
+
+Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
+
+Signed-off-by: Carl Huang <[email protected]>
+Signed-off-by: Kalle Valo <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+---
+ drivers/net/wireless/ath/ath11k/wmi.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
+index 40032c2b497551..bca66c1d47ad57 100644
+--- a/drivers/net/wireless/ath/ath11k/wmi.c
++++ b/drivers/net/wireless/ath/ath11k/wmi.c
+@@ -1950,6 +1950,11 @@ void ath11k_wmi_start_scan_init(struct ath11k *ar,
+ WMI_SCAN_EVENT_DEQUEUED;
+ arg->scan_flags |= WMI_SCAN_CHAN_STAT_EVENT;
+ arg->num_bssid = 1;
++
++ /* fill bssid_list[0] with 0xff, otherwise bssid and RA will be
++ * ZEROs in probe request
++ */
++ eth_broadcast_addr(arg->bssid_list[0].addr);
+ }
+
+ static inline void
diff --git a/package/kernel/mac80211/patches/ath11k/006-v5.11-ath11k-use-MHI-provided-APIs-to-allocate-and-free-MHI-con.patch b/package/kernel/mac80211/patches/ath11k/006-v5.11-ath11k-use-MHI-provided-APIs-to-allocate-and-free-MHI-con.patch
new file mode 100644
index 0000000..c82e7cc
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath11k/006-v5.11-ath11k-use-MHI-provided-APIs-to-allocate-and-free-MHI-con.patch
@@ -0,0 +1,57 @@
+From 57449b07eafcc831343013b87b57e928c50d16b4 Mon Sep 17 00:00:00 2001
+From: Bhaumik Bhatt <[email protected]>
+Date: Tue, 17 Nov 2020 09:33:56 -0800
+Subject: [PATCH] ath11k: use MHI provided APIs to allocate and free MHI
+ controller
+
+Use MHI provided APIs to allocate and free MHI controller to
+improve MHI host driver handling. This also fixes a memory leak
+as the MHI controller was allocated but never freed.
+
+Signed-off-by: Bhaumik Bhatt <[email protected]>
+Reviewed-by: Manivannan Sadhasivam <[email protected]>
+Signed-off-by: Kalle Valo <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+---
+ drivers/net/wireless/ath/ath11k/mhi.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c