mac80211: update backport to r48681

This commit is contained in:
Matthias Schiffer 2016-02-08 22:26:29 +01:00
parent 9a10ad688d
commit a40d3cddba
25 changed files with 8369 additions and 5694 deletions

View File

@ -18,6 +18,5 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT=y
CONFIG_ATH_USER_REGD=y CONFIG_ATH_USER_REGD=y
CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_DEBUG=y
CONFIG_ATH10K_CT_COMMUNITY_FW=y
CONFIG_LUCI_SRCDIET=y CONFIG_LUCI_SRCDIET=y

View File

@ -0,0 +1,59 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 9 Feb 2016 18:22:29 +0100
Subject: ath10k-firmware: add Candela Technologies firmware for QCA988X
diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
index 882294c..c6e6f2d 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -46,6 +46,26 @@ define Download/ath10k-firmware-qca988x
endef
$(eval $(call Download,ath10k-firmware-qca988x))
+
+define Package/ath10k-firmware-qca988x-ct
+$(Package/ath10k-firmware-default)
+ TITLE:=ath10k firmware for QCA988x devices (Candela Technologies version)
+ CONFLICTS:=ath10k-firmware-qca988x
+endef
+
+QCA988X_CT_FIRMWARE_FILE:=firmware-5-ct-full-community.bin
+
+define Download/ath10k-firmware-qca988x-ct
+ # See http://www.candelatech.com/ath10k.php
+ #URL:=http://www.candelatech.com/downloads/ath10k-10-2/
+ # Update to beta version (will switch back to official URL after v2 release)
+ URL:=https://home.universe-factory.net/neoraider/
+ FILE:=$(QCA988X_CT_FIRMWARE_FILE)
+ MD5SUM:=9aa205cfd6b98e695ca8e9ae6d1bcb6b
+endef
+$(eval $(call Download,ath10k-firmware-qca988x-ct))
+
+
define Package/ath10k-firmware-qca99x0
$(Package/ath10k-firmware-default)
TITLE:=ath10k firmware for QCA99x0 devices
@@ -81,6 +101,16 @@ define Package/ath10k-firmware-qca988x/install
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
endef
+define Package/ath10k-firmware-qca988x-ct/install
+ $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
+ $(INSTALL_DATA) \
+ $(PKG_BUILD_DIR)/QCA988X/board.bin \
+ $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
+ $(INSTALL_DATA) \
+ $(DL_DIR)/$(QCA988X_CT_FIRMWARE_FILE) \
+ $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
+endef
+
define Package/ath10k-firmware-qca6174/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k
$(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
@@ -100,5 +130,6 @@ define Package/ath10k-firmware-qca99x0/install
endef
$(eval $(call BuildPackage,ath10k-firmware-qca988x))
+$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca99x0))
$(eval $(call BuildPackage,ath10k-firmware-qca6174))

View File

@ -1,47 +0,0 @@
From: Nils Schneider <nils@nilsschneider.net>
Date: Fri, 24 Jul 2015 21:52:12 +0200
Subject: mac80211: set mcast-rate for mesh point interfaces
In order to set the multicast rate for mesh point interfaces the "mesh join"
was made explicit and moved to mac80211_setup_vif(), similar to how it is
done for IBSS interfaces.
Previously, the mesh join was made implicit in case authentication (i.e.
$key) was not used when creating the interface in mac80211_prepare_vif(),
while using authentication would create the interface first, then join
later in mac80211_setup_vif() by starting authsae.
Signed-off-by: Nils Schneider <nils@nilsschneider.net>
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 2a8d2f9..8d31a80 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -455,12 +455,7 @@ mac80211_prepare_vif() {
}
;;
mesh)
- json_get_vars key mesh_id
- if [ -n "$key" ]; then
- iw phy "$phy" interface add "$ifname" type mp
- else
- iw phy "$phy" interface add "$ifname" type mp mesh_id "$mesh_id"
- fi
+ iw phy "$phy" interface add "$ifname" type mp
;;
monitor)
iw phy "$phy" interface add "$ifname" type monitor
@@ -603,6 +598,13 @@ mac80211_setup_vif() {
wireless_vif_parse_encryption
mac80211_setup_supplicant || failed=1
fi
+ else
+ json_get_vars mesh_id mcast_rate
+
+ mcval=
+ [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
+
+ iw dev "$ifname" mesh join "$mesh_id" ${mcval:+mcast-rate $mcval}
fi
for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do

View File

@ -1,82 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 24 Oct 2015 21:53:10 +0200
Subject: mac80211: fix crash when using mesh (11s) VIF together with another VIF
Using a 802.11s mesh VIF together with a different VIF (e.g. IBSS) led to
a panic.
Steps to reproduce:
rmmod mac80211_hwsim
insmod /lib/modules/3.18.21/mac80211_hwsim.ko channels=2
iw phy phy2 interface add ibss2 type ibss
iw phy phy2 interface add mesh2 type mp
iw phy phy3 interface add ibss3 type ibss
iw phy phy3 interface add mesh3 type mp
ip link set ibss2 up
ip link set mesh2 up
ip link set ibss3 up
ip link set mesh3 up
iw dev ibss2 ibss join foo 2412
iw dev ibss3 ibss join foo 2412
# Ensure that ibss2 and ibss3 are associated, otherwise leave and join
# on ibss3 again
iw dev mesh2 mesh join bar
iw dev mesh3 mesh join bar
The patch has also been submitted upstream.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/kernel/mac80211/patches/339-mac80211-fix-crash-on-mesh-local-link-ID-generation-.patch b/package/kernel/mac80211/patches/339-mac80211-fix-crash-on-mesh-local-link-ID-generation-.patch
new file mode 100644
index 0000000..5784b98
--- /dev/null
+++ b/package/kernel/mac80211/patches/339-mac80211-fix-crash-on-mesh-local-link-ID-generation-.patch
@@ -0,0 +1,46 @@
+From 604f8b1964b8380eddf1f03dbdafa7a1c13d80d6 Mon Sep 17 00:00:00 2001
+Message-Id: <604f8b1964b8380eddf1f03dbdafa7a1c13d80d6.1445716231.git.mschiffer@universe-factory.net>
+From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Sat, 24 Oct 2015 21:25:51 +0200
+Subject: [PATCH] mac80211: fix crash on mesh local link ID generation with
+ VIFs
+
+llid_in_use needs to be limited to stations of the same VIF, otherwise it
+will cause a NULL deref as the sta_info of non-mesh-VIFs don't have
+sta->mesh set.
+
+Steps to reproduce:
+
+ modprobe mac80211_hwsim channels=2
+ iw phy phy0 interface add ibss0 type ibss
+ iw phy phy0 interface add mesh0 type mp
+ iw phy phy1 interface add ibss1 type ibss
+ iw phy phy1 interface add mesh1 type mp
+ ip link set ibss0 up
+ ip link set mesh0 up
+ ip link set ibss1 up
+ ip link set mesh1 up
+ iw dev ibss0 ibss join foo 2412
+ iw dev ibss1 ibss join foo 2412
+ # Ensure that ibss0 and ibss1 are actually associated; I often need to
+ # leave and join the cell on ibss1 a second time.
+ iw dev mesh0 mesh join bar
+ iw dev mesh1 mesh join bar # crash
+
+Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
+---
+ net/mac80211/mesh_plink.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/net/mac80211/mesh_plink.c
++++ b/net/mac80211/mesh_plink.c
+@@ -646,6 +646,9 @@ static bool llid_in_use(struct ieee80211
+
+ rcu_read_lock();
+ list_for_each_entry_rcu(sta, &local->sta_list, list) {
++ if (sdata != sta->sdata)
++ continue;
++
+ if (!memcmp(&sta->mesh->llid, &llid, sizeof(llid))) {
+ in_use = true;
+ break;

View File

@ -1,70 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 10 Mar 2015 13:17:14 +0100
Subject: ath10k: add Candelatech community firmware as an additional choice
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 566e156..1dc1816 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -270,6 +270,29 @@ Atheros IEEE 802.11ac family of chipsets. For now only
PCI is supported.
endef
+define KernelPackage/ath10k/config
+ if PACKAGE_kmod-ath10k
+ choice
+ prompt "ath10k firmware flavour"
+ default ATH10K_AP_FW
+ help
+ This option allows you to choose between different ath10k firmwares.
+
+ config ATH10K_AP_FW
+ bool "Firmware optimized for AP operation"
+ help
+ Use the ath10k firmware optimized for access point operation.
+ Supports only AP mode, will crash in IBSS (ad-hoc) mode.
+
+ config ATH10K_CT_COMMUNITY_FW
+ bool "Firmware by Candela Technologies (community version)"
+ help
+ Supports both AP and IBSS (ad-hoc) mode. Doesn't support
+ encryption when using multiple VIFs.
+ endchoice
+ endif
+ endef
+
PKG_ATH10K_LINUX_FIRMWARE_NAME:=ath10k-firmware
PKG_ATH10K_LINUX_FIRMWARE_VERSION:=b46f3e01a6c1f9150fb4612ef53611d714565842
PKG_ATH10K_LINUX_FIRMWARE_SOURCE:=$(PKG_ATH10K_LINUX_FIRMWARE_NAME)-$(PKG_ATH10K_LINUX_FIRMWARE_VERSION).tar.bz2
@@ -288,6 +311,14 @@ define Download/ath10k-firmware
endef
$(eval $(call Download,ath10k-firmware))
+ATH10K_CT_COMMUNITY_FW:=firmware-2-ct-full-community-14.bin
+define Download/ath10k-firmware-ct-community
+ FILE:=$(ATH10K_CT_COMMUNITY_FW)
+ URL:=http://www.candelatech.com/downloads/
+ MD5SUM:=800799459c20c1683138c74b3ba58f25
+endef
+$(eval $(call Download,ath10k-firmware-ct-community))
+
#Broadcom firmware
ifneq ($(CONFIG_B43_FW_6_30),)
@@ -1854,9 +1885,16 @@ define KernelPackage/ath10k/install
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.0/board.bin \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/
+ifeq ($(CONFIG_ATH10K_AP_FW),y)
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.2.4/untested/firmware-5.bin_10.2.4.70-2 \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
+endif
+ifeq ($(CONFIG_ATH10K_CT_COMMUNITY_FW),y)
+ $(INSTALL_DATA) \
+ $(DL_DIR)/$(ATH10K_CT_COMMUNITY_FW) \
+ $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
+endif
endef
define KernelPackage/b43/install

View File

@ -1,35 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 1 Sep 2015 19:59:16 +0200
Subject: mac80211: ath9k: add correct MAC/BB name for ar9561
diff --git a/package/kernel/mac80211/patches/546-ath9k_add-correct-MAC-BB-name-for-ar9561.patch b/package/kernel/mac80211/patches/546-ath9k_add-correct-MAC-BB-name-for-ar9561.patch
new file mode 100644
index 0000000..a2a2c78
--- /dev/null
+++ b/package/kernel/mac80211/patches/546-ath9k_add-correct-MAC-BB-name-for-ar9561.patch
@@ -0,0 +1,25 @@
+From 1165dd900cc8de3addbc8bef7e6196b07799d25e Mon Sep 17 00:00:00 2001
+From: Miaoqing Pan <miaoqing@qca.qualcomm.com>
+Date: Wed, 12 Aug 2015 14:20:46 +0800
+Subject: ath9k: add correct MAC/BB name for ar9561
+
+MAC/BB name is"????" if the MAC/BB is unknown.
+
+Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+
+diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
+index a31a680..1dd0339 100644
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -3186,6 +3186,7 @@ static struct {
+ { AR_SREV_VERSION_9550, "9550" },
+ { AR_SREV_VERSION_9565, "9565" },
+ { AR_SREV_VERSION_9531, "9531" },
++ { AR_SREV_VERSION_9561, "9561" },
+ };
+
+ /* For devices with external radios */
+--
+cgit v0.10.2
+

View File

@ -1,17 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 28 Nov 2015 22:40:40 +0100
Subject: acx-mac80211: mark as BROKEN to avoid compile failure on mipsel targets
diff --git a/package/kernel/acx-mac80211/Makefile b/package/kernel/acx-mac80211/Makefile
index 1820e7a..fb17a46 100644
--- a/package/kernel/acx-mac80211/Makefile
+++ b/package/kernel/acx-mac80211/Makefile
@@ -30,7 +30,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/acx-mac80211
SUBMENU:=Wireless Drivers
TITLE:=ACX1xx mac80211 driver
- DEPENDS:=@(PCI_SUPPORT||TARGET_ar7) @!TARGET_cobalt @mipsel +kmod-mac80211
+ DEPENDS:=@(PCI_SUPPORT||TARGET_ar7) @!TARGET_cobalt @mipsel +kmod-mac80211 @BROKEN
FILES:=$(PKG_BUILD_DIR)/acx-mac80211.ko
AUTOLOAD:=$(call AutoLoad,50,mac80211 acx-mac80211)
MAINTAINER:=Florian Fainelli <florian@openwrt.org>

View File

@ -142,7 +142,7 @@ $(eval $(call GluonModel,TLWR2543,tl-wr2543-v1,tp-link-tl-wr2543n-nd-v1))
ifeq ($(BROKEN),1) ifeq ($(BROKEN),1)
# Archer C5 v1, C7 v2 # Archer C5 v1, C7 v2
$(eval $(call GluonProfile,ARCHERC7,kmod-ath10k)) $(eval $(call GluonProfile,ARCHERC7,kmod-ath10k ath10k-firmware-qca988x-ct))
$(eval $(call GluonModel,ARCHERC7,archer-c5,tp-link-archer-c5-v1)) # BROKEN: ath10k $(eval $(call GluonModel,ARCHERC7,archer-c5,tp-link-archer-c5-v1)) # BROKEN: ath10k
$(eval $(call GluonModel,ARCHERC7,archer-c7-v2,tp-link-archer-c7-v2)) # BROKEN: ath10k $(eval $(call GluonModel,ARCHERC7,archer-c7-v2,tp-link-archer-c7-v2)) # BROKEN: ath10k
endif endif