mac80211: add ath10k sdio cards support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
80f796076f
commit
721c3a8db1
@ -32,6 +32,23 @@ define Package/ath10k-firmware-qca9377/install
|
|||||||
endef
|
endef
|
||||||
$(eval $(call BuildPackage,ath10k-firmware-qca9377))
|
$(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)
|
Package/ath10k-board-qca9887 = $(call Package/firmware-default,ath10k qca9887 board firmware)
|
||||||
define Package/ath10k-board-qca9887/install
|
define Package/ath10k-board-qca9887/install
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
|
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
PKG_DRIVERS += \
|
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
|
ath11k ath11k-ahb ath11k-pci carl9170 owl-loader ar5523 wil6210
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS += \
|
PKG_CONFIG_DEPENDS += \
|
||||||
@ -37,7 +37,7 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING
|
|||||||
WIL6210_TRACING
|
WIL6210_TRACING
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config-$(call config_package,ath,regular smallbuffers) += ATH_CARDS ATH_COMMON
|
config-$(call config_package,ath,regular sdio smallbuffers) += ATH_CARDS ATH_COMMON
|
||||||
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_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_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
|
||||||
config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL ATH11K_SPECTRAL
|
config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL ATH11K_SPECTRAL
|
||||||
@ -59,6 +59,7 @@ config-$(CONFIG_ATH11K_THERMAL) += ATH11K_THERMAL
|
|||||||
|
|
||||||
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
||||||
config-$(call config_package,ath10k,regular) += ATH10K ATH10K_PCI
|
config-$(call config_package,ath10k,regular) += ATH10K ATH10K_PCI
|
||||||
|
config-$(call config_package,ath10k-sdio,sdio) += ATH10K ATH10K_SDIO
|
||||||
config-$(call config_package,ath10k-smallbuffers,smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS
|
config-$(call config_package,ath10k-smallbuffers,smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS
|
||||||
config-$(call config_package,ath11k) += ATH11K
|
config-$(call config_package,ath11k) += ATH11K
|
||||||
config-$(call config_package,ath11k-ahb) += ATH11K_AHB
|
config-$(call config_package,ath11k-ahb) += ATH11K_AHB
|
||||||
@ -292,6 +293,24 @@ define KernelPackage/ath10k/config
|
|||||||
|
|
||||||
endef
|
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
|
||||||
|
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
|
define KernelPackage/ath10k-smallbuffers
|
||||||
$(call KernelPackage/ath10k)
|
$(call KernelPackage/ath10k)
|
||||||
TITLE+= (small buffers for low-RAM devices)
|
TITLE+= (small buffers for low-RAM devices)
|
||||||
|
@ -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));
|
@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
@@ -10088,7 +10088,6 @@ int ath10k_mac_register(struct ath10k *a
|
@@ -10089,7 +10089,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||||
+++ b/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 &&
|
} else if (sta->deflink.vht_cap.vht_supported &&
|
||||||
!ath11k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
|
!ath11k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
|
||||||
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
|
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
|
||||||
@ -12,7 +12,7 @@
|
|||||||
} else if (sta->deflink.ht_cap.ht_supported &&
|
} else if (sta->deflink.ht_cap.ht_supported &&
|
||||||
!ath11k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
|
!ath11k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
|
||||||
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
|
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;
|
*ht_cap_info = ht_cap;
|
||||||
band->ht_cap = ath11k_create_ht_cap(ar, ht_cap,
|
band->ht_cap = ath11k_create_ht_cap(ar, ht_cap,
|
||||||
rate_cap_rx_chainmask);
|
rate_cap_rx_chainmask);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/mac80211/vht.c
|
--- a/net/mac80211/vht.c
|
||||||
+++ b/net/mac80211/vht.c
|
+++ b/net/mac80211/vht.c
|
||||||
@@ -135,7 +135,8 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
|
@@ -137,7 +137,8 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
|
||||||
have_80mhz = false;
|
have_80mhz = false;
|
||||||
for (i = 0; i < sband->n_channels; i++) {
|
for (i = 0; i < sband->n_channels; i++) {
|
||||||
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
||||||
@ -24,7 +24,7 @@
|
|||||||
have_80mhz = true;
|
have_80mhz = true;
|
||||||
--- a/net/mac80211/mlme.c
|
--- a/net/mac80211/mlme.c
|
||||||
+++ b/net/mac80211/mlme.c
|
+++ b/net/mac80211/mlme.c
|
||||||
@@ -4969,7 +4969,8 @@ static int ieee80211_prep_channel(struct
|
@@ -4992,7 +4992,8 @@ static int ieee80211_prep_channel(struct
|
||||||
have_80mhz = false;
|
have_80mhz = false;
|
||||||
for (i = 0; i < sband->n_channels; i++) {
|
for (i = 0; i < sband->n_channels; i++) {
|
||||||
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user