diff --git a/package/firmware/linux-firmware/qca_ath10k.mk b/package/firmware/linux-firmware/qca_ath10k.mk index 25a1571ad6..1bcbbf1af3 100644 --- a/package/firmware/linux-firmware/qca_ath10k.mk +++ b/package/firmware/linux-firmware/qca_ath10k.mk @@ -32,6 +32,23 @@ define Package/ath10k-firmware-qca9377/install endef $(eval $(call BuildPackage,ath10k-firmware-qca9377)) +Package/ath10k-board-qca9377-sdio = $(call Package/firmware-default,ath10k qca9377 board sdio firmware) +define Package/ath10k-board-qca9377-sdio/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9377/hw1.0 + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/ath10k/QCA9377/hw1.0/board.bin \ + $(1)/lib/firmware/ath10k/QCA9377/hw1.0/board.bin +endef +$(eval $(call BuildPackage,ath10k-board-qca9377-sdio)) +Package/ath10k-firmware-qca9377-sdio = $(call Package/firmware-default,ath10k qca9377 sdio firmware,+ath10k-board-qca9377-sdio) +define Package/ath10k-firmware-qca9377-sdio/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9377/hw1.0 + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/ath10k/QCA9377/hw1.0/firmware-sdio-5.bin \ + $(1)/lib/firmware/ath10k/QCA9377/hw1.0/firmware-sdio-5.bin +endef +$(eval $(call BuildPackage,ath10k-firmware-qca9377-sdio)) + Package/ath10k-board-qca9887 = $(call Package/firmware-default,ath10k qca9887 board firmware) define Package/ath10k-board-qca9887/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0 diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk index a422555442..8785369f17 100644 --- a/package/kernel/mac80211/ath.mk +++ b/package/kernel/mac80211/ath.mk @@ -1,5 +1,5 @@ PKG_DRIVERS += \ - ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \ + ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-sdio ath10k-smallbuffers \ ath11k ath11k-ahb ath11k-pci carl9170 owl-loader ar5523 wil6210 PKG_CONFIG_DEPENDS += \ @@ -59,6 +59,7 @@ config-$(CONFIG_ATH11K_THERMAL) += ATH11K_THERMAL config-$(call config_package,ath9k-htc) += ATH9K_HTC config-$(call config_package,ath10k) += ATH10K ATH10K_PCI +config-$(call config_package,ath10k-sdio) += ATH10K ATH10K_SDIO config-$(call config_package,ath10k-smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS config-$(call config_package,ath11k) += ATH11K config-$(call config_package,ath11k-ahb) += ATH11K_AHB @@ -288,10 +289,29 @@ define KernelPackage/ath10k/config config ATH10K_THERMAL bool "Enable thermal sensors and throttling support" default y - depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-smallbuffers + depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-sdio || PACKAGE_kmod-ath10k-smallbuffers endef +define KernelPackage/ath10k-sdio + $(call KernelPackage/mac80211/Default) + TITLE:=Atheros 802.11ac SDIO wireless cards support + URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath10k + DEPENDS+= +kmod-ath +kmod-mmc +@DRIVER_11AC_SUPPORT \ + +ATH10K_THERMAL:kmod-hwmon-core +ATH10K_THERMAL:kmod-thermal + FILES:= \ + $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \ + $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_sdio.ko + AUTOLOAD:=$(call AutoProbe,ath10k_core ath10k_sdio) + MODPARAMS.ath10k_core:=frame_mode=2 + VARIANT:=sdio +endef + +define KernelPackage/ath10k-sdio/description +This module adds support for wireless adapters based on +Atheros IEEE 802.11ac family of chipsets with SDIO bus. +endef + define KernelPackage/ath10k-smallbuffers $(call KernelPackage/ath10k) TITLE+= (small buffers for low-RAM devices) diff --git a/package/kernel/mac80211/patches/ath10k/982-ath10k-disable-caldata-prefetch-for-sdio-bus.patch b/package/kernel/mac80211/patches/ath10k/982-ath10k-disable-caldata-prefetch-for-sdio-bus.patch new file mode 100644 index 0000000000..f9d28a2245 --- /dev/null +++ b/package/kernel/mac80211/patches/ath10k/982-ath10k-disable-caldata-prefetch-for-sdio-bus.patch @@ -0,0 +1,24 @@ +--- a/drivers/net/wireless/ath/ath10k/core.c ++++ b/drivers/net/wireless/ath/ath10k/core.c +@@ -3534,7 +3534,8 @@ int ath10k_core_register(struct ath10k * + * Forcing the work to be done immediately works around this problem + * but may also delay the boot when firmware images cannot be found. + */ +- flush_workqueue(ar->workqueue); ++ if (ar->hif.bus != ATH10K_BUS_SDIO) ++ flush_workqueue(ar->workqueue); + + return 0; + } +--- a/drivers/net/wireless/ath/ath10k/debug.c ++++ b/drivers/net/wireless/ath/ath10k/debug.c +@@ -1261,6 +1261,9 @@ static int ath10k_debug_cal_data_fetch(s + if (ar->hw_params.cal_data_len == 0) + return -EOPNOTSUPP; + ++ if (ar->hif.bus == ATH10K_BUS_SDIO) ++ return -EINVAL; ++ + hi_addr = host_interest_item_address(HI_ITEM(hi_board_data)); + + ret = ath10k_hif_diag_read(ar, hi_addr, &addr, sizeof(addr)); diff --git a/package/kernel/mac80211/patches/ath11k/983-ath11k-Enable-VHT-for-2G.patch b/package/kernel/mac80211/patches/ath11k/983-ath11k-Enable-VHT-for-2G.patch index 316396fdc8..b2c21617a2 100644 --- a/package/kernel/mac80211/patches/ath11k/983-ath11k-Enable-VHT-for-2G.patch +++ b/package/kernel/mac80211/patches/ath11k/983-ath11k-Enable-VHT-for-2G.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -2776,9 +2776,9 @@ static void ath11k_peer_assoc_h_phymode( +@@ -2777,9 +2777,9 @@ static void ath11k_peer_assoc_h_phymode( } else if (sta->deflink.vht_cap.vht_supported && !ath11k_peer_assoc_h_vht_masked(vht_mcs_mask)) { if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40) @@ -12,7 +12,7 @@ } else if (sta->deflink.ht_cap.ht_supported && !ath11k_peer_assoc_h_ht_masked(ht_mcs_mask)) { if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40) -@@ -5616,6 +5616,9 @@ static void ath11k_mac_setup_ht_vht_cap( +@@ -5615,6 +5615,9 @@ static void ath11k_mac_setup_ht_vht_cap( *ht_cap_info = ht_cap; band->ht_cap = ath11k_create_ht_cap(ar, ht_cap, rate_cap_rx_chainmask);