From 43ceba8cb99dff243e21fb23ae2cda8e7e163956 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 8 Feb 2016 18:38:36 +0100 Subject: [PATCH] Update OpenWrt base --- modules | 2 +- ...-mac80211-backport-from-trunk-r47249.patch | 7265 +++++++++++++++-- ...d-support-for-tp-link-wr740n-v5.0-EU.patch | 2 +- ...ar71xx-add-support-for-TL-WR741ND-v5.patch | 2 +- .../0011-brcm2708-Implement-sysupgrade.patch | 87 - ...11-sunxi-fix-uboot-install-location.patch} | 0 ...i-respect-CONFIG_TARGET_IMAGES_GZIP.patch} | 0 ...urcefilter-to-disable-source-filter.patch} | 0 ...cast-rate-for-mesh-point-interfaces.patch} | 0 ...d_detect-for-some-NETGEAR-WNDR3700v2.patch | 26 - ...apd-prevent-channel-switch-for-5GHz.patch} | 0 ...-Link-TL-WR841N-ND-v9-Compex-WPJ531.patch} | 0 ...r71xx-rework-patch-for-qca953x-956x.patch} | 148 +- ...agate-the-real-postinst-return-code.patch} | 0 ...itional-libopenssl-build-dependency.patch} | 0 ...itional-libopenssl-build-dependency.patch} | 0 ...s.patch => 0021-odhcp6c-minor-fixes.patch} | 0 ...uner-support-for-UniFi-Outdoor-Plus.patch} | 0 ...ase-files-add-etc-profile.d-support.patch} | 2 +- ...52-based-USB-to-Ethernet-converters.patch} | 0 ...support-for-TP-LINK-TL-WR841N-ND-v10.patch | 31 - ...ils-tplink-safeloader-clean-up-code.patch} | 0 ...-format-clean-up-vendor-information.patch} | 0 ...n-1.1-support-to-CPE210-220-510-520.patch} | 0 ...s-with-prohibited-blackholed-source.patch} | 0 ...h-11s-VIF-together-with-another-VIF.patch} | 0 ...ty-firmware-as-an-additional-choice.patch} | 0 ...h79_soc_rev-value-for-QCA9531-ver.-2.patch | 181 - ...-add-correct-MAC-BB-name-for-ar9561.patch} | 0 ...TL-WR941ND-v6-international-version.patch} | 10 +- ...-support-for-TP-Link-TL-WR1043ND-v3.patch} | 2 +- ...th10k-calibration-data-load-changes.patch} | 0 ...x-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch} | 4 +- ...d-compile-failure-on-mipsel-targets.patch} | 0 ...-Added-source-old-to-PKG_SOURCE_URL.patch} | 4 +- ...tallation-of-headers-for-host-build.patch} | 0 ...alloc-instead-of-oom-kill-processes.patch} | 0 ...ct-for-some-NETGEAR-WNDR3700v2-again.patch | 46 - ...0-x86-generic-refresh-kernel-config.patch} | 0 ...CC-base-files-add-missing-public-key.patch | 17 - ...6-generic-enable-pata_atiixp-driver.patch} | 0 ...tall-rule-to-install-libbz2.so-files.patch | 23 - ...another-fix-to-wndr3700_board_detect.patch | 29 - ...keyring-reference-leak-CVE-2016-0728.patch | 87 - 44 files changed, 6704 insertions(+), 1264 deletions(-) delete mode 100644 patches/openwrt/0011-brcm2708-Implement-sysupgrade.patch rename patches/openwrt/{0012-sunxi-fix-uboot-install-location.patch => 0011-sunxi-fix-uboot-install-location.patch} (100%) rename patches/openwrt/{0013-sunxi-respect-CONFIG_TARGET_IMAGES_GZIP.patch => 0012-sunxi-respect-CONFIG_TARGET_IMAGES_GZIP.patch} (100%) rename patches/openwrt/{0014-odhcp6c-add-option-sourcefilter-to-disable-source-filter.patch => 0013-odhcp6c-add-option-sourcefilter-to-disable-source-filter.patch} (100%) rename patches/openwrt/{0016-mac80211-set-mcast-rate-for-mesh-point-interfaces.patch => 0014-mac80211-set-mcast-rate-for-mesh-point-interfaces.patch} (100%) delete mode 100644 patches/openwrt/0015-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2.patch rename patches/openwrt/{0017-hostapd-prevent-channel-switch-for-5GHz.patch => 0015-hostapd-prevent-channel-switch-for-5GHz.patch} (100%) rename patches/openwrt/{0018-ar71xx-fix-ethernet-initialization-on-QCA953x-based-boards-TP-Link-TL-WR841N-ND-v9-Compex-WPJ531.patch => 0016-ar71xx-fix-ethernet-initialization-on-QCA953x-based-boards-TP-Link-TL-WR841N-ND-v9-Compex-WPJ531.patch} (100%) rename patches/openwrt/{0019-ar71xx-rework-patch-for-qca953x-956x.patch => 0017-ar71xx-rework-patch-for-qca953x-956x.patch} (84%) rename patches/openwrt/{0020-base-files-default_postinst-propagate-the-real-postinst-return-code.patch => 0018-base-files-default_postinst-propagate-the-real-postinst-return-code.patch} (100%) rename patches/openwrt/{0021-opkg-work-around-unconditional-libopenssl-build-dependency.patch => 0019-opkg-work-around-unconditional-libopenssl-build-dependency.patch} (100%) rename patches/openwrt/{0022-hostapd-work-around-unconditional-libopenssl-build-dependency.patch => 0020-hostapd-work-around-unconditional-libopenssl-build-dependency.patch} (100%) rename patches/openwrt/{0023-odhcp6c-minor-fixes.patch => 0021-odhcp6c-minor-fixes.patch} (100%) rename patches/openwrt/{0024-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch => 0022-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch} (100%) rename patches/openwrt/{0026-base-files-add-etc-profile.d-support.patch => 0023-base-files-add-etc-profile.d-support.patch} (98%) rename patches/openwrt/{0027-Kernel-Realtek-8150-and-Realtek-8152-based-USB-to-Ethernet-converters.patch => 0024-Kernel-Realtek-8150-and-Realtek-8152-based-USB-to-Ethernet-converters.patch} (100%) delete mode 100644 patches/openwrt/0025-ar71xx-add-support-for-TP-LINK-TL-WR841N-ND-v10.patch rename patches/openwrt/{0028-tools-firmware-utils-tplink-safeloader-clean-up-code.patch => 0025-tools-firmware-utils-tplink-safeloader-clean-up-code.patch} (100%) rename patches/openwrt/{0029-tools-firmware-utils-tplink-safeloader-fix-support-list-format-clean-up-vendor-information.patch => 0026-tools-firmware-utils-tplink-safeloader-fix-support-list-format-clean-up-vendor-information.patch} (100%) rename patches/openwrt/{0030-tools-firmware-utils-tplink-safeloader-add-version-1.1-support-to-CPE210-220-510-520.patch => 0027-tools-firmware-utils-tplink-safeloader-add-version-1.1-support-to-CPE210-220-510-520.patch} (100%) rename patches/openwrt/{0032-ipv6-fix-crash-on-ICMPv6-redirects-with-prohibited-blackholed-source.patch => 0028-ipv6-fix-crash-on-ICMPv6-redirects-with-prohibited-blackholed-source.patch} (100%) rename patches/openwrt/{0033-mac80211-fix-crash-when-using-mesh-11s-VIF-together-with-another-VIF.patch => 0029-mac80211-fix-crash-when-using-mesh-11s-VIF-together-with-another-VIF.patch} (100%) rename patches/openwrt/{0034-ath10k-add-Candelatech-community-firmware-as-an-additional-choice.patch => 0030-ath10k-add-Candelatech-community-firmware-as-an-additional-choice.patch} (100%) delete mode 100644 patches/openwrt/0031-ar71xx-fix-ath79_soc_rev-value-for-QCA9531-ver.-2.patch rename patches/openwrt/{0035-mac80211-ath9k-add-correct-MAC-BB-name-for-ar9561.patch => 0031-mac80211-ath9k-add-correct-MAC-BB-name-for-ar9561.patch} (100%) rename patches/openwrt/{0036-ar71xx-add-support-for-TP-LINK-TL-WR941ND-v6-international-version.patch => 0032-ar71xx-add-support-for-TP-LINK-TL-WR941ND-v6-international-version.patch} (98%) rename patches/openwrt/{0037-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch => 0033-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch} (98%) rename patches/openwrt/{0038-ar71xx-backport-ath10k-calibration-data-load-changes.patch => 0034-ar71xx-backport-ath10k-calibration-data-load-changes.patch} (100%) rename patches/openwrt/{0039-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch => 0035-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch} (88%) rename patches/openwrt/{0042-acx-mac80211-mark-as-BROKEN-to-avoid-compile-failure-on-mipsel-targets.patch => 0036-acx-mac80211-mark-as-BROKEN-to-avoid-compile-failure-on-mipsel-targets.patch} (100%) rename patches/openwrt/{0043-OpenSSL-Added-source-old-to-PKG_SOURCE_URL.patch => 0037-OpenSSL-Added-source-old-to-PKG_SOURCE_URL.patch} (92%) rename patches/openwrt/{0046-lua-fix-installation-of-headers-for-host-build.patch => 0038-lua-fix-installation-of-headers-for-host-build.patch} (100%) rename patches/openwrt/{0047-kernel-fs-seq_file-fallback-to-vmalloc-instead-of-oom-kill-processes.patch => 0039-kernel-fs-seq_file-fallback-to-vmalloc-instead-of-oom-kill-processes.patch} (100%) delete mode 100644 patches/openwrt/0040-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2-again.patch rename patches/openwrt/{0049-x86-generic-refresh-kernel-config.patch => 0040-x86-generic-refresh-kernel-config.patch} (100%) delete mode 100644 patches/openwrt/0041-CC-base-files-add-missing-public-key.patch rename patches/openwrt/{0050-x86-generic-enable-pata_atiixp-driver.patch => 0041-x86-generic-enable-pata_atiixp-driver.patch} (100%) delete mode 100644 patches/openwrt/0044-Revert-bzip2-extend-fix-the-Host-Install-rule-to-install-libbz2.so-files.patch delete mode 100644 patches/openwrt/0045-ar71xx-another-fix-to-wndr3700_board_detect.patch delete mode 100644 patches/openwrt/0048-kernel-fix-keyring-reference-leak-CVE-2016-0728.patch diff --git a/modules b/modules index ad6d44b5..f7b1af47 100644 --- a/modules +++ b/modules @@ -1,7 +1,7 @@ GLUON_FEEDS='openwrt gluon routing luci' OPENWRT_REPO=git://git.openwrt.org/15.05/openwrt.git -OPENWRT_COMMIT=363508bcabd8e9205f5fffc8ff282439e61d618f +OPENWRT_COMMIT=c698aa66043a151ac76d19849be9ee24dfd78b72 PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git PACKAGES_OPENWRT_COMMIT=f8a70fc188673d0ae8739b0a3095f7f61335fc10 diff --git a/patches/openwrt/0006-mac80211-backport-from-trunk-r47249.patch b/patches/openwrt/0006-mac80211-backport-from-trunk-r47249.patch index 2f8fb79b..5f6e2ad0 100644 --- a/patches/openwrt/0006-mac80211-backport-from-trunk-r47249.patch +++ b/patches/openwrt/0006-mac80211-backport-from-trunk-r47249.patch @@ -3174,7 +3174,7 @@ index a1eedce..566e156 100644 $(eval $(call KernelPackage,wl18xx)) +$(eval $(call KernelPackage,zd1211rw)) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh -index c9bc3d6..2a8d2f9 100644 +index 2852f3e..2a8d2f9 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -486,7 +486,7 @@ mac80211_prepare_vif() { @@ -3186,7 +3186,17 @@ index c9bc3d6..2a8d2f9 100644 fi json_select .. -@@ -582,7 +582,7 @@ mac80211_setup_vif() { +@@ -525,9 +525,6 @@ mac80211_setup_adhoc_htmode() { + esac + [ "$auto_channel" -gt 0 ] && ibss_htmode="HT40+" + ;; +- NONE|NOHT) +- ibss_htmode="NOHT" +- ;; + *) ibss_htmode="" ;; + esac + +@@ -585,7 +582,7 @@ mac80211_setup_vif() { json_get_vars mode json_get_var vif_txpower txpower @@ -3195,7 +3205,7 @@ index c9bc3d6..2a8d2f9 100644 wireless_setup_vif_failed IFUP_ERROR json_select .. return -@@ -638,7 +638,7 @@ mac80211_interface_cleanup() { +@@ -641,7 +638,7 @@ mac80211_interface_cleanup() { local phy="$1" for wdev in $(list_phy_interfaces "$phy"); do @@ -3205,287 +3215,514 @@ index c9bc3d6..2a8d2f9 100644 done } diff --git a/package/kernel/mac80211/files/regdb.txt b/package/kernel/mac80211/files/regdb.txt -index ba95fc6..84413fd 100644 +index 463ace3..84413fd 100644 --- a/package/kernel/mac80211/files/regdb.txt +++ b/package/kernel/mac80211/files/regdb.txt -@@ -6,7 +6,7 @@ country 00: +@@ -2,7 +2,7 @@ + country 00: + (2402 - 2472 @ 40), (20) + # Channel 12 - 13. +- (2457 - 2482 @ 20), (20), NO-IR, AUTO-BW ++ (2457 - 2482 @ 40), (20), NO-IR # Channel 14. Only JP enables this and for 802.11b only (2474 - 2494 @ 20), (20), NO-IR, NO-OFDM # Channel 36 - 48 -- (5170 - 5250 @ 80), (20) -+ (5170 - 5250 @ 80), (20), AUTO-BW - # Channel 52 - 64 - (5250 - 5330 @ 80), (20), NO-IR, DFS, AUTO-BW - # Channel 100 - 144 -@@ -54,8 +54,8 @@ country AL: DFS-ETSI - - country AM: DFS-ETSI - (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (18) -- (5250 - 5330 @ 80), (18), DFS -+ (5170 - 5250 @ 20), (18) -+ (5250 - 5330 @ 20), (18), DFS - - country AN: DFS-ETSI - (2402 - 2482 @ 40), (20) -@@ -85,7 +85,7 @@ country AT: DFS-ETSI - # 60 gHz band channels 1-4, ref: Etsi En 302 567 +@@ -22,7 +22,7 @@ country AD: + (5170 - 5250 @ 80), (20) + (5250 - 5330 @ 80), (20), DFS + (5490 - 5710 @ 80), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 (57000 - 66000 @ 2160), (40) --country AU: -+country AU: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW -@@ -141,14 +141,20 @@ country BG: DFS-ETSI + country AE: DFS-FCC +@@ -82,7 +82,7 @@ country AT: DFS-ETSI (5170 - 5250 @ 80), (20), AUTO-BW (5250 - 5330 @ 80), (20), DFS, AUTO-BW (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country AU: DFS-ETSI +@@ -108,7 +108,7 @@ country BA: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country BB: DFS-FCC +@@ -126,7 +126,7 @@ country BE: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country BF: DFS-FCC +@@ -141,13 +141,13 @@ country BG: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 5 GHz Short Range Devices, ref: + # 5 gHz Short Range Devices, ref: -+ # Etsi EN 300 440-1 -+ # Etsi EN 300 440-2 -+ # http://crc.bg/files/_bg/Spisak_2015.pdf -+ # http://crc.bg/files/_bg/Pravila_2015_resh24.pdf -+ (5725 - 5875 @ 80), (14) - # 60 gHz band channels 1-4, ref: Etsi En 302 567 + # Etsi EN 300 440-1 + # Etsi EN 300 440-2 + # http://crc.bg/files/_bg/Spisak_2015.pdf + # http://crc.bg/files/_bg/Pravila_2015_resh24.pdf + (5725 - 5875 @ 80), (14) +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 (57000 - 66000 @ 2160), (40) country BH: DFS-JP - (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (20) -- (5250 - 5330 @ 80), (20), DFS -- (5735 - 5835 @ 80), (20) -+ (5170 - 5250 @ 20), (20) -+ (5250 - 5330 @ 20), (20), DFS -+ (5735 - 5835 @ 20), (20) - - country BL: DFS-ETSI - (2402 - 2482 @ 40), (20) -@@ -263,10 +269,10 @@ country CO: DFS-FCC - - country CR: DFS-FCC - (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (17) -- (5250 - 5330 @ 80), (24), DFS -- (5490 - 5730 @ 80), (24), DFS -- (5735 - 5835 @ 80), (30) -+ (5170 - 5250 @ 20), (17) -+ (5250 - 5330 @ 20), (24), DFS -+ (5490 - 5730 @ 20), (24), DFS -+ (5735 - 5835 @ 20), (30) - - country CX: DFS-FCC - (2402 - 2482 @ 40), (20) -@@ -349,10 +355,10 @@ country DZ: DFS-JP - - country EC: DFS-FCC - (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (17) -- (5250 - 5330 @ 80), (24), DFS -- (5490 - 5730 @ 80), (24), DFS -- (5735 - 5835 @ 80), (30) -+ (5170 - 5250 @ 20), (17) -+ (5250 - 5330 @ 20), (24), DFS -+ (5490 - 5730 @ 20), (24), DFS -+ (5735 - 5835 @ 20), (30) - - country EE: DFS-ETSI - (2402 - 2482 @ 40), (20) -@@ -364,8 +370,8 @@ country EE: DFS-ETSI - - country EG: DFS-ETSI - (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (20) -- (5250 - 5330 @ 80), (20), DFS -+ (5170 - 5250 @ 40), (20) -+ (5250 - 5330 @ 40), (20), DFS - - # Orden IET/787/2013, de 25 de abril, por la que se aprueba - # el cuadro nacional de atribución de frecuencias. -@@ -474,10 +480,10 @@ country GT: DFS-FCC - - country GU: DFS-FCC +@@ -216,8 +216,7 @@ country CA: DFS-FCC (2402 - 2472 @ 40), (30) -- (5170 - 5250 @ 80), (17) -- (5250 - 5330 @ 80), (24), DFS -- (5490 - 5730 @ 80), (24), DFS -- (5735 - 5835 @ 80), (30) -+ (5170 - 5250 @ 20), (17) -+ (5250 - 5330 @ 20), (24), DFS -+ (5490 - 5730 @ 20), (24), DFS -+ (5735 - 5835 @ 20), (30) - - country GY: - (2402 - 2482 @ 40), (30) -@@ -522,8 +528,8 @@ country HU: DFS-ETSI - - country ID: DFS-JP - # ref: http://www.postel.go.id/content/ID/regulasi/standardisasi/kepdir/bwa%205,8%20ghz.pdf -- (2402 - 2482 @ 40), (20) -- (5735 - 5815 @ 80), (23) -+ (2402 - 2482 @ 20), (20) -+ (5735 - 5815 @ 20), (23) - - country IE: DFS-ETSI - (2402 - 2482 @ 40), (20) -@@ -584,6 +590,9 @@ country JP: DFS-JP - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (23), DFS -+ # 60 GHz band channels 2-4 at 10mW, -+ # ref: http://www.arib.or.jp/english/html/overview/doc/1-STD-T74v1_1.pdf -+ (59000 - 66000 @ 2160), (10 mW) - - country KE: DFS-JP - (2402 - 2482 @ 40), (20) -@@ -607,11 +616,11 @@ country KN: DFS-ETSI - (5735 - 5815 @ 80), (30) - - country KP: DFS-JP -- (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (20), AUTO-BW -- (5250 - 5330 @ 80), (20), DFS, AUTO-BW -- (5490 - 5630 @ 80), (30), DFS -- (5735 - 5815 @ 80), (30) -+ (2402 - 2482 @ 20), (20) -+ (5170 - 5250 @ 20), (20) -+ (5250 - 5330 @ 20), (20), DFS -+ (5490 - 5630 @ 20), (30), DFS -+ (5735 - 5815 @ 20), (30) - - country KR: DFS-JP - (2402 - 2482 @ 40), (20) -@@ -659,10 +668,10 @@ country LI: DFS-ETSI - - country LK: DFS-FCC - (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (17) -- (5250 - 5330 @ 80), (24), DFS -- (5490 - 5730 @ 80), (24), DFS -- (5735 - 5835 @ 80), (30) -+ (5170 - 5250 @ 20), (17) -+ (5250 - 5330 @ 20), (24), DFS -+ (5490 - 5730 @ 20), (24), DFS -+ (5735 - 5835 @ 20), (30) - - # Source: - # http://lca.org.ls/images/documents/lesotho_national_frequency_allocation_plan.pdf -@@ -751,11 +760,12 @@ country MN: DFS-FCC - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - --country MO: -- (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 40), (23) -- (5250 - 5330 @ 40), (23), DFS -- (5735 - 5835 @ 40), (30) -+country MO: DFS-FCC -+ (2402 - 2482 @ 40), (23) -+ (5170 - 5250 @ 80), (23), AUTO-BW -+ (5250 - 5330 @ 80), (23), DFS, AUTO-BW -+ (5490 - 5730 @ 160), (30), DFS -+ (5735 - 5835 @ 80), (30) - - country MP: DFS-FCC - (2402 - 2472 @ 40), (30) -@@ -793,6 +803,14 @@ country MU: DFS-FCC - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -+# Source: -+# http://www.cam.gov.mv/docs/tech_standards/TAM-TS-100-2004-WLAN.pdf -+country MV: DFS-ETSI -+ (2400 - 2483.5 @ 40), (100 mW) -+ (5150 - 5250 @ 80), (200 mW), AUTO-BW -+ (5250 - 5350 @ 80), (100 mW), DFS, AUTO-BW -+ (5725 - 5850 @ 80), (100 mW) -+ - country MW: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW -@@ -812,6 +830,11 @@ country MY: DFS-FCC - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - -+country NG: DFS-ETSI -+ (2402 - 2482 @ 40), (20) -+ (5250 - 5330 @ 80), (30), DFS -+ (5735 - 5835 @ 80), (30) -+ - country NI: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW -@@ -848,7 +871,7 @@ country NP: DFS-JP - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5735 - 5835 @ 80), (20) - --country NZ: DFS-FCC -+country NZ: DFS-ETSI - (2402 - 2482 @ 40), (30) (5170 - 5250 @ 80), (17), AUTO-BW (5250 - 5330 @ 80), (24), DFS, AUTO-BW -@@ -971,10 +994,12 @@ country RS: DFS-ETSI +- (5490 - 5600 @ 80), (24), DFS +- (5650 - 5730 @ 80), (24), DFS ++ (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + + # Source: +@@ -234,7 +233,7 @@ country CH: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country CI: DFS-FCC +@@ -255,7 +254,7 @@ country CN: DFS-FCC + (5170 - 5250 @ 80), (23), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) +- # 60 GHz band channels 1,4: 28dBm, channels 2,3: 44dBm ++ # 60 gHz band channels 1,4: 28dBm, channels 2,3: 44dBm + # ref: http://www.miit.gov.cn/n11293472/n11505629/n11506593/n11960250/n11960606/n11960700/n12330791.files/n12330790.pdf + (57240 - 59400 @ 2160), (28) + (59400 - 63720 @ 2160), (44) +@@ -287,7 +286,7 @@ country CY: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + # Data from http://www.ctu.eu/164/download/VOR/VOR-12-08-2005-34.pdf +@@ -299,7 +298,7 @@ country CZ: DFS-ETSI + (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW + (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW + (5470 - 5725 @ 160), (500 mW), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + # Data from "Frequenznutzungsplan" (as published in April 2008), downloaded from +@@ -323,7 +322,7 @@ country DE: DFS-ETSI + (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW + # entries 308002, 309001 and 310003 + (5470 - 5725 @ 160), (500 mW), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country DK: DFS-ETSI +@@ -331,7 +330,7 @@ country DK: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + # Source: +@@ -366,7 +365,7 @@ country EE: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country EG: DFS-ETSI +@@ -386,7 +385,7 @@ country ES: DFS-ETSI + (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW + (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW + (5470 - 5725 @ 160), (500 mW), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country ET: DFS-ETSI +@@ -396,11 +395,11 @@ country ET: DFS-ETSI + (5490 - 5710 @ 160), (27), DFS + + country FI: DFS-ETSI +- (2400 - 2483.5 @ 40), (20) +- (5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW +- (5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW +- (5470 - 5725 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20), AUTO-BW ++ (5250 - 5330 @ 80), (20), DFS, AUTO-BW ++ (5490 - 5710 @ 160), (27), DFS ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country FM: DFS-FCC +@@ -415,7 +414,7 @@ country FR: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country GB: DFS-ETSI +@@ -423,7 +422,7 @@ country GB: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country GD: DFS-FCC +@@ -437,7 +436,7 @@ country GE: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (18), AUTO-BW + (5250 - 5330 @ 80), (18), DFS, AUTO-BW +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country GF: DFS-ETSI +@@ -455,9 +454,9 @@ country GH: DFS-FCC + + country GL: DFS-ETSI + (2402 - 2482 @ 40), (20) +- (5170 - 5250 @ 80), (20), AUTO-BW +- (5250 - 5330 @ 80), (20), DFS, AUTO-BW +- (5490 - 5710 @ 160), (27), DFS ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + + country GP: DFS-ETSI + (2402 - 2482 @ 40), (20) +@@ -470,7 +469,7 @@ country GR: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country GT: DFS-FCC +@@ -490,7 +489,7 @@ country GY: + (2402 - 2482 @ 40), (30) + (5735 - 5835 @ 80), (30) + +-country HK: DFS-ETSI ++country HK: + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW +@@ -505,11 +504,11 @@ country HN: DFS-FCC + (5735 - 5835 @ 80), (30) + + country HR: DFS-ETSI +- (2400 - 2483.5 @ 40), (20) +- (5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW +- (5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW +- (5470 - 5725 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20), AUTO-BW ++ (5250 - 5330 @ 80), (20), DFS, AUTO-BW ++ (5490 - 5710 @ 160), (27), DFS ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country HT: DFS-FCC +@@ -524,7 +523,7 @@ country HU: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country ID: DFS-JP +@@ -537,7 +536,7 @@ country IE: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country IL: DFS-ETSI +@@ -560,7 +559,7 @@ country IS: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country IT: DFS-ETSI +@@ -568,7 +567,7 @@ country IT: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country JM: DFS-FCC +@@ -687,7 +686,7 @@ country LT: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country LU: DFS-ETSI +@@ -695,7 +694,7 @@ country LU: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country LV: DFS-ETSI +@@ -703,7 +702,7 @@ country LV: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country MA: DFS-ETSI +@@ -751,7 +750,7 @@ country MK: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country MN: DFS-FCC +@@ -794,7 +793,7 @@ country MT: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country MU: DFS-FCC +@@ -827,10 +826,9 @@ country MX: DFS-FCC + + country MY: DFS-FCC + (2402 - 2482 @ 40), (20) +- (5170 - 5250 @ 80), (24), AUTO-BW +- (5250 - 5330 @ 80), (24), DFS, AUTO-BW +- (5490 - 5650 @ 160), (24), DFS +- (5735 - 5835 @ 80), (24) ++ (5170 - 5250 @ 80), (17), AUTO-BW ++ (5250 - 5330 @ 80), (23), DFS, AUTO-BW ++ (5735 - 5835 @ 80), (30) + + country NG: DFS-ETSI + (2402 - 2482 @ 40), (20) +@@ -849,7 +847,7 @@ country NL: DFS-ETSI + (5170 - 5250 @ 80), (20), NO-OUTDOOR, AUTO-BW + (5250 - 5330 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + # Data from http://www.lovdata.no/dokument/SF/forskrift/2012-01-19-77 +@@ -864,7 +862,7 @@ country NO: DFS-ETSI + (5470 - 5795 @ 160), (500 mW), DFS + (5815 - 5850 @ 35), (2000 mW), DFS + (17100 - 17300 @ 200), (100 mW) +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country NP: DFS-JP +@@ -928,7 +926,7 @@ country PL: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country PM: DFS-ETSI +@@ -949,7 +947,7 @@ country PT: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country PW: DFS-FCC +@@ -981,7 +979,7 @@ country RO: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + +@@ -991,15 +989,15 @@ country RS: DFS-ETSI + (2400 - 2483.5 @ 40), (100 mW) + (5150 - 5350 @ 40), (200 mW), NO-OUTDOOR + (5470 - 5725 @ 20), (1000 mW), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) country RU: DFS-ETSI (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (20) -- (5250 - 5330 @ 80), (20), DFS +- (5170 - 5250 @ 80), (20), AUTO-BW +- (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5650 - 5730 @ 80), (30), DFS - (5735 - 5835 @ 80), (30) + (5170 - 5250 @ 40), (20) + (5250 - 5330 @ 40), (20), DFS + (5650 - 5730 @ 40), (30), DFS + (5735 - 5835 @ 40), (30) -+ # 60 GHz band channels 1-4, ref: Changes to NLA 124_Order №129_22042015.pdf -+ (57000 - 66000 @ 2160), (40) + # 60 GHz band channels 1-4, ref: Changes to NLA 124_Order №129_22042015.pdf + (57000 - 66000 @ 2160), (40) - country RW: DFS-FCC - (2402 - 2482 @ 40), (20) -@@ -1037,9 +1062,9 @@ country SR: DFS-ETSI - - country SV: DFS-FCC - (2402 - 2482 @ 40), (20) -- (5170 - 5250 @ 80), (17) -- (5250 - 5330 @ 80), (23), DFS -- (5735 - 5835 @ 80), (30) -+ (5170 - 5250 @ 20), (17) -+ (5250 - 5330 @ 20), (23), DFS -+ (5735 - 5835 @ 20), (30) - - country SY: - (2402 - 2482 @ 40), (20) -@@ -1099,6 +1124,10 @@ country TW: DFS-JP - (5650 - 5710 @ 40), (30), DFS - (5735 - 5835 @ 80), (30) - -+country TZ: -+ (2402 - 2482 @ 40), (20) -+ (5735 - 5835 @ 80), (30) -+ - # Source: - # #914 / 06 Sep 2007: http://www.ucrf.gov.ua/uk/doc/nkrz/1196068874 - # #1174 / 23 Oct 2008: http://www.nkrz.gov.ua/uk/activities/ruling/1225269361 -@@ -1125,6 +1154,7 @@ country US: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW -+ (5490 - 5730 @ 160), (23), DFS - (5735 - 5835 @ 80), (30) - # 60g band - # reference: http://cfr.regstoday.com/47cfr15.aspx#47_CFR_15p255 -@@ -1192,6 +1222,12 @@ country WF: DFS-ETSI +@@ -1021,7 +1019,7 @@ country SE: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW (5250 - 5330 @ 80), (20), DFS, AUTO-BW (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) -+country WS: DFS-ETSI -+ (2402 - 2482 @ 40), (20) -+ (5170 - 5250 @ 40), (20) -+ (5250 - 5330 @ 40), (20), DFS -+ (5490 - 5710 @ 40), (27), DFS -+ - country YE: + country SG: DFS-FCC +@@ -1036,7 +1034,7 @@ country SI: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country SK: DFS-ETSI +@@ -1044,7 +1042,7 @@ country SK: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + # Source: +@@ -1109,7 +1107,7 @@ country TR: DFS-ETSI + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + + country TT: DFS-FCC +@@ -1119,20 +1117,12 @@ country TT: DFS-FCC + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +-# Source: +-# Table of Frequency Allocations of Republic of China (Taiwan) / Nov 2014: +-# http://www.motc.gov.tw/websitedowndoc?file=post/201411171137330.doc& \ +-# filedisplay=Table+of+radio+frequency+allocation.doc +-# LP0002 Low-power Radio-frequency Devices Technical Regulations / 28 Jun 2011: +-# http://www.ncc.gov.tw/english/show_file.aspx?table_name=news&file_sn=681 +-# (section 3.10.1, 4.7) +-country TW: DFS-FCC +- (2400 - 2483.5 @ 40), (30) +- # Follow US 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients +- (5150 - 5250 @ 80), (23), AUTO-BW +- (5250 - 5350 @ 80), (23), DFS, AUTO-BW +- (5470 - 5725 @ 160), (23), DFS +- (5725 - 5850 @ 80), (30) ++country TW: DFS-JP ++ (2402 - 2472 @ 40), (30) ++ (5270 - 5330 @ 40), (17), DFS ++ (5490 - 5590 @ 80), (30), DFS ++ (5650 - 5710 @ 40), (30), DFS ++ (5735 - 5835 @ 80), (30) + + country TZ: (2402 - 2482 @ 40), (20) +@@ -1147,11 +1137,10 @@ country TZ: + # disputable definitions there. + country UA: DFS-ETSI + (2400 - 2483.5 @ 40), (20), NO-OUTDOOR +- (5150 - 5250 @ 80), (20), NO-OUTDOOR, AUTO-BW +- (5250 - 5350 @ 80), (20), DFS, NO-OUTDOOR, AUTO-BW +- (5490 - 5670 @ 160), (20), DFS ++ (5150 - 5350 @ 40), (20), NO-OUTDOOR ++ (5490 - 5670 @ 80), (20), DFS + (5735 - 5835 @ 80), (20) +- # 60 GHz band channels 1-4, ref: Etsi En 302 567 ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + country UG: DFS-FCC +@@ -1163,8 +1152,7 @@ country UG: DFS-FCC + + country US: DFS-FCC + (2402 - 2472 @ 40), (30) +- # 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients +- (5170 - 5250 @ 80), (23), AUTO-BW ++ (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5490 - 5730 @ 160), (23), DFS + (5735 - 5835 @ 80), (30) +@@ -1175,8 +1163,9 @@ country US: DFS-FCC + + country UY: DFS-FCC + (2402 - 2482 @ 40), (20) +- (5170 - 5250 @ 80), (23), AUTO-BW +- (5250 - 5330 @ 80), (23), DFS, AUTO-BW ++ (5170 - 5250 @ 80), (17), AUTO-BW ++ (5250 - 5330 @ 80), (24), DFS, AUTO-BW ++ (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + + # Source: +@@ -1252,7 +1241,7 @@ country ZA: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW +- (5490 - 5710 @ 160), (30) ++ (5490 - 5710 @ 160), (27), DFS + + country ZW: DFS-ETSI + (2402 - 2482 @ 40), (20) diff --git a/package/kernel/mac80211/patches/001-fix_build.patch b/package/kernel/mac80211/patches/001-fix_build.patch index 818983e..402649d 100644 --- a/package/kernel/mac80211/patches/001-fix_build.patch @@ -13184,10 +13421,10 @@ index 0000000..b19e7ee + } else { + info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; + hdr->seq_ctrl = cpu_to_le16(sdata->sequence_number); -diff --git a/package/kernel/mac80211/patches/335-brcmfmac-Fix-oops-when-SDIO-device-is-removed.patch b/package/kernel/mac80211/patches/335-brcmfmac-Fix-oops-when-SDIO-device-is-removed.patch +diff --git a/package/kernel/mac80211/patches/335-0001-brcmfmac-Fix-oops-when-SDIO-device-is-removed.patch b/package/kernel/mac80211/patches/335-0001-brcmfmac-Fix-oops-when-SDIO-device-is-removed.patch deleted file mode 100644 index 5e63a80..0000000 ---- a/package/kernel/mac80211/patches/335-brcmfmac-Fix-oops-when-SDIO-device-is-removed.patch +--- a/package/kernel/mac80211/patches/335-0001-brcmfmac-Fix-oops-when-SDIO-device-is-removed.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Hante Meuleman @@ -13234,89 +13471,10 @@ index 5e63a80..0000000 - } else if (atomic_read(&bus->intstatus) || - atomic_read(&bus->ipend) > 0 || - (!atomic_read(&bus->fcstate) && -diff --git a/package/kernel/mac80211/patches/335-mac80211-fix-handling-of-PS-filtering-with-fast-xmit.patch b/package/kernel/mac80211/patches/335-mac80211-fix-handling-of-PS-filtering-with-fast-xmit.patch -new file mode 100644 -index 0000000..7aef205 ---- /dev/null -+++ b/package/kernel/mac80211/patches/335-mac80211-fix-handling-of-PS-filtering-with-fast-xmit.patch -@@ -0,0 +1,45 @@ -+From: Felix Fietkau -+Date: Thu, 24 Sep 2015 14:11:40 +0200 -+Subject: [PATCH] mac80211: fix handling of PS filtering with fast-xmit -+ -+Fixes dropped packets in the tx path in case a non-PS station triggers -+the tx filter. -+ -+Cc: stable@vger.kernel.org # 4.2 -+Signed-off-by: Felix Fietkau -+--- -+ -+--- a/net/mac80211/status.c -++++ b/net/mac80211/status.c -+@@ -101,6 +101,7 @@ static void ieee80211_handle_filtered_fr -+ * when it wakes up for the next time. -+ */ -+ set_sta_flag(sta, WLAN_STA_CLEAR_PS_FILT); -++ ieee80211_clear_fast_xmit(sta); -+ -+ /* -+ * This code races in the following way: -+--- a/net/mac80211/tx.c -++++ b/net/mac80211/tx.c -+@@ -1217,8 +1217,10 @@ ieee80211_tx_prepare(struct ieee80211_su -+ -+ if (!tx->sta) -+ info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT; -+- else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) -++ else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) { -+ info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT; -++ ieee80211_check_fast_xmit(tx->sta); -++ } -+ -+ info->flags |= IEEE80211_TX_CTL_FIRST_FRAGMENT; -+ -+@@ -2450,7 +2452,8 @@ void ieee80211_check_fast_xmit(struct st -+ -+ if (test_sta_flag(sta, WLAN_STA_PS_STA) || -+ test_sta_flag(sta, WLAN_STA_PS_DRIVER) || -+- test_sta_flag(sta, WLAN_STA_PS_DELIVER)) -++ test_sta_flag(sta, WLAN_STA_PS_DELIVER) || -++ test_sta_flag(sta, WLAN_STA_CLEAR_PS_FILT)) -+ goto out; -+ -+ if (sdata->noack_map) -diff --git a/package/kernel/mac80211/patches/336-ath9k-declare-required-extra-tx-headroom.patch b/package/kernel/mac80211/patches/336-ath9k-declare-required-extra-tx-headroom.patch -new file mode 100644 -index 0000000..4d88591 ---- /dev/null -+++ b/package/kernel/mac80211/patches/336-ath9k-declare-required-extra-tx-headroom.patch -@@ -0,0 +1,22 @@ -+From: Felix Fietkau -+Date: Thu, 24 Sep 2015 16:57:37 +0200 -+Subject: [PATCH] ath9k: declare required extra tx headroom -+ -+ath9k inserts padding between the 802.11 header and the data area (to -+align it). Since it didn't declare this extra required headroom, this -+led to some nasty issues like randomly dropped packets in some setups. -+ -+Cc: stable@vger.kernel.org -+Signed-off-by: Felix Fietkau -+--- -+ -+--- a/drivers/net/wireless/ath/ath9k/init.c -++++ b/drivers/net/wireless/ath/ath9k/init.c -+@@ -875,6 +875,7 @@ static void ath9k_set_hw_capab(struct at -+ hw->max_rate_tries = 10; -+ hw->sta_data_size = sizeof(struct ath_node); -+ hw->vif_data_size = sizeof(struct ath_vif); -++ hw->extra_tx_headroom = 4; -+ -+ hw->wiphy->available_antennas_rx = BIT(ah->caps.max_rxchains) - 1; -+ hw->wiphy->available_antennas_tx = BIT(ah->caps.max_txchains) - 1; -diff --git a/package/kernel/mac80211/patches/336-brcmfmac-Simplify-watchdog-sleep.patch b/package/kernel/mac80211/patches/336-brcmfmac-Simplify-watchdog-sleep.patch +diff --git a/package/kernel/mac80211/patches/335-0002-brcmfmac-Simplify-watchdog-sleep.patch b/package/kernel/mac80211/patches/335-0002-brcmfmac-Simplify-watchdog-sleep.patch deleted file mode 100644 index 201da75..0000000 ---- a/package/kernel/mac80211/patches/336-brcmfmac-Simplify-watchdog-sleep.patch +--- a/package/kernel/mac80211/patches/335-0002-brcmfmac-Simplify-watchdog-sleep.patch +++ /dev/null @@ -1,157 +0,0 @@ -From: Hante Meuleman @@ -13476,10 +13634,10 @@ index 201da75..0000000 - - /* Assign bus interface call back */ - bus->sdiodev->bus_if->dev = bus->sdiodev->dev; -diff --git a/package/kernel/mac80211/patches/337-brcmfmac-Fix-possible-race-condition.patch b/package/kernel/mac80211/patches/337-brcmfmac-Fix-possible-race-condition.patch +diff --git a/package/kernel/mac80211/patches/335-0003-brcmfmac-Fix-possible-race-condition.patch b/package/kernel/mac80211/patches/335-0003-brcmfmac-Fix-possible-race-condition.patch deleted file mode 100644 index 3a2de7a..0000000 ---- a/package/kernel/mac80211/patches/337-brcmfmac-Fix-possible-race-condition.patch +--- a/package/kernel/mac80211/patches/335-0003-brcmfmac-Fix-possible-race-condition.patch +++ /dev/null @@ -1,83 +0,0 @@ -From: Hante Meuleman @@ -13565,53 +13723,10 @@ index 3a2de7a..0000000 - } - - if (ret) -diff --git a/package/kernel/mac80211/patches/337-nl80211-put-current-TX-power-in-interface-info.patch b/package/kernel/mac80211/patches/337-nl80211-put-current-TX-power-in-interface-info.patch -new file mode 100644 -index 0000000..df2cc4b ---- /dev/null -+++ b/package/kernel/mac80211/patches/337-nl80211-put-current-TX-power-in-interface-info.patch -@@ -0,0 +1,37 @@ -+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -+Date: Mon, 31 Aug 2015 22:59:38 +0200 -+Subject: [PATCH] nl80211: put current TX power in interface info -+MIME-Version: 1.0 -+Content-Type: text/plain; charset=UTF-8 -+Content-Transfer-Encoding: 8bit -+ -+Many drivers implement reading current TX power (using either cfg80211 -+or ieee80211 op) but userspace can't get it using nl80211. Right now the -+only way to access it is to call some wext ioctl. -+Let's put TX power in interface info reply (callback is wdev specific) -+just like we do with current channel. -+To be consistent (e.g. NL80211_CMD_SET_WIPHY) let's use mBm as na unit. -+ -+Signed-off-by: Rafał Miłecki -+Signed-off-by: Johannes Berg -+--- -+ -+--- a/net/wireless/nl80211.c -++++ b/net/wireless/nl80211.c -+@@ -2406,6 +2406,16 @@ static int nl80211_send_iface(struct sk_ -+ } -+ } -+ -++ if (rdev->ops->get_tx_power) { -++ int dbm, ret; -++ -++ ret = rdev_get_tx_power(rdev, wdev, &dbm); -++ if (ret == 0 && -++ nla_put_u32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL, -++ DBM_TO_MBM(dbm))) -++ goto nla_put_failure; -++ } -++ -+ if (wdev->ssid_len) { -+ if (nla_put(msg, NL80211_ATTR_SSID, wdev->ssid_len, wdev->ssid)) -+ goto nla_put_failure; -diff --git a/package/kernel/mac80211/patches/338-brcmfmac-Add-support-for-BCM4345-SDIO-chipset.patch b/package/kernel/mac80211/patches/338-brcmfmac-Add-support-for-BCM4345-SDIO-chipset.patch +diff --git a/package/kernel/mac80211/patches/335-0004-brcmfmac-Add-support-for-BCM4345-SDIO-chipset.patch b/package/kernel/mac80211/patches/335-0004-brcmfmac-Add-support-for-BCM4345-SDIO-chipset.patch deleted file mode 100644 index c9eb900..0000000 ---- a/package/kernel/mac80211/patches/338-brcmfmac-Add-support-for-BCM4345-SDIO-chipset.patch +--- a/package/kernel/mac80211/patches/335-0004-brcmfmac-Add-support-for-BCM4345-SDIO-chipset.patch +++ /dev/null @@ -1,86 +0,0 @@ -From: Syed Asifful Dayyan @@ -13700,37 +13815,61 @@ index c9eb900..0000000 - #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 - - #define SDIO_VENDOR_ID_INTEL 0x0089 -diff --git a/package/kernel/mac80211/patches/338-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch b/package/kernel/mac80211/patches/338-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch +diff --git a/package/kernel/mac80211/patches/335-mac80211-fix-handling-of-PS-filtering-with-fast-xmit.patch b/package/kernel/mac80211/patches/335-mac80211-fix-handling-of-PS-filtering-with-fast-xmit.patch new file mode 100644 -index 0000000..2f492e0 +index 0000000..7aef205 --- /dev/null -+++ b/package/kernel/mac80211/patches/338-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch -@@ -0,0 +1,21 @@ ++++ b/package/kernel/mac80211/patches/335-mac80211-fix-handling-of-PS-filtering-with-fast-xmit.patch +@@ -0,0 +1,45 @@ +From: Felix Fietkau -+Date: Mon, 5 Oct 2015 17:41:25 +0200 -+Subject: [PATCH] mac80211: initialize tid field in struct ieee80211_txq ++Date: Thu, 24 Sep 2015 14:11:40 +0200 ++Subject: [PATCH] mac80211: fix handling of PS filtering with fast-xmit + ++Fixes dropped packets in the tx path in case a non-PS station triggers ++the tx filter. ++ ++Cc: stable@vger.kernel.org # 4.2 +Signed-off-by: Felix Fietkau +--- + -+--- a/net/mac80211/util.c -++++ b/net/mac80211/util.c -+@@ -3288,9 +3288,11 @@ void ieee80211_init_tx_queue(struct ieee -+ if (sta) { -+ txqi->txq.sta = &sta->sta; -+ sta->sta.txq[tid] = &txqi->txq; -++ txqi->txq.tid = tid; -+ txqi->txq.ac = ieee802_1d_to_ac[tid & 7]; -+ } else { -+ sdata->vif.txq = &txqi->txq; -++ txqi->txq.tid = 0; -+ txqi->txq.ac = IEEE80211_AC_BE; -+ } -+ } -diff --git a/package/kernel/mac80211/patches/339-brcmfmac-remove-duplication-of-ramsize-info.patch b/package/kernel/mac80211/patches/339-brcmfmac-remove-duplication-of-ramsize-info.patch ++--- a/net/mac80211/status.c +++++ b/net/mac80211/status.c ++@@ -101,6 +101,7 @@ static void ieee80211_handle_filtered_fr ++ * when it wakes up for the next time. ++ */ ++ set_sta_flag(sta, WLAN_STA_CLEAR_PS_FILT); +++ ieee80211_clear_fast_xmit(sta); ++ ++ /* ++ * This code races in the following way: ++--- a/net/mac80211/tx.c +++++ b/net/mac80211/tx.c ++@@ -1217,8 +1217,10 @@ ieee80211_tx_prepare(struct ieee80211_su ++ ++ if (!tx->sta) ++ info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT; ++- else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) +++ else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) { ++ info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT; +++ ieee80211_check_fast_xmit(tx->sta); +++ } ++ ++ info->flags |= IEEE80211_TX_CTL_FIRST_FRAGMENT; ++ ++@@ -2450,7 +2452,8 @@ void ieee80211_check_fast_xmit(struct st ++ ++ if (test_sta_flag(sta, WLAN_STA_PS_STA) || ++ test_sta_flag(sta, WLAN_STA_PS_DRIVER) || ++- test_sta_flag(sta, WLAN_STA_PS_DELIVER)) +++ test_sta_flag(sta, WLAN_STA_PS_DELIVER) || +++ test_sta_flag(sta, WLAN_STA_CLEAR_PS_FILT)) ++ goto out; ++ ++ if (sdata->noack_map) +diff --git a/package/kernel/mac80211/patches/336-0001-brcmfmac-remove-duplication-of-ramsize-info.patch b/package/kernel/mac80211/patches/336-0001-brcmfmac-remove-duplication-of-ramsize-info.patch deleted file mode 100644 index 7a688c4..0000000 ---- a/package/kernel/mac80211/patches/339-brcmfmac-remove-duplication-of-ramsize-info.patch +--- a/package/kernel/mac80211/patches/336-0001-brcmfmac-remove-duplication-of-ramsize-info.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Arend van Spriel @@ -13781,10 +13920,10 @@ index 7a688c4..0000000 - /* Set card control so an SDIO card reset does a WLAN backplane reset */ - reg_val = brcmf_sdiod_regrb(bus->sdiodev, - SDIO_CCCR_BRCM_CARDCTRL, &err); -diff --git a/package/kernel/mac80211/patches/340-brcmfmac-always-perform-cores-checks.patch b/package/kernel/mac80211/patches/340-brcmfmac-always-perform-cores-checks.patch +diff --git a/package/kernel/mac80211/patches/336-0002-brcmfmac-always-perform-cores-checks.patch b/package/kernel/mac80211/patches/336-0002-brcmfmac-always-perform-cores-checks.patch deleted file mode 100644 index e2a2074..0000000 ---- a/package/kernel/mac80211/patches/340-brcmfmac-always-perform-cores-checks.patch +--- a/package/kernel/mac80211/patches/336-0002-brcmfmac-always-perform-cores-checks.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: Arend van Spriel @@ -13861,10 +14000,10 @@ index e2a2074..0000000 - - static void brcmf_chip_get_raminfo(struct brcmf_chip_priv *ci) - { -diff --git a/package/kernel/mac80211/patches/341-brcmfmac-rename-chip-download-functions.patch b/package/kernel/mac80211/patches/341-brcmfmac-rename-chip-download-functions.patch +diff --git a/package/kernel/mac80211/patches/336-0003-brcmfmac-rename-chip-download-functions.patch b/package/kernel/mac80211/patches/336-0003-brcmfmac-rename-chip-download-functions.patch deleted file mode 100644 index a272800..0000000 ---- a/package/kernel/mac80211/patches/341-brcmfmac-rename-chip-download-functions.patch +--- a/package/kernel/mac80211/patches/336-0003-brcmfmac-rename-chip-download-functions.patch +++ /dev/null @@ -1,240 +0,0 @@ -From: Arend van Spriel @@ -14107,10 +14246,10 @@ index a272800..0000000 - brcmf_sdio_clkctl(bus, CLK_NONE, false); - sdio_release_host(bus->sdiodev->func[1]); - } -diff --git a/package/kernel/mac80211/patches/342-brcmfmac-assure-device-is-ready-for-download-after-b.patch b/package/kernel/mac80211/patches/342-brcmfmac-assure-device-is-ready-for-download-after-b.patch +diff --git a/package/kernel/mac80211/patches/336-0004-brcmfmac-assure-device-is-ready-for-download-after-b.patch b/package/kernel/mac80211/patches/336-0004-brcmfmac-assure-device-is-ready-for-download-after-b.patch deleted file mode 100644 index 6b1dd81..0000000 ---- a/package/kernel/mac80211/patches/342-brcmfmac-assure-device-is-ready-for-download-after-b.patch +--- a/package/kernel/mac80211/patches/336-0004-brcmfmac-assure-device-is-ready-for-download-after-b.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Arend van Spriel @@ -14174,10 +14313,10 @@ index 6b1dd81..0000000 - rstvec = get_unaligned_le32(fw->data); - brcmf_dbg(SDIO, "firmware rstvec: %x\n", rstvec); - -diff --git a/package/kernel/mac80211/patches/343-brcmfmac-extract-ram-size-info-from-internal-memory-.patch b/package/kernel/mac80211/patches/343-brcmfmac-extract-ram-size-info-from-internal-memory-.patch +diff --git a/package/kernel/mac80211/patches/336-0005-brcmfmac-extract-ram-size-info-from-internal-memory-.patch b/package/kernel/mac80211/patches/336-0005-brcmfmac-extract-ram-size-info-from-internal-memory-.patch deleted file mode 100644 index bcc2ed4..0000000 ---- a/package/kernel/mac80211/patches/343-brcmfmac-extract-ram-size-info-from-internal-memory-.patch +--- a/package/kernel/mac80211/patches/336-0005-brcmfmac-extract-ram-size-info-from-internal-memory-.patch +++ /dev/null @@ -1,367 +0,0 @@ -From: Arend van Spriel @@ -14547,10 +14686,10 @@ index bcc2ed4..0000000 - char name[8]; - }; - -diff --git a/package/kernel/mac80211/patches/344-brcmfmac-take-save-restore-memory-into-account-for-S.patch b/package/kernel/mac80211/patches/344-brcmfmac-take-save-restore-memory-into-account-for-S.patch +diff --git a/package/kernel/mac80211/patches/336-0006-brcmfmac-take-save-restore-memory-into-account-for-S.patch b/package/kernel/mac80211/patches/336-0006-brcmfmac-take-save-restore-memory-into-account-for-S.patch deleted file mode 100644 index 69618a7..0000000 ---- a/package/kernel/mac80211/patches/344-brcmfmac-take-save-restore-memory-into-account-for-S.patch +--- a/package/kernel/mac80211/patches/336-0006-brcmfmac-take-save-restore-memory-into-account-for-S.patch +++ /dev/null @@ -1,96 +0,0 @@ -From: Arend van Spriel @@ -14649,10 +14788,10 @@ index 69618a7..0000000 - } - - static void brcmf_sdio_get_console_addr(struct brcmf_sdio *bus) -diff --git a/package/kernel/mac80211/patches/345-brcmfmac-fix-watchdog-timer-regression.patch b/package/kernel/mac80211/patches/345-brcmfmac-fix-watchdog-timer-regression.patch +diff --git a/package/kernel/mac80211/patches/336-0007-brcmfmac-fix-watchdog-timer-regression.patch b/package/kernel/mac80211/patches/336-0007-brcmfmac-fix-watchdog-timer-regression.patch deleted file mode 100644 index 1b10dbb..0000000 ---- a/package/kernel/mac80211/patches/345-brcmfmac-fix-watchdog-timer-regression.patch +--- a/package/kernel/mac80211/patches/336-0007-brcmfmac-fix-watchdog-timer-regression.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Arend van Spriel @@ -14714,10 +14853,38 @@ index 1b10dbb..0000000 - brcmf_sdio_clkctl(bus, CLK_AVAIL, false); - /* Leave the device in state where it is - * 'passive'. This is done by resetting all -diff --git a/package/kernel/mac80211/patches/346-brcmfmac-avoid-runtime-pm-for-sdio-host-controller.patch b/package/kernel/mac80211/patches/346-brcmfmac-avoid-runtime-pm-for-sdio-host-controller.patch +diff --git a/package/kernel/mac80211/patches/336-ath9k-declare-required-extra-tx-headroom.patch b/package/kernel/mac80211/patches/336-ath9k-declare-required-extra-tx-headroom.patch +new file mode 100644 +index 0000000..4d88591 +--- /dev/null ++++ b/package/kernel/mac80211/patches/336-ath9k-declare-required-extra-tx-headroom.patch +@@ -0,0 +1,22 @@ ++From: Felix Fietkau ++Date: Thu, 24 Sep 2015 16:57:37 +0200 ++Subject: [PATCH] ath9k: declare required extra tx headroom ++ ++ath9k inserts padding between the 802.11 header and the data area (to ++align it). Since it didn't declare this extra required headroom, this ++led to some nasty issues like randomly dropped packets in some setups. ++ ++Cc: stable@vger.kernel.org ++Signed-off-by: Felix Fietkau ++--- ++ ++--- a/drivers/net/wireless/ath/ath9k/init.c +++++ b/drivers/net/wireless/ath/ath9k/init.c ++@@ -875,6 +875,7 @@ static void ath9k_set_hw_capab(struct at ++ hw->max_rate_tries = 10; ++ hw->sta_data_size = sizeof(struct ath_node); ++ hw->vif_data_size = sizeof(struct ath_vif); +++ hw->extra_tx_headroom = 4; ++ ++ hw->wiphy->available_antennas_rx = BIT(ah->caps.max_rxchains) - 1; ++ hw->wiphy->available_antennas_tx = BIT(ah->caps.max_txchains) - 1; +diff --git a/package/kernel/mac80211/patches/337-0001-brcmfmac-avoid-runtime-pm-for-sdio-host-controller.patch b/package/kernel/mac80211/patches/337-0001-brcmfmac-avoid-runtime-pm-for-sdio-host-controller.patch deleted file mode 100644 index af76f13..0000000 ---- a/package/kernel/mac80211/patches/346-brcmfmac-avoid-runtime-pm-for-sdio-host-controller.patch +--- a/package/kernel/mac80211/patches/337-0001-brcmfmac-avoid-runtime-pm-for-sdio-host-controller.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Arend van Spriel @@ -14764,10 +14931,10 @@ index af76f13..0000000 - out: - if (ret) - brcmf_sdiod_remove(sdiodev); -diff --git a/package/kernel/mac80211/patches/347-brcmfmac-Add-necessary-memory-barriers-for-SDIO.patch b/package/kernel/mac80211/patches/347-brcmfmac-Add-necessary-memory-barriers-for-SDIO.patch +diff --git a/package/kernel/mac80211/patches/337-0002-brcmfmac-Add-necessary-memory-barriers-for-SDIO.patch b/package/kernel/mac80211/patches/337-0002-brcmfmac-Add-necessary-memory-barriers-for-SDIO.patch deleted file mode 100644 index c419cc6..0000000 ---- a/package/kernel/mac80211/patches/347-brcmfmac-Add-necessary-memory-barriers-for-SDIO.patch +--- a/package/kernel/mac80211/patches/337-0002-brcmfmac-Add-necessary-memory-barriers-for-SDIO.patch +++ /dev/null @@ -1,171 +0,0 @@ -From: Hante Meuleman @@ -14941,10 +15108,10 @@ index c419cc6..0000000 - - /* Assign bus interface call back */ - bus->sdiodev->bus_if->dev = bus->sdiodev->dev; -diff --git a/package/kernel/mac80211/patches/348-brcmfmac-Remove-unnecessary-new-line-in-pcie-console.patch b/package/kernel/mac80211/patches/348-brcmfmac-Remove-unnecessary-new-line-in-pcie-console.patch +diff --git a/package/kernel/mac80211/patches/337-0003-brcmfmac-Remove-unnecessary-new-line-in-pcie-console.patch b/package/kernel/mac80211/patches/337-0003-brcmfmac-Remove-unnecessary-new-line-in-pcie-console.patch deleted file mode 100644 index 1bc98a0..0000000 ---- a/package/kernel/mac80211/patches/348-brcmfmac-Remove-unnecessary-new-line-in-pcie-console.patch +--- a/package/kernel/mac80211/patches/337-0003-brcmfmac-Remove-unnecessary-new-line-in-pcie-console.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Hante Meuleman @@ -14973,10 +15140,10 @@ index 1bc98a0..0000000 - console->log_idx = 0; - } - } -diff --git a/package/kernel/mac80211/patches/349-brcmfmac-add-MODULE_FIRMWARE-macros-for-bcm4356-PCIe.patch b/package/kernel/mac80211/patches/349-brcmfmac-add-MODULE_FIRMWARE-macros-for-bcm4356-PCIe.patch +diff --git a/package/kernel/mac80211/patches/337-0004-brcmfmac-add-MODULE_FIRMWARE-macros-for-bcm4356-PCIe.patch b/package/kernel/mac80211/patches/337-0004-brcmfmac-add-MODULE_FIRMWARE-macros-for-bcm4356-PCIe.patch deleted file mode 100644 index fcf0bf3..0000000 ---- a/package/kernel/mac80211/patches/349-brcmfmac-add-MODULE_FIRMWARE-macros-for-bcm4356-PCIe.patch +--- a/package/kernel/mac80211/patches/337-0004-brcmfmac-add-MODULE_FIRMWARE-macros-for-bcm4356-PCIe.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Arend van Spriel @@ -15005,10 +15172,10 @@ index fcf0bf3..0000000 - MODULE_FIRMWARE(BRCMF_PCIE_43570_FW_NAME); - MODULE_FIRMWARE(BRCMF_PCIE_43570_NVRAM_NAME); - -diff --git a/package/kernel/mac80211/patches/350-brcmfmac-add-support-for-BCM43430-SDIO-chipset.patch b/package/kernel/mac80211/patches/350-brcmfmac-add-support-for-BCM43430-SDIO-chipset.patch +diff --git a/package/kernel/mac80211/patches/337-0005-brcmfmac-add-support-for-BCM43430-SDIO-chipset.patch b/package/kernel/mac80211/patches/337-0005-brcmfmac-add-support-for-BCM43430-SDIO-chipset.patch deleted file mode 100644 index b3e9bc9..0000000 ---- a/package/kernel/mac80211/patches/350-brcmfmac-add-support-for-BCM43430-SDIO-chipset.patch +--- a/package/kernel/mac80211/patches/337-0005-brcmfmac-add-support-for-BCM43430-SDIO-chipset.patch +++ /dev/null @@ -1,138 +0,0 @@ -From: Arend van Spriel @@ -15149,10 +15316,10 @@ index b3e9bc9..0000000 - #define SDIO_DEVICE_ID_BROADCOM_4345 0x4345 - #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 - -diff --git a/package/kernel/mac80211/patches/351-brcmfmac-only-support-the-BCM43455-7-device.patch b/package/kernel/mac80211/patches/351-brcmfmac-only-support-the-BCM43455-7-device.patch +diff --git a/package/kernel/mac80211/patches/337-0006-brcmfmac-only-support-the-BCM43455-7-device.patch b/package/kernel/mac80211/patches/337-0006-brcmfmac-only-support-the-BCM43455-7-device.patch deleted file mode 100644 index c3d7bc2..0000000 ---- a/package/kernel/mac80211/patches/351-brcmfmac-only-support-the-BCM43455-7-device.patch +--- a/package/kernel/mac80211/patches/337-0006-brcmfmac-only-support-the-BCM43455-7-device.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Arend van Spriel @@ -15205,10 +15372,10 @@ index c3d7bc2..0000000 - { BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4354) } - }; - -diff --git a/package/kernel/mac80211/patches/352-brcmfmac-remove-support-for-unreleased-BCM4354-PCIe.patch b/package/kernel/mac80211/patches/352-brcmfmac-remove-support-for-unreleased-BCM4354-PCIe.patch +diff --git a/package/kernel/mac80211/patches/337-0007-brcmfmac-remove-support-for-unreleased-BCM4354-PCIe.patch b/package/kernel/mac80211/patches/337-0007-brcmfmac-remove-support-for-unreleased-BCM4354-PCIe.patch deleted file mode 100644 index a62cfdf..0000000 ---- a/package/kernel/mac80211/patches/352-brcmfmac-remove-support-for-unreleased-BCM4354-PCIe.patch +--- a/package/kernel/mac80211/patches/337-0007-brcmfmac-remove-support-for-unreleased-BCM4354-PCIe.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Arend van Spriel @@ -15263,10 +15430,53 @@ index a62cfdf..0000000 - BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID), -diff --git a/package/kernel/mac80211/patches/353-brcmfmac-disable-MBSS-feature-for-BCM43362.patch b/package/kernel/mac80211/patches/353-brcmfmac-disable-MBSS-feature-for-BCM43362.patch +diff --git a/package/kernel/mac80211/patches/337-nl80211-put-current-TX-power-in-interface-info.patch b/package/kernel/mac80211/patches/337-nl80211-put-current-TX-power-in-interface-info.patch +new file mode 100644 +index 0000000..df2cc4b +--- /dev/null ++++ b/package/kernel/mac80211/patches/337-nl80211-put-current-TX-power-in-interface-info.patch +@@ -0,0 +1,37 @@ ++From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= ++Date: Mon, 31 Aug 2015 22:59:38 +0200 ++Subject: [PATCH] nl80211: put current TX power in interface info ++MIME-Version: 1.0 ++Content-Type: text/plain; charset=UTF-8 ++Content-Transfer-Encoding: 8bit ++ ++Many drivers implement reading current TX power (using either cfg80211 ++or ieee80211 op) but userspace can't get it using nl80211. Right now the ++only way to access it is to call some wext ioctl. ++Let's put TX power in interface info reply (callback is wdev specific) ++just like we do with current channel. ++To be consistent (e.g. NL80211_CMD_SET_WIPHY) let's use mBm as na unit. ++ ++Signed-off-by: Rafał Miłecki ++Signed-off-by: Johannes Berg ++--- ++ ++--- a/net/wireless/nl80211.c +++++ b/net/wireless/nl80211.c ++@@ -2406,6 +2406,16 @@ static int nl80211_send_iface(struct sk_ ++ } ++ } ++ +++ if (rdev->ops->get_tx_power) { +++ int dbm, ret; +++ +++ ret = rdev_get_tx_power(rdev, wdev, &dbm); +++ if (ret == 0 && +++ nla_put_u32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL, +++ DBM_TO_MBM(dbm))) +++ goto nla_put_failure; +++ } +++ ++ if (wdev->ssid_len) { ++ if (nla_put(msg, NL80211_ATTR_SSID, wdev->ssid_len, wdev->ssid)) ++ goto nla_put_failure; +diff --git a/package/kernel/mac80211/patches/338-brcmfmac-disable-MBSS-feature-for-BCM43362.patch b/package/kernel/mac80211/patches/338-brcmfmac-disable-MBSS-feature-for-BCM43362.patch deleted file mode 100644 index 366ff85..0000000 ---- a/package/kernel/mac80211/patches/353-brcmfmac-disable-MBSS-feature-for-BCM43362.patch +--- a/package/kernel/mac80211/patches/338-brcmfmac-disable-MBSS-feature-for-BCM43362.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Arend van Spriel @@ -15297,10 +15507,37 @@ index 366ff85..0000000 - - /* set chip related quirks */ - switch (drvr->bus_if->chip) { -diff --git a/package/kernel/mac80211/patches/354-brcmfmac-use-static-superset-of-channels-for-wiphy-b.patch b/package/kernel/mac80211/patches/354-brcmfmac-use-static-superset-of-channels-for-wiphy-b.patch +diff --git a/package/kernel/mac80211/patches/338-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch b/package/kernel/mac80211/patches/338-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch +new file mode 100644 +index 0000000..2f492e0 +--- /dev/null ++++ b/package/kernel/mac80211/patches/338-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch +@@ -0,0 +1,21 @@ ++From: Felix Fietkau ++Date: Mon, 5 Oct 2015 17:41:25 +0200 ++Subject: [PATCH] mac80211: initialize tid field in struct ieee80211_txq ++ ++Signed-off-by: Felix Fietkau ++--- ++ ++--- a/net/mac80211/util.c +++++ b/net/mac80211/util.c ++@@ -3288,9 +3288,11 @@ void ieee80211_init_tx_queue(struct ieee ++ if (sta) { ++ txqi->txq.sta = &sta->sta; ++ sta->sta.txq[tid] = &txqi->txq; +++ txqi->txq.tid = tid; ++ txqi->txq.ac = ieee802_1d_to_ac[tid & 7]; ++ } else { ++ sdata->vif.txq = &txqi->txq; +++ txqi->txq.tid = 0; ++ txqi->txq.ac = IEEE80211_AC_BE; ++ } ++ } +diff --git a/package/kernel/mac80211/patches/339-0001-brcmfmac-use-static-superset-of-channels-for-wiphy-b.patch b/package/kernel/mac80211/patches/339-0001-brcmfmac-use-static-superset-of-channels-for-wiphy-b.patch deleted file mode 100644 index 6e461f6..0000000 ---- a/package/kernel/mac80211/patches/354-brcmfmac-use-static-superset-of-channels-for-wiphy-b.patch +--- a/package/kernel/mac80211/patches/339-0001-brcmfmac-use-static-superset-of-channels-for-wiphy-b.patch +++ /dev/null @@ -1,300 +0,0 @@ -From: Arend van Spriel @@ -15603,10 +15840,10 @@ index 6e461f6..0000000 - kfree(wiphy->iface_combinations); - if (wiphy->bands[IEEE80211_BAND_2GHZ]) { - kfree(wiphy->bands[IEEE80211_BAND_2GHZ]->channels); -diff --git a/package/kernel/mac80211/patches/355-brcmfmac-update-wiphy-band-information-upon-updating.patch b/package/kernel/mac80211/patches/355-brcmfmac-update-wiphy-band-information-upon-updating.patch +diff --git a/package/kernel/mac80211/patches/339-0002-brcmfmac-update-wiphy-band-information-upon-updating.patch b/package/kernel/mac80211/patches/339-0002-brcmfmac-update-wiphy-band-information-upon-updating.patch deleted file mode 100644 index a0c22eb..0000000 ---- a/package/kernel/mac80211/patches/355-brcmfmac-update-wiphy-band-information-upon-updating.patch +--- a/package/kernel/mac80211/patches/339-0002-brcmfmac-update-wiphy-band-information-upon-updating.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Arend van Spriel @@ -15638,10 +15875,10 @@ index a0c22eb..0000000 - } - - static void brcmf_free_wiphy(struct wiphy *wiphy) -diff --git a/package/kernel/mac80211/patches/356-brcmfmac-add-description-for-feature-flags.patch b/package/kernel/mac80211/patches/356-brcmfmac-add-description-for-feature-flags.patch +diff --git a/package/kernel/mac80211/patches/339-0003-brcmfmac-add-description-for-feature-flags.patch b/package/kernel/mac80211/patches/339-0003-brcmfmac-add-description-for-feature-flags.patch deleted file mode 100644 index 193f507..0000000 ---- a/package/kernel/mac80211/patches/356-brcmfmac-add-description-for-feature-flags.patch +--- a/package/kernel/mac80211/patches/339-0003-brcmfmac-add-description-for-feature-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Arend van Spriel @@ -15668,10 +15905,10 @@ index 193f507..0000000 - */ - #define BRCMF_FEAT_LIST \ - BRCMF_FEAT_DEF(MBSS) \ -diff --git a/package/kernel/mac80211/patches/357-brcmfmac-make-scheduled-scan-support-conditional.patch b/package/kernel/mac80211/patches/357-brcmfmac-make-scheduled-scan-support-conditional.patch +diff --git a/package/kernel/mac80211/patches/339-0004-brcmfmac-make-scheduled-scan-support-conditional.patch b/package/kernel/mac80211/patches/339-0004-brcmfmac-make-scheduled-scan-support-conditional.patch deleted file mode 100644 index 42330b4..0000000 ---- a/package/kernel/mac80211/patches/357-brcmfmac-make-scheduled-scan-support-conditional.patch +--- a/package/kernel/mac80211/patches/339-0004-brcmfmac-make-scheduled-scan-support-conditional.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Arend van Spriel @@ -15725,10 +15962,10 @@ index 42330b4..0000000 - BRCMF_FEAT_DEF(WOWL) - /* - * Quirks: -diff --git a/package/kernel/mac80211/patches/358-brcmfmac-add-support-for-BCM4324-rev-B5-chipset.patch b/package/kernel/mac80211/patches/358-brcmfmac-add-support-for-BCM4324-rev-B5-chipset.patch +diff --git a/package/kernel/mac80211/patches/339-0005-brcmfmac-add-support-for-BCM4324-rev-B5-chipset.patch b/package/kernel/mac80211/patches/339-0005-brcmfmac-add-support-for-BCM4324-rev-B5-chipset.patch deleted file mode 100644 index b859d46..0000000 ---- a/package/kernel/mac80211/patches/358-brcmfmac-add-support-for-BCM4324-rev-B5-chipset.patch +--- a/package/kernel/mac80211/patches/339-0005-brcmfmac-add-support-for-BCM4324-rev-B5-chipset.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Arend van Spriel @@ -15774,10 +16011,10 @@ index b859d46..0000000 - { BRCM_CC_4329_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4329) }, - { BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4330) }, - { BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4334) }, -diff --git a/package/kernel/mac80211/patches/359-brcmfmac-process-interrupt-regardless-sdiod-state.patch b/package/kernel/mac80211/patches/359-brcmfmac-process-interrupt-regardless-sdiod-state.patch +diff --git a/package/kernel/mac80211/patches/339-0006-brcmfmac-process-interrupt-regardless-sdiod-state.patch b/package/kernel/mac80211/patches/339-0006-brcmfmac-process-interrupt-regardless-sdiod-state.patch deleted file mode 100644 index d420308..0000000 ---- a/package/kernel/mac80211/patches/359-brcmfmac-process-interrupt-regardless-sdiod-state.patch +--- a/package/kernel/mac80211/patches/339-0006-brcmfmac-process-interrupt-regardless-sdiod-state.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Arend van Spriel @@ -15807,10 +16044,10 @@ index d420308..0000000 - /* Count the interrupt call */ - bus->sdcnt.intrcount++; - if (in_interrupt()) -diff --git a/package/kernel/mac80211/patches/360-brcmfmac-fix-sdio-suspend-and-resume.patch b/package/kernel/mac80211/patches/360-brcmfmac-fix-sdio-suspend-and-resume.patch +diff --git a/package/kernel/mac80211/patches/339-0007-brcmfmac-fix-sdio-suspend-and-resume.patch b/package/kernel/mac80211/patches/339-0007-brcmfmac-fix-sdio-suspend-and-resume.patch deleted file mode 100644 index ac5584e..0000000 ---- a/package/kernel/mac80211/patches/360-brcmfmac-fix-sdio-suspend-and-resume.patch +--- a/package/kernel/mac80211/patches/339-0007-brcmfmac-fix-sdio-suspend-and-resume.patch +++ /dev/null @@ -1,68 +0,0 @@ -From: Arend van Spriel @@ -15881,10 +16118,10 @@ index ac5584e..0000000 - return 0; - } - -diff --git a/package/kernel/mac80211/patches/361-brcmfmac-add-support-for-BCM4358-PCIe-device.patch b/package/kernel/mac80211/patches/361-brcmfmac-add-support-for-BCM4358-PCIe-device.patch +diff --git a/package/kernel/mac80211/patches/339-0008-brcmfmac-add-support-for-BCM4358-PCIe-device.patch b/package/kernel/mac80211/patches/339-0008-brcmfmac-add-support-for-BCM4358-PCIe-device.patch deleted file mode 100644 index a521b65..0000000 ---- a/package/kernel/mac80211/patches/361-brcmfmac-add-support-for-BCM4358-PCIe-device.patch +--- a/package/kernel/mac80211/patches/339-0008-brcmfmac-add-support-for-BCM4358-PCIe-device.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Arend van Spriel @@ -15964,10 +16201,10 @@ index a521b65..0000000 - #define BRCM_PCIE_43602_DEVICE_ID 0x43ba - #define BRCM_PCIE_43602_2G_DEVICE_ID 0x43bb - #define BRCM_PCIE_43602_5G_DEVICE_ID 0x43bc -diff --git a/package/kernel/mac80211/patches/362-brcmfmac-add-additional-43602-pcie-device-id.patch b/package/kernel/mac80211/patches/362-brcmfmac-add-additional-43602-pcie-device-id.patch +diff --git a/package/kernel/mac80211/patches/339-0009-brcmfmac-add-additional-43602-pcie-device-id.patch b/package/kernel/mac80211/patches/339-0009-brcmfmac-add-additional-43602-pcie-device-id.patch deleted file mode 100644 index bcbb984..0000000 ---- a/package/kernel/mac80211/patches/362-brcmfmac-add-additional-43602-pcie-device-id.patch +--- a/package/kernel/mac80211/patches/339-0009-brcmfmac-add-additional-43602-pcie-device-id.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Hante Meuleman @@ -16000,10 +16237,10 @@ index bcbb984..0000000 - - /* brcmsmac IDs */ - #define BCM4313_D11N2G_ID 0x4727 /* 4313 802.11n 2.4G device */ -diff --git a/package/kernel/mac80211/patches/363-brcmfmac-Add-support-for-multiple-PCIE-devices-in-nv.patch b/package/kernel/mac80211/patches/363-brcmfmac-Add-support-for-multiple-PCIE-devices-in-nv.patch +diff --git a/package/kernel/mac80211/patches/339-0010-brcmfmac-Add-support-for-multiple-PCIE-devices-in-nv.patch b/package/kernel/mac80211/patches/339-0010-brcmfmac-Add-support-for-multiple-PCIE-devices-in-nv.patch deleted file mode 100644 index 5f9bbea..0000000 ---- a/package/kernel/mac80211/patches/363-brcmfmac-Add-support-for-multiple-PCIE-devices-in-nv.patch +--- a/package/kernel/mac80211/patches/339-0010-brcmfmac-Add-support-for-multiple-PCIE-devices-in-nv.patch +++ /dev/null @@ -1,351 +0,0 @@ -From: Hante Meuleman @@ -16357,10 +16594,10 @@ index 5f9bbea..0000000 - if (ret == 0) - return 0; - fail_bus: -diff --git a/package/kernel/mac80211/patches/364-brcmfmac-cleanup-a-sizeof.patch b/package/kernel/mac80211/patches/364-brcmfmac-cleanup-a-sizeof.patch +diff --git a/package/kernel/mac80211/patches/340-brcmfmac-cleanup-a-sizeof.patch b/package/kernel/mac80211/patches/340-brcmfmac-cleanup-a-sizeof.patch deleted file mode 100644 index d26e118..0000000 ---- a/package/kernel/mac80211/patches/364-brcmfmac-cleanup-a-sizeof.patch +--- a/package/kernel/mac80211/patches/340-brcmfmac-cleanup-a-sizeof.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Dan Carpenter @@ -16386,10 +16623,10 @@ index d26e118..0000000 - GFP_KERNEL); - if (!flowrings) - goto fail; -diff --git a/package/kernel/mac80211/patches/365-brcmfmac-check-result-of-USB-firmware-request.patch b/package/kernel/mac80211/patches/365-brcmfmac-check-result-of-USB-firmware-request.patch +diff --git a/package/kernel/mac80211/patches/341-brcmfmac-check-result-of-USB-firmware-request.patch b/package/kernel/mac80211/patches/341-brcmfmac-check-result-of-USB-firmware-request.patch deleted file mode 100644 index 9b2880d..0000000 ---- a/package/kernel/mac80211/patches/365-brcmfmac-check-result-of-USB-firmware-request.patch +--- a/package/kernel/mac80211/patches/341-brcmfmac-check-result-of-USB-firmware-request.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -16425,10 +16662,10 @@ index 9b2880d..0000000 - return 0; - - fail: -diff --git a/package/kernel/mac80211/patches/366-brcmfmac-prohibit-ACPI-power-management-for-brcmfmac.patch b/package/kernel/mac80211/patches/366-brcmfmac-prohibit-ACPI-power-management-for-brcmfmac.patch +diff --git a/package/kernel/mac80211/patches/342-brcmfmac-prohibit-ACPI-power-management-for-brcmfmac.patch b/package/kernel/mac80211/patches/342-brcmfmac-prohibit-ACPI-power-management-for-brcmfmac.patch deleted file mode 100644 index d46b300..0000000 ---- a/package/kernel/mac80211/patches/366-brcmfmac-prohibit-ACPI-power-management-for-brcmfmac.patch +--- a/package/kernel/mac80211/patches/342-brcmfmac-prohibit-ACPI-power-management-for-brcmfmac.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: "Fu, Zhonghui" @@ -16478,10 +16715,10 @@ index d46b300..0000000 - /* Consume func num 1 but dont do anything with it. */ - if (func->num == 1) - return 0; -diff --git a/package/kernel/mac80211/patches/367-brcmfmac-avoid-gcc-5.1-warning.patch b/package/kernel/mac80211/patches/367-brcmfmac-avoid-gcc-5.1-warning.patch +diff --git a/package/kernel/mac80211/patches/343-brcmfmac-avoid-gcc-5.1-warning.patch b/package/kernel/mac80211/patches/343-brcmfmac-avoid-gcc-5.1-warning.patch deleted file mode 100644 index 9b4609f..0000000 ---- a/package/kernel/mac80211/patches/367-brcmfmac-avoid-gcc-5.1-warning.patch +--- a/package/kernel/mac80211/patches/343-brcmfmac-avoid-gcc-5.1-warning.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Arnd Bergmann @@ -16514,10 +16751,10 @@ index 9b4609f..0000000 - u32 slot_id, struct sk_buff **pktout, - bool remove_item) - { -diff --git a/package/kernel/mac80211/patches/368-brcmfmac-allow-device-tree-node-without-interrupts-p.patch b/package/kernel/mac80211/patches/368-brcmfmac-allow-device-tree-node-without-interrupts-p.patch +diff --git a/package/kernel/mac80211/patches/344-0001-brcmfmac-allow-device-tree-node-without-interrupts-p.patch b/package/kernel/mac80211/patches/344-0001-brcmfmac-allow-device-tree-node-without-interrupts-p.patch deleted file mode 100644 index b16782d..0000000 ---- a/package/kernel/mac80211/patches/368-brcmfmac-allow-device-tree-node-without-interrupts-p.patch +--- a/package/kernel/mac80211/patches/344-0001-brcmfmac-allow-device-tree-node-without-interrupts-p.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Arend van Spriel @@ -16565,10 +16802,10 @@ index b16782d..0000000 -- if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0) -- sdiodev->pdata->drive_strength = val; - } -diff --git a/package/kernel/mac80211/patches/369-brcmfmac-Improve-throughput-by-scheduling-msbug-flow.patch b/package/kernel/mac80211/patches/369-brcmfmac-Improve-throughput-by-scheduling-msbug-flow.patch +diff --git a/package/kernel/mac80211/patches/344-0002-brcmfmac-Improve-throughput-by-scheduling-msbug-flow.patch b/package/kernel/mac80211/patches/344-0002-brcmfmac-Improve-throughput-by-scheduling-msbug-flow.patch deleted file mode 100644 index f81250e..0000000 ---- a/package/kernel/mac80211/patches/369-brcmfmac-Improve-throughput-by-scheduling-msbug-flow.patch +--- a/package/kernel/mac80211/patches/344-0002-brcmfmac-Improve-throughput-by-scheduling-msbug-flow.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Hante Meuleman @@ -16658,10 +16895,10 @@ index f81250e..0000000 - - return 0; - } -diff --git a/package/kernel/mac80211/patches/370-brcmfmac-remove-pci-shared-structure-rev4-support.patch b/package/kernel/mac80211/patches/370-brcmfmac-remove-pci-shared-structure-rev4-support.patch +diff --git a/package/kernel/mac80211/patches/344-0003-brcmfmac-remove-pci-shared-structure-rev4-support.patch b/package/kernel/mac80211/patches/344-0003-brcmfmac-remove-pci-shared-structure-rev4-support.patch deleted file mode 100644 index 61153c4..0000000 ---- a/package/kernel/mac80211/patches/370-brcmfmac-remove-pci-shared-structure-rev4-support.patch +--- a/package/kernel/mac80211/patches/344-0003-brcmfmac-remove-pci-shared-structure-rev4-support.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Franky Lin @@ -16705,10 +16942,10 @@ index 61153c4..0000000 - - addr = sharedram_addr + BRCMF_SHARED_MAX_RXBUFPOST_OFFSET; - shared->max_rxbufpost = brcmf_pcie_read_tcm16(devinfo, addr); -diff --git a/package/kernel/mac80211/patches/371-brcmfmac-remove-dummy-cache-flush-invalidate-functio.patch b/package/kernel/mac80211/patches/371-brcmfmac-remove-dummy-cache-flush-invalidate-functio.patch +diff --git a/package/kernel/mac80211/patches/344-0004-brcmfmac-remove-dummy-cache-flush-invalidate-functio.patch b/package/kernel/mac80211/patches/344-0004-brcmfmac-remove-dummy-cache-flush-invalidate-functio.patch deleted file mode 100644 index 8c8eebe..0000000 ---- a/package/kernel/mac80211/patches/371-brcmfmac-remove-dummy-cache-flush-invalidate-functio.patch +--- a/package/kernel/mac80211/patches/344-0004-brcmfmac-remove-dummy-cache-flush-invalidate-functio.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: Franky Lin @@ -16831,10 +17068,10 @@ index 8c8eebe..0000000 - - addr = devinfo->shared.tcm_base_address + - BRCMF_SHARED_DMA_RINGUPD_ADDR_OFFSET; -diff --git a/package/kernel/mac80211/patches/372-brcmfmac-add-support-for-dma-indices-feature.patch b/package/kernel/mac80211/patches/372-brcmfmac-add-support-for-dma-indices-feature.patch +diff --git a/package/kernel/mac80211/patches/344-0005-brcmfmac-add-support-for-dma-indices-feature.patch b/package/kernel/mac80211/patches/344-0005-brcmfmac-add-support-for-dma-indices-feature.patch deleted file mode 100644 index 2f50abd..0000000 ---- a/package/kernel/mac80211/patches/372-brcmfmac-add-support-for-dma-indices-feature.patch +--- a/package/kernel/mac80211/patches/344-0005-brcmfmac-add-support-for-dma-indices-feature.patch +++ /dev/null @@ -1,270 +0,0 @@ -From: Franky Lin @@ -17107,10 +17344,10 @@ index 2f50abd..0000000 - addr = sharedram_addr + BRCMF_SHARED_MAX_RXBUFPOST_OFFSET; - shared->max_rxbufpost = brcmf_pcie_read_tcm16(devinfo, addr); - if (shared->max_rxbufpost == 0) -diff --git a/package/kernel/mac80211/patches/373-brcmfmac-avoid-null-pointer-access-when-brcmf_msgbuf.patch b/package/kernel/mac80211/patches/373-brcmfmac-avoid-null-pointer-access-when-brcmf_msgbuf.patch +diff --git a/package/kernel/mac80211/patches/345-brcmfmac-avoid-null-pointer-access-when-brcmf_msgbuf.patch b/package/kernel/mac80211/patches/345-brcmfmac-avoid-null-pointer-access-when-brcmf_msgbuf.patch deleted file mode 100644 index 28408d2..0000000 ---- a/package/kernel/mac80211/patches/373-brcmfmac-avoid-null-pointer-access-when-brcmf_msgbuf.patch +--- a/package/kernel/mac80211/patches/345-brcmfmac-avoid-null-pointer-access-when-brcmf_msgbuf.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: Arend van Spriel @@ -17215,10 +17452,10 @@ index 28408d2..0000000 - - if (data_offset) - skb_pull(skb, data_offset); -diff --git a/package/kernel/mac80211/patches/374-brcmfmac-fix-invalid-access-to-struct-acpi_device-fi.patch b/package/kernel/mac80211/patches/374-brcmfmac-fix-invalid-access-to-struct-acpi_device-fi.patch +diff --git a/package/kernel/mac80211/patches/346-brcmfmac-fix-invalid-access-to-struct-acpi_device-fi.patch b/package/kernel/mac80211/patches/346-brcmfmac-fix-invalid-access-to-struct-acpi_device-fi.patch deleted file mode 100644 index f023034..0000000 ---- a/package/kernel/mac80211/patches/374-brcmfmac-fix-invalid-access-to-struct-acpi_device-fi.patch +--- a/package/kernel/mac80211/patches/346-brcmfmac-fix-invalid-access-to-struct-acpi_device-fi.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Arend van Spriel @@ -17284,10 +17521,10 @@ index f023034..0000000 - - /* Consume func num 1 but dont do anything with it. */ - if (func->num == 1) -diff --git a/package/kernel/mac80211/patches/375-brcmfmac-simplify-check-stripping-v2-NVRAM.patch b/package/kernel/mac80211/patches/375-brcmfmac-simplify-check-stripping-v2-NVRAM.patch +diff --git a/package/kernel/mac80211/patches/347-brcmfmac-simplify-check-stripping-v2-NVRAM.patch b/package/kernel/mac80211/patches/347-brcmfmac-simplify-check-stripping-v2-NVRAM.patch deleted file mode 100644 index 2bfd44f..0000000 ---- a/package/kernel/mac80211/patches/375-brcmfmac-simplify-check-stripping-v2-NVRAM.patch +--- a/package/kernel/mac80211/patches/347-brcmfmac-simplify-check-stripping-v2-NVRAM.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -17346,10 +17583,10 @@ index 2bfd44f..0000000 - while (nvp->nvram[i] != 0) { - nvram[j] = nvp->nvram[i]; - i++; -diff --git a/package/kernel/mac80211/patches/376-brcmfmac-simplify-check-finding-NVRAM-v1-device-path.patch b/package/kernel/mac80211/patches/376-brcmfmac-simplify-check-finding-NVRAM-v1-device-path.patch +diff --git a/package/kernel/mac80211/patches/348-brcmfmac-simplify-check-finding-NVRAM-v1-device-path.patch b/package/kernel/mac80211/patches/348-brcmfmac-simplify-check-finding-NVRAM-v1-device-path.patch deleted file mode 100644 index 0e65114..0000000 ---- a/package/kernel/mac80211/patches/376-brcmfmac-simplify-check-finding-NVRAM-v1-device-path.patch +--- a/package/kernel/mac80211/patches/348-brcmfmac-simplify-check-finding-NVRAM-v1-device-path.patch +++ /dev/null @@ -1,57 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -17409,10 +17646,10 @@ index 0e65114..0000000 - } - while (nvp->nvram[i] != 0) - i++; -diff --git a/package/kernel/mac80211/patches/377-brcmfmac-treat-0-as-end-of-comment-when-parsing-NVRA.patch b/package/kernel/mac80211/patches/377-brcmfmac-treat-0-as-end-of-comment-when-parsing-NVRA.patch +diff --git a/package/kernel/mac80211/patches/349-brcmfmac-treat-0-as-end-of-comment-when-parsing-NVRA.patch b/package/kernel/mac80211/patches/349-brcmfmac-treat-0-as-end-of-comment-when-parsing-NVRA.patch deleted file mode 100644 index dc174e5..0000000 ---- a/package/kernel/mac80211/patches/377-brcmfmac-treat-0-as-end-of-comment-when-parsing-NVRA.patch +--- a/package/kernel/mac80211/patches/349-brcmfmac-treat-0-as-end-of-comment-when-parsing-NVRA.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -17460,10 +17697,10 @@ index dc174e5..0000000 - return IDLE; - } - -diff --git a/package/kernel/mac80211/patches/378-brcmfmac-allow-NVRAM-values-to-contain-spaces.patch b/package/kernel/mac80211/patches/378-brcmfmac-allow-NVRAM-values-to-contain-spaces.patch +diff --git a/package/kernel/mac80211/patches/350-brcmfmac-allow-NVRAM-values-to-contain-spaces.patch b/package/kernel/mac80211/patches/350-brcmfmac-allow-NVRAM-values-to-contain-spaces.patch deleted file mode 100644 index 5700142..0000000 ---- a/package/kernel/mac80211/patches/378-brcmfmac-allow-NVRAM-values-to-contain-spaces.patch +--- a/package/kernel/mac80211/patches/350-brcmfmac-allow-NVRAM-values-to-contain-spaces.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -17516,10 +17753,10 @@ index 5700142..0000000 - brcmf_dbg(INFO, "warning: ln=%d:col=%d: '=' expected, skip invalid key entry\n", - nvp->line, nvp->column); - return COMMENT; -diff --git a/package/kernel/mac80211/patches/379-ath9k-fix-DMA-stop-sequence-for-AR9003.patch b/package/kernel/mac80211/patches/379-ath9k-fix-DMA-stop-sequence-for-AR9003.patch +diff --git a/package/kernel/mac80211/patches/351-ath9k-fix-DMA-stop-sequence-for-AR9003.patch b/package/kernel/mac80211/patches/351-ath9k-fix-DMA-stop-sequence-for-AR9003.patch deleted file mode 100644 index 814b0d7..0000000 ---- a/package/kernel/mac80211/patches/379-ath9k-fix-DMA-stop-sequence-for-AR9003.patch +--- a/package/kernel/mac80211/patches/351-ath9k-fix-DMA-stop-sequence-for-AR9003.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Felix Fietkau @@ -17555,10 +17792,10 @@ index 814b0d7..0000000 - - return ret; - } -diff --git a/package/kernel/mac80211/patches/380-brcmfmac-support-NVRAMs-containing-pci-devpaths-inst.patch b/package/kernel/mac80211/patches/380-brcmfmac-support-NVRAMs-containing-pci-devpaths-inst.patch +diff --git a/package/kernel/mac80211/patches/352-brcmfmac-support-NVRAMs-containing-pci-devpaths-inst.patch b/package/kernel/mac80211/patches/352-brcmfmac-support-NVRAMs-containing-pci-devpaths-inst.patch deleted file mode 100644 index 7bbd57e..0000000 ---- a/package/kernel/mac80211/patches/380-brcmfmac-support-NVRAMs-containing-pci-devpaths-inst.patch +--- a/package/kernel/mac80211/patches/352-brcmfmac-support-NVRAMs-containing-pci-devpaths-inst.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -17617,10 +17854,10 @@ index 7bbd57e..0000000 - id = nvp->nvram[i + 7] - '0'; - found = true; - break; -diff --git a/package/kernel/mac80211/patches/381-brcmfmac-set-wiphy-perm_addr-to-hardware-MAC-address.patch b/package/kernel/mac80211/patches/381-brcmfmac-set-wiphy-perm_addr-to-hardware-MAC-address.patch +diff --git a/package/kernel/mac80211/patches/353-brcmfmac-set-wiphy-perm_addr-to-hardware-MAC-address.patch b/package/kernel/mac80211/patches/353-brcmfmac-set-wiphy-perm_addr-to-hardware-MAC-address.patch deleted file mode 100644 index 1eff6ed..0000000 ---- a/package/kernel/mac80211/patches/381-brcmfmac-set-wiphy-perm_addr-to-hardware-MAC-address.patch +--- a/package/kernel/mac80211/patches/353-brcmfmac-set-wiphy-perm_addr-to-hardware-MAC-address.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -17646,10 +17883,10 @@ index 1eff6ed..0000000 - set_wiphy_dev(wiphy, busdev); - - cfg = wiphy_priv(wiphy); -diff --git a/package/kernel/mac80211/patches/382-brcmfmac-use-direct-data-pointer-in-NVRAM-parser-str.patch b/package/kernel/mac80211/patches/382-brcmfmac-use-direct-data-pointer-in-NVRAM-parser-str.patch +diff --git a/package/kernel/mac80211/patches/354-brcmfmac-use-direct-data-pointer-in-NVRAM-parser-str.patch b/package/kernel/mac80211/patches/354-brcmfmac-use-direct-data-pointer-in-NVRAM-parser-str.patch deleted file mode 100644 index c6e83dd..0000000 ---- a/package/kernel/mac80211/patches/382-brcmfmac-use-direct-data-pointer-in-NVRAM-parser-str.patch +--- a/package/kernel/mac80211/patches/354-brcmfmac-use-direct-data-pointer-in-NVRAM-parser-str.patch +++ /dev/null @@ -1,144 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -17796,10 +18033,10 @@ index c6e83dd..0000000 - fwctx->domain_nr, fwctx->bus_nr); - release_firmware(fw); - if (!nvram && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL)) -diff --git a/package/kernel/mac80211/patches/383-b43-fix-support-for-14e4-4321-PCI-dev-with-BCM4321-c.patch b/package/kernel/mac80211/patches/383-b43-fix-support-for-14e4-4321-PCI-dev-with-BCM4321-c.patch +diff --git a/package/kernel/mac80211/patches/355-b43-fix-support-for-14e4-4321-PCI-dev-with-BCM4321-c.patch b/package/kernel/mac80211/patches/355-b43-fix-support-for-14e4-4321-PCI-dev-with-BCM4321-c.patch deleted file mode 100644 index 4ecef3b..0000000 ---- a/package/kernel/mac80211/patches/383-b43-fix-support-for-14e4-4321-PCI-dev-with-BCM4321-c.patch +--- a/package/kernel/mac80211/patches/355-b43-fix-support-for-14e4-4321-PCI-dev-with-BCM4321-c.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -17834,10 +18071,10 @@ index 4ecef3b..0000000 - case 0x4313: /* BCM4311 */ - case 0x431a: /* BCM4318 */ - case 0x432a: /* BCM4321 */ -diff --git a/package/kernel/mac80211/patches/384-ath9k-force-rx_clear-when-disabling-rx.patch b/package/kernel/mac80211/patches/384-ath9k-force-rx_clear-when-disabling-rx.patch +diff --git a/package/kernel/mac80211/patches/356-ath9k-force-rx_clear-when-disabling-rx.patch b/package/kernel/mac80211/patches/356-ath9k-force-rx_clear-when-disabling-rx.patch deleted file mode 100644 index bddb15a..0000000 ---- a/package/kernel/mac80211/patches/384-ath9k-force-rx_clear-when-disabling-rx.patch +--- a/package/kernel/mac80211/patches/356-ath9k-force-rx_clear-when-disabling-rx.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Felix Fietkau @@ -17871,36 +18108,10 @@ index bddb15a..0000000 - - ath9k_hw_disable_mib_counters(ah); - } -diff --git a/package/kernel/mac80211/patches/385-ath9k_hw-fix-device-ID-check-for-AR956x.patch b/package/kernel/mac80211/patches/385-ath9k_hw-fix-device-ID-check-for-AR956x.patch -deleted file mode 100644 -index 2674efb..0000000 ---- a/package/kernel/mac80211/patches/385-ath9k_hw-fix-device-ID-check-for-AR956x.patch -+++ /dev/null -@@ -1,20 +0,0 @@ --From: Felix Fietkau --Date: Sun, 21 Jun 2015 19:45:59 +0200 --Subject: [PATCH] ath9k_hw: fix device ID check for AR956x -- --Because of the missing return, the macVersion value was being --overwritten with an invalid register read -- --Signed-off-by: Felix Fietkau ----- -- ----- a/drivers/net/wireless/ath/ath9k/hw.c --+++ b/drivers/net/wireless/ath/ath9k/hw.c --@@ -278,6 +278,7 @@ static void ath9k_hw_read_revisions(stru -- return; -- case AR9300_DEVID_QCA956X: -- ah->hw_version.macVersion = AR_SREV_VERSION_9561; --+ return; -- } -- -- val = REG_READ(ah, AR_SREV) & AR_SREV_ID; -diff --git a/package/kernel/mac80211/patches/385-brcmfmac-Update-msgbuf-read-pointer-quicker.patch b/package/kernel/mac80211/patches/385-brcmfmac-Update-msgbuf-read-pointer-quicker.patch +diff --git a/package/kernel/mac80211/patches/357-0001-brcmfmac-Update-msgbuf-read-pointer-quicker.patch b/package/kernel/mac80211/patches/357-0001-brcmfmac-Update-msgbuf-read-pointer-quicker.patch deleted file mode 100644 index 74df9f9..0000000 ---- a/package/kernel/mac80211/patches/385-brcmfmac-Update-msgbuf-read-pointer-quicker.patch +--- a/package/kernel/mac80211/patches/357-0001-brcmfmac-Update-msgbuf-read-pointer-quicker.patch +++ /dev/null @@ -1,109 +0,0 @@ -From: Hante Meuleman @@ -18012,10 +18223,10 @@ index 74df9f9..0000000 - - if (commonring->r_ptr == 0) - goto again; -diff --git a/package/kernel/mac80211/patches/386-brcmfmac-remove-chipinfo-debugfs-entry.patch b/package/kernel/mac80211/patches/386-brcmfmac-remove-chipinfo-debugfs-entry.patch +diff --git a/package/kernel/mac80211/patches/357-0002-brcmfmac-remove-chipinfo-debugfs-entry.patch b/package/kernel/mac80211/patches/357-0002-brcmfmac-remove-chipinfo-debugfs-entry.patch deleted file mode 100644 index 9e5b486..0000000 ---- a/package/kernel/mac80211/patches/386-brcmfmac-remove-chipinfo-debugfs-entry.patch +--- a/package/kernel/mac80211/patches/357-0002-brcmfmac-remove-chipinfo-debugfs-entry.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Arend van Spriel @@ -18057,10 +18268,10 @@ index 9e5b486..0000000 - - return PTR_ERR_OR_ZERO(drvr->dbgfs_dir); - } -diff --git a/package/kernel/mac80211/patches/387-brcmfmac-remove-watchdog-reset-from-brcmf_pcie_busco.patch b/package/kernel/mac80211/patches/387-brcmfmac-remove-watchdog-reset-from-brcmf_pcie_busco.patch +diff --git a/package/kernel/mac80211/patches/357-0003-brcmfmac-remove-watchdog-reset-from-brcmf_pcie_busco.patch b/package/kernel/mac80211/patches/357-0003-brcmfmac-remove-watchdog-reset-from-brcmf_pcie_busco.patch deleted file mode 100644 index c38b2cd..0000000 ---- a/package/kernel/mac80211/patches/387-brcmfmac-remove-watchdog-reset-from-brcmf_pcie_busco.patch +--- a/package/kernel/mac80211/patches/357-0003-brcmfmac-remove-watchdog-reset-from-brcmf_pcie_busco.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: Arend van Spriel @@ -18116,10 +18327,10 @@ index c38b2cd..0000000 - - kfree(bus->bus_priv.pcie); - kfree(bus->msgbuf->flowrings); -diff --git a/package/kernel/mac80211/patches/388-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch b/package/kernel/mac80211/patches/388-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch +diff --git a/package/kernel/mac80211/patches/357-0004-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch b/package/kernel/mac80211/patches/357-0004-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch deleted file mode 100644 index 756fbb2..0000000 ---- a/package/kernel/mac80211/patches/388-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch +--- a/package/kernel/mac80211/patches/357-0004-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch +++ /dev/null @@ -1,69 +0,0 @@ -From: Arend van Spriel @@ -18191,10 +18402,36 @@ index 756fbb2..0000000 -+ drvr->dbgfs_dir, read_fn); -+ return PTR_ERR_OR_ZERO(e); - } -diff --git a/package/kernel/mac80211/patches/389-0001-brcmfmac-Check-if-firmware-supports-p2p.patch b/package/kernel/mac80211/patches/389-0001-brcmfmac-Check-if-firmware-supports-p2p.patch +diff --git a/package/kernel/mac80211/patches/358-ath9k_hw-fix-device-ID-check-for-AR956x.patch b/package/kernel/mac80211/patches/358-ath9k_hw-fix-device-ID-check-for-AR956x.patch +deleted file mode 100644 +index 2674efb..0000000 +--- a/package/kernel/mac80211/patches/358-ath9k_hw-fix-device-ID-check-for-AR956x.patch ++++ /dev/null +@@ -1,20 +0,0 @@ +-From: Felix Fietkau +-Date: Sun, 21 Jun 2015 19:45:59 +0200 +-Subject: [PATCH] ath9k_hw: fix device ID check for AR956x +- +-Because of the missing return, the macVersion value was being +-overwritten with an invalid register read +- +-Signed-off-by: Felix Fietkau +---- +- +---- a/drivers/net/wireless/ath/ath9k/hw.c +-+++ b/drivers/net/wireless/ath/ath9k/hw.c +-@@ -278,6 +278,7 @@ static void ath9k_hw_read_revisions(stru +- return; +- case AR9300_DEVID_QCA956X: +- ah->hw_version.macVersion = AR_SREV_VERSION_9561; +-+ return; +- } +- +- val = REG_READ(ah, AR_SREV) & AR_SREV_ID; +diff --git a/package/kernel/mac80211/patches/359-0001-brcmfmac-Check-if-firmware-supports-p2p.patch b/package/kernel/mac80211/patches/359-0001-brcmfmac-Check-if-firmware-supports-p2p.patch deleted file mode 100644 index ff24a4a..0000000 ---- a/package/kernel/mac80211/patches/389-0001-brcmfmac-Check-if-firmware-supports-p2p.patch +--- a/package/kernel/mac80211/patches/359-0001-brcmfmac-Check-if-firmware-supports-p2p.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Pontus Fuchs @@ -18239,10 +18476,10 @@ index ff24a4a..0000000 - /* - * Quirks: - * -diff --git a/package/kernel/mac80211/patches/389-0002-brcmfmac-Build-wiphy-mode-and-interface-combinations.patch b/package/kernel/mac80211/patches/389-0002-brcmfmac-Build-wiphy-mode-and-interface-combinations.patch +diff --git a/package/kernel/mac80211/patches/359-0002-brcmfmac-Build-wiphy-mode-and-interface-combinations.patch b/package/kernel/mac80211/patches/359-0002-brcmfmac-Build-wiphy-mode-and-interface-combinations.patch deleted file mode 100644 index 3876ba0..0000000 ---- a/package/kernel/mac80211/patches/389-0002-brcmfmac-Build-wiphy-mode-and-interface-combinations.patch +--- a/package/kernel/mac80211/patches/359-0002-brcmfmac-Build-wiphy-mode-and-interface-combinations.patch +++ /dev/null @@ -1,198 +0,0 @@ -From: Pontus Fuchs @@ -18443,10 +18680,10 @@ index 3876ba0..0000000 - kfree(wiphy->iface_combinations); - if (wiphy->bands[IEEE80211_BAND_2GHZ]) { - kfree(wiphy->bands[IEEE80211_BAND_2GHZ]->channels); -diff --git a/package/kernel/mac80211/patches/389-0003-brcmfmac-rework-.get_station-callback.patch b/package/kernel/mac80211/patches/389-0003-brcmfmac-rework-.get_station-callback.patch +diff --git a/package/kernel/mac80211/patches/359-0003-brcmfmac-rework-.get_station-callback.patch b/package/kernel/mac80211/patches/359-0003-brcmfmac-rework-.get_station-callback.patch deleted file mode 100644 index 7bd0686..0000000 ---- a/package/kernel/mac80211/patches/389-0003-brcmfmac-rework-.get_station-callback.patch +--- a/package/kernel/mac80211/patches/359-0003-brcmfmac-rework-.get_station-callback.patch +++ /dev/null @@ -1,326 +0,0 @@ -From: Arend van Spriel @@ -18775,10 +19012,10 @@ index 7bd0686..0000000 - }; - - struct brcmf_chanspec_list { -diff --git a/package/kernel/mac80211/patches/389-0004-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch b/package/kernel/mac80211/patches/389-0004-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch +diff --git a/package/kernel/mac80211/patches/359-0004-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch b/package/kernel/mac80211/patches/359-0004-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch deleted file mode 100644 index 302bc3e..0000000 ---- a/package/kernel/mac80211/patches/389-0004-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch +--- a/package/kernel/mac80211/patches/359-0004-brcmfmac-have-sdio-return-EIO-when-device-communicat.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: Arend van Spriel @@ -18837,10 +19074,10 @@ index 302bc3e..0000000 - - /* Wait until control frame is available */ - timeleft = brcmf_sdio_dcmd_resp_wait(bus, &bus->rxlen, &pending); -diff --git a/package/kernel/mac80211/patches/389-0005-ath9k-make-DMA-stop-related-messages-debug-only.patch b/package/kernel/mac80211/patches/389-0005-ath9k-make-DMA-stop-related-messages-debug-only.patch +diff --git a/package/kernel/mac80211/patches/359-0005-ath9k-make-DMA-stop-related-messages-debug-only.patch b/package/kernel/mac80211/patches/359-0005-ath9k-make-DMA-stop-related-messages-debug-only.patch deleted file mode 100644 index 34af6d2..0000000 ---- a/package/kernel/mac80211/patches/389-0005-ath9k-make-DMA-stop-related-messages-debug-only.patch +--- a/package/kernel/mac80211/patches/359-0005-ath9k-make-DMA-stop-related-messages-debug-only.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: Felix Fietkau @@ -18917,10 +19154,10 @@ index 34af6d2..0000000 - - for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { - if (!ATH_TXQ_SETUP(sc, i)) -diff --git a/package/kernel/mac80211/patches/389-0006-brcmfmac-free-ifp-for-non-netdev-interface-in-p2p-mo.patch b/package/kernel/mac80211/patches/389-0006-brcmfmac-free-ifp-for-non-netdev-interface-in-p2p-mo.patch +diff --git a/package/kernel/mac80211/patches/359-0006-brcmfmac-free-ifp-for-non-netdev-interface-in-p2p-mo.patch b/package/kernel/mac80211/patches/359-0006-brcmfmac-free-ifp-for-non-netdev-interface-in-p2p-mo.patch deleted file mode 100644 index 06f2dce..0000000 ---- a/package/kernel/mac80211/patches/389-0006-brcmfmac-free-ifp-for-non-netdev-interface-in-p2p-mo.patch +--- a/package/kernel/mac80211/patches/359-0006-brcmfmac-free-ifp-for-non-netdev-interface-in-p2p-mo.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Arend van Spriel @@ -18967,10 +19204,10 @@ index 06f2dce..0000000 - brcmf_p2p_delete_p2pdev(p2p, vif); - return 0; - default: -diff --git a/package/kernel/mac80211/patches/389-0007-brcmfmac-move-p2p-attach-detach-functions.patch b/package/kernel/mac80211/patches/389-0007-brcmfmac-move-p2p-attach-detach-functions.patch +diff --git a/package/kernel/mac80211/patches/359-0007-brcmfmac-move-p2p-attach-detach-functions.patch b/package/kernel/mac80211/patches/359-0007-brcmfmac-move-p2p-attach-detach-functions.patch deleted file mode 100644 index 0a6e093..0000000 ---- a/package/kernel/mac80211/patches/389-0007-brcmfmac-move-p2p-attach-detach-functions.patch +--- a/package/kernel/mac80211/patches/359-0007-brcmfmac-move-p2p-attach-detach-functions.patch +++ /dev/null @@ -1,225 +0,0 @@ -From: Arend van Spriel @@ -19198,10 +19435,10 @@ index 0a6e093..0000000 -+ memset(p2p, 0, sizeof(*p2p)); -+} -+ -diff --git a/package/kernel/mac80211/patches/389-0008-brcmfmac-assure-p2pdev-is-unregistered-upon-driver-u.patch b/package/kernel/mac80211/patches/389-0008-brcmfmac-assure-p2pdev-is-unregistered-upon-driver-u.patch +diff --git a/package/kernel/mac80211/patches/359-0008-brcmfmac-assure-p2pdev-is-unregistered-upon-driver-u.patch b/package/kernel/mac80211/patches/359-0008-brcmfmac-assure-p2pdev-is-unregistered-upon-driver-u.patch deleted file mode 100644 index 72e8eed..0000000 ---- a/package/kernel/mac80211/patches/389-0008-brcmfmac-assure-p2pdev-is-unregistered-upon-driver-u.patch +--- a/package/kernel/mac80211/patches/359-0008-brcmfmac-assure-p2pdev-is-unregistered-upon-driver-u.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Arend van Spriel @@ -19267,10 +19504,10 @@ index 72e8eed..0000000 - } - /* just set it all to zero */ - memset(p2p, 0, sizeof(*p2p)); -diff --git a/package/kernel/mac80211/patches/390-0001-brcmfmac-fix-double-free-of-p2pdev-interface.patch b/package/kernel/mac80211/patches/390-0001-brcmfmac-fix-double-free-of-p2pdev-interface.patch +diff --git a/package/kernel/mac80211/patches/360-0001-brcmfmac-fix-double-free-of-p2pdev-interface.patch b/package/kernel/mac80211/patches/360-0001-brcmfmac-fix-double-free-of-p2pdev-interface.patch deleted file mode 100644 index 179c77e..0000000 ---- a/package/kernel/mac80211/patches/390-0001-brcmfmac-fix-double-free-of-p2pdev-interface.patch +--- a/package/kernel/mac80211/patches/360-0001-brcmfmac-fix-double-free-of-p2pdev-interface.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Arend van Spriel @@ -19300,10 +19537,10 @@ index 179c77e..0000000 - brcmf_free_vif(vif); - } - -diff --git a/package/kernel/mac80211/patches/390-0002-brcmfmac-make-brcmf_p2p_detach-call-conditional.patch b/package/kernel/mac80211/patches/390-0002-brcmfmac-make-brcmf_p2p_detach-call-conditional.patch +diff --git a/package/kernel/mac80211/patches/360-0002-brcmfmac-make-brcmf_p2p_detach-call-conditional.patch b/package/kernel/mac80211/patches/360-0002-brcmfmac-make-brcmf_p2p_detach-call-conditional.patch deleted file mode 100644 index e4f88b5..0000000 ---- a/package/kernel/mac80211/patches/390-0002-brcmfmac-make-brcmf_p2p_detach-call-conditional.patch +--- a/package/kernel/mac80211/patches/360-0002-brcmfmac-make-brcmf_p2p_detach-call-conditional.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Arend van Spriel @@ -19335,10 +19572,10 @@ index e4f88b5..0000000 - - brcmf_bus_change_state(bus_if, BRCMF_BUS_DOWN); - -diff --git a/package/kernel/mac80211/patches/391-brcmfmac-set-wiphy-s-addresses-to-provide-valid-MACs.patch b/package/kernel/mac80211/patches/391-brcmfmac-set-wiphy-s-addresses-to-provide-valid-MACs.patch +diff --git a/package/kernel/mac80211/patches/361-brcmfmac-set-wiphy-s-addresses-to-provide-valid-MACs.patch b/package/kernel/mac80211/patches/361-brcmfmac-set-wiphy-s-addresses-to-provide-valid-MACs.patch deleted file mode 100644 index 0a81237..0000000 ---- a/package/kernel/mac80211/patches/391-brcmfmac-set-wiphy-s-addresses-to-provide-valid-MACs.patch +--- a/package/kernel/mac80211/patches/361-brcmfmac-set-wiphy-s-addresses-to-provide-valid-MACs.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Rafa? Mi?ecki @@ -19408,10 +19645,10 @@ index 0a81237..0000000 - struct brcmf_if *iflist[BRCMF_MAX_IFS]; - - struct mutex proto_block; -diff --git a/package/kernel/mac80211/patches/392-brcmfmac-dhd_sdio.c-use-existing-atomic_or-primitive.patch b/package/kernel/mac80211/patches/392-brcmfmac-dhd_sdio.c-use-existing-atomic_or-primitive.patch +diff --git a/package/kernel/mac80211/patches/362-brcmfmac-dhd_sdio.c-use-existing-atomic_or-primitive.patch b/package/kernel/mac80211/patches/362-brcmfmac-dhd_sdio.c-use-existing-atomic_or-primitive.patch deleted file mode 100644 index e44f121..0000000 ---- a/package/kernel/mac80211/patches/392-brcmfmac-dhd_sdio.c-use-existing-atomic_or-primitive.patch +--- a/package/kernel/mac80211/patches/362-brcmfmac-dhd_sdio.c-use-existing-atomic_or-primitive.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Vineet Gupta @@ -19459,10 +19696,10 @@ index e44f121..0000000 - - brcmf_sdio_clrintr(bus); - -diff --git a/package/kernel/mac80211/patches/393-0001-brcmfmac-check-all-combinations-when-setting-wiphy-s.patch b/package/kernel/mac80211/patches/393-0001-brcmfmac-check-all-combinations-when-setting-wiphy-s.patch +diff --git a/package/kernel/mac80211/patches/363-0001-brcmfmac-check-all-combinations-when-setting-wiphy-s.patch b/package/kernel/mac80211/patches/363-0001-brcmfmac-check-all-combinations-when-setting-wiphy-s.patch deleted file mode 100644 index 76ca143..0000000 ---- a/package/kernel/mac80211/patches/393-0001-brcmfmac-check-all-combinations-when-setting-wiphy-s.patch +--- a/package/kernel/mac80211/patches/363-0001-brcmfmac-check-all-combinations-when-setting-wiphy-s.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= @@ -19511,10 +19748,10 @@ index 76ca143..0000000 - u8 *addr = drvr->addresses[i].addr; - - memcpy(addr, drvr->mac, ETH_ALEN); -diff --git a/package/kernel/mac80211/patches/393-0002-brcmfmac-correct-interface-combination-info.patch b/package/kernel/mac80211/patches/393-0002-brcmfmac-correct-interface-combination-info.patch +diff --git a/package/kernel/mac80211/patches/363-0002-brcmfmac-correct-interface-combination-info.patch b/package/kernel/mac80211/patches/363-0002-brcmfmac-correct-interface-combination-info.patch deleted file mode 100644 index c4a0720..0000000 ---- a/package/kernel/mac80211/patches/393-0002-brcmfmac-correct-interface-combination-info.patch +--- a/package/kernel/mac80211/patches/363-0002-brcmfmac-correct-interface-combination-info.patch +++ /dev/null @@ -1,204 +0,0 @@ -From: Arend van Spriel @@ -19721,10 +19958,10 @@ index c4a0720..0000000 - kfree(wiphy->iface_combinations); - if (wiphy->bands[IEEE80211_BAND_2GHZ]) { - kfree(wiphy->bands[IEEE80211_BAND_2GHZ]->channels); -diff --git a/package/kernel/mac80211/patches/393-0003-brcmfmac-add-debugfs-entry-for-msgbuf-statistics.patch b/package/kernel/mac80211/patches/393-0003-brcmfmac-add-debugfs-entry-for-msgbuf-statistics.patch +diff --git a/package/kernel/mac80211/patches/363-0003-brcmfmac-add-debugfs-entry-for-msgbuf-statistics.patch b/package/kernel/mac80211/patches/363-0003-brcmfmac-add-debugfs-entry-for-msgbuf-statistics.patch deleted file mode 100644 index 9768ef2..0000000 ---- a/package/kernel/mac80211/patches/393-0003-brcmfmac-add-debugfs-entry-for-msgbuf-statistics.patch +--- a/package/kernel/mac80211/patches/363-0003-brcmfmac-add-debugfs-entry-for-msgbuf-statistics.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Franky Lin @@ -19814,10 +20051,10 @@ index 9768ef2..0000000 - return 0; - - fail: -diff --git a/package/kernel/mac80211/patches/393-0004-brcmfmac-make-use-of-cfg80211_check_combinations.patch b/package/kernel/mac80211/patches/393-0004-brcmfmac-make-use-of-cfg80211_check_combinations.patch +diff --git a/package/kernel/mac80211/patches/363-0004-brcmfmac-make-use-of-cfg80211_check_combinations.patch b/package/kernel/mac80211/patches/363-0004-brcmfmac-make-use-of-cfg80211_check_combinations.patch deleted file mode 100644 index 2b84cf9..0000000 ---- a/package/kernel/mac80211/patches/393-0004-brcmfmac-make-use-of-cfg80211_check_combinations.patch +--- a/package/kernel/mac80211/patches/363-0004-brcmfmac-make-use-of-cfg80211_check_combinations.patch +++ /dev/null @@ -1,83 +0,0 @@ -From: Arend van Spriel @@ -19903,10 +20140,10 @@ index 2b84cf9..0000000 - switch (type) { - case NL80211_IFTYPE_MONITOR: - case NL80211_IFTYPE_WDS: -diff --git a/package/kernel/mac80211/patches/393-0005-brcmfmac-block-the-correct-flowring-when-backup-queu.patch b/package/kernel/mac80211/patches/393-0005-brcmfmac-block-the-correct-flowring-when-backup-queu.patch +diff --git a/package/kernel/mac80211/patches/363-0005-brcmfmac-block-the-correct-flowring-when-backup-queu.patch b/package/kernel/mac80211/patches/363-0005-brcmfmac-block-the-correct-flowring-when-backup-queu.patch deleted file mode 100644 index 2d5f7b9..0000000 ---- a/package/kernel/mac80211/patches/393-0005-brcmfmac-block-the-correct-flowring-when-backup-queu.patch +--- a/package/kernel/mac80211/patches/363-0005-brcmfmac-block-the-correct-flowring-when-backup-queu.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Franky Lin @@ -19957,10 +20194,10 @@ index 2d5f7b9..0000000 - spin_unlock_irqrestore(&flow->block_lock, flags); - return; - } -diff --git a/package/kernel/mac80211/patches/393-0006-brcmfmac-bump-highest-event-number-for-4339-firmware.patch b/package/kernel/mac80211/patches/393-0006-brcmfmac-bump-highest-event-number-for-4339-firmware.patch +diff --git a/package/kernel/mac80211/patches/363-0006-brcmfmac-bump-highest-event-number-for-4339-firmware.patch b/package/kernel/mac80211/patches/363-0006-brcmfmac-bump-highest-event-number-for-4339-firmware.patch deleted file mode 100644 index 7378401..0000000 ---- a/package/kernel/mac80211/patches/393-0006-brcmfmac-bump-highest-event-number-for-4339-firmware.patch +--- a/package/kernel/mac80211/patches/363-0006-brcmfmac-bump-highest-event-number-for-4339-firmware.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Arend van Spriel @@ -20015,10 +20252,10 @@ index 7378401..0000000 - }; - #undef BRCMF_ENUM_DEF - -diff --git a/package/kernel/mac80211/patches/394-0001-brcmfmac-consolidate-ifp-lookup-in-driver-core.patch b/package/kernel/mac80211/patches/394-0001-brcmfmac-consolidate-ifp-lookup-in-driver-core.patch +diff --git a/package/kernel/mac80211/patches/365-0001-brcmfmac-consolidate-ifp-lookup-in-driver-core.patch b/package/kernel/mac80211/patches/365-0001-brcmfmac-consolidate-ifp-lookup-in-driver-core.patch deleted file mode 100644 index 97444b3..0000000 ---- a/package/kernel/mac80211/patches/394-0001-brcmfmac-consolidate-ifp-lookup-in-driver-core.patch +--- a/package/kernel/mac80211/patches/365-0001-brcmfmac-consolidate-ifp-lookup-in-driver-core.patch +++ /dev/null @@ -1,138 +0,0 @@ -From: Arend van Spriel @@ -20159,10 +20396,10 @@ index 97444b3..0000000 - brcmf_err("Received pkt for invalid ifidx %d\n", ifidx); - brcmu_pkt_buf_free_skb(skb); - return; -diff --git a/package/kernel/mac80211/patches/394-0002-brcmfmac-make-brcmf_proto_hdrpull-return-struct-brcm.patch b/package/kernel/mac80211/patches/394-0002-brcmfmac-make-brcmf_proto_hdrpull-return-struct-brcm.patch +diff --git a/package/kernel/mac80211/patches/365-0002-brcmfmac-make-brcmf_proto_hdrpull-return-struct-brcm.patch b/package/kernel/mac80211/patches/365-0002-brcmfmac-make-brcmf_proto_hdrpull-return-struct-brcm.patch deleted file mode 100644 index 632714c..0000000 ---- a/package/kernel/mac80211/patches/394-0002-brcmfmac-make-brcmf_proto_hdrpull-return-struct-brcm.patch +--- a/package/kernel/mac80211/patches/365-0002-brcmfmac-make-brcmf_proto_hdrpull-return-struct-brcm.patch +++ /dev/null @@ -1,222 +0,0 @@ -From: Arend van Spriel @@ -20387,10 +20624,10 @@ index 632714c..0000000 - } - static inline int brcmf_proto_query_dcmd(struct brcmf_pub *drvr, int ifidx, - uint cmd, void *buf, uint len) -diff --git a/package/kernel/mac80211/patches/394-0003-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch b/package/kernel/mac80211/patches/394-0003-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch +diff --git a/package/kernel/mac80211/patches/365-0003-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch b/package/kernel/mac80211/patches/365-0003-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch deleted file mode 100644 index 2d15a77..0000000 ---- a/package/kernel/mac80211/patches/394-0003-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch +--- a/package/kernel/mac80211/patches/365-0003-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Arend van Spriel @@ -20480,10 +20717,10 @@ index 2d15a77..0000000 - brcmf_free_vif(vif); - } - -diff --git a/package/kernel/mac80211/patches/394-0004-brcmfmac-only-call-brcmf_cfg80211_detach-when-attach.patch b/package/kernel/mac80211/patches/394-0004-brcmfmac-only-call-brcmf_cfg80211_detach-when-attach.patch +diff --git a/package/kernel/mac80211/patches/365-0004-brcmfmac-only-call-brcmf_cfg80211_detach-when-attach.patch b/package/kernel/mac80211/patches/365-0004-brcmfmac-only-call-brcmf_cfg80211_detach-when-attach.patch deleted file mode 100644 index 2b61f4e..0000000 ---- a/package/kernel/mac80211/patches/394-0004-brcmfmac-only-call-brcmf_cfg80211_detach-when-attach.patch +--- a/package/kernel/mac80211/patches/365-0004-brcmfmac-only-call-brcmf_cfg80211_detach-when-attach.patch +++ /dev/null @@ -1,92 +0,0 @@ -From: Arend van Spriel @@ -20578,10 +20815,10 @@ index 2b61f4e..0000000 - if (drvr->fws) { - brcmf_fws_del_interface(ifp); - brcmf_fws_deinit(drvr); -diff --git a/package/kernel/mac80211/patches/394-0005-brcmfmac-correct-detection-of-p2pdev-interface-event.patch b/package/kernel/mac80211/patches/394-0005-brcmfmac-correct-detection-of-p2pdev-interface-event.patch +diff --git a/package/kernel/mac80211/patches/365-0005-brcmfmac-correct-detection-of-p2pdev-interface-event.patch b/package/kernel/mac80211/patches/365-0005-brcmfmac-correct-detection-of-p2pdev-interface-event.patch deleted file mode 100644 index 868b0a8..0000000 ---- a/package/kernel/mac80211/patches/394-0005-brcmfmac-correct-detection-of-p2pdev-interface-event.patch +--- a/package/kernel/mac80211/patches/365-0005-brcmfmac-correct-detection-of-p2pdev-interface-event.patch +++ /dev/null @@ -1,105 +0,0 @@ -From: Arend van Spriel @@ -20689,10 +20926,10 @@ index 868b0a8..0000000 - if (IS_ERR(ifp)) - return; - brcmf_fws_add_interface(ifp); -diff --git a/package/kernel/mac80211/patches/394-0006-brcmfmac-use-brcmf_get_ifp-to-map-ifidx-to-struct-br.patch b/package/kernel/mac80211/patches/394-0006-brcmfmac-use-brcmf_get_ifp-to-map-ifidx-to-struct-br.patch +diff --git a/package/kernel/mac80211/patches/365-0006-brcmfmac-use-brcmf_get_ifp-to-map-ifidx-to-struct-br.patch b/package/kernel/mac80211/patches/365-0006-brcmfmac-use-brcmf_get_ifp-to-map-ifidx-to-struct-br.patch deleted file mode 100644 index aebbfa6..0000000 ---- a/package/kernel/mac80211/patches/394-0006-brcmfmac-use-brcmf_get_ifp-to-map-ifidx-to-struct-br.patch +--- a/package/kernel/mac80211/patches/365-0006-brcmfmac-use-brcmf_get_ifp-to-map-ifidx-to-struct-br.patch +++ /dev/null @@ -1,126 +0,0 @@ -From: Arend van Spriel @@ -20821,10 +21058,10 @@ index aebbfa6..0000000 - "wlfc_mode", mode) == 0) { - BRCMF_FWS_MODE_SET_REUSESEQ(fws->mode, 1); - } -diff --git a/package/kernel/mac80211/patches/394-0007-brcmfmac-pass-struct-brcmf_if-instance-in-brcmf_txfi.patch b/package/kernel/mac80211/patches/394-0007-brcmfmac-pass-struct-brcmf_if-instance-in-brcmf_txfi.patch +diff --git a/package/kernel/mac80211/patches/365-0007-brcmfmac-pass-struct-brcmf_if-instance-in-brcmf_txfi.patch b/package/kernel/mac80211/patches/365-0007-brcmfmac-pass-struct-brcmf_if-instance-in-brcmf_txfi.patch deleted file mode 100644 index 23a7b6f..0000000 ---- a/package/kernel/mac80211/patches/394-0007-brcmfmac-pass-struct-brcmf_if-instance-in-brcmf_txfi.patch +--- a/package/kernel/mac80211/patches/365-0007-brcmfmac-pass-struct-brcmf_if-instance-in-brcmf_txfi.patch +++ /dev/null @@ -1,122 +0,0 @@ -From: Arend van Spriel @@ -20949,10 +21186,10 @@ index 23a7b6f..0000000 - } - - -diff --git a/package/kernel/mac80211/patches/394-0008-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch b/package/kernel/mac80211/patches/394-0008-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch +diff --git a/package/kernel/mac80211/patches/365-0008-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch b/package/kernel/mac80211/patches/365-0008-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch deleted file mode 100644 index 8ddc0a6..0000000 ---- a/package/kernel/mac80211/patches/394-0008-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch +--- a/package/kernel/mac80211/patches/365-0008-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch +++ /dev/null @@ -1,92 +0,0 @@ -From: Arend van Spriel @@ -21047,10 +21284,10 @@ index 8ddc0a6..0000000 - - struct mutex proto_block; - unsigned char proto_buf[BRCMF_DCMD_MAXLEN]; -diff --git a/package/kernel/mac80211/patches/394-0009-brcmfmac-add-dedicated-debug-level-for-firmware-cons.patch b/package/kernel/mac80211/patches/394-0009-brcmfmac-add-dedicated-debug-level-for-firmware-cons.patch +diff --git a/package/kernel/mac80211/patches/365-0009-brcmfmac-add-dedicated-debug-level-for-firmware-cons.patch b/package/kernel/mac80211/patches/365-0009-brcmfmac-add-dedicated-debug-level-for-firmware-cons.patch deleted file mode 100644 index a0a798b..0000000 ---- a/package/kernel/mac80211/patches/394-0009-brcmfmac-add-dedicated-debug-level-for-firmware-cons.patch +--- a/package/kernel/mac80211/patches/365-0009-brcmfmac-add-dedicated-debug-level-for-firmware-cons.patch +++ /dev/null @@ -1,103 +0,0 @@ -From: Arend van Spriel @@ -21156,10 +21393,10 @@ index a0a798b..0000000 - bus->console_interval != 0) { - bus->console.count += BRCMF_WD_POLL_MS; - if (bus->console.count >= bus->console_interval) { -diff --git a/package/kernel/mac80211/patches/394-0010-brcmfmac-remove-ifidx-parameter-from-brcmf_fws_txsta.patch b/package/kernel/mac80211/patches/394-0010-brcmfmac-remove-ifidx-parameter-from-brcmf_fws_txsta.patch +diff --git a/package/kernel/mac80211/patches/365-0010-brcmfmac-remove-ifidx-parameter-from-brcmf_fws_txsta.patch b/package/kernel/mac80211/patches/365-0010-brcmfmac-remove-ifidx-parameter-from-brcmf_fws_txsta.patch deleted file mode 100644 index 53e7ede..0000000 ---- a/package/kernel/mac80211/patches/394-0010-brcmfmac-remove-ifidx-parameter-from-brcmf_fws_txsta.patch +--- a/package/kernel/mac80211/patches/365-0010-brcmfmac-remove-ifidx-parameter-from-brcmf_fws_txsta.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Arend van Spriel @@ -21196,10 +21433,10 @@ index 53e7ede..0000000 - genbit, seq); - if (remove_from_hanger || ret) - brcmf_txfinalize(ifp, skb, true); -diff --git a/package/kernel/mac80211/patches/394-0011-brcmfmac-change-prototype-for-brcmf_fws_hdrpull.patch b/package/kernel/mac80211/patches/394-0011-brcmfmac-change-prototype-for-brcmf_fws_hdrpull.patch +diff --git a/package/kernel/mac80211/patches/365-0011-brcmfmac-change-prototype-for-brcmf_fws_hdrpull.patch b/package/kernel/mac80211/patches/365-0011-brcmfmac-change-prototype-for-brcmf_fws_hdrpull.patch deleted file mode 100644 index bb05235..0000000 ---- a/package/kernel/mac80211/patches/394-0011-brcmfmac-change-prototype-for-brcmf_fws_hdrpull.patch +--- a/package/kernel/mac80211/patches/365-0011-brcmfmac-change-prototype-for-brcmf_fws_hdrpull.patch +++ /dev/null @@ -1,97 +0,0 @@ -From: Arend van Spriel @@ -21299,10 +21536,10 @@ index bb05235..0000000 - int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb); - - void brcmf_fws_reset_interface(struct brcmf_if *ifp); -diff --git a/package/kernel/mac80211/patches/394-0012-brcmfmac-introduce-brcmf_net_detach-function.patch b/package/kernel/mac80211/patches/394-0012-brcmfmac-introduce-brcmf_net_detach-function.patch +diff --git a/package/kernel/mac80211/patches/365-0012-brcmfmac-introduce-brcmf_net_detach-function.patch b/package/kernel/mac80211/patches/365-0012-brcmfmac-introduce-brcmf_net_detach-function.patch deleted file mode 100644 index ba92c67..0000000 ---- a/package/kernel/mac80211/patches/394-0012-brcmfmac-introduce-brcmf_net_detach-function.patch +--- a/package/kernel/mac80211/patches/365-0012-brcmfmac-introduce-brcmf_net_detach-function.patch +++ /dev/null @@ -1,99 +0,0 @@ -From: Arend van Spriel @@ -21404,10 +21641,10 @@ index ba92c67..0000000 - drvr->iflist[1] = NULL; - } - return ret; -diff --git a/package/kernel/mac80211/patches/395-brcmfmac-Reset-PCIE-devices-after-recognition.patch b/package/kernel/mac80211/patches/395-brcmfmac-Reset-PCIE-devices-after-recognition.patch +diff --git a/package/kernel/mac80211/patches/366-brcmfmac-Reset-PCIE-devices-after-recognition.patch b/package/kernel/mac80211/patches/366-brcmfmac-Reset-PCIE-devices-after-recognition.patch deleted file mode 100644 index 5a7e447..0000000 ---- a/package/kernel/mac80211/patches/395-brcmfmac-Reset-PCIE-devices-after-recognition.patch +--- a/package/kernel/mac80211/patches/366-brcmfmac-Reset-PCIE-devices-after-recognition.patch +++ /dev/null @@ -1,193 +0,0 @@ -From: Hante Meuleman @@ -21603,10 +21840,10 @@ index 5a7e447..0000000 - - kfree(bus->bus_priv.pcie); - kfree(bus->msgbuf->flowrings); -diff --git a/package/kernel/mac80211/patches/396-ath10k-fix-DMA-related-firmware-crashes-on-multiple-.patch b/package/kernel/mac80211/patches/396-ath10k-fix-DMA-related-firmware-crashes-on-multiple-.patch +diff --git a/package/kernel/mac80211/patches/367-ath10k-fix-DMA-related-firmware-crashes-on-multiple-.patch b/package/kernel/mac80211/patches/367-ath10k-fix-DMA-related-firmware-crashes-on-multiple-.patch deleted file mode 100644 index f7b3e40..0000000 ---- a/package/kernel/mac80211/patches/396-ath10k-fix-DMA-related-firmware-crashes-on-multiple-.patch +--- a/package/kernel/mac80211/patches/367-ath10k-fix-DMA-related-firmware-crashes-on-multiple-.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Felix Fietkau @@ -21633,10 +21870,10 @@ index f7b3e40..0000000 - - /* Target specific defines for WMI-TLV firmware */ - #define TARGET_TLV_NUM_VDEVS 3 -diff --git a/package/kernel/mac80211/patches/397-ath9k-declare-required-extra-tx-headroom.patch b/package/kernel/mac80211/patches/397-ath9k-declare-required-extra-tx-headroom.patch +diff --git a/package/kernel/mac80211/patches/368-ath9k-declare-required-extra-tx-headroom.patch b/package/kernel/mac80211/patches/368-ath9k-declare-required-extra-tx-headroom.patch deleted file mode 100644 index c420d20..0000000 ---- a/package/kernel/mac80211/patches/397-ath9k-declare-required-extra-tx-headroom.patch +--- a/package/kernel/mac80211/patches/368-ath9k-declare-required-extra-tx-headroom.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Felix Fietkau @@ -21661,10 +21898,10 @@ index c420d20..0000000 - - hw->wiphy->available_antennas_rx = BIT(ah->caps.max_rxchains) - 1; - hw->wiphy->available_antennas_tx = BIT(ah->caps.max_txchains) - 1; -diff --git a/package/kernel/mac80211/patches/398-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch b/package/kernel/mac80211/patches/398-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch +diff --git a/package/kernel/mac80211/patches/369-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch b/package/kernel/mac80211/patches/369-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch deleted file mode 100644 index 1478efa..0000000 ---- a/package/kernel/mac80211/patches/398-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch +--- a/package/kernel/mac80211/patches/369-mac80211-initialize-tid-field-in-struct-ieee80211_tx.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Felix Fietkau @@ -21688,6 +21925,5737 @@ index 1478efa..0000000 - txqi->txq.ac = IEEE80211_AC_BE; - } - } +diff --git a/package/kernel/mac80211/patches/370-0001-brcmfmac-Fix-exception-handling.patch b/package/kernel/mac80211/patches/370-0001-brcmfmac-Fix-exception-handling.patch +deleted file mode 100644 +index bcd1031..0000000 +--- a/package/kernel/mac80211/patches/370-0001-brcmfmac-Fix-exception-handling.patch ++++ /dev/null +@@ -1,24 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:04 +0200 +-Subject: [PATCH] brcmfmac: Fix exception handling. +- +-In some exception situations the ifp->vif was not properly assigned +-which could result in crash. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -6331,6 +6331,7 @@ wiphy_unreg_out: +- priv_out: +- wl_deinit_priv(cfg); +- brcmf_free_vif(vif); +-+ ifp->vif = NULL; +- wiphy_out: +- brcmf_free_wiphy(wiphy); +- return NULL; +diff --git a/package/kernel/mac80211/patches/370-0002-brcmfmac-Add-support-for-the-BCM4350-PCIE-device.patch b/package/kernel/mac80211/patches/370-0002-brcmfmac-Add-support-for-the-BCM4350-PCIE-device.patch +deleted file mode 100644 +index f4ab77b..0000000 +--- a/package/kernel/mac80211/patches/370-0002-brcmfmac-Add-support-for-the-BCM4350-PCIE-device.patch ++++ /dev/null +@@ -1,81 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:05 +0200 +-Subject: [PATCH] brcmfmac: Add support for the BCM4350 PCIE device. +- +-This patch adds support fo the BRCM4350 2x2 11ac PCIE device. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/chip.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/chip.c +-@@ -647,6 +647,7 @@ static u32 brcmf_chip_tcm_rambase(struct +- return 0x198000; +- case BRCM_CC_4335_CHIP_ID: +- case BRCM_CC_4339_CHIP_ID: +-+ case BRCM_CC_4350_CHIP_ID: +- case BRCM_CC_4354_CHIP_ID: +- case BRCM_CC_4356_CHIP_ID: +- case BRCM_CC_43567_CHIP_ID: +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -47,6 +47,8 @@ enum brcmf_pcie_state { +- +- #define BRCMF_PCIE_43602_FW_NAME "brcm/brcmfmac43602-pcie.bin" +- #define BRCMF_PCIE_43602_NVRAM_NAME "brcm/brcmfmac43602-pcie.txt" +-+#define BRCMF_PCIE_4350_FW_NAME "brcm/brcmfmac4350-pcie.bin" +-+#define BRCMF_PCIE_4350_NVRAM_NAME "brcm/brcmfmac4350-pcie.txt" +- #define BRCMF_PCIE_4356_FW_NAME "brcm/brcmfmac4356-pcie.bin" +- #define BRCMF_PCIE_4356_NVRAM_NAME "brcm/brcmfmac4356-pcie.txt" +- #define BRCMF_PCIE_43570_FW_NAME "brcm/brcmfmac43570-pcie.bin" +-@@ -194,6 +196,8 @@ enum brcmf_pcie_state { +- +- MODULE_FIRMWARE(BRCMF_PCIE_43602_FW_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_43602_NVRAM_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4350_FW_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4350_NVRAM_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4356_FW_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4356_NVRAM_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_43570_FW_NAME); +-@@ -1418,6 +1422,10 @@ static int brcmf_pcie_get_fwnames(struct +- fw_name = BRCMF_PCIE_43602_FW_NAME; +- nvram_name = BRCMF_PCIE_43602_NVRAM_NAME; +- break; +-+ case BRCM_CC_4350_CHIP_ID: +-+ fw_name = BRCMF_PCIE_4350_FW_NAME; +-+ nvram_name = BRCMF_PCIE_4350_NVRAM_NAME; +-+ break; +- case BRCM_CC_4356_CHIP_ID: +- fw_name = BRCMF_PCIE_4356_FW_NAME; +- nvram_name = BRCMF_PCIE_4356_NVRAM_NAME; +-@@ -1956,6 +1964,7 @@ cleanup: +- PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, 0 } +- +- static struct pci_device_id brcmf_pcie_devid_table[] = { +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID), +---- a/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +-+++ b/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +-@@ -39,6 +39,7 @@ +- #define BRCM_CC_4339_CHIP_ID 0x4339 +- #define BRCM_CC_43430_CHIP_ID 43430 +- #define BRCM_CC_4345_CHIP_ID 0x4345 +-+#define BRCM_CC_4350_CHIP_ID 0x4350 +- #define BRCM_CC_4354_CHIP_ID 0x4354 +- #define BRCM_CC_4356_CHIP_ID 0x4356 +- #define BRCM_CC_43566_CHIP_ID 43566 +-@@ -56,6 +57,7 @@ +- #define BRCM_USB_BCMFW_DEVICE_ID 0x0bdc +- +- /* PCIE Device IDs */ +-+#define BRCM_PCIE_4350_DEVICE_ID 0x43a3 +- #define BRCM_PCIE_4354_DEVICE_ID 0x43df +- #define BRCM_PCIE_4356_DEVICE_ID 0x43ec +- #define BRCM_PCIE_43567_DEVICE_ID 0x43d3 +diff --git a/package/kernel/mac80211/patches/370-0003-brcmfmac-Fix-set-and-get-tx-power-functions.patch b/package/kernel/mac80211/patches/370-0003-brcmfmac-Fix-set-and-get-tx-power-functions.patch +deleted file mode 100644 +index 62fdd8d..0000000 +--- a/package/kernel/mac80211/patches/370-0003-brcmfmac-Fix-set-and-get-tx-power-functions.patch ++++ /dev/null +@@ -1,218 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:06 +0200 +-Subject: [PATCH] brcmfmac: Fix set and get tx-power functions. +- +-Implementation of tx-power (get and set) related functions are +-still assuming mW interface. This is wrong as functions use dbm +-(or mbm) nowadays. As a result a tx power configuration could +-result in wrong power configuration. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -236,89 +236,6 @@ static int brcmf_roamoff; +- module_param_named(roamoff, brcmf_roamoff, int, S_IRUSR); +- MODULE_PARM_DESC(roamoff, "do not use internal roaming engine"); +- +--/* Quarter dBm units to mW +-- * Table starts at QDBM_OFFSET, so the first entry is mW for qdBm=153 +-- * Table is offset so the last entry is largest mW value that fits in +-- * a u16. +-- */ +-- +--#define QDBM_OFFSET 153 /* Offset for first entry */ +--#define QDBM_TABLE_LEN 40 /* Table size */ +-- +--/* Smallest mW value that will round up to the first table entry, QDBM_OFFSET. +-- * Value is ( mW(QDBM_OFFSET - 1) + mW(QDBM_OFFSET) ) / 2 +-- */ +--#define QDBM_TABLE_LOW_BOUND 6493 /* Low bound */ +-- +--/* Largest mW value that will round down to the last table entry, +-- * QDBM_OFFSET + QDBM_TABLE_LEN-1. +-- * Value is ( mW(QDBM_OFFSET + QDBM_TABLE_LEN - 1) + +-- * mW(QDBM_OFFSET + QDBM_TABLE_LEN) ) / 2. +-- */ +--#define QDBM_TABLE_HIGH_BOUND 64938 /* High bound */ +-- +--static const u16 nqdBm_to_mW_map[QDBM_TABLE_LEN] = { +--/* qdBm: +0 +1 +2 +3 +4 +5 +6 +7 */ +--/* 153: */ 6683, 7079, 7499, 7943, 8414, 8913, 9441, 10000, +--/* 161: */ 10593, 11220, 11885, 12589, 13335, 14125, 14962, 15849, +--/* 169: */ 16788, 17783, 18836, 19953, 21135, 22387, 23714, 25119, +--/* 177: */ 26607, 28184, 29854, 31623, 33497, 35481, 37584, 39811, +--/* 185: */ 42170, 44668, 47315, 50119, 53088, 56234, 59566, 63096 +--}; +-- +--static u16 brcmf_qdbm_to_mw(u8 qdbm) +--{ +-- uint factor = 1; +-- int idx = qdbm - QDBM_OFFSET; +-- +-- if (idx >= QDBM_TABLE_LEN) +-- /* clamp to max u16 mW value */ +-- return 0xFFFF; +-- +-- /* scale the qdBm index up to the range of the table 0-40 +-- * where an offset of 40 qdBm equals a factor of 10 mW. +-- */ +-- while (idx < 0) { +-- idx += 40; +-- factor *= 10; +-- } +-- +-- /* return the mW value scaled down to the correct factor of 10, +-- * adding in factor/2 to get proper rounding. +-- */ +-- return (nqdBm_to_mW_map[idx] + factor / 2) / factor; +--} +-- +--static u8 brcmf_mw_to_qdbm(u16 mw) +--{ +-- u8 qdbm; +-- int offset; +-- uint mw_uint = mw; +-- uint boundary; +-- +-- /* handle boundary case */ +-- if (mw_uint <= 1) +-- return 0; +-- +-- offset = QDBM_OFFSET; +-- +-- /* move mw into the range of the table */ +-- while (mw_uint < QDBM_TABLE_LOW_BOUND) { +-- mw_uint *= 10; +-- offset -= 40; +-- } +-- +-- for (qdbm = 0; qdbm < QDBM_TABLE_LEN - 1; qdbm++) { +-- boundary = nqdBm_to_mW_map[qdbm] + (nqdBm_to_mW_map[qdbm + 1] - +-- nqdBm_to_mW_map[qdbm]) / 2; +-- if (mw_uint < boundary) +-- break; +-- } +-- +-- qdbm += (u8) offset; +-- +-- return qdbm; +--} +- +- static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf, +- struct cfg80211_chan_def *ch) +-@@ -2016,16 +1933,14 @@ static s32 +- brcmf_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, +- enum nl80211_tx_power_setting type, s32 mbm) +- { +-- +- struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); +- struct net_device *ndev = cfg_to_ndev(cfg); +- struct brcmf_if *ifp = netdev_priv(ndev); +-- u16 txpwrmw; +-- s32 err = 0; +-- s32 disable = 0; +-- s32 dbm = MBM_TO_DBM(mbm); +-+ s32 err; +-+ s32 disable; +-+ u32 qdbm = 127; +- +-- brcmf_dbg(TRACE, "Enter\n"); +-+ brcmf_dbg(TRACE, "Enter %d %d\n", type, mbm); +- if (!check_vif_up(ifp->vif)) +- return -EIO; +- +-@@ -2034,12 +1949,20 @@ brcmf_cfg80211_set_tx_power(struct wiphy +- break; +- case NL80211_TX_POWER_LIMITED: +- case NL80211_TX_POWER_FIXED: +-- if (dbm < 0) { +-+ if (mbm < 0) { +- brcmf_err("TX_POWER_FIXED - dbm is negative\n"); +- err = -EINVAL; +- goto done; +- } +-+ qdbm = MBM_TO_DBM(4 * mbm); +-+ if (qdbm > 127) +-+ qdbm = 127; +-+ qdbm |= WL_TXPWR_OVERRIDE; +- break; +-+ default: +-+ brcmf_err("Unsupported type %d\n", type); +-+ err = -EINVAL; +-+ goto done; +- } +- /* Make sure radio is off or on as far as software is concerned */ +- disable = WL_RADIO_SW_DISABLE << 16; +-@@ -2047,52 +1970,44 @@ brcmf_cfg80211_set_tx_power(struct wiphy +- if (err) +- brcmf_err("WLC_SET_RADIO error (%d)\n", err); +- +-- if (dbm > 0xffff) +-- txpwrmw = 0xffff; +-- else +-- txpwrmw = (u16) dbm; +-- err = brcmf_fil_iovar_int_set(ifp, "qtxpower", +-- (s32)brcmf_mw_to_qdbm(txpwrmw)); +-+ err = brcmf_fil_iovar_int_set(ifp, "qtxpower", qdbm); +- if (err) +- brcmf_err("qtxpower error (%d)\n", err); +-- cfg->conf->tx_power = dbm; +- +- done: +-- brcmf_dbg(TRACE, "Exit\n"); +-+ brcmf_dbg(TRACE, "Exit %d (qdbm)\n", qdbm & ~WL_TXPWR_OVERRIDE); +- return err; +- } +- +--static s32 brcmf_cfg80211_get_tx_power(struct wiphy *wiphy, +-- struct wireless_dev *wdev, +-- s32 *dbm) +-+static s32 +-+brcmf_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, +-+ s32 *dbm) +- { +- struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); +-- struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg)); +-- s32 txpwrdbm; +-- u8 result; +-- s32 err = 0; +-+ struct net_device *ndev = cfg_to_ndev(cfg); +-+ struct brcmf_if *ifp = netdev_priv(ndev); +-+ s32 qdbm = 0; +-+ s32 err; +- +- brcmf_dbg(TRACE, "Enter\n"); +- if (!check_vif_up(ifp->vif)) +- return -EIO; +- +-- err = brcmf_fil_iovar_int_get(ifp, "qtxpower", &txpwrdbm); +-+ err = brcmf_fil_iovar_int_get(ifp, "qtxpower", &qdbm); +- if (err) { +- brcmf_err("error (%d)\n", err); +- goto done; +- } +-- +-- result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE); +-- *dbm = (s32) brcmf_qdbm_to_mw(result); +-+ *dbm = (qdbm & ~WL_TXPWR_OVERRIDE) / 4; +- +- done: +-- brcmf_dbg(TRACE, "Exit\n"); +-+ brcmf_dbg(TRACE, "Exit (0x%x %d)\n", qdbm, *dbm); +- return err; +- } +- +- static s32 +- brcmf_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *ndev, +-- u8 key_idx, bool unicast, bool multicast) +-+ u8 key_idx, bool unicast, bool multicast) +- { +- struct brcmf_if *ifp = netdev_priv(ndev); +- u32 index; +diff --git a/package/kernel/mac80211/patches/370-0004-brcmfmac-Only-assign-primary-netdev-to-if2bss-array.patch b/package/kernel/mac80211/patches/370-0004-brcmfmac-Only-assign-primary-netdev-to-if2bss-array.patch +deleted file mode 100644 +index c51365f..0000000 +--- a/package/kernel/mac80211/patches/370-0004-brcmfmac-Only-assign-primary-netdev-to-if2bss-array.patch ++++ /dev/null +@@ -1,73 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:07 +0200 +-Subject: [PATCH] brcmfmac: Only assign primary netdev to if2bss array. +- +-The if2bss allows for translation of ifidx to bssidx which has a 1:n +-relation. Therefor only the first (primary) netdev should be +-assigned in this array. This fixes the p2pon=1 module param usage. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -53,6 +53,8 @@ MODULE_LICENSE("Dual BSD/GPL"); +- #define BRCMF_RXREORDER_EXPIDX_VALID 0x08 +- #define BRCMF_RXREORDER_NEW_HOLE 0x10 +- +-+#define BRCMF_BSSIDX_INVALID -1 +-+ +- /* Error bits */ +- int brcmf_msg_level; +- module_param_named(debug, brcmf_msg_level, int, S_IRUSR | S_IWUSR); +-@@ -837,7 +839,8 @@ struct brcmf_if *brcmf_add_if(struct brc +- ifp = netdev_priv(ndev); +- ifp->ndev = ndev; +- /* store mapping ifidx to bssidx */ +-- drvr->if2bss[ifidx] = bssidx; +-+ if (drvr->if2bss[ifidx] == BRCMF_BSSIDX_INVALID) +-+ drvr->if2bss[ifidx] = bssidx; +- } +- +- ifp->drvr = drvr; +-@@ -862,15 +865,15 @@ static void brcmf_del_if(struct brcmf_pu +- struct brcmf_if *ifp; +- +- ifp = drvr->iflist[bssidx]; +-- drvr->if2bss[ifp->ifidx] = -1; +- drvr->iflist[bssidx] = NULL; +- if (!ifp) { +- brcmf_err("Null interface, idx=%d\n", bssidx); +- return; +- } +- brcmf_dbg(TRACE, "Enter, idx=%d, ifidx=%d\n", bssidx, ifp->ifidx); +-+ if (drvr->if2bss[ifp->ifidx] == bssidx) +-+ drvr->if2bss[ifp->ifidx] = BRCMF_BSSIDX_INVALID; +- if (ifp->ndev) { +-- drvr->if2bss[ifp->ifidx] = -1; +- if (bssidx == 0) { +- if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) { +- rtnl_lock(); +-@@ -926,6 +929,7 @@ int brcmf_attach(struct device *dev) +- { +- struct brcmf_pub *drvr = NULL; +- int ret = 0; +-+ int i; +- +- brcmf_dbg(TRACE, "Enter\n"); +- +-@@ -934,7 +938,9 @@ int brcmf_attach(struct device *dev) +- if (!drvr) +- return -ENOMEM; +- +-- memset(drvr->if2bss, 0xFF, sizeof(drvr->if2bss)); +-+ for (i = 0; i < ARRAY_SIZE(drvr->if2bss); i++) +-+ drvr->if2bss[i] = BRCMF_BSSIDX_INVALID; +-+ +- mutex_init(&drvr->proto_block); +- +- /* Link to bus module */ +diff --git a/package/kernel/mac80211/patches/370-0005-brcmfmac-Inform-p2p-module-about-p2pon-through-API.patch b/package/kernel/mac80211/patches/370-0005-brcmfmac-Inform-p2p-module-about-p2pon-through-API.patch +deleted file mode 100644 +index 3c1058d..0000000 +--- a/package/kernel/mac80211/patches/370-0005-brcmfmac-Inform-p2p-module-about-p2pon-through-API.patch ++++ /dev/null +@@ -1,113 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:08 +0200 +-Subject: [PATCH] brcmfmac: Inform p2p module about p2pon through API +- +-When the p2pon module param is used then p2p attach will initialize +-p2p device iface in the firmware, but it is doing that by checking +-data. It is cleaner to pass the p2pon information to p2p by API. +-This information is also needed for other patch. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -6126,7 +6126,8 @@ static void brcmf_free_wiphy(struct wiph +- } +- +- struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, +-- struct device *busdev) +-+ struct device *busdev, +-+ bool p2pdev_forced) +- { +- struct net_device *ndev = brcmf_get_ifp(drvr, 0)->ndev; +- struct brcmf_cfg80211_info *cfg; +-@@ -6218,7 +6219,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +- *cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; +- } +- +-- err = brcmf_p2p_attach(cfg); +-+ err = brcmf_p2p_attach(cfg, p2pdev_forced); +- if (err) { +- brcmf_err("P2P initilisation failed (%d)\n", err); +- goto wiphy_unreg_out; +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-@@ -469,7 +469,8 @@ brcmf_cfg80211_connect_info *cfg_to_conn +- } +- +- struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, +-- struct device *busdev); +-+ struct device *busdev, +-+ bool p2pdev_forced); +- void brcmf_cfg80211_detach(struct brcmf_cfg80211_info *cfg); +- s32 brcmf_cfg80211_up(struct net_device *ndev); +- s32 brcmf_cfg80211_down(struct net_device *ndev); +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -1044,7 +1044,8 @@ int brcmf_bus_start(struct device *dev) +- +- brcmf_fws_add_interface(ifp); +- +-- drvr->config = brcmf_cfg80211_attach(drvr, bus_if->dev); +-+ drvr->config = brcmf_cfg80211_attach(drvr, bus_if->dev, +-+ brcmf_p2p_enable); +- if (drvr->config == NULL) { +- ret = -ENOMEM; +- goto fail; +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -2333,7 +2333,7 @@ void brcmf_p2p_stop_device(struct wiphy +- * +- * @cfg: driver private data for cfg80211 interface. +- */ +--s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg) +-+s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced) +- { +- struct brcmf_if *pri_ifp; +- struct brcmf_if *p2p_ifp; +-@@ -2348,11 +2348,15 @@ s32 brcmf_p2p_attach(struct brcmf_cfg802 +- +- drvr = cfg->pub; +- +-- pri_ifp = drvr->iflist[0]; +-- p2p_ifp = drvr->iflist[1]; +-- +-+ pri_ifp = brcmf_get_ifp(drvr, 0); +- p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif = pri_ifp->vif; +- +-+ if (p2pdev_forced) { +-+ p2p_ifp = drvr->iflist[1]; +-+ } else { +-+ p2p_ifp = NULL; +-+ p2p->p2pdev_dynamically = true; +-+ } +- if (p2p_ifp) { +- p2p_vif = brcmf_alloc_vif(cfg, NL80211_IFTYPE_P2P_DEVICE, +- false); +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.h +-@@ -124,6 +124,7 @@ struct afx_hdl { +- * @wait_next_af: thread synchronizing struct. +- * @gon_req_action: about to send go negotiation requets frame. +- * @block_gon_req_tx: drop tx go negotiation requets frame. +-+ * @p2pdev_dynamically: is p2p device if created by module param or supplicant. +- */ +- struct brcmf_p2p_info { +- struct brcmf_cfg80211_info *cfg; +-@@ -144,9 +145,10 @@ struct brcmf_p2p_info { +- struct completion wait_next_af; +- bool gon_req_action; +- bool block_gon_req_tx; +-+ bool p2pdev_dynamically; +- }; +- +--s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg); +-+s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced); +- void brcmf_p2p_detach(struct brcmf_p2p_info *p2p); +- struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, +- enum nl80211_iftype type, u32 *flags, +diff --git a/package/kernel/mac80211/patches/370-0006-brcmfmac-Fix-bug-in-flowring-management.patch b/package/kernel/mac80211/patches/370-0006-brcmfmac-Fix-bug-in-flowring-management.patch +deleted file mode 100644 +index 66b2117..0000000 +--- a/package/kernel/mac80211/patches/370-0006-brcmfmac-Fix-bug-in-flowring-management.patch ++++ /dev/null +@@ -1,26 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:09 +0200 +-Subject: [PATCH] brcmfmac: Fix bug in flowring management. +- +-The hash index stored in the flowrings is of type u16 but gets +-stored in u8. This can result in incorrect indexing and possibly +-result in crashes. This patch fixes the type. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/flowring.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/flowring.h +-@@ -34,7 +34,7 @@ enum ring_status { +- }; +- +- struct brcmf_flowring_ring { +-- u8 hash_id; +-+ u16 hash_id; +- bool blocked; +- enum ring_status status; +- struct sk_buff_head skblist; +diff --git a/package/kernel/mac80211/patches/370-0007-brcmfmac-Make-p2pon-module-param-always-available.patch b/package/kernel/mac80211/patches/370-0007-brcmfmac-Make-p2pon-module-param-always-available.patch +deleted file mode 100644 +index c143c3b..0000000 +--- a/package/kernel/mac80211/patches/370-0007-brcmfmac-Make-p2pon-module-param-always-available.patch ++++ /dev/null +@@ -1,29 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:10 +0200 +-Subject: [PATCH] brcmfmac: Make p2pon module param always available. +- +-p2pon module param is currently under define BRCMDBG. Though it is +-a needed option for older versions of the wpa_supplicant which do not +-support the P2P_DEVICE interface. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -62,10 +62,8 @@ MODULE_PARM_DESC(debug, "level of debug +- +- /* P2P0 enable */ +- static int brcmf_p2p_enable; +--#ifdef CPTCFG_BRCMDBG +- module_param_named(p2pon, brcmf_p2p_enable, int, 0); +--MODULE_PARM_DESC(p2pon, "enable p2p management functionality"); +--#endif +-+MODULE_PARM_DESC(p2pon, "enable legacy p2p management functionality"); +- +- char *brcmf_ifname(struct brcmf_pub *drvr, int ifidx) +- { +diff --git a/package/kernel/mac80211/patches/370-0008-brcmfmac-Workaround-in-change-vif-for-wpa_supplicant.patch b/package/kernel/mac80211/patches/370-0008-brcmfmac-Workaround-in-change-vif-for-wpa_supplicant.patch +deleted file mode 100644 +index 15ac2d9..0000000 +--- a/package/kernel/mac80211/patches/370-0008-brcmfmac-Workaround-in-change-vif-for-wpa_supplicant.patch ++++ /dev/null +@@ -1,76 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:11 +0200 +-Subject: [PATCH] brcmfmac: Workaround in change vif for wpa_supplicant +- support. +- +-Different wpa_supplicants have different behavior and expectations +-regarding the change_virtual_intf behavior. This patch implements +-a workaround for the different versions and possible brcmfmac +-configuration. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -776,6 +776,37 @@ brcmf_cfg80211_change_iface(struct wiphy +- s32 err = 0; +- +- brcmf_dbg(TRACE, "Enter, idx=%d, type=%d\n", ifp->bssidx, type); +-+ +-+ /* WAR: There are a number of p2p interface related problems which +-+ * need to be handled initially (before doing the validate). +-+ * wpa_supplicant tends to do iface changes on p2p device/client/go +-+ * which are not always possible/allowed. However we need to return +-+ * OK otherwise the wpa_supplicant wont start. The situation differs +-+ * on configuration and setup (p2pon=1 module param). The first check +-+ * is to see if the request is a change to station for p2p iface. +-+ */ +-+ if ((type == NL80211_IFTYPE_STATION) && +-+ ((vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT) || +-+ (vif->wdev.iftype == NL80211_IFTYPE_P2P_GO) || +-+ (vif->wdev.iftype == NL80211_IFTYPE_P2P_DEVICE))) { +-+ brcmf_dbg(TRACE, "Ignoring cmd for p2p if\n"); +-+ /* Now depending on whether module param p2pon=1 was used the +-+ * response needs to be either 0 or EOPNOTSUPP. The reason is +-+ * that if p2pon=1 is used, but a newer supplicant is used then +-+ * we should return an error, as this combination wont work. +-+ * In other situations 0 is returned and supplicant will start +-+ * normally. It will give a trace in cfg80211, but it is the +-+ * only way to get it working. Unfortunately this will result +-+ * in situation where we wont support new supplicant in +-+ * combination with module param p2pon=1, but that is the way +-+ * it is. If the user tries this then unloading of driver might +-+ * fail/lock. +-+ */ +-+ if (cfg->p2p.p2pdev_dynamically) +-+ return -EOPNOTSUPP; +-+ else +-+ return 0; +-+ } +- err = brcmf_vif_change_validate(wiphy_to_cfg(wiphy), vif, type); +- if (err) { +- brcmf_err("iface validation failed: err=%d\n", err); +-@@ -791,18 +822,6 @@ brcmf_cfg80211_change_iface(struct wiphy +- infra = 0; +- break; +- case NL80211_IFTYPE_STATION: +-- /* Ignore change for p2p IF. Unclear why supplicant does this */ +-- if ((vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT) || +-- (vif->wdev.iftype == NL80211_IFTYPE_P2P_GO)) { +-- brcmf_dbg(TRACE, "Ignoring cmd for p2p if\n"); +-- /* WAR: It is unexpected to get a change of VIF for P2P +-- * IF, but it happens. The request can not be handled +-- * but returning EPERM causes a crash. Returning 0 +-- * without setting ieee80211_ptr->iftype causes trace +-- * (WARN_ON) but it works with wpa_supplicant +-- */ +-- return 0; +-- } +- infra = 1; +- break; +- case NL80211_IFTYPE_AP: +diff --git a/package/kernel/mac80211/patches/370-0009-brcmfmac-Deleting-of-p2p-device-is-leaking-memory.patch b/package/kernel/mac80211/patches/370-0009-brcmfmac-Deleting-of-p2p-device-is-leaking-memory.patch +deleted file mode 100644 +index 1988b5c..0000000 +--- a/package/kernel/mac80211/patches/370-0009-brcmfmac-Deleting-of-p2p-device-is-leaking-memory.patch ++++ /dev/null +@@ -1,124 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:12 +0200 +-Subject: [PATCH] brcmfmac: Deleting of p2p device is leaking memory. +- +-When a p2p device gets deleted, the memory for the vif is not being +-released. This is solved by reorganizing the cleanup path and +-properly freeing the memory. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -887,6 +887,16 @@ static void brcmf_del_if(struct brcmf_pu +- cancel_work_sync(&ifp->multicast_work); +- } +- brcmf_net_detach(ifp->ndev); +-+ } else { +-+ /* Only p2p device interfaces which get dynamically created +-+ * end up here. In this case the p2p module should be informed +-+ * about the removal of the interface within the firmware. If +-+ * not then p2p commands towards the firmware will cause some +-+ * serious troublesome side effects. The p2p module will clean +-+ * up the ifp if needed. +-+ */ +-+ brcmf_p2p_ifp_removed(ifp); +-+ kfree(ifp); +- } +- } +- +-@@ -894,7 +904,8 @@ void brcmf_remove_interface(struct brcmf +- { +- if (!ifp || WARN_ON(ifp->drvr->iflist[ifp->bssidx] != ifp)) +- return; +-- +-+ brcmf_dbg(TRACE, "Enter, bssidx=%d, ifidx=%d\n", ifp->bssidx, +-+ ifp->ifidx); +- brcmf_fws_del_interface(ifp); +- brcmf_del_if(ifp->drvr, ifp->bssidx); +- } +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -2131,20 +2131,6 @@ fail: +- } +- +- /** +-- * brcmf_p2p_delete_p2pdev() - delete P2P_DEVICE virtual interface. +-- * +-- * @vif: virtual interface object to delete. +-- */ +--static void brcmf_p2p_delete_p2pdev(struct brcmf_p2p_info *p2p, +-- struct brcmf_cfg80211_vif *vif) +--{ +-- cfg80211_unregister_wdev(&vif->wdev); +-- p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif = NULL; +-- brcmf_remove_interface(vif->ifp); +-- brcmf_free_vif(vif); +--} +-- +--/** +- * brcmf_p2p_add_vif() - create a new P2P virtual interface. +- * +- * @wiphy: wiphy device of new interface. +-@@ -2264,9 +2250,11 @@ int brcmf_p2p_del_vif(struct wiphy *wiph +- break; +- +- case NL80211_IFTYPE_P2P_DEVICE: +-+ if (!p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif) +-+ return 0; +- brcmf_p2p_cancel_remain_on_channel(vif->ifp); +- brcmf_p2p_deinit_discovery(p2p); +-- brcmf_p2p_delete_p2pdev(p2p, vif); +-+ brcmf_remove_interface(vif->ifp); +- return 0; +- default: +- return -ENOTSUPP; +-@@ -2298,6 +2286,21 @@ int brcmf_p2p_del_vif(struct wiphy *wiph +- return err; +- } +- +-+void brcmf_p2p_ifp_removed(struct brcmf_if *ifp) +-+{ +-+ struct brcmf_cfg80211_info *cfg; +-+ struct brcmf_cfg80211_vif *vif; +-+ +-+ brcmf_dbg(INFO, "P2P: device interface removed\n"); +-+ vif = ifp->vif; +-+ cfg = wdev_to_cfg(&vif->wdev); +-+ cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif = NULL; +-+ rtnl_lock(); +-+ cfg80211_unregister_wdev(&vif->wdev); +-+ rtnl_unlock(); +-+ brcmf_free_vif(vif); +-+} +-+ +- int brcmf_p2p_start_device(struct wiphy *wiphy, struct wireless_dev *wdev) +- { +- struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); +-@@ -2422,10 +2425,7 @@ void brcmf_p2p_detach(struct brcmf_p2p_i +- if (vif != NULL) { +- brcmf_p2p_cancel_remain_on_channel(vif->ifp); +- brcmf_p2p_deinit_discovery(p2p); +-- /* remove discovery interface */ +-- rtnl_lock(); +-- brcmf_p2p_delete_p2pdev(p2p, vif); +-- rtnl_unlock(); +-+ brcmf_remove_interface(vif->ifp); +- } +- /* just set it all to zero */ +- memset(p2p, 0, sizeof(*p2p)); +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.h +-@@ -156,6 +156,7 @@ struct wireless_dev *brcmf_p2p_add_vif(s +- int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev); +- int brcmf_p2p_ifchange(struct brcmf_cfg80211_info *cfg, +- enum brcmf_fil_p2p_if_types if_type); +-+void brcmf_p2p_ifp_removed(struct brcmf_if *ifp); +- int brcmf_p2p_start_device(struct wiphy *wiphy, struct wireless_dev *wdev); +- void brcmf_p2p_stop_device(struct wiphy *wiphy, struct wireless_dev *wdev); +- int brcmf_p2p_scan_prep(struct wiphy *wiphy, +diff --git a/package/kernel/mac80211/patches/370-0010-brcmfmac-Only-handle-p2p_stop_device-if-vif-is-valid.patch b/package/kernel/mac80211/patches/370-0010-brcmfmac-Only-handle-p2p_stop_device-if-vif-is-valid.patch +deleted file mode 100644 +index 5225c9e..0000000 +--- a/package/kernel/mac80211/patches/370-0010-brcmfmac-Only-handle-p2p_stop_device-if-vif-is-valid.patch ++++ /dev/null +@@ -1,40 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:13 +0200 +-Subject: [PATCH] brcmfmac: Only handle p2p_stop_device if vif is valid +- +-In some situations it is possible that vif has been removed while +-cfg80211 invokes the p2p_stop_device handler. This will result in +-crash. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -2324,11 +2324,17 @@ void brcmf_p2p_stop_device(struct wiphy +- struct brcmf_cfg80211_vif *vif; +- +- vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev); +-- mutex_lock(&cfg->usr_sync); +-- (void)brcmf_p2p_deinit_discovery(p2p); +-- brcmf_abort_scanning(cfg); +-- clear_bit(BRCMF_VIF_STATUS_READY, &vif->sme_state); +-- mutex_unlock(&cfg->usr_sync); +-+ /* This call can be result of the unregister_wdev call. In that case +-+ * we dont want to do anything anymore. Just return. The config vif +-+ * will have been cleared at this point. +-+ */ +-+ if (p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif == vif) { +-+ mutex_lock(&cfg->usr_sync); +-+ (void)brcmf_p2p_deinit_discovery(p2p); +-+ brcmf_abort_scanning(cfg); +-+ clear_bit(BRCMF_VIF_STATUS_READY, &vif->sme_state); +-+ mutex_unlock(&cfg->usr_sync); +-+ } +- } +- +- /** +diff --git a/package/kernel/mac80211/patches/370-0011-brcmfmac-Fix-p2p-bug-for-older-firmwares.patch b/package/kernel/mac80211/patches/370-0011-brcmfmac-Fix-p2p-bug-for-older-firmwares.patch +deleted file mode 100644 +index e2f24e8..0000000 +--- a/package/kernel/mac80211/patches/370-0011-brcmfmac-Fix-p2p-bug-for-older-firmwares.patch ++++ /dev/null +@@ -1,35 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:14 +0200 +-Subject: [PATCH] brcmfmac: Fix p2p bug for older firmwares. +- +-Some devices with older firmwares are reporting new p2p device +-interface with the wrong type. Accept this type to get p2p +-working for these devices. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-@@ -186,11 +186,13 @@ static void brcmf_fweh_handle_if_event(s +- ifevent->action, ifevent->ifidx, ifevent->bssidx, +- ifevent->flags, ifevent->role); +- +-- /* The P2P Device interface event must not be ignored +-- * contrary to what firmware tells us. +-+ /* The P2P Device interface event must not be ignored contrary to what +-+ * firmware tells us. Older firmware uses p2p noif, with sta role. +-+ * This should be accepted. +- */ +-- is_p2pdev = (ifevent->flags & BRCMF_E_IF_FLAG_NOIF) && +-- ifevent->role == BRCMF_E_IF_ROLE_P2P_CLIENT; +-+ is_p2pdev = ((ifevent->flags & BRCMF_E_IF_FLAG_NOIF) && +-+ (ifevent->role == BRCMF_E_IF_ROLE_P2P_CLIENT || +-+ ifevent->role == BRCMF_E_IF_ROLE_STA)); +- if (!is_p2pdev && (ifevent->flags & BRCMF_E_IF_FLAG_NOIF)) { +- brcmf_dbg(EVENT, "event can be ignored\n"); +- return; +diff --git a/package/kernel/mac80211/patches/370-0012-brcmfmac-Add-module-parameter-to-disable-features.patch b/package/kernel/mac80211/patches/370-0012-brcmfmac-Add-module-parameter-to-disable-features.patch +deleted file mode 100644 +index 52c787f..0000000 +--- a/package/kernel/mac80211/patches/370-0012-brcmfmac-Add-module-parameter-to-disable-features.patch ++++ /dev/null +@@ -1,54 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:15 +0200 +-Subject: [PATCH] brcmfmac: Add module parameter to disable features. +- +-For debugging purpose it is very handy to be able to disable +-features. It has happened a few times that new features turned +-out not always being properly detected for all devices/firmwares. +-Making it possible to disable the feature with a module parameter +-will make testing/debugging easier. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/feature.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/feature.c +-@@ -15,6 +15,7 @@ +- */ +- +- #include +-+#include +- +- #include +- #include "core.h" +-@@ -23,6 +24,12 @@ +- #include "fwil.h" +- #include "feature.h" +- +-+ +-+/* Module param feature_disable (global for all devices) */ +-+static int brcmf_feature_disable; +-+module_param_named(feature_disable, brcmf_feature_disable, int, 0); +-+MODULE_PARM_DESC(feature_disable, "Disable features"); +-+ +- /* +- * expand feature list to array of feature strings. +- */ +-@@ -131,6 +138,12 @@ void brcmf_feat_attach(struct brcmf_pub +- brcmf_feat_iovar_int_set(ifp, BRCMF_FEAT_MBSS, "mbss", 0); +- brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_P2P, "p2p"); +- +-+ if (brcmf_feature_disable) { +-+ brcmf_dbg(INFO, "Features: 0x%02x, disable: 0x%02x\n", +-+ ifp->drvr->feat_flags, brcmf_feature_disable); +-+ ifp->drvr->feat_flags &= ~brcmf_feature_disable; +-+ } +-+ +- /* set chip related quirks */ +- switch (drvr->bus_if->chip) { +- case BRCM_CC_43236_CHIP_ID: +diff --git a/package/kernel/mac80211/patches/370-0013-brcmfmac-Fix-race-condition-bug-when-deleting-p2p-in.patch b/package/kernel/mac80211/patches/370-0013-brcmfmac-Fix-race-condition-bug-when-deleting-p2p-in.patch +deleted file mode 100644 +index 58a638a..0000000 +--- a/package/kernel/mac80211/patches/370-0013-brcmfmac-Fix-race-condition-bug-when-deleting-p2p-in.patch ++++ /dev/null +@@ -1,80 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:16 +0200 +-Subject: [PATCH] brcmfmac: Fix race condition bug when deleting p2p interface. +- +-When p2p device interface gets deleted by deinitialising discovery +-it will result in an event which removes the interface, but that is +-also done by delete p2p interface code. This results in race +-condition which sometimes results in lockup/crash. With this patch +-the delete device interface will wait for the event (with timeout) +-removing the possible race condition. Also on the stop device call +-from cfg80211 the deinitialisation of the discovery device should +-be avoided as it can result in a similar situation. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -2238,6 +2238,7 @@ int brcmf_p2p_del_vif(struct wiphy *wiph +- brcmf_dbg(TRACE, "delete P2P vif\n"); +- vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev); +- +-+ brcmf_cfg80211_arm_vif_event(cfg, vif); +- switch (vif->wdev.iftype) { +- case NL80211_IFTYPE_P2P_CLIENT: +- if (test_bit(BRCMF_VIF_STATUS_DISCONNECTING, &vif->sme_state)) +-@@ -2254,8 +2255,6 @@ int brcmf_p2p_del_vif(struct wiphy *wiph +- return 0; +- brcmf_p2p_cancel_remain_on_channel(vif->ifp); +- brcmf_p2p_deinit_discovery(p2p); +-- brcmf_remove_interface(vif->ifp); +-- return 0; +- default: +- return -ENOTSUPP; +- } +-@@ -2267,10 +2266,11 @@ int brcmf_p2p_del_vif(struct wiphy *wiph +- wait_for_completion_timeout(&cfg->vif_disabled, +- msecs_to_jiffies(500)); +- +-- brcmf_vif_clear_mgmt_ies(vif); +-- +-- brcmf_cfg80211_arm_vif_event(cfg, vif); +-- err = brcmf_p2p_release_p2p_if(vif); +-+ err = 0; +-+ if (vif->wdev.iftype != NL80211_IFTYPE_P2P_DEVICE) { +-+ brcmf_vif_clear_mgmt_ies(vif); +-+ err = brcmf_p2p_release_p2p_if(vif); +-+ } +- if (!err) { +- /* wait for firmware event */ +- err = brcmf_cfg80211_wait_vif_event_timeout(cfg, BRCMF_E_IF_DEL, +-@@ -2280,8 +2280,12 @@ int brcmf_p2p_del_vif(struct wiphy *wiph +- else +- err = 0; +- } +-+ if (err) +-+ brcmf_remove_interface(vif->ifp); +-+ +- brcmf_cfg80211_arm_vif_event(cfg, NULL); +-- p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif = NULL; +-+ if (vif->wdev.iftype != NL80211_IFTYPE_P2P_DEVICE) +-+ p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif = NULL; +- +- return err; +- } +-@@ -2330,7 +2334,9 @@ void brcmf_p2p_stop_device(struct wiphy +- */ +- if (p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif == vif) { +- mutex_lock(&cfg->usr_sync); +-- (void)brcmf_p2p_deinit_discovery(p2p); +-+ /* Set the discovery state to SCAN */ +-+ (void)brcmf_p2p_set_discover_state(vif->ifp, +-+ WL_P2P_DISC_ST_SCAN, 0, 0); +- brcmf_abort_scanning(cfg); +- clear_bit(BRCMF_VIF_STATUS_READY, &vif->sme_state); +- mutex_unlock(&cfg->usr_sync); +diff --git a/package/kernel/mac80211/patches/370-0014-brcmfmac-Add-support-for-the-BCM4365-and-BCM4366-PCI.patch b/package/kernel/mac80211/patches/370-0014-brcmfmac-Add-support-for-the-BCM4365-and-BCM4366-PCI.patch +deleted file mode 100644 +index d0bbf2a..0000000 +--- a/package/kernel/mac80211/patches/370-0014-brcmfmac-Add-support-for-the-BCM4365-and-BCM4366-PCI.patch ++++ /dev/null +@@ -1,277 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:17 +0200 +-Subject: [PATCH] brcmfmac: Add support for the BCM4365 and BCM4366 PCIE +- devices. +- +-This patch adds support for the BCM4365 and BCM4366 11ac Wave2 +-PCIE devices. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/chip.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/chip.c +-@@ -208,6 +208,7 @@ struct sbsocramregs { +- }; +- +- #define SOCRAMREGOFFS(_f) offsetof(struct sbsocramregs, _f) +-+#define SYSMEMREGOFFS(_f) offsetof(struct sbsocramregs, _f) +- +- #define ARMCR4_CAP (0x04) +- #define ARMCR4_BANKIDX (0x40) +-@@ -516,6 +517,9 @@ static int brcmf_chip_cores_check(struct +- case BCMA_CORE_ARM_CR4: +- cpu_found = true; +- break; +-+ case BCMA_CORE_ARM_CA7: +-+ cpu_found = true; +-+ break; +- default: +- break; +- } +-@@ -614,6 +618,29 @@ static void brcmf_chip_socram_ramsize(st +- } +- } +- +-+/** Return the SYS MEM size */ +-+static u32 brcmf_chip_sysmem_ramsize(struct brcmf_core_priv *sysmem) +-+{ +-+ u32 memsize = 0; +-+ u32 coreinfo; +-+ u32 idx; +-+ u32 nb; +-+ u32 banksize; +-+ +-+ if (!brcmf_chip_iscoreup(&sysmem->pub)) +-+ brcmf_chip_resetcore(&sysmem->pub, 0, 0, 0); +-+ +-+ coreinfo = brcmf_chip_core_read32(sysmem, SYSMEMREGOFFS(coreinfo)); +-+ nb = (coreinfo & SRCI_SRNB_MASK) >> SRCI_SRNB_SHIFT; +-+ +-+ for (idx = 0; idx < nb; idx++) { +-+ brcmf_chip_socram_banksize(sysmem, idx, &banksize); +-+ memsize += banksize; +-+ } +-+ +-+ return memsize; +-+} +-+ +- /** Return the TCM-RAM size of the ARMCR4 core. */ +- static u32 brcmf_chip_tcm_ramsize(struct brcmf_core_priv *cr4) +- { +-@@ -656,6 +683,9 @@ static u32 brcmf_chip_tcm_rambase(struct +- case BRCM_CC_4358_CHIP_ID: +- case BRCM_CC_43602_CHIP_ID: +- return 0x180000; +-+ case BRCM_CC_4365_CHIP_ID: +-+ case BRCM_CC_4366_CHIP_ID: +-+ return 0x200000; +- default: +- brcmf_err("unknown chip: %s\n", ci->pub.name); +- break; +-@@ -678,10 +708,28 @@ static int brcmf_chip_get_raminfo(struct +- return -EINVAL; +- } +- } else { +-- mem = brcmf_chip_get_core(&ci->pub, BCMA_CORE_INTERNAL_MEM); +-- mem_core = container_of(mem, struct brcmf_core_priv, pub); +-- brcmf_chip_socram_ramsize(mem_core, &ci->pub.ramsize, +-- &ci->pub.srsize); +-+ mem = brcmf_chip_get_core(&ci->pub, BCMA_CORE_SYS_MEM); +-+ if (mem) { +-+ mem_core = container_of(mem, struct brcmf_core_priv, +-+ pub); +-+ ci->pub.ramsize = brcmf_chip_sysmem_ramsize(mem_core); +-+ ci->pub.rambase = brcmf_chip_tcm_rambase(ci); +-+ if (!ci->pub.rambase) { +-+ brcmf_err("RAM base not provided with ARM CA7 core\n"); +-+ return -EINVAL; +-+ } +-+ } else { +-+ mem = brcmf_chip_get_core(&ci->pub, +-+ BCMA_CORE_INTERNAL_MEM); +-+ if (!mem) { +-+ brcmf_err("No memory cores found\n"); +-+ return -ENOMEM; +-+ } +-+ mem_core = container_of(mem, struct brcmf_core_priv, +-+ pub); +-+ brcmf_chip_socram_ramsize(mem_core, &ci->pub.ramsize, +-+ &ci->pub.srsize); +-+ } +- } +- brcmf_dbg(INFO, "RAM: base=0x%x size=%d (0x%x) sr=%d (0x%x)\n", +- ci->pub.rambase, ci->pub.ramsize, ci->pub.ramsize, +-@@ -924,7 +972,7 @@ static int brcmf_chip_recognition(struct +- static void brcmf_chip_disable_arm(struct brcmf_chip_priv *chip, u16 id) +- { +- struct brcmf_core *core; +-- struct brcmf_core_priv *cr4; +-+ struct brcmf_core_priv *cpu; +- u32 val; +- +- +-@@ -937,10 +985,11 @@ static void brcmf_chip_disable_arm(struc +- brcmf_chip_coredisable(core, 0, 0); +- break; +- case BCMA_CORE_ARM_CR4: +-- cr4 = container_of(core, struct brcmf_core_priv, pub); +-+ case BCMA_CORE_ARM_CA7: +-+ cpu = container_of(core, struct brcmf_core_priv, pub); +- +- /* clear all IOCTL bits except HALT bit */ +-- val = chip->ops->read32(chip->ctx, cr4->wrapbase + BCMA_IOCTL); +-+ val = chip->ops->read32(chip->ctx, cpu->wrapbase + BCMA_IOCTL); +- val &= ARMCR4_BCMA_IOCTL_CPUHALT; +- brcmf_chip_resetcore(core, val, ARMCR4_BCMA_IOCTL_CPUHALT, +- ARMCR4_BCMA_IOCTL_CPUHALT); +-@@ -1162,6 +1211,33 @@ static bool brcmf_chip_cr4_set_active(st +- return true; +- } +- +-+static inline void +-+brcmf_chip_ca7_set_passive(struct brcmf_chip_priv *chip) +-+{ +-+ struct brcmf_core *core; +-+ +-+ brcmf_chip_disable_arm(chip, BCMA_CORE_ARM_CA7); +-+ +-+ core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211); +-+ brcmf_chip_resetcore(core, D11_BCMA_IOCTL_PHYRESET | +-+ D11_BCMA_IOCTL_PHYCLOCKEN, +-+ D11_BCMA_IOCTL_PHYCLOCKEN, +-+ D11_BCMA_IOCTL_PHYCLOCKEN); +-+} +-+ +-+static bool brcmf_chip_ca7_set_active(struct brcmf_chip_priv *chip, u32 rstvec) +-+{ +-+ struct brcmf_core *core; +-+ +-+ chip->ops->activate(chip->ctx, &chip->pub, rstvec); +-+ +-+ /* restore ARM */ +-+ core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_ARM_CA7); +-+ brcmf_chip_resetcore(core, ARMCR4_BCMA_IOCTL_CPUHALT, 0, 0); +-+ +-+ return true; +-+} +-+ +- void brcmf_chip_set_passive(struct brcmf_chip *pub) +- { +- struct brcmf_chip_priv *chip; +-@@ -1175,8 +1251,16 @@ void brcmf_chip_set_passive(struct brcmf +- brcmf_chip_cr4_set_passive(chip); +- return; +- } +-- +-- brcmf_chip_cm3_set_passive(chip); +-+ arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CA7); +-+ if (arm) { +-+ brcmf_chip_ca7_set_passive(chip); +-+ return; +-+ } +-+ arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CM3); +-+ if (arm) { +-+ brcmf_chip_cm3_set_passive(chip); +-+ return; +-+ } +- } +- +- bool brcmf_chip_set_active(struct brcmf_chip *pub, u32 rstvec) +-@@ -1190,8 +1274,14 @@ bool brcmf_chip_set_active(struct brcmf_ +- arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CR4); +- if (arm) +- return brcmf_chip_cr4_set_active(chip, rstvec); +-+ arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CA7); +-+ if (arm) +-+ return brcmf_chip_ca7_set_active(chip, rstvec); +-+ arm = brcmf_chip_get_core(pub, BCMA_CORE_ARM_CM3); +-+ if (arm) +-+ return brcmf_chip_cm3_set_active(chip); +- +-- return brcmf_chip_cm3_set_active(chip); +-+ return false; +- } +- +- bool brcmf_chip_sr_capable(struct brcmf_chip *pub) +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -55,6 +55,10 @@ enum brcmf_pcie_state { +- #define BRCMF_PCIE_43570_NVRAM_NAME "brcm/brcmfmac43570-pcie.txt" +- #define BRCMF_PCIE_4358_FW_NAME "brcm/brcmfmac4358-pcie.bin" +- #define BRCMF_PCIE_4358_NVRAM_NAME "brcm/brcmfmac4358-pcie.txt" +-+#define BRCMF_PCIE_4365_FW_NAME "brcm/brcmfmac4365b-pcie.bin" +-+#define BRCMF_PCIE_4365_NVRAM_NAME "brcm/brcmfmac4365b-pcie.txt" +-+#define BRCMF_PCIE_4366_FW_NAME "brcm/brcmfmac4366b-pcie.bin" +-+#define BRCMF_PCIE_4366_NVRAM_NAME "brcm/brcmfmac4366b-pcie.txt" +- +- #define BRCMF_PCIE_FW_UP_TIMEOUT 2000 /* msec */ +- +-@@ -204,6 +208,10 @@ MODULE_FIRMWARE(BRCMF_PCIE_43570_FW_NAME +- MODULE_FIRMWARE(BRCMF_PCIE_43570_NVRAM_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4358_FW_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4358_NVRAM_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4365_FW_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4365_NVRAM_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4366_FW_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4366_NVRAM_NAME); +- +- +- struct brcmf_pcie_console { +-@@ -1440,6 +1448,14 @@ static int brcmf_pcie_get_fwnames(struct +- fw_name = BRCMF_PCIE_4358_FW_NAME; +- nvram_name = BRCMF_PCIE_4358_NVRAM_NAME; +- break; +-+ case BRCM_CC_4365_CHIP_ID: +-+ fw_name = BRCMF_PCIE_4365_FW_NAME; +-+ nvram_name = BRCMF_PCIE_4365_NVRAM_NAME; +-+ break; +-+ case BRCM_CC_4366_CHIP_ID: +-+ fw_name = BRCMF_PCIE_4366_FW_NAME; +-+ nvram_name = BRCMF_PCIE_4366_NVRAM_NAME; +-+ break; +- default: +- brcmf_err("Unsupported chip 0x%04x\n", devinfo->ci->chip); +- return -ENODEV; +-@@ -1973,6 +1989,12 @@ static struct pci_device_id brcmf_pcie_d +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_2G_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_5G_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_RAW_DEVICE_ID), +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4365_DEVICE_ID), +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4365_2G_DEVICE_ID), +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4365_5G_DEVICE_ID), +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_DEVICE_ID), +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_2G_DEVICE_ID), +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID), +- { /* end: all zeroes */ } +- }; +- +---- a/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +-+++ b/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +-@@ -48,6 +48,8 @@ +- #define BRCM_CC_43570_CHIP_ID 43570 +- #define BRCM_CC_4358_CHIP_ID 0x4358 +- #define BRCM_CC_43602_CHIP_ID 43602 +-+#define BRCM_CC_4365_CHIP_ID 0x4365 +-+#define BRCM_CC_4366_CHIP_ID 0x4366 +- +- /* USB Device IDs */ +- #define BRCM_USB_43143_DEVICE_ID 0xbd1e +-@@ -67,6 +69,13 @@ +- #define BRCM_PCIE_43602_2G_DEVICE_ID 0x43bb +- #define BRCM_PCIE_43602_5G_DEVICE_ID 0x43bc +- #define BRCM_PCIE_43602_RAW_DEVICE_ID 43602 +-+#define BRCM_PCIE_4365_DEVICE_ID 0x43ca +-+#define BRCM_PCIE_4365_2G_DEVICE_ID 0x43cb +-+#define BRCM_PCIE_4365_5G_DEVICE_ID 0x43cc +-+#define BRCM_PCIE_4366_DEVICE_ID 0x43c3 +-+#define BRCM_PCIE_4366_2G_DEVICE_ID 0x43c4 +-+#define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 +-+ +- +- /* brcmsmac IDs */ +- #define BCM4313_D11N2G_ID 0x4727 /* 4313 802.11n 2.4G device */ +diff --git a/package/kernel/mac80211/patches/370-0015-brcmfmac-Fix-TDLS-setup-by-properly-handling-p2p-noi.patch b/package/kernel/mac80211/patches/370-0015-brcmfmac-Fix-TDLS-setup-by-properly-handling-p2p-noi.patch +deleted file mode 100644 +index d33c803..0000000 +--- a/package/kernel/mac80211/patches/370-0015-brcmfmac-Fix-TDLS-setup-by-properly-handling-p2p-noi.patch ++++ /dev/null +@@ -1,120 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:18 +0200 +-Subject: [PATCH] brcmfmac: Fix TDLS setup by properly handling p2p noif. +- +-There is a workaround needed for p2p device setup which breaks tdls +-functionality. This patch fixes that by properly signalling fweh that +-p2p device setup is ongoing. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-@@ -188,11 +188,13 @@ static void brcmf_fweh_handle_if_event(s +- +- /* The P2P Device interface event must not be ignored contrary to what +- * firmware tells us. Older firmware uses p2p noif, with sta role. +-- * This should be accepted. +-+ * This should be accepted when p2pdev_setup is ongoing. TDLS setup will +-+ * use the same ifevent and should be ignored. +- */ +- is_p2pdev = ((ifevent->flags & BRCMF_E_IF_FLAG_NOIF) && +- (ifevent->role == BRCMF_E_IF_ROLE_P2P_CLIENT || +-- ifevent->role == BRCMF_E_IF_ROLE_STA)); +-+ ((ifevent->role == BRCMF_E_IF_ROLE_STA) && +-+ (drvr->fweh.p2pdev_setup_ongoing)))); +- if (!is_p2pdev && (ifevent->flags & BRCMF_E_IF_FLAG_NOIF)) { +- brcmf_dbg(EVENT, "event can be ignored\n"); +- return; +-@@ -316,6 +318,17 @@ event_free: +- } +- +- /** +-+ * brcmf_fweh_p2pdev_setup() - P2P device setup ongoing (or not). +-+ * +-+ * @ifp: ifp on which setup is taking place or finished. +-+ * @ongoing: p2p device setup in progress (or not). +-+ */ +-+void brcmf_fweh_p2pdev_setup(struct brcmf_if *ifp, bool ongoing) +-+{ +-+ ifp->drvr->fweh.p2pdev_setup_ongoing = ongoing; +-+} +-+ +-+/** +- * brcmf_fweh_attach() - initialize firmware event handling. +- * +- * @drvr: driver information object. +---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h +-@@ -230,12 +230,14 @@ typedef int (*brcmf_fweh_handler_t)(stru +- /** +- * struct brcmf_fweh_info - firmware event handling information. +- * +-+ * @p2pdev_setup_ongoing: P2P device creation in progress. +- * @event_work: event worker. +- * @evt_q_lock: lock for event queue protection. +- * @event_q: event queue. +- * @evt_handler: registered event handlers. +- */ +- struct brcmf_fweh_info { +-+ bool p2pdev_setup_ongoing; +- struct work_struct event_work; +- spinlock_t evt_q_lock; +- struct list_head event_q; +-@@ -255,6 +257,7 @@ void brcmf_fweh_unregister(struct brcmf_ +- int brcmf_fweh_activate_events(struct brcmf_if *ifp); +- void brcmf_fweh_process_event(struct brcmf_pub *drvr, +- struct brcmf_event *event_packet); +-+void brcmf_fweh_p2pdev_setup(struct brcmf_if *ifp, bool ongoing); +- +- static inline void brcmf_fweh_process_skb(struct brcmf_pub *drvr, +- struct sk_buff *skb) +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -2084,11 +2084,13 @@ static struct wireless_dev *brcmf_p2p_cr +- brcmf_p2p_set_firmware(pri_ifp, p2p->dev_addr); +- +- brcmf_cfg80211_arm_vif_event(p2p->cfg, p2p_vif); +-+ brcmf_fweh_p2pdev_setup(pri_ifp, true); +- +- /* Initialize P2P Discovery in the firmware */ +- err = brcmf_fil_iovar_int_set(pri_ifp, "p2p_disc", 1); +- if (err < 0) { +- brcmf_err("set p2p_disc error\n"); +-+ brcmf_fweh_p2pdev_setup(pri_ifp, false); +- brcmf_cfg80211_arm_vif_event(p2p->cfg, NULL); +- goto fail; +- } +-@@ -2097,6 +2099,7 @@ static struct wireless_dev *brcmf_p2p_cr +- err = brcmf_cfg80211_wait_vif_event_timeout(p2p->cfg, BRCMF_E_IF_ADD, +- msecs_to_jiffies(1500)); +- brcmf_cfg80211_arm_vif_event(p2p->cfg, NULL); +-+ brcmf_fweh_p2pdev_setup(pri_ifp, false); +- if (!err) { +- brcmf_err("timeout occurred\n"); +- err = -EIO; +-@@ -2393,6 +2396,8 @@ s32 brcmf_p2p_attach(struct brcmf_cfg802 +- memcpy(p2p_ifp->mac_addr, p2p->dev_addr, ETH_ALEN); +- brcmf_p2p_set_firmware(pri_ifp, p2p->dev_addr); +- +-+ brcmf_fweh_p2pdev_setup(pri_ifp, true); +-+ +- /* Initialize P2P Discovery in the firmware */ +- err = brcmf_fil_iovar_int_set(pri_ifp, "p2p_disc", 1); +- if (err < 0) { +-@@ -2419,8 +2424,9 @@ s32 brcmf_p2p_attach(struct brcmf_cfg802 +- INIT_WORK(&p2p->afx_hdl.afx_work, brcmf_p2p_afx_handler); +- init_completion(&p2p->afx_hdl.act_frm_scan); +- init_completion(&p2p->wait_next_af); +-- } +- exit: +-+ brcmf_fweh_p2pdev_setup(pri_ifp, false); +-+ } +- return err; +- } +- +diff --git a/package/kernel/mac80211/patches/370-0016-brcmfmac-Accept-events-when-TDLS-is-used-in-combinat.patch b/package/kernel/mac80211/patches/370-0016-brcmfmac-Accept-events-when-TDLS-is-used-in-combinat.patch +deleted file mode 100644 +index b880078..0000000 +--- a/package/kernel/mac80211/patches/370-0016-brcmfmac-Accept-events-when-TDLS-is-used-in-combinat.patch ++++ /dev/null +@@ -1,29 +0,0 @@ +-From: Hante Meuleman +-Date: Fri, 18 Sep 2015 22:08:19 +0200 +-Subject: [PATCH] brcmfmac: Accept events when TDLS is used in combination with +- p2p. +- +-TDLS events are mapped back to primary interface but when p2p is in +-use then this fails because the check was incorrect by checking +-bsscfg number. Which can be different when a p2p device has been +-created. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-@@ -300,8 +300,7 @@ static void brcmf_fweh_event_worker(stru +- goto event_free; +- } +- +-- if ((event->code == BRCMF_E_TDLS_PEER_EVENT) && +-- (emsg.bsscfgidx == 1)) +-+ if (event->code == BRCMF_E_TDLS_PEER_EVENT) +- ifp = drvr->iflist[0]; +- else +- ifp = drvr->iflist[emsg.bsscfgidx]; +diff --git a/package/kernel/mac80211/patches/371-brcmfmac-include-linux-atomic.h.patch b/package/kernel/mac80211/patches/371-brcmfmac-include-linux-atomic.h.patch +deleted file mode 100644 +index 9311a9d..0000000 +--- a/package/kernel/mac80211/patches/371-brcmfmac-include-linux-atomic.h.patch ++++ /dev/null +@@ -1,23 +0,0 @@ +-From: Hauke Mehrtens +-Date: Sat, 19 Sep 2015 12:47:20 +0200 +-Subject: [PATCH] brcmfmac: include linux/atomic.h +- +-brcmfmac uses atomic_or() and other atomic_* functions, but does not +-include linux/atomic.h. This file gets included by some other header +-file so this normally does not cause problems. +- +-Signed-off-by: Hauke Mehrtens +-Acked-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-@@ -15,6 +15,7 @@ +- */ +- +- #include +-+#include +- #include +- #include +- #include +diff --git a/package/kernel/mac80211/patches/372-0001-brcmfmac-expose-device-memory-to-devcoredump-subsyst.patch b/package/kernel/mac80211/patches/372-0001-brcmfmac-expose-device-memory-to-devcoredump-subsyst.patch +deleted file mode 100644 +index cf3f278..0000000 +--- a/package/kernel/mac80211/patches/372-0001-brcmfmac-expose-device-memory-to-devcoredump-subsyst.patch ++++ /dev/null +@@ -1,347 +0,0 @@ +-From: Arend van Spriel +-Date: Thu, 8 Oct 2015 20:33:11 +0200 +-Subject: [PATCH] brcmfmac: expose device memory to devcoredump subsystem +- +-Upon PSM watchdog event received from firmware the driver will obtain +-a memory snapshot of the device and expose it to user-space through +-the devcoredump framework. This will trigger a uevent. +- +-Reviewed-by: Hante Meuleman +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/Kconfig +-+++ b/drivers/net/wireless/brcm80211/Kconfig +-@@ -85,5 +85,6 @@ config BRCM_TRACING +- config BRCMDBG +- bool "Broadcom driver debug functions" +- depends on BRCMSMAC || BRCMFMAC +-+ select WANT_DEV_COREDUMP +- ---help--- +- Selecting this enables additional code for debug purposes. +---- a/drivers/net/wireless/brcm80211/brcmfmac/bus.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/bus.h +-@@ -65,6 +65,8 @@ struct brcmf_bus_dcmd { +- * @rxctl: receive a control response message from dongle. +- * @gettxq: obtain a reference of bus transmit queue (optional). +- * @wowl_config: specify if dongle is configured for wowl when going to suspend +-+ * @get_ramsize: obtain size of device memory. +-+ * @get_memdump: obtain device memory dump in provided buffer. +- * +- * This structure provides an abstract interface towards the +- * bus specific driver. For control messages to common driver +-@@ -79,6 +81,8 @@ struct brcmf_bus_ops { +- int (*rxctl)(struct device *dev, unsigned char *msg, uint len); +- struct pktq * (*gettxq)(struct device *dev); +- void (*wowl_config)(struct device *dev, bool enabled); +-+ size_t (*get_ramsize)(struct device *dev); +-+ int (*get_memdump)(struct device *dev, void *data, size_t len); +- }; +- +- +-@@ -185,6 +189,23 @@ void brcmf_bus_wowl_config(struct brcmf_ +- bus->ops->wowl_config(bus->dev, enabled); +- } +- +-+static inline size_t brcmf_bus_get_ramsize(struct brcmf_bus *bus) +-+{ +-+ if (!bus->ops->get_ramsize) +-+ return 0; +-+ +-+ return bus->ops->get_ramsize(bus->dev); +-+} +-+ +-+static inline +-+int brcmf_bus_get_memdump(struct brcmf_bus *bus, void *data, size_t len) +-+{ +-+ if (!bus->ops->get_memdump) +-+ return -EOPNOTSUPP; +-+ +-+ return bus->ops->get_memdump(bus->dev, data, len); +-+} +-+ +- /* +- * interface functions from common layer +- */ +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -957,8 +957,8 @@ int brcmf_attach(struct device *dev) +- drvr->bus_if = dev_get_drvdata(dev); +- drvr->bus_if->drvr = drvr; +- +-- /* create device debugfs folder */ +-- brcmf_debugfs_attach(drvr); +-+ /* attach debug facilities */ +-+ brcmf_debug_attach(drvr); +- +- /* Attach and link in the protocol */ +- ret = brcmf_proto_attach(drvr); +-@@ -1155,7 +1155,7 @@ void brcmf_detach(struct device *dev) +- +- brcmf_proto_detach(drvr); +- +-- brcmf_debugfs_detach(drvr); +-+ brcmf_debug_detach(drvr); +- bus_if->drvr = NULL; +- kfree(drvr); +- } +---- a/drivers/net/wireless/brcm80211/brcmfmac/debug.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/debug.c +-@@ -16,15 +16,45 @@ +- #include +- #include +- #include +-+#include +- +- #include +- #include +- #include "core.h" +- #include "bus.h" +-+#include "fweh.h" +- #include "debug.h" +- +- static struct dentry *root_folder; +- +-+static int brcmf_debug_create_memdump(struct brcmf_bus *bus, const void *data, +-+ size_t len) +-+{ +-+ void *dump; +-+ size_t ramsize; +-+ +-+ ramsize = brcmf_bus_get_ramsize(bus); +-+ if (ramsize) { +-+ dump = vzalloc(len + ramsize); +-+ if (!dump) +-+ return -ENOMEM; +-+ memcpy(dump, data, len); +-+ brcmf_bus_get_memdump(bus, dump + len, ramsize); +-+ dev_coredumpv(bus->dev, dump, len + ramsize, GFP_KERNEL); +-+ } +-+ return 0; +-+} +-+ +-+static int brcmf_debug_psm_watchdog_notify(struct brcmf_if *ifp, +-+ const struct brcmf_event_msg *evtmsg, +-+ void *data) +-+{ +-+ brcmf_dbg(TRACE, "enter: idx=%d\n", ifp->bssidx); +-+ +-+ return brcmf_debug_create_memdump(ifp->drvr->bus_if, data, +-+ evtmsg->datalen); +-+} +-+ +- void brcmf_debugfs_init(void) +- { +- root_folder = debugfs_create_dir(KBUILD_MODNAME, NULL); +-@@ -41,7 +71,7 @@ void brcmf_debugfs_exit(void) +- root_folder = NULL; +- } +- +--int brcmf_debugfs_attach(struct brcmf_pub *drvr) +-+int brcmf_debug_attach(struct brcmf_pub *drvr) +- { +- struct device *dev = drvr->bus_if->dev; +- +-@@ -49,12 +79,18 @@ int brcmf_debugfs_attach(struct brcmf_pu +- return -ENODEV; +- +- drvr->dbgfs_dir = debugfs_create_dir(dev_name(dev), root_folder); +-+ if (IS_ERR(drvr->dbgfs_dir)) +-+ return PTR_ERR(drvr->dbgfs_dir); +- +-- return PTR_ERR_OR_ZERO(drvr->dbgfs_dir); +-+ +-+ return brcmf_fweh_register(drvr, BRCMF_E_PSM_WATCHDOG, +-+ brcmf_debug_psm_watchdog_notify); +- } +- +--void brcmf_debugfs_detach(struct brcmf_pub *drvr) +-+void brcmf_debug_detach(struct brcmf_pub *drvr) +- { +-+ brcmf_fweh_unregister(drvr, BRCMF_E_PSM_WATCHDOG); +-+ +- if (!IS_ERR_OR_NULL(drvr->dbgfs_dir)) +- debugfs_remove_recursive(drvr->dbgfs_dir); +- } +---- a/drivers/net/wireless/brcm80211/brcmfmac/debug.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/debug.h +-@@ -109,8 +109,8 @@ struct brcmf_pub; +- #ifdef DEBUG +- void brcmf_debugfs_init(void); +- void brcmf_debugfs_exit(void); +--int brcmf_debugfs_attach(struct brcmf_pub *drvr); +--void brcmf_debugfs_detach(struct brcmf_pub *drvr); +-+int brcmf_debug_attach(struct brcmf_pub *drvr); +-+void brcmf_debug_detach(struct brcmf_pub *drvr); +- struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr); +- int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn, +- int (*read_fn)(struct seq_file *seq, void *data)); +-@@ -121,11 +121,11 @@ static inline void brcmf_debugfs_init(vo +- static inline void brcmf_debugfs_exit(void) +- { +- } +--static inline int brcmf_debugfs_attach(struct brcmf_pub *drvr) +-+static inline int brcmf_debug_attach(struct brcmf_pub *drvr) +- { +- return 0; +- } +--static inline void brcmf_debugfs_detach(struct brcmf_pub *drvr) +-+static inline void brcmf_debug_detach(struct brcmf_pub *drvr) +- { +- } +- static inline +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -448,6 +448,47 @@ brcmf_pcie_copy_mem_todev(struct brcmf_p +- } +- +- +-+static void +-+brcmf_pcie_copy_dev_tomem(struct brcmf_pciedev_info *devinfo, u32 mem_offset, +-+ void *dstaddr, u32 len) +-+{ +-+ void __iomem *address = devinfo->tcm + mem_offset; +-+ __le32 *dst32; +-+ __le16 *dst16; +-+ u8 *dst8; +-+ +-+ if (((ulong)address & 4) || ((ulong)dstaddr & 4) || (len & 4)) { +-+ if (((ulong)address & 2) || ((ulong)dstaddr & 2) || (len & 2)) { +-+ dst8 = (u8 *)dstaddr; +-+ while (len) { +-+ *dst8 = ioread8(address); +-+ address++; +-+ dst8++; +-+ len--; +-+ } +-+ } else { +-+ len = len / 2; +-+ dst16 = (__le16 *)dstaddr; +-+ while (len) { +-+ *dst16 = cpu_to_le16(ioread16(address)); +-+ address += 2; +-+ dst16++; +-+ len--; +-+ } +-+ } +-+ } else { +-+ len = len / 4; +-+ dst32 = (__le32 *)dstaddr; +-+ while (len) { +-+ *dst32 = cpu_to_le32(ioread32(address)); +-+ address += 4; +-+ dst32++; +-+ len--; +-+ } +-+ } +-+} +-+ +-+ +- #define WRITECC32(devinfo, reg, value) brcmf_pcie_write_reg32(devinfo, \ +- CHIPCREGOFFS(reg), value) +- +-@@ -1352,12 +1393,36 @@ static void brcmf_pcie_wowl_config(struc +- } +- +- +-+static size_t brcmf_pcie_get_ramsize(struct device *dev) +-+{ +-+ struct brcmf_bus *bus_if = dev_get_drvdata(dev); +-+ struct brcmf_pciedev *buspub = bus_if->bus_priv.pcie; +-+ struct brcmf_pciedev_info *devinfo = buspub->devinfo; +-+ +-+ return devinfo->ci->ramsize - devinfo->ci->srsize; +-+} +-+ +-+ +-+static int brcmf_pcie_get_memdump(struct device *dev, void *data, size_t len) +-+{ +-+ struct brcmf_bus *bus_if = dev_get_drvdata(dev); +-+ struct brcmf_pciedev *buspub = bus_if->bus_priv.pcie; +-+ struct brcmf_pciedev_info *devinfo = buspub->devinfo; +-+ +-+ brcmf_dbg(PCIE, "dump at 0x%08X: len=%zu\n", devinfo->ci->rambase, len); +-+ brcmf_pcie_copy_dev_tomem(devinfo, devinfo->ci->rambase, data, len); +-+ return 0; +-+} +-+ +-+ +- static struct brcmf_bus_ops brcmf_pcie_bus_ops = { +- .txdata = brcmf_pcie_tx, +- .stop = brcmf_pcie_down, +- .txctl = brcmf_pcie_tx_ctlpkt, +- .rxctl = brcmf_pcie_rx_ctlpkt, +- .wowl_config = brcmf_pcie_wowl_config, +-+ .get_ramsize = brcmf_pcie_get_ramsize, +-+ .get_memdump = brcmf_pcie_get_memdump, +- }; +- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-@@ -3539,6 +3539,51 @@ done: +- return err; +- } +- +-+static size_t brcmf_sdio_bus_get_ramsize(struct device *dev) +-+{ +-+ struct brcmf_bus *bus_if = dev_get_drvdata(dev); +-+ struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; +-+ struct brcmf_sdio *bus = sdiodev->bus; +-+ +-+ return bus->ci->ramsize - bus->ci->srsize; +-+} +-+ +-+static int brcmf_sdio_bus_get_memdump(struct device *dev, void *data, +-+ size_t mem_size) +-+{ +-+ struct brcmf_bus *bus_if = dev_get_drvdata(dev); +-+ struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; +-+ struct brcmf_sdio *bus = sdiodev->bus; +-+ int err; +-+ int address; +-+ int offset; +-+ int len; +-+ +-+ brcmf_dbg(INFO, "dump at 0x%08x: size=%zu\n", bus->ci->rambase, +-+ mem_size); +-+ +-+ address = bus->ci->rambase; +-+ offset = err = 0; +-+ sdio_claim_host(sdiodev->func[1]); +-+ while (offset < mem_size) { +-+ len = ((offset + MEMBLOCK) < mem_size) ? MEMBLOCK : +-+ mem_size - offset; +-+ err = brcmf_sdiod_ramrw(sdiodev, false, address, data, len); +-+ if (err) { +-+ brcmf_err("error %d on reading %d membytes at 0x%08x\n", +-+ err, len, address); +-+ goto done; +-+ } +-+ data += len; +-+ offset += len; +-+ address += len; +-+ } +-+ +-+done: +-+ sdio_release_host(sdiodev->func[1]); +-+ return err; +-+} +-+ +- void brcmf_sdio_trigger_dpc(struct brcmf_sdio *bus) +- { +- if (!bus->dpc_triggered) { +-@@ -3987,7 +4032,9 @@ static struct brcmf_bus_ops brcmf_sdio_b +- .txctl = brcmf_sdio_bus_txctl, +- .rxctl = brcmf_sdio_bus_rxctl, +- .gettxq = brcmf_sdio_bus_gettxq, +-- .wowl_config = brcmf_sdio_wowl_config +-+ .wowl_config = brcmf_sdio_wowl_config, +-+ .get_ramsize = brcmf_sdio_bus_get_ramsize, +-+ .get_memdump = brcmf_sdio_bus_get_memdump, +- }; +- +- static void brcmf_sdio_firmware_callback(struct device *dev, +diff --git a/package/kernel/mac80211/patches/372-0002-brcmfmac-Fix-race-condition-between-USB-probe-load-a.patch b/package/kernel/mac80211/patches/372-0002-brcmfmac-Fix-race-condition-between-USB-probe-load-a.patch +deleted file mode 100644 +index 5b82bca..0000000 +--- a/package/kernel/mac80211/patches/372-0002-brcmfmac-Fix-race-condition-between-USB-probe-load-a.patch ++++ /dev/null +@@ -1,108 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 8 Oct 2015 20:33:12 +0200 +-Subject: [PATCH] brcmfmac: Fix race condition between USB probe/load and +- disconnect. +- +-When a USB device gets disconnected due to for example removal +-then it is possible that it is still in the loading phase due to +-the asynchronous load routines. These routines can then possible +-access memory which has been freed. Fix this by mutex locking the +-device init phase. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c +-@@ -144,6 +144,7 @@ struct brcmf_usbdev_info { +- +- struct usb_device *usbdev; +- struct device *dev; +-+ struct mutex dev_init_lock; +- +- int ctl_in_pipe, ctl_out_pipe; +- struct urb *ctl_urb; /* URB for control endpoint */ +-@@ -1204,6 +1205,8 @@ static void brcmf_usb_probe_phase2(struc +- int ret; +- +- brcmf_dbg(USB, "Start fw downloading\n"); +-+ +-+ devinfo = bus->bus_priv.usb->devinfo; +- ret = check_file(fw->data); +- if (ret < 0) { +- brcmf_err("invalid firmware\n"); +-@@ -1211,7 +1214,6 @@ static void brcmf_usb_probe_phase2(struc +- goto error; +- } +- +-- devinfo = bus->bus_priv.usb->devinfo; +- devinfo->image = fw->data; +- devinfo->image_len = fw->size; +- +-@@ -1224,9 +1226,11 @@ static void brcmf_usb_probe_phase2(struc +- if (ret) +- goto error; +- +-+ mutex_unlock(&devinfo->dev_init_lock); +- return; +- error: +- brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), ret); +-+ mutex_unlock(&devinfo->dev_init_lock); +- device_release_driver(dev); +- } +- +-@@ -1264,6 +1268,7 @@ static int brcmf_usb_probe_cb(struct brc +- if (ret) +- goto fail; +- /* we are done */ +-+ mutex_unlock(&devinfo->dev_init_lock); +- return 0; +- } +- bus->chip = bus_pub->devid; +-@@ -1317,6 +1322,12 @@ brcmf_usb_probe(struct usb_interface *in +- +- devinfo->usbdev = usb; +- devinfo->dev = &usb->dev; +-+ /* Take an init lock, to protect for disconnect while still loading. +-+ * Necessary because of the asynchronous firmware load construction +-+ */ +-+ mutex_init(&devinfo->dev_init_lock); +-+ mutex_lock(&devinfo->dev_init_lock); +-+ +- usb_set_intfdata(intf, devinfo); +- +- /* Check that the device supports only one configuration */ +-@@ -1391,6 +1402,7 @@ brcmf_usb_probe(struct usb_interface *in +- return 0; +- +- fail: +-+ mutex_unlock(&devinfo->dev_init_lock); +- kfree(devinfo); +- usb_set_intfdata(intf, NULL); +- return ret; +-@@ -1403,8 +1415,19 @@ brcmf_usb_disconnect(struct usb_interfac +- +- brcmf_dbg(USB, "Enter\n"); +- devinfo = (struct brcmf_usbdev_info *)usb_get_intfdata(intf); +-- brcmf_usb_disconnect_cb(devinfo); +-- kfree(devinfo); +-+ +-+ if (devinfo) { +-+ mutex_lock(&devinfo->dev_init_lock); +-+ /* Make sure that devinfo still exists. Firmware probe routines +-+ * may have released the device and cleared the intfdata. +-+ */ +-+ if (!usb_get_intfdata(intf)) +-+ goto done; +-+ +-+ brcmf_usb_disconnect_cb(devinfo); +-+ kfree(devinfo); +-+ } +-+done: +- brcmf_dbg(USB, "Exit\n"); +- } +- +diff --git a/package/kernel/mac80211/patches/372-0003-brcmfmac-rename-firmware_path-to-alternative_fw_path.patch b/package/kernel/mac80211/patches/372-0003-brcmfmac-rename-firmware_path-to-alternative_fw_path.patch +deleted file mode 100644 +index f877c23..0000000 +--- a/package/kernel/mac80211/patches/372-0003-brcmfmac-rename-firmware_path-to-alternative_fw_path.patch ++++ /dev/null +@@ -1,28 +0,0 @@ +-From: Franky Lin +-Date: Thu, 8 Oct 2015 20:33:13 +0200 +-Subject: [PATCH] brcmfmac: rename firmware_path to alternative_fw_path +- +-In brcmfmac the module parameter "firmware_path" is used as an +-alternative relative path under the search path used by firmware_class +-or ueventhelper. Rename the parameter to alternative_fw_path to avoid +-confusion. +- +-Reviewed-by: Pieter-Paul Giesberts +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Hante Meuleman +-Signed-off-by: Franky Lin +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/firmware.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/firmware.c +-@@ -28,7 +28,7 @@ +- #define BRCMF_FW_NVRAM_PCIEDEV_LEN 10 /* pcie/1/4/ + \0 */ +- +- char brcmf_firmware_path[BRCMF_FW_PATH_LEN]; +--module_param_string(firmware_path, brcmf_firmware_path, +-+module_param_string(alternative_fw_path, brcmf_firmware_path, +- BRCMF_FW_PATH_LEN, 0440); +- +- enum nvram_parser_state { +diff --git a/package/kernel/mac80211/patches/372-0004-brcmfmac-remove-conversational-comment.patch b/package/kernel/mac80211/patches/372-0004-brcmfmac-remove-conversational-comment.patch +deleted file mode 100644 +index 0bfd9ef..0000000 +--- a/package/kernel/mac80211/patches/372-0004-brcmfmac-remove-conversational-comment.patch ++++ /dev/null +@@ -1,25 +0,0 @@ +-From: Arend van Spriel +-Date: Thu, 8 Oct 2015 20:33:14 +0200 +-Subject: [PATCH] brcmfmac: remove conversational comment +- +-Removing a comment that was only useful during the review of +-the change that introduced it and which should never have been +-submitted. +- +-Reviewed-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c +-@@ -873,9 +873,6 @@ brcmf_msgbuf_process_txstatus(struct brc +- commonring = msgbuf->flowrings[flowid]; +- atomic_dec(&commonring->outstanding_tx); +- +-- /* Hante: i believe this was a bug as tx_status->msg.ifidx was used +-- * in brcmf_txfinalize as index in drvr->iflist. Can you confirm/deny? +-- */ +- brcmf_txfinalize(brcmf_get_ifp(msgbuf->drvr, tx_status->msg.ifidx), +- skb, true); +- } +diff --git a/package/kernel/mac80211/patches/372-0005-brcmfmac-Rework-p2p-attach-use-single-method-for-p2p.patch b/package/kernel/mac80211/patches/372-0005-brcmfmac-Rework-p2p-attach-use-single-method-for-p2p.patch +deleted file mode 100644 +index 3ffada8..0000000 +--- a/package/kernel/mac80211/patches/372-0005-brcmfmac-Rework-p2p-attach-use-single-method-for-p2p.patch ++++ /dev/null +@@ -1,226 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 8 Oct 2015 20:33:15 +0200 +-Subject: [PATCH] brcmfmac: Rework p2p attach, use single method for p2p dev +- creation. +- +-When module param p2pon is used a p2p device is created at init. +-This patch reworks how this is done by using the same method as +-for a dynamically (by user space) created p2p device. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Reviewed-by: Franky (Zhenhui) Lin +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -6237,6 +6237,17 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +- else +- *cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; +- } +-+ /* p2p might require that "if-events" get processed by fweh. So +-+ * activate the already registered event handlers now and activate +-+ * the rest when initialization has completed. drvr->config needs to +-+ * be assigned before activating events. +-+ */ +-+ drvr->config = cfg; +-+ err = brcmf_fweh_activate_events(ifp); +-+ if (err) { +-+ brcmf_err("FWEH activation failed (%d)\n", err); +-+ goto wiphy_unreg_out; +-+ } +- +- err = brcmf_p2p_attach(cfg, p2pdev_forced); +- if (err) { +-@@ -6259,6 +6270,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +- brcmf_notify_tdls_peer_event); +- } +- +-+ /* (re-) activate FWEH event handling */ +-+ err = brcmf_fweh_activate_events(ifp); +-+ if (err) { +-+ brcmf_err("FWEH activation failed (%d)\n", err); +-+ goto wiphy_unreg_out; +-+ } +-+ +- return cfg; +- +- wiphy_unreg_out: +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -828,8 +828,8 @@ struct brcmf_if *brcmf_add_if(struct brc +- } else { +- brcmf_dbg(INFO, "allocate netdev interface\n"); +- /* Allocate netdev, including space for private structure */ +-- ndev = alloc_netdev(sizeof(*ifp), name, NET_NAME_UNKNOWN, +-- ether_setup); +-+ ndev = alloc_netdev(sizeof(*ifp), is_p2pdev ? "p2p%d" : name, +-+ NET_NAME_UNKNOWN, ether_setup); +- if (!ndev) +- return ERR_PTR(-ENOMEM); +- +-@@ -1021,12 +1021,7 @@ int brcmf_bus_start(struct device *dev) +- if (IS_ERR(ifp)) +- return PTR_ERR(ifp); +- +-- if (brcmf_p2p_enable) +-- p2p_ifp = brcmf_add_if(drvr, 1, 0, false, "p2p%d", NULL); +-- else +-- p2p_ifp = NULL; +-- if (IS_ERR(p2p_ifp)) +-- p2p_ifp = NULL; +-+ p2p_ifp = NULL; +- +- /* signal bus ready */ +- brcmf_bus_change_state(bus_if, BRCMF_BUS_UP); +-@@ -1060,11 +1055,13 @@ int brcmf_bus_start(struct device *dev) +- goto fail; +- } +- +-- ret = brcmf_fweh_activate_events(ifp); +-- if (ret < 0) +-- goto fail; +-- +- ret = brcmf_net_attach(ifp, false); +-+ +-+ if ((!ret) && (brcmf_p2p_enable)) { +-+ p2p_ifp = drvr->iflist[1]; +-+ if (p2p_ifp) +-+ ret = brcmf_net_p2p_attach(p2p_ifp); +-+ } +- fail: +- if (ret < 0) { +- brcmf_err("failed: %d\n", ret); +-@@ -1076,20 +1073,12 @@ fail: +- brcmf_fws_del_interface(ifp); +- brcmf_fws_deinit(drvr); +- } +-- if (drvr->iflist[0]) { +-+ if (ifp) +- brcmf_net_detach(ifp->ndev); +-- drvr->iflist[0] = NULL; +-- } +-- if (p2p_ifp) { +-+ if (p2p_ifp) +- brcmf_net_detach(p2p_ifp->ndev); +-- drvr->iflist[1] = NULL; +-- } +- return ret; +- } +-- if ((brcmf_p2p_enable) && (p2p_ifp)) +-- if (brcmf_net_p2p_attach(p2p_ifp) < 0) +-- brcmf_p2p_enable = 0; +-- +- return 0; +- } +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-@@ -213,7 +213,8 @@ static void brcmf_fweh_handle_if_event(s +- is_p2pdev, emsg->ifname, emsg->addr); +- if (IS_ERR(ifp)) +- return; +-- brcmf_fws_add_interface(ifp); +-+ if (!is_p2pdev) +-+ brcmf_fws_add_interface(ifp); +- if (!drvr->fweh.evt_handler[BRCMF_E_IF]) +- if (brcmf_net_attach(ifp, false) < 0) +- return; +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -2350,83 +2350,30 @@ void brcmf_p2p_stop_device(struct wiphy +- * brcmf_p2p_attach() - attach for P2P. +- * +- * @cfg: driver private data for cfg80211 interface. +-+ * @p2pdev_forced: create p2p device interface at attach. +- */ +- s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced) +- { +-- struct brcmf_if *pri_ifp; +-- struct brcmf_if *p2p_ifp; +-- struct brcmf_cfg80211_vif *p2p_vif; +- struct brcmf_p2p_info *p2p; +-- struct brcmf_pub *drvr; +-- s32 bssidx; +-+ struct brcmf_if *pri_ifp; +- s32 err = 0; +-+ void *err_ptr; +- +- p2p = &cfg->p2p; +- p2p->cfg = cfg; +- +-- drvr = cfg->pub; +-- +-- pri_ifp = brcmf_get_ifp(drvr, 0); +-+ pri_ifp = brcmf_get_ifp(cfg->pub, 0); +- p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif = pri_ifp->vif; +- +- if (p2pdev_forced) { +-- p2p_ifp = drvr->iflist[1]; +-+ err_ptr = brcmf_p2p_create_p2pdev(p2p, NULL, NULL); +-+ if (IS_ERR(err_ptr)) { +-+ brcmf_err("P2P device creation failed.\n"); +-+ err = PTR_ERR(err_ptr); +-+ } +- } else { +-- p2p_ifp = NULL; +- p2p->p2pdev_dynamically = true; +- } +-- if (p2p_ifp) { +-- p2p_vif = brcmf_alloc_vif(cfg, NL80211_IFTYPE_P2P_DEVICE, +-- false); +-- if (IS_ERR(p2p_vif)) { +-- brcmf_err("could not create discovery vif\n"); +-- err = -ENOMEM; +-- goto exit; +-- } +-- +-- p2p_vif->ifp = p2p_ifp; +-- p2p_ifp->vif = p2p_vif; +-- p2p_vif->wdev.netdev = p2p_ifp->ndev; +-- p2p_ifp->ndev->ieee80211_ptr = &p2p_vif->wdev; +-- SET_NETDEV_DEV(p2p_ifp->ndev, wiphy_dev(cfg->wiphy)); +-- +-- p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif = p2p_vif; +-- +-- brcmf_p2p_generate_bss_mac(p2p, NULL); +-- memcpy(p2p_ifp->mac_addr, p2p->dev_addr, ETH_ALEN); +-- brcmf_p2p_set_firmware(pri_ifp, p2p->dev_addr); +-- +-- brcmf_fweh_p2pdev_setup(pri_ifp, true); +-- +-- /* Initialize P2P Discovery in the firmware */ +-- err = brcmf_fil_iovar_int_set(pri_ifp, "p2p_disc", 1); +-- if (err < 0) { +-- brcmf_err("set p2p_disc error\n"); +-- brcmf_free_vif(p2p_vif); +-- goto exit; +-- } +-- /* obtain bsscfg index for P2P discovery */ +-- err = brcmf_fil_iovar_int_get(pri_ifp, "p2p_dev", &bssidx); +-- if (err < 0) { +-- brcmf_err("retrieving discover bsscfg index failed\n"); +-- brcmf_free_vif(p2p_vif); +-- goto exit; +-- } +-- /* Verify that firmware uses same bssidx as driver !! */ +-- if (p2p_ifp->bssidx != bssidx) { +-- brcmf_err("Incorrect bssidx=%d, compared to p2p_ifp->bssidx=%d\n", +-- bssidx, p2p_ifp->bssidx); +-- brcmf_free_vif(p2p_vif); +-- goto exit; +-- } +-- +-- init_completion(&p2p->send_af_done); +-- INIT_WORK(&p2p->afx_hdl.afx_work, brcmf_p2p_afx_handler); +-- init_completion(&p2p->afx_hdl.act_frm_scan); +-- init_completion(&p2p->wait_next_af); +--exit: +-- brcmf_fweh_p2pdev_setup(pri_ifp, false); +-- } +- return err; +- } +- +diff --git a/package/kernel/mac80211/patches/372-0006-brcmfmac-Fix-station-info-rate-information.patch b/package/kernel/mac80211/patches/372-0006-brcmfmac-Fix-station-info-rate-information.patch +deleted file mode 100644 +index 0abcf1e..0000000 +--- a/package/kernel/mac80211/patches/372-0006-brcmfmac-Fix-station-info-rate-information.patch ++++ /dev/null +@@ -1,36 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 8 Oct 2015 20:33:16 +0200 +-Subject: [PATCH] brcmfmac: Fix station info rate information. +- +-Txrate and rxrate in get_station got assigned first with value +-in kbps and then divided by 100 to get it in 100kbps unit. The +-problem with that is that type of rate is u16 which resulted +-in incorrect values for high data rate values. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -2477,13 +2477,13 @@ brcmf_cfg80211_get_station(struct wiphy +- sinfo->rx_packets += le32_to_cpu(sta_info_le.rx_mcast_pkts); +- if (sinfo->tx_packets) { +- sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE); +-- sinfo->txrate.legacy = le32_to_cpu(sta_info_le.tx_rate); +-- sinfo->txrate.legacy /= 100; +-+ sinfo->txrate.legacy = +-+ le32_to_cpu(sta_info_le.tx_rate) / 100; +- } +- if (sinfo->rx_packets) { +- sinfo->filled |= BIT(NL80211_STA_INFO_RX_BITRATE); +-- sinfo->rxrate.legacy = le32_to_cpu(sta_info_le.rx_rate); +-- sinfo->rxrate.legacy /= 100; +-+ sinfo->rxrate.legacy = +-+ le32_to_cpu(sta_info_le.rx_rate) / 100; +- } +- if (le16_to_cpu(sta_info_le.ver) >= 4) { +- sinfo->filled |= BIT(NL80211_STA_INFO_TX_BYTES); +diff --git a/package/kernel/mac80211/patches/372-0007-brcmfmac-Add-RSSI-information-to-get_station.patch b/package/kernel/mac80211/patches/372-0007-brcmfmac-Add-RSSI-information-to-get_station.patch +deleted file mode 100644 +index bb03d67..0000000 +--- a/package/kernel/mac80211/patches/372-0007-brcmfmac-Add-RSSI-information-to-get_station.patch ++++ /dev/null +@@ -1,50 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 8 Oct 2015 20:33:17 +0200 +-Subject: [PATCH] brcmfmac: Add RSSI information to get_station. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -2431,6 +2431,9 @@ brcmf_cfg80211_get_station(struct wiphy +- struct brcmf_sta_info_le sta_info_le; +- u32 sta_flags; +- u32 is_tdls_peer; +-+ s32 total_rssi; +-+ s32 count_rssi; +-+ u32 i; +- +- brcmf_dbg(TRACE, "Enter, MAC %pM\n", mac); +- if (!check_vif_up(ifp->vif)) +-@@ -2491,6 +2494,26 @@ brcmf_cfg80211_get_station(struct wiphy +- sinfo->filled |= BIT(NL80211_STA_INFO_RX_BYTES); +- sinfo->rx_bytes = le64_to_cpu(sta_info_le.rx_tot_bytes); +- } +-+ total_rssi = 0; +-+ count_rssi = 0; +-+ for (i = 0; i < BRCMF_ANT_MAX; i++) { +-+ if (sta_info_le.rssi[i]) { +-+ sinfo->chain_signal_avg[count_rssi] = +-+ sta_info_le.rssi[i]; +-+ sinfo->chain_signal[count_rssi] = +-+ sta_info_le.rssi[i]; +-+ total_rssi += sta_info_le.rssi[i]; +-+ count_rssi++; +-+ } +-+ } +-+ if (count_rssi) { +-+ sinfo->filled |= BIT(NL80211_STA_INFO_CHAIN_SIGNAL); +-+ sinfo->chains = count_rssi; +-+ +-+ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL); +-+ total_rssi /= count_rssi; +-+ sinfo->signal = total_rssi; +-+ } +- } +- done: +- brcmf_dbg(TRACE, "Exit\n"); +diff --git a/package/kernel/mac80211/patches/372-0008-brcmfmac-Add-dump_station-support-to-cfg80221-ops.patch b/package/kernel/mac80211/patches/372-0008-brcmfmac-Add-dump_station-support-to-cfg80221-ops.patch +deleted file mode 100644 +index a6bafd2..0000000 +--- a/package/kernel/mac80211/patches/372-0008-brcmfmac-Add-dump_station-support-to-cfg80221-ops.patch ++++ /dev/null +@@ -1,107 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 8 Oct 2015 20:33:18 +0200 +-Subject: [PATCH] brcmfmac: Add dump_station support to cfg80221 ops. +- +-With this feature it becomes possible to request a station +-assoc list. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -2520,6 +2520,35 @@ done: +- return err; +- } +- +-+static int +-+brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev, +-+ int idx, u8 *mac, struct station_info *sinfo) +-+{ +-+ struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); +-+ struct brcmf_if *ifp = netdev_priv(ndev); +-+ s32 err; +-+ +-+ brcmf_dbg(TRACE, "Enter, idx %d\n", idx); +-+ +-+ if (idx == 0) { +-+ cfg->assoclist.count = cpu_to_le32(BRCMF_MAX_ASSOCLIST); +-+ err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_ASSOCLIST, +-+ &cfg->assoclist, +-+ sizeof(cfg->assoclist)); +-+ if (err) { +-+ brcmf_err("BRCMF_C_GET_ASSOCLIST unsupported, err=%d\n", +-+ err); +-+ cfg->assoclist.count = 0; +-+ return -EOPNOTSUPP; +-+ } +-+ } +-+ if (idx < le32_to_cpu(cfg->assoclist.count)) { +-+ memcpy(mac, cfg->assoclist.mac[idx], ETH_ALEN); +-+ return brcmf_cfg80211_get_station(wiphy, ndev, mac, sinfo); +-+ } +-+ return -ENOENT; +-+} +-+ +- static s32 +- brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, +- bool enabled, s32 timeout) +-@@ -4619,6 +4648,7 @@ static struct cfg80211_ops wl_cfg80211_o +- .join_ibss = brcmf_cfg80211_join_ibss, +- .leave_ibss = brcmf_cfg80211_leave_ibss, +- .get_station = brcmf_cfg80211_get_station, +-+ .dump_station = brcmf_cfg80211_dump_station, +- .set_tx_power = brcmf_cfg80211_set_tx_power, +- .get_tx_power = brcmf_cfg80211_get_tx_power, +- .add_key = brcmf_cfg80211_add_key, +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-@@ -407,6 +407,7 @@ struct brcmf_cfg80211_info { +- struct brcmu_d11inf d11inf; +- bool wowl_enabled; +- u32 pre_wowl_pmmode; +-+ struct brcmf_assoclist_le assoclist; +- }; +- +- /** +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.h +-@@ -72,6 +72,7 @@ +- #define BRCMF_C_GET_BSS_INFO 136 +- #define BRCMF_C_GET_BANDLIST 140 +- #define BRCMF_C_SET_SCB_TIMEOUT 158 +-+#define BRCMF_C_GET_ASSOCLIST 159 +- #define BRCMF_C_GET_PHYLIST 180 +- #define BRCMF_C_SET_SCAN_CHANNEL_TIME 185 +- #define BRCMF_C_SET_SCAN_UNASSOC_TIME 187 +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-@@ -119,6 +119,8 @@ +- #define BRCMF_COUNTRY_BUF_SZ 4 +- #define BRCMF_ANT_MAX 4 +- +-+#define BRCMF_MAX_ASSOCLIST 128 +-+ +- /* join preference types for join_pref iovar */ +- enum brcmf_join_pref_types { +- BRCMF_JOIN_PREF_RSSI = 1, +-@@ -621,4 +623,15 @@ struct brcmf_rev_info_le { +- __le32 nvramrev; +- }; +- +-+/** +-+ * struct brcmf_assoclist_le - request assoc list. +-+ * +-+ * @count: indicates number of stations. +-+ * @mac: MAC addresses of stations. +-+ */ +-+struct brcmf_assoclist_le { +-+ __le32 count; +-+ u8 mac[BRCMF_MAX_ASSOCLIST][ETH_ALEN]; +-+}; +-+ +- #endif /* FWIL_TYPES_H_ */ +diff --git a/package/kernel/mac80211/patches/372-0009-brcmfmac-Move-brcmf_c_preinit_dcmds-prototype-to-cor.patch b/package/kernel/mac80211/patches/372-0009-brcmfmac-Move-brcmf_c_preinit_dcmds-prototype-to-cor.patch +deleted file mode 100644 +index dc54904..0000000 +--- a/package/kernel/mac80211/patches/372-0009-brcmfmac-Move-brcmf_c_preinit_dcmds-prototype-to-cor.patch ++++ /dev/null +@@ -1,42 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 8 Oct 2015 20:33:19 +0200 +-Subject: [PATCH] brcmfmac: Move brcmf_c_preinit_dcmds prototype to correct +- file. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/common.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/common.h +-@@ -17,4 +17,7 @@ +- +- extern const u8 ALLFFMAC[ETH_ALEN]; +- +-+/* Sets dongle media info (drv_version, mac address). */ +-+int brcmf_c_preinit_dcmds(struct brcmf_if *ifp); +-+ +- #endif /* BRCMFMAC_COMMON_H */ +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -33,6 +33,7 @@ +- #include "feature.h" +- #include "proto.h" +- #include "pcie.h" +-+#include "common.h" +- +- MODULE_AUTHOR("Broadcom Corporation"); +- MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver."); +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.h +-@@ -214,7 +214,4 @@ void brcmf_txflowblock_if(struct brcmf_i +- void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success); +- void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb); +- +--/* Sets dongle media info (drv_version, mac address). */ +--int brcmf_c_preinit_dcmds(struct brcmf_if *ifp); +-- +- #endif /* BRCMFMAC_CORE_H */ +diff --git a/package/kernel/mac80211/patches/372-0010-brcmfmac-Remove-unused-state-AP-creating.patch b/package/kernel/mac80211/patches/372-0010-brcmfmac-Remove-unused-state-AP-creating.patch +deleted file mode 100644 +index c6a7363..0000000 +--- a/package/kernel/mac80211/patches/372-0010-brcmfmac-Remove-unused-state-AP-creating.patch ++++ /dev/null +@@ -1,55 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 8 Oct 2015 20:33:20 +0200 +-Subject: [PATCH] brcmfmac: Remove unused state AP creating. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -839,7 +839,6 @@ brcmf_cfg80211_change_iface(struct wiphy +- err = brcmf_p2p_ifchange(cfg, BRCMF_FIL_P2P_IF_GO); +- } +- if (!err) { +-- set_bit(BRCMF_VIF_STATUS_AP_CREATING, &vif->sme_state); +- brcmf_dbg(INFO, "IF Type = AP\n"); +- } +- } else { +-@@ -4250,7 +4249,6 @@ brcmf_cfg80211_start_ap(struct wiphy *wi +- +- brcmf_dbg(TRACE, "GO mode configuration complete\n"); +- } +-- clear_bit(BRCMF_VIF_STATUS_AP_CREATING, &ifp->vif->sme_state); +- set_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); +- +- exit: +-@@ -4315,7 +4313,6 @@ static int brcmf_cfg80211_stop_ap(struct +- } +- brcmf_set_mpc(ifp, 1); +- brcmf_configure_arp_offload(ifp, true); +-- set_bit(BRCMF_VIF_STATUS_AP_CREATING, &ifp->vif->sme_state); +- clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); +- +- return err; +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-@@ -143,7 +143,6 @@ struct brcmf_cfg80211_profile { +- * @BRCMF_VIF_STATUS_CONNECTING: connect/join in progress. +- * @BRCMF_VIF_STATUS_CONNECTED: connected/joined succesfully. +- * @BRCMF_VIF_STATUS_DISCONNECTING: disconnect/disable in progress. +-- * @BRCMF_VIF_STATUS_AP_CREATING: interface configured for AP operation. +- * @BRCMF_VIF_STATUS_AP_CREATED: AP operation started. +- */ +- enum brcmf_vif_status { +-@@ -151,7 +150,6 @@ enum brcmf_vif_status { +- BRCMF_VIF_STATUS_CONNECTING, +- BRCMF_VIF_STATUS_CONNECTED, +- BRCMF_VIF_STATUS_DISCONNECTING, +-- BRCMF_VIF_STATUS_AP_CREATING, +- BRCMF_VIF_STATUS_AP_CREATED +- }; +- +diff --git a/package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch b/package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch +deleted file mode 100644 +index c0948de..0000000 +--- a/package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch ++++ /dev/null +@@ -1,122 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 8 Oct 2015 20:33:21 +0200 +-Subject: [PATCH] brcmfmac: Properly set carrier state of netdev. +- +-Use the netif_carrier api to correctly set carrier state on the +-different modes. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Reviewed-by: Franky (Zhenhui) Lin +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -4250,6 +4250,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi +- brcmf_dbg(TRACE, "GO mode configuration complete\n"); +- } +- set_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); +-+ brcmf_net_setcarrier(ifp, true); +- +- exit: +- if ((err) && (!mbss)) { +-@@ -4314,6 +4315,7 @@ static int brcmf_cfg80211_stop_ap(struct +- brcmf_set_mpc(ifp, 1); +- brcmf_configure_arp_offload(ifp, true); +- clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); +-+ brcmf_net_setcarrier(ifp, false); +- +- return err; +- } +-@@ -5023,6 +5025,7 @@ brcmf_notify_connect_status(struct brcmf +- &ifp->vif->sme_state); +- } else +- brcmf_bss_connect_done(cfg, ndev, e, true); +-+ brcmf_net_setcarrier(ifp, true); +- } else if (brcmf_is_linkdown(e)) { +- brcmf_dbg(CONN, "Linkdown\n"); +- if (!brcmf_is_ibssmode(ifp->vif)) { +-@@ -5032,6 +5035,7 @@ brcmf_notify_connect_status(struct brcmf +- brcmf_init_prof(ndev_to_prof(ndev)); +- if (ndev != cfg_to_ndev(cfg)) +- complete(&cfg->vif_disabled); +-+ brcmf_net_setcarrier(ifp, false); +- } else if (brcmf_is_nonetwork(cfg, e)) { +- if (brcmf_is_ibssmode(ifp->vif)) +- clear_bit(BRCMF_VIF_STATUS_CONNECTING, +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -635,8 +635,7 @@ static int brcmf_netdev_stop(struct net_ +- +- brcmf_cfg80211_down(ndev); +- +-- /* Set state and stop OS transmissions */ +-- netif_stop_queue(ndev); +-+ brcmf_net_setcarrier(ifp, false); +- +- return 0; +- } +-@@ -670,8 +669,8 @@ static int brcmf_netdev_open(struct net_ +- return -EIO; +- } +- +-- /* Allow transmit calls */ +-- netif_start_queue(ndev); +-+ /* Clear, carrier, set when connected or AP mode. */ +-+ netif_carrier_off(ndev); +- return 0; +- } +- +-@@ -736,6 +735,24 @@ static void brcmf_net_detach(struct net_ +- brcmf_cfg80211_free_netdev(ndev); +- } +- +-+void brcmf_net_setcarrier(struct brcmf_if *ifp, bool on) +-+{ +-+ struct net_device *ndev; +-+ +-+ brcmf_dbg(TRACE, "Enter, idx=%d carrier=%d\n", ifp->bssidx, on); +-+ +-+ ndev = ifp->ndev; +-+ brcmf_txflowblock_if(ifp, BRCMF_NETIF_STOP_REASON_DISCONNECTED, !on); +-+ if (on) { +-+ if (!netif_carrier_ok(ndev)) +-+ netif_carrier_on(ndev); +-+ +-+ } else { +-+ if (netif_carrier_ok(ndev)) +-+ netif_carrier_off(ndev); +-+ } +-+} +-+ +- static int brcmf_net_p2p_open(struct net_device *ndev) +- { +- brcmf_dbg(TRACE, "Enter\n"); +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.h +-@@ -154,10 +154,13 @@ struct brcmf_fws_mac_descriptor; +- * netif stopped due to firmware signalling flow control. +- * @BRCMF_NETIF_STOP_REASON_FLOW: +- * netif stopped due to flowring full. +-+ * @BRCMF_NETIF_STOP_REASON_DISCONNECTED: +-+ * netif stopped due to not being connected (STA mode). +- */ +- enum brcmf_netif_stop_reason { +-- BRCMF_NETIF_STOP_REASON_FWS_FC = 1, +-- BRCMF_NETIF_STOP_REASON_FLOW = 2 +-+ BRCMF_NETIF_STOP_REASON_FWS_FC = BIT(0), +-+ BRCMF_NETIF_STOP_REASON_FLOW = BIT(1), +-+ BRCMF_NETIF_STOP_REASON_DISCONNECTED = BIT(2) +- }; +- +- /** +-@@ -213,5 +216,6 @@ void brcmf_txflowblock_if(struct brcmf_i +- enum brcmf_netif_stop_reason reason, bool state); +- void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success); +- void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb); +-+void brcmf_net_setcarrier(struct brcmf_if *ifp, bool on); +- +- #endif /* BRCMFMAC_CORE_H */ +diff --git a/package/kernel/mac80211/patches/373-brcm80211-Add-support-for-brcm4371.patch b/package/kernel/mac80211/patches/373-brcm80211-Add-support-for-brcm4371.patch +deleted file mode 100644 +index ea6fad1..0000000 +--- a/package/kernel/mac80211/patches/373-brcm80211-Add-support-for-brcm4371.patch ++++ /dev/null +@@ -1,78 +0,0 @@ +-From: Eric Caruso +-Date: Wed, 14 Oct 2015 12:34:11 -0700 +-Subject: [PATCH] brcm80211: Add support for brcm4371 +- +-This is a new Broadcom chip and we should be able to recognize it. +- +-Signed-off-by: Eric Caruso +-Acked-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/chip.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/chip.c +-@@ -682,6 +682,7 @@ static u32 brcmf_chip_tcm_rambase(struct +- case BRCM_CC_43570_CHIP_ID: +- case BRCM_CC_4358_CHIP_ID: +- case BRCM_CC_43602_CHIP_ID: +-+ case BRCM_CC_4371_CHIP_ID: +- return 0x180000; +- case BRCM_CC_4365_CHIP_ID: +- case BRCM_CC_4366_CHIP_ID: +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -59,6 +59,8 @@ enum brcmf_pcie_state { +- #define BRCMF_PCIE_4365_NVRAM_NAME "brcm/brcmfmac4365b-pcie.txt" +- #define BRCMF_PCIE_4366_FW_NAME "brcm/brcmfmac4366b-pcie.bin" +- #define BRCMF_PCIE_4366_NVRAM_NAME "brcm/brcmfmac4366b-pcie.txt" +-+#define BRCMF_PCIE_4371_FW_NAME "brcm/brcmfmac4371-pcie.bin" +-+#define BRCMF_PCIE_4371_NVRAM_NAME "brcm/brcmfmac4371-pcie.txt" +- +- #define BRCMF_PCIE_FW_UP_TIMEOUT 2000 /* msec */ +- +-@@ -212,6 +214,8 @@ MODULE_FIRMWARE(BRCMF_PCIE_4365_FW_NAME) +- MODULE_FIRMWARE(BRCMF_PCIE_4365_NVRAM_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4366_FW_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4366_NVRAM_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4371_FW_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4371_NVRAM_NAME); +- +- +- struct brcmf_pcie_console { +-@@ -1521,6 +1525,10 @@ static int brcmf_pcie_get_fwnames(struct +- fw_name = BRCMF_PCIE_4366_FW_NAME; +- nvram_name = BRCMF_PCIE_4366_NVRAM_NAME; +- break; +-+ case BRCM_CC_4371_CHIP_ID: +-+ fw_name = BRCMF_PCIE_4371_FW_NAME; +-+ nvram_name = BRCMF_PCIE_4371_NVRAM_NAME; +-+ break; +- default: +- brcmf_err("Unsupported chip 0x%04x\n", devinfo->ci->chip); +- return -ENODEV; +-@@ -2060,6 +2068,7 @@ static struct pci_device_id brcmf_pcie_d +- BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_2G_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID), +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID), +- { /* end: all zeroes */ } +- }; +- +---- a/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +-+++ b/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +-@@ -50,6 +50,7 @@ +- #define BRCM_CC_43602_CHIP_ID 43602 +- #define BRCM_CC_4365_CHIP_ID 0x4365 +- #define BRCM_CC_4366_CHIP_ID 0x4366 +-+#define BRCM_CC_4371_CHIP_ID 0x4371 +- +- /* USB Device IDs */ +- #define BRCM_USB_43143_DEVICE_ID 0xbd1e +-@@ -75,6 +76,7 @@ +- #define BRCM_PCIE_4366_DEVICE_ID 0x43c3 +- #define BRCM_PCIE_4366_2G_DEVICE_ID 0x43c4 +- #define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 +-+#define BRCM_PCIE_4371_DEVICE_ID 0x440d +- +- +- /* brcmsmac IDs */ +diff --git a/package/kernel/mac80211/patches/374-0001-brcmfmac-Add-support-for-the-BCM4359-11ac-RSDB-PCIE-.patch b/package/kernel/mac80211/patches/374-0001-brcmfmac-Add-support-for-the-BCM4359-11ac-RSDB-PCIE-.patch +deleted file mode 100644 +index 221bae6..0000000 +--- a/package/kernel/mac80211/patches/374-0001-brcmfmac-Add-support-for-the-BCM4359-11ac-RSDB-PCIE-.patch ++++ /dev/null +@@ -1,78 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:11 +0100 +-Subject: [PATCH] brcmfmac: Add support for the BCM4359 11ac RSDB PCIE device. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/chip.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/chip.c +-@@ -681,6 +681,7 @@ static u32 brcmf_chip_tcm_rambase(struct +- case BRCM_CC_43569_CHIP_ID: +- case BRCM_CC_43570_CHIP_ID: +- case BRCM_CC_4358_CHIP_ID: +-+ case BRCM_CC_4359_CHIP_ID: +- case BRCM_CC_43602_CHIP_ID: +- case BRCM_CC_4371_CHIP_ID: +- return 0x180000; +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -55,6 +55,8 @@ enum brcmf_pcie_state { +- #define BRCMF_PCIE_43570_NVRAM_NAME "brcm/brcmfmac43570-pcie.txt" +- #define BRCMF_PCIE_4358_FW_NAME "brcm/brcmfmac4358-pcie.bin" +- #define BRCMF_PCIE_4358_NVRAM_NAME "brcm/brcmfmac4358-pcie.txt" +-+#define BRCMF_PCIE_4359_FW_NAME "brcm/brcmfmac4359-pcie.bin" +-+#define BRCMF_PCIE_4359_NVRAM_NAME "brcm/brcmfmac4359-pcie.txt" +- #define BRCMF_PCIE_4365_FW_NAME "brcm/brcmfmac4365b-pcie.bin" +- #define BRCMF_PCIE_4365_NVRAM_NAME "brcm/brcmfmac4365b-pcie.txt" +- #define BRCMF_PCIE_4366_FW_NAME "brcm/brcmfmac4366b-pcie.bin" +-@@ -210,6 +212,8 @@ MODULE_FIRMWARE(BRCMF_PCIE_43570_FW_NAME +- MODULE_FIRMWARE(BRCMF_PCIE_43570_NVRAM_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4358_FW_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4358_NVRAM_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4359_FW_NAME); +-+MODULE_FIRMWARE(BRCMF_PCIE_4359_NVRAM_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4365_FW_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4365_NVRAM_NAME); +- MODULE_FIRMWARE(BRCMF_PCIE_4366_FW_NAME); +-@@ -1517,6 +1521,10 @@ static int brcmf_pcie_get_fwnames(struct +- fw_name = BRCMF_PCIE_4358_FW_NAME; +- nvram_name = BRCMF_PCIE_4358_NVRAM_NAME; +- break; +-+ case BRCM_CC_4359_CHIP_ID: +-+ fw_name = BRCMF_PCIE_4359_FW_NAME; +-+ nvram_name = BRCMF_PCIE_4359_NVRAM_NAME; +-+ break; +- case BRCM_CC_4365_CHIP_ID: +- fw_name = BRCMF_PCIE_4365_FW_NAME; +- nvram_name = BRCMF_PCIE_4365_NVRAM_NAME; +-@@ -2058,6 +2066,7 @@ static struct pci_device_id brcmf_pcie_d +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_4358_DEVICE_ID), +-+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4359_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_2G_DEVICE_ID), +- BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_5G_DEVICE_ID), +---- a/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +-+++ b/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +-@@ -47,6 +47,7 @@ +- #define BRCM_CC_43569_CHIP_ID 43569 +- #define BRCM_CC_43570_CHIP_ID 43570 +- #define BRCM_CC_4358_CHIP_ID 0x4358 +-+#define BRCM_CC_4359_CHIP_ID 0x4359 +- #define BRCM_CC_43602_CHIP_ID 43602 +- #define BRCM_CC_4365_CHIP_ID 0x4365 +- #define BRCM_CC_4366_CHIP_ID 0x4366 +-@@ -66,6 +67,7 @@ +- #define BRCM_PCIE_43567_DEVICE_ID 0x43d3 +- #define BRCM_PCIE_43570_DEVICE_ID 0x43d9 +- #define BRCM_PCIE_4358_DEVICE_ID 0x43e9 +-+#define BRCM_PCIE_4359_DEVICE_ID 0x43ef +- #define BRCM_PCIE_43602_DEVICE_ID 0x43ba +- #define BRCM_PCIE_43602_2G_DEVICE_ID 0x43bb +- #define BRCM_PCIE_43602_5G_DEVICE_ID 0x43bc +diff --git a/package/kernel/mac80211/patches/374-0002-brcmfmac-Simplify-and-fix-usage-of-brcmf_ifname.patch b/package/kernel/mac80211/patches/374-0002-brcmfmac-Simplify-and-fix-usage-of-brcmf_ifname.patch +deleted file mode 100644 +index 331896b..0000000 +--- a/package/kernel/mac80211/patches/374-0002-brcmfmac-Simplify-and-fix-usage-of-brcmf_ifname.patch ++++ /dev/null +@@ -1,110 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:12 +0100 +-Subject: [PATCH] brcmfmac: Simplify and fix usage of brcmf_ifname. +- +-brcmf_ifname is a debug function to return a name related to an ifp, +-but is using a rather complex implementation. It was also used +-wrongly from bcdc as it did not use the bsscfgidx as it was supposed +-to, but bssidx. This patch fixes that bug and simplifies +-brcmf_ifname. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c +-@@ -187,7 +187,8 @@ retry: +- goto retry; +- if (id != bcdc->reqid) { +- brcmf_err("%s: unexpected request id %d (expected %d)\n", +-- brcmf_ifname(drvr, ifidx), id, bcdc->reqid); +-+ brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id, +-+ bcdc->reqid); +- ret = -EINVAL; +- goto done; +- } +-@@ -234,7 +235,8 @@ brcmf_proto_bcdc_set_dcmd(struct brcmf_p +- +- if (id != bcdc->reqid) { +- brcmf_err("%s: unexpected request id %d (expected %d)\n", +-- brcmf_ifname(drvr, ifidx), id, bcdc->reqid); +-+ brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id, +-+ bcdc->reqid); +- ret = -EINVAL; +- goto done; +- } +-@@ -298,13 +300,13 @@ brcmf_proto_bcdc_hdrpull(struct brcmf_pu +- if (((h->flags & BCDC_FLAG_VER_MASK) >> BCDC_FLAG_VER_SHIFT) != +- BCDC_PROTO_VER) { +- brcmf_err("%s: non-BCDC packet received, flags 0x%x\n", +-- brcmf_ifname(drvr, tmp_if->ifidx), h->flags); +-+ brcmf_ifname(tmp_if), h->flags); +- return -EBADE; +- } +- +- if (h->flags & BCDC_FLAG_SUM_GOOD) { +- brcmf_dbg(BCDC, "%s: BDC rcv, good checksum, flags 0x%x\n", +-- brcmf_ifname(drvr, tmp_if->ifidx), h->flags); +-+ brcmf_ifname(tmp_if), h->flags); +- pktbuf->ip_summed = CHECKSUM_UNNECESSARY; +- } +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -66,20 +66,13 @@ static int brcmf_p2p_enable; +- module_param_named(p2pon, brcmf_p2p_enable, int, 0); +- MODULE_PARM_DESC(p2pon, "enable legacy p2p management functionality"); +- +--char *brcmf_ifname(struct brcmf_pub *drvr, int ifidx) +-+char *brcmf_ifname(struct brcmf_if *ifp) +- { +-- if (ifidx < 0 || ifidx >= BRCMF_MAX_IFS) { +-- brcmf_err("ifidx %d out of range\n", ifidx); +-- return ""; +-- } +-- +-- if (drvr->iflist[ifidx] == NULL) { +-- brcmf_err("null i/f %d\n", ifidx); +-+ if (!ifp) +- return ""; +-- } +- +-- if (drvr->iflist[ifidx]->ndev) +-- return drvr->iflist[ifidx]->ndev->name; +-+ if (ifp->ndev) +-+ return ifp->ndev->name; +- +- return ""; +- } +-@@ -237,14 +230,14 @@ static netdev_tx_t brcmf_netdev_start_xm +- struct sk_buff *skb2; +- +- brcmf_dbg(INFO, "%s: insufficient headroom\n", +-- brcmf_ifname(drvr, ifp->bssidx)); +-+ brcmf_ifname(ifp)); +- drvr->bus_if->tx_realloc++; +- skb2 = skb_realloc_headroom(skb, drvr->hdrlen); +- dev_kfree_skb(skb); +- skb = skb2; +- if (skb == NULL) { +- brcmf_err("%s: skb_realloc_headroom failed\n", +-- brcmf_ifname(drvr, ifp->bssidx)); +-+ brcmf_ifname(ifp)); +- ret = -ENOMEM; +- goto done; +- } +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.h +-@@ -205,7 +205,7 @@ struct brcmf_skb_reorder_data { +- int brcmf_netdev_wait_pend8021x(struct brcmf_if *ifp); +- +- /* Return pointer to interface name */ +--char *brcmf_ifname(struct brcmf_pub *drvr, int idx); +-+char *brcmf_ifname(struct brcmf_if *ifp); +- struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx); +- int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked); +- struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx, s32 ifidx, +diff --git a/package/kernel/mac80211/patches/374-0003-brcmfmac-Remove-unnecessary-check-from-start_xmit.patch b/package/kernel/mac80211/patches/374-0003-brcmfmac-Remove-unnecessary-check-from-start_xmit.patch +deleted file mode 100644 +index 4d60521..0000000 +--- a/package/kernel/mac80211/patches/374-0003-brcmfmac-Remove-unnecessary-check-from-start_xmit.patch ++++ /dev/null +@@ -1,32 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:13 +0100 +-Subject: [PATCH] brcmfmac: Remove unnecessary check from start_xmit. +- +-The brcmf_netdev_start_xmit checks if the ndev is still valid by +-checking if it still exists in database. This check is not needed +-and therefor removed. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -217,14 +217,6 @@ static netdev_tx_t brcmf_netdev_start_xm +- goto done; +- } +- +-- if (!drvr->iflist[ifp->bssidx]) { +-- brcmf_err("bad ifidx %d\n", ifp->bssidx); +-- netif_stop_queue(ndev); +-- dev_kfree_skb(skb); +-- ret = -ENODEV; +-- goto done; +-- } +-- +- /* Make sure there's enough room for any header */ +- if (skb_headroom(skb) < drvr->hdrlen) { +- struct sk_buff *skb2; +diff --git a/package/kernel/mac80211/patches/374-0004-brcmfmac-Remove-unncessary-variable-irq_requested.patch b/package/kernel/mac80211/patches/374-0004-brcmfmac-Remove-unncessary-variable-irq_requested.patch +deleted file mode 100644 +index 5030297..0000000 +--- a/package/kernel/mac80211/patches/374-0004-brcmfmac-Remove-unncessary-variable-irq_requested.patch ++++ /dev/null +@@ -1,49 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:14 +0100 +-Subject: [PATCH] brcmfmac: Remove unncessary variable irq_requested. +- +-The variable irq_requested is unneeded as the functionality +-it is providing, is also provided by the variable irq_allocated. +- +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -257,7 +257,6 @@ struct brcmf_pcie_core_info { +- struct brcmf_pciedev_info { +- enum brcmf_pcie_state state; +- bool in_irq; +-- bool irq_requested; +- struct pci_dev *pdev; +- char fw_name[BRCMF_FW_PATH_LEN + BRCMF_FW_NAME_LEN]; +- char nvram_name[BRCMF_FW_PATH_LEN + BRCMF_FW_NAME_LEN]; +-@@ -889,7 +888,6 @@ static int brcmf_pcie_request_irq(struct +- +- brcmf_dbg(PCIE, "Enter\n"); +- /* is it a v1 or v2 implementation */ +-- devinfo->irq_requested = false; +- pci_enable_msi(pdev); +- if (devinfo->generic_corerev == BRCMF_PCIE_GENREV1) { +- if (request_threaded_irq(pdev->irq, +-@@ -912,7 +910,6 @@ static int brcmf_pcie_request_irq(struct +- return -EIO; +- } +- } +-- devinfo->irq_requested = true; +- devinfo->irq_allocated = true; +- return 0; +- } +-@@ -930,9 +927,6 @@ static void brcmf_pcie_release_irq(struc +- pdev = devinfo->pdev; +- +- brcmf_pcie_intr_disable(devinfo); +-- if (!devinfo->irq_requested) +-- return; +-- devinfo->irq_requested = false; +- free_irq(pdev->irq, devinfo); +- pci_disable_msi(pdev); +- +diff --git a/package/kernel/mac80211/patches/374-0005-brcmfmac-Disable-runtime-pm-for-USB.patch b/package/kernel/mac80211/patches/374-0005-brcmfmac-Disable-runtime-pm-for-USB.patch +deleted file mode 100644 +index f2afb90..0000000 +--- a/package/kernel/mac80211/patches/374-0005-brcmfmac-Disable-runtime-pm-for-USB.patch ++++ /dev/null +@@ -1,26 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:15 +0100 +-Subject: [PATCH] brcmfmac: Disable runtime pm for USB. +- +-Currently runtime pm is enabled for USB, but it is not properly +-supported by driver. This patch disables the runtime PM support +-completely for USB, as it currently can result in problems on +-some systems. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c +-@@ -1504,7 +1504,6 @@ static struct usb_driver brcmf_usbdrvr = +- .suspend = brcmf_usb_suspend, +- .resume = brcmf_usb_resume, +- .reset_resume = brcmf_usb_reset_resume, +-- .supports_autosuspend = 1, +- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) +- .disable_hub_initiated_lpm = 1, +- #endif +diff --git a/package/kernel/mac80211/patches/374-0006-brcmfmac-Add-RSDB-support.patch b/package/kernel/mac80211/patches/374-0006-brcmfmac-Add-RSDB-support.patch +deleted file mode 100644 +index 78a95c5..0000000 +--- a/package/kernel/mac80211/patches/374-0006-brcmfmac-Add-RSDB-support.patch ++++ /dev/null +@@ -1,65 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:16 +0100 +-Subject: [PATCH] brcmfmac: Add RSDB support. +- +-Broadcom devices with a single 802.11 core can work on two band +-concurrently using VSDB feature, ie. Virtual Simultaneous Dual-Band. +-For devices that are fitted with two 802.11 cores and RF paths the +-driver should support a firmware feature called RSDB, which stands +-for Real Simultaneous Dual-Band. RSDB works almost autonomously in +-firmware except for AP config. When the device supports RSDB then +-the interface should not be brought down when configuring it, +-otherwise the link (if configured) on the other interface will be +-lost. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-[kvalo@codeaurora.org: changed the commit log based on discussion] +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -4182,7 +4182,9 @@ brcmf_cfg80211_start_ap(struct wiphy *wi +- } +- } +- +-- if (dev_role == NL80211_IFTYPE_AP) { +-+ if ((dev_role == NL80211_IFTYPE_AP) && +-+ ((ifp->ifidx == 0) || +-+ !brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB))) { +- err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); +- if (err < 0) { +- brcmf_err("BRCMF_C_DOWN error %d\n", err); +---- a/drivers/net/wireless/brcm80211/brcmfmac/feature.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/feature.c +-@@ -137,6 +137,7 @@ void brcmf_feat_attach(struct brcmf_pub +- if (drvr->bus_if->chip != BRCM_CC_43362_CHIP_ID) +- brcmf_feat_iovar_int_set(ifp, BRCMF_FEAT_MBSS, "mbss", 0); +- brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_P2P, "p2p"); +-+ brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_RSDB, "rsdb_mode"); +- +- if (brcmf_feature_disable) { +- brcmf_dbg(INFO, "Features: 0x%02x, disable: 0x%02x\n", +---- a/drivers/net/wireless/brcm80211/brcmfmac/feature.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/feature.h +-@@ -24,13 +24,16 @@ +- * PNO: preferred network offload. +- * WOWL: Wake-On-WLAN. +- * P2P: peer-to-peer +-+ * RSDB: Real Simultaneous Dual Band +- */ +- #define BRCMF_FEAT_LIST \ +- BRCMF_FEAT_DEF(MBSS) \ +- BRCMF_FEAT_DEF(MCHAN) \ +- BRCMF_FEAT_DEF(PNO) \ +- BRCMF_FEAT_DEF(WOWL) \ +-- BRCMF_FEAT_DEF(P2P) +-+ BRCMF_FEAT_DEF(P2P) \ +-+ BRCMF_FEAT_DEF(RSDB) +-+ +- /* +- * Quirks: +- * +diff --git a/package/kernel/mac80211/patches/374-0007-brcmfmac-Use-consistent-naming-for-bsscfgidx.patch b/package/kernel/mac80211/patches/374-0007-brcmfmac-Use-consistent-naming-for-bsscfgidx.patch +deleted file mode 100644 +index d1e7264..0000000 +--- a/package/kernel/mac80211/patches/374-0007-brcmfmac-Use-consistent-naming-for-bsscfgidx.patch ++++ /dev/null +@@ -1,533 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:17 +0100 +-Subject: [PATCH] brcmfmac: Use consistent naming for bsscfgidx. +- +-The variable bsscfgidx is used in different places with different +-names, e.g. bsscfg, bssidx, bsscfg_idx. This patch cleans this up +-by using bsscfgidx everywhere. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -775,7 +775,8 @@ brcmf_cfg80211_change_iface(struct wiphy +- s32 ap = 0; +- s32 err = 0; +- +-- brcmf_dbg(TRACE, "Enter, idx=%d, type=%d\n", ifp->bssidx, type); +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, type=%d\n", ifp->bsscfgidx, +-+ type); +- +- /* WAR: There are a number of p2p interface related problems which +- * need to be handled initially (before doing the validate). +-@@ -2920,7 +2921,7 @@ brcmf_cfg80211_escan_handler(struct brcm +- status = e->status; +- +- if (!test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) { +-- brcmf_err("scan not ready, bssidx=%d\n", ifp->bssidx); +-+ brcmf_err("scan not ready, bsscfgidx=%d\n", ifp->bsscfgidx); +- return -EPERM; +- } +- +-@@ -3876,7 +3877,8 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c +- ifp = vif->ifp; +- saved_ie = &vif->saved_ie; +- +-- brcmf_dbg(TRACE, "bssidx %d, pktflag : 0x%02X\n", ifp->bssidx, pktflag); +-+ brcmf_dbg(TRACE, "bsscfgidx %d, pktflag : 0x%02X\n", ifp->bsscfgidx, +-+ pktflag); +- iovar_ie_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL); +- if (!iovar_ie_buf) +- return -ENOMEM; +-@@ -4240,7 +4242,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi +- brcmf_err("setting ssid failed %d\n", err); +- goto exit; +- } +-- bss_enable.bsscfg_idx = cpu_to_le32(ifp->bssidx); +-+ bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx); +- bss_enable.enable = cpu_to_le32(1); +- err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable, +- sizeof(bss_enable)); +-@@ -4307,7 +4309,7 @@ static int brcmf_cfg80211_stop_ap(struct +- if (err < 0) +- brcmf_err("BRCMF_C_UP error %d\n", err); +- } else { +-- bss_enable.bsscfg_idx = cpu_to_le32(ifp->bssidx); +-+ bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx); +- bss_enable.enable = cpu_to_le32(0); +- err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable, +- sizeof(bss_enable)); +-@@ -5093,9 +5095,9 @@ static s32 brcmf_notify_vif_event(struct +- struct brcmf_cfg80211_vif_event *event = &cfg->vif_event; +- struct brcmf_cfg80211_vif *vif; +- +-- brcmf_dbg(TRACE, "Enter: action %u flags %u ifidx %u bsscfg %u\n", +-+ brcmf_dbg(TRACE, "Enter: action %u flags %u ifidx %u bsscfgidx %u\n", +- ifevent->action, ifevent->flags, ifevent->ifidx, +-- ifevent->bssidx); +-+ ifevent->bsscfgidx); +- +- mutex_lock(&event->vif_event_lock); +- event->action = ifevent->action; +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -80,7 +80,7 @@ char *brcmf_ifname(struct brcmf_if *ifp) +- struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx) +- { +- struct brcmf_if *ifp; +-- s32 bssidx; +-+ s32 bsscfgidx; +- +- if (ifidx < 0 || ifidx >= BRCMF_MAX_IFS) { +- brcmf_err("ifidx %d out of range\n", ifidx); +-@@ -88,9 +88,9 @@ struct brcmf_if *brcmf_get_ifp(struct br +- } +- +- ifp = NULL; +-- bssidx = drvr->if2bss[ifidx]; +-- if (bssidx >= 0) +-- ifp = drvr->iflist[bssidx]; +-+ bsscfgidx = drvr->if2bss[ifidx]; +-+ if (bsscfgidx >= 0) +-+ ifp = drvr->iflist[bsscfgidx]; +- +- return ifp; +- } +-@@ -108,7 +108,7 @@ static void _brcmf_set_multicast_list(st +- +- ifp = container_of(work, struct brcmf_if, multicast_work); +- +-- brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->bssidx); +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d\n", ifp->bsscfgidx); +- +- ndev = ifp->ndev; +- +-@@ -168,7 +168,7 @@ _brcmf_set_mac_address(struct work_struc +- +- ifp = container_of(work, struct brcmf_if, setmacaddr_work); +- +-- brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->bssidx); +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d\n", ifp->bsscfgidx); +- +- err = brcmf_fil_iovar_data_set(ifp, "cur_etheraddr", ifp->mac_addr, +- ETH_ALEN); +-@@ -206,7 +206,7 @@ static netdev_tx_t brcmf_netdev_start_xm +- struct brcmf_pub *drvr = ifp->drvr; +- struct ethhdr *eh = (struct ethhdr *)(skb->data); +- +-- brcmf_dbg(DATA, "Enter, idx=%d\n", ifp->bssidx); +-+ brcmf_dbg(DATA, "Enter, bsscfgidx=%d\n", ifp->bsscfgidx); +- +- /* Can the device send data? */ +- if (drvr->bus_if->state != BRCMF_BUS_UP) { +-@@ -267,8 +267,8 @@ void brcmf_txflowblock_if(struct brcmf_i +- if (!ifp || !ifp->ndev) +- return; +- +-- brcmf_dbg(TRACE, "enter: idx=%d stop=0x%X reason=%d state=%d\n", +-- ifp->bssidx, ifp->netif_stop, reason, state); +-+ brcmf_dbg(TRACE, "enter: bsscfgidx=%d stop=0x%X reason=%d state=%d\n", +-+ ifp->bsscfgidx, ifp->netif_stop, reason, state); +- +- spin_lock_irqsave(&ifp->netif_stop_lock, flags); +- if (state) { +-@@ -587,7 +587,7 @@ static struct net_device_stats *brcmf_ne +- { +- struct brcmf_if *ifp = netdev_priv(ndev); +- +-- brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->bssidx); +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d\n", ifp->bsscfgidx); +- +- return &ifp->stats; +- } +-@@ -616,7 +616,7 @@ static int brcmf_netdev_stop(struct net_ +- { +- struct brcmf_if *ifp = netdev_priv(ndev); +- +-- brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->bssidx); +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d\n", ifp->bsscfgidx); +- +- brcmf_cfg80211_down(ndev); +- +-@@ -632,7 +632,7 @@ static int brcmf_netdev_open(struct net_ +- struct brcmf_bus *bus_if = drvr->bus_if; +- u32 toe_ol; +- +-- brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->bssidx); +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d\n", ifp->bsscfgidx); +- +- /* If bus is not ready, can't continue */ +- if (bus_if->state != BRCMF_BUS_UP) { +-@@ -674,7 +674,7 @@ int brcmf_net_attach(struct brcmf_if *if +- struct net_device *ndev; +- s32 err; +- +-- brcmf_dbg(TRACE, "Enter, idx=%d mac=%pM\n", ifp->bssidx, +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d mac=%pM\n", ifp->bsscfgidx, +- ifp->mac_addr); +- ndev = ifp->ndev; +- +-@@ -706,7 +706,7 @@ int brcmf_net_attach(struct brcmf_if *if +- return 0; +- +- fail: +-- drvr->iflist[ifp->bssidx] = NULL; +-+ drvr->iflist[ifp->bsscfgidx] = NULL; +- ndev->netdev_ops = NULL; +- free_netdev(ndev); +- return -EBADE; +-@@ -724,7 +724,8 @@ void brcmf_net_setcarrier(struct brcmf_i +- { +- struct net_device *ndev; +- +-- brcmf_dbg(TRACE, "Enter, idx=%d carrier=%d\n", ifp->bssidx, on); +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d carrier=%d\n", ifp->bsscfgidx, +-+ on); +- +- ndev = ifp->ndev; +- brcmf_txflowblock_if(ifp, BRCMF_NETIF_STOP_REASON_DISCONNECTED, !on); +-@@ -771,7 +772,7 @@ static int brcmf_net_p2p_attach(struct b +- { +- struct net_device *ndev; +- +-- brcmf_dbg(TRACE, "Enter, idx=%d mac=%pM\n", ifp->bssidx, +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d mac=%pM\n", ifp->bsscfgidx, +- ifp->mac_addr); +- ndev = ifp->ndev; +- +-@@ -790,21 +791,21 @@ static int brcmf_net_p2p_attach(struct b +- return 0; +- +- fail: +-- ifp->drvr->iflist[ifp->bssidx] = NULL; +-+ ifp->drvr->iflist[ifp->bsscfgidx] = NULL; +- ndev->netdev_ops = NULL; +- free_netdev(ndev); +- return -EBADE; +- } +- +--struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx, s32 ifidx, +-+struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, +- bool is_p2pdev, char *name, u8 *mac_addr) +- { +- struct brcmf_if *ifp; +- struct net_device *ndev; +- +-- brcmf_dbg(TRACE, "Enter, idx=%d, ifidx=%d\n", bssidx, ifidx); +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, ifidx=%d\n", bsscfgidx, ifidx); +- +-- ifp = drvr->iflist[bssidx]; +-+ ifp = drvr->iflist[bsscfgidx]; +- /* +- * Delete the existing interface before overwriting it +- * in case we missed the BRCMF_E_IF_DEL event. +-@@ -815,7 +816,7 @@ struct brcmf_if *brcmf_add_if(struct brc +- if (ifidx) { +- netif_stop_queue(ifp->ndev); +- brcmf_net_detach(ifp->ndev); +-- drvr->iflist[bssidx] = NULL; +-+ drvr->iflist[bsscfgidx] = NULL; +- } else { +- brcmf_err("ignore IF event\n"); +- return ERR_PTR(-EINVAL); +-@@ -839,15 +840,15 @@ struct brcmf_if *brcmf_add_if(struct brc +- ndev->destructor = brcmf_cfg80211_free_netdev; +- ifp = netdev_priv(ndev); +- ifp->ndev = ndev; +-- /* store mapping ifidx to bssidx */ +-+ /* store mapping ifidx to bsscfgidx */ +- if (drvr->if2bss[ifidx] == BRCMF_BSSIDX_INVALID) +-- drvr->if2bss[ifidx] = bssidx; +-+ drvr->if2bss[ifidx] = bsscfgidx; +- } +- +- ifp->drvr = drvr; +-- drvr->iflist[bssidx] = ifp; +-+ drvr->iflist[bsscfgidx] = ifp; +- ifp->ifidx = ifidx; +-- ifp->bssidx = bssidx; +-+ ifp->bsscfgidx = bsscfgidx; +- +- init_waitqueue_head(&ifp->pend_8021x_wait); +- spin_lock_init(&ifp->netif_stop_lock); +-@@ -861,21 +862,22 @@ struct brcmf_if *brcmf_add_if(struct brc +- return ifp; +- } +- +--static void brcmf_del_if(struct brcmf_pub *drvr, s32 bssidx) +-+static void brcmf_del_if(struct brcmf_pub *drvr, s32 bsscfgidx) +- { +- struct brcmf_if *ifp; +- +-- ifp = drvr->iflist[bssidx]; +-- drvr->iflist[bssidx] = NULL; +-+ ifp = drvr->iflist[bsscfgidx]; +-+ drvr->iflist[bsscfgidx] = NULL; +- if (!ifp) { +-- brcmf_err("Null interface, idx=%d\n", bssidx); +-+ brcmf_err("Null interface, bsscfgidx=%d\n", bsscfgidx); +- return; +- } +-- brcmf_dbg(TRACE, "Enter, idx=%d, ifidx=%d\n", bssidx, ifp->ifidx); +-- if (drvr->if2bss[ifp->ifidx] == bssidx) +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, ifidx=%d\n", bsscfgidx, +-+ ifp->ifidx); +-+ if (drvr->if2bss[ifp->ifidx] == bsscfgidx) +- drvr->if2bss[ifp->ifidx] = BRCMF_BSSIDX_INVALID; +- if (ifp->ndev) { +-- if (bssidx == 0) { +-+ if (bsscfgidx == 0) { +- if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) { +- rtnl_lock(); +- brcmf_netdev_stop(ifp->ndev); +-@@ -905,12 +907,12 @@ static void brcmf_del_if(struct brcmf_pu +- +- void brcmf_remove_interface(struct brcmf_if *ifp) +- { +-- if (!ifp || WARN_ON(ifp->drvr->iflist[ifp->bssidx] != ifp)) +-+ if (!ifp || WARN_ON(ifp->drvr->iflist[ifp->bsscfgidx] != ifp)) +- return; +-- brcmf_dbg(TRACE, "Enter, bssidx=%d, ifidx=%d\n", ifp->bssidx, +-+ brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, ifidx=%d\n", ifp->bsscfgidx, +- ifp->ifidx); +- brcmf_fws_del_interface(ifp); +-- brcmf_del_if(ifp->drvr, ifp->bssidx); +-+ brcmf_del_if(ifp->drvr, ifp->bsscfgidx); +- } +- +- int brcmf_get_next_free_bsscfgidx(struct brcmf_pub *drvr) +-@@ -925,10 +927,10 @@ int brcmf_get_next_free_bsscfgidx(struct +- highest = 2; +- for (ifidx = 0; ifidx < BRCMF_MAX_IFS; ifidx++) { +- if (drvr->iflist[ifidx]) { +-- if (drvr->iflist[ifidx]->bssidx == bsscfgidx) +-+ if (drvr->iflist[ifidx]->bsscfgidx == bsscfgidx) +- bsscfgidx = highest + 1; +-- else if (drvr->iflist[ifidx]->bssidx > highest) +-- highest = drvr->iflist[ifidx]->bssidx; +-+ else if (drvr->iflist[ifidx]->bsscfgidx > highest) +-+ highest = drvr->iflist[ifidx]->bsscfgidx; +- } else { +- available = true; +- } +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.h +-@@ -174,7 +174,7 @@ enum brcmf_netif_stop_reason { +- * @multicast_work: worker object for multicast provisioning. +- * @fws_desc: interface specific firmware-signalling descriptor. +- * @ifidx: interface index in device firmware. +-- * @bssidx: index of bss associated with this interface. +-+ * @bsscfgidx: index of bss associated with this interface. +- * @mac_addr: assigned mac address. +- * @netif_stop: bitmap indicates reason why netif queues are stopped. +- * @netif_stop_lock: spinlock for update netif_stop from multiple sources. +-@@ -190,7 +190,7 @@ struct brcmf_if { +- struct work_struct multicast_work; +- struct brcmf_fws_mac_descriptor *fws_desc; +- int ifidx; +-- s32 bssidx; +-+ s32 bsscfgidx; +- u8 mac_addr[ETH_ALEN]; +- u8 netif_stop; +- spinlock_t netif_stop_lock; +-@@ -208,7 +208,7 @@ int brcmf_netdev_wait_pend8021x(struct b +- char *brcmf_ifname(struct brcmf_if *ifp); +- struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx); +- int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked); +--struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx, s32 ifidx, +-+struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, +- bool is_p2pdev, char *name, u8 *mac_addr); +- void brcmf_remove_interface(struct brcmf_if *ifp); +- int brcmf_get_next_free_bsscfgidx(struct brcmf_pub *drvr); +---- a/drivers/net/wireless/brcm80211/brcmfmac/debug.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/debug.c +-@@ -49,7 +49,7 @@ static int brcmf_debug_psm_watchdog_noti +- const struct brcmf_event_msg *evtmsg, +- void *data) +- { +-- brcmf_dbg(TRACE, "enter: idx=%d\n", ifp->bssidx); +-+ brcmf_dbg(TRACE, "enter: bsscfgidx=%d\n", ifp->bsscfgidx); +- +- return brcmf_debug_create_memdump(ifp->drvr->bus_if, data, +- evtmsg->datalen); +---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +-@@ -182,8 +182,8 @@ static void brcmf_fweh_handle_if_event(s +- bool is_p2pdev; +- int err = 0; +- +-- brcmf_dbg(EVENT, "action: %u idx: %u bsscfg: %u flags: %u role: %u\n", +-- ifevent->action, ifevent->ifidx, ifevent->bssidx, +-+ brcmf_dbg(EVENT, "action: %u ifidx: %u bsscfgidx: %u flags: %u role: %u\n", +-+ ifevent->action, ifevent->ifidx, ifevent->bsscfgidx, +- ifevent->flags, ifevent->role); +- +- /* The P2P Device interface event must not be ignored contrary to what +-@@ -204,12 +204,12 @@ static void brcmf_fweh_handle_if_event(s +- return; +- } +- +-- ifp = drvr->iflist[ifevent->bssidx]; +-+ ifp = drvr->iflist[ifevent->bsscfgidx]; +- +- if (ifevent->action == BRCMF_E_IF_ADD) { +- brcmf_dbg(EVENT, "adding %s (%pM)\n", emsg->ifname, +- emsg->addr); +-- ifp = brcmf_add_if(drvr, ifevent->bssidx, ifevent->ifidx, +-+ ifp = brcmf_add_if(drvr, ifevent->bsscfgidx, ifevent->ifidx, +- is_p2pdev, emsg->ifname, emsg->addr); +- if (IS_ERR(ifp)) +- return; +---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h +-@@ -219,7 +219,7 @@ struct brcmf_if_event { +- u8 ifidx; +- u8 action; +- u8 flags; +-- u8 bssidx; +-+ u8 bsscfgidx; +- u8 role; +- }; +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +-@@ -293,22 +293,22 @@ brcmf_fil_iovar_int_get(struct brcmf_if +- } +- +- static u32 +--brcmf_create_bsscfg(s32 bssidx, char *name, char *data, u32 datalen, char *buf, +-- u32 buflen) +-+brcmf_create_bsscfg(s32 bsscfgidx, char *name, char *data, u32 datalen, +-+ char *buf, u32 buflen) +- { +- const s8 *prefix = "bsscfg:"; +- s8 *p; +- u32 prefixlen; +- u32 namelen; +- u32 iolen; +-- __le32 bssidx_le; +-+ __le32 bsscfgidx_le; +- +-- if (bssidx == 0) +-+ if (bsscfgidx == 0) +- return brcmf_create_iovar(name, data, datalen, buf, buflen); +- +- prefixlen = strlen(prefix); +- namelen = strlen(name) + 1; /* lengh of iovar name + null */ +-- iolen = prefixlen + namelen + sizeof(bssidx_le) + datalen; +-+ iolen = prefixlen + namelen + sizeof(bsscfgidx_le) + datalen; +- +- if (buflen < iolen) { +- brcmf_err("buffer is too short\n"); +-@@ -326,9 +326,9 @@ brcmf_create_bsscfg(s32 bssidx, char *na +- p += namelen; +- +- /* bss config index as first data */ +-- bssidx_le = cpu_to_le32(bssidx); +-- memcpy(p, &bssidx_le, sizeof(bssidx_le)); +-- p += sizeof(bssidx_le); +-+ bsscfgidx_le = cpu_to_le32(bsscfgidx); +-+ memcpy(p, &bsscfgidx_le, sizeof(bsscfgidx_le)); +-+ p += sizeof(bsscfgidx_le); +- +- /* parameter buffer follows */ +- if (datalen) +-@@ -347,12 +347,12 @@ brcmf_fil_bsscfg_data_set(struct brcmf_i +- +- mutex_lock(&drvr->proto_block); +- +-- brcmf_dbg(FIL, "ifidx=%d, bssidx=%d, name=%s, len=%d\n", ifp->ifidx, +-- ifp->bssidx, name, len); +-+ brcmf_dbg(FIL, "ifidx=%d, bsscfgidx=%d, name=%s, len=%d\n", ifp->ifidx, +-+ ifp->bsscfgidx, name, len); +- brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, +- min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); +- +-- buflen = brcmf_create_bsscfg(ifp->bssidx, name, data, len, +-+ buflen = brcmf_create_bsscfg(ifp->bsscfgidx, name, data, len, +- drvr->proto_buf, sizeof(drvr->proto_buf)); +- if (buflen) { +- err = brcmf_fil_cmd_data(ifp, BRCMF_C_SET_VAR, drvr->proto_buf, +-@@ -376,7 +376,7 @@ brcmf_fil_bsscfg_data_get(struct brcmf_i +- +- mutex_lock(&drvr->proto_block); +- +-- buflen = brcmf_create_bsscfg(ifp->bssidx, name, data, len, +-+ buflen = brcmf_create_bsscfg(ifp->bsscfgidx, name, data, len, +- drvr->proto_buf, sizeof(drvr->proto_buf)); +- if (buflen) { +- err = brcmf_fil_cmd_data(ifp, BRCMF_C_GET_VAR, drvr->proto_buf, +-@@ -387,8 +387,8 @@ brcmf_fil_bsscfg_data_get(struct brcmf_i +- err = -EPERM; +- brcmf_err("Creating bsscfg failed\n"); +- } +-- brcmf_dbg(FIL, "ifidx=%d, bssidx=%d, name=%s, len=%d\n", ifp->ifidx, +-- ifp->bssidx, name, len); +-+ brcmf_dbg(FIL, "ifidx=%d, bsscfgidx=%d, name=%s, len=%d\n", ifp->ifidx, +-+ ifp->bsscfgidx, name, len); +- brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, +- min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-@@ -170,7 +170,7 @@ struct brcmf_fil_af_params_le { +- }; +- +- struct brcmf_fil_bss_enable_le { +-- __le32 bsscfg_idx; +-+ __le32 bsscfgidx; +- __le32 enable; +- }; +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +-@@ -719,7 +719,7 @@ static void brcmf_fws_macdesc_init(struc +- desc->state = BRCMF_FWS_STATE_OPEN; +- desc->requested_credit = 0; +- desc->requested_packet = 0; +-- /* depending on use may need ifp->bssidx instead */ +-+ /* depending on use may need ifp->bsscfgidx instead */ +- desc->interface_id = ifidx; +- desc->ac_bitmap = 0xff; /* update this when handling APSD */ +- if (addr) +-@@ -1938,7 +1938,7 @@ void brcmf_fws_reset_interface(struct br +- { +- struct brcmf_fws_mac_descriptor *entry = ifp->fws_desc; +- +-- brcmf_dbg(TRACE, "enter: idx=%d\n", ifp->bssidx); +-+ brcmf_dbg(TRACE, "enter: bsscfgidx=%d\n", ifp->bsscfgidx); +- if (!entry) +- return; +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -2067,7 +2067,7 @@ static struct wireless_dev *brcmf_p2p_cr +- struct brcmf_if *p2p_ifp; +- struct brcmf_if *pri_ifp; +- int err; +-- u32 bssidx; +-+ u32 bsscfgidx; +- +- if (p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif) +- return ERR_PTR(-ENOSPC); +-@@ -2113,13 +2113,13 @@ static struct wireless_dev *brcmf_p2p_cr +- memcpy(&p2p_vif->wdev.address, p2p->dev_addr, sizeof(p2p->dev_addr)); +- +- /* verify bsscfg index for P2P discovery */ +-- err = brcmf_fil_iovar_int_get(pri_ifp, "p2p_dev", &bssidx); +-+ err = brcmf_fil_iovar_int_get(pri_ifp, "p2p_dev", &bsscfgidx); +- if (err < 0) { +- brcmf_err("retrieving discover bsscfg index failed\n"); +- goto fail; +- } +- +-- WARN_ON(p2p_ifp->bssidx != bssidx); +-+ WARN_ON(p2p_ifp->bsscfgidx != bsscfgidx); +- +- init_completion(&p2p->send_af_done); +- INIT_WORK(&p2p->afx_hdl.afx_work, brcmf_p2p_afx_handler); +diff --git a/package/kernel/mac80211/patches/374-0008-brcmfmac-Use-new-methods-for-pcie-Power-Management.patch b/package/kernel/mac80211/patches/374-0008-brcmfmac-Use-new-methods-for-pcie-Power-Management.patch +deleted file mode 100644 +index fb2b85e..0000000 +--- a/package/kernel/mac80211/patches/374-0008-brcmfmac-Use-new-methods-for-pcie-Power-Management.patch ++++ /dev/null +@@ -1,163 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:18 +0100 +-Subject: [PATCH] brcmfmac: Use new methods for pcie Power Management. +- +-Currently the legacy methods suspend and resume are used for pcie +-devices. This is not the preferable method and is also causing +-issues with some setups when doing hibernate. Changing this to +-use the new PM methods. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -1388,10 +1388,6 @@ static void brcmf_pcie_wowl_config(struc +- +- brcmf_dbg(PCIE, "Configuring WOWL, enabled=%d\n", enabled); +- devinfo->wowl_enabled = enabled; +-- if (enabled) +-- device_set_wakeup_enable(&devinfo->pdev->dev, true); +-- else +-- device_set_wakeup_enable(&devinfo->pdev->dev, false); +- } +- +- +-@@ -1961,15 +1957,14 @@ brcmf_pcie_remove(struct pci_dev *pdev) +- #ifdef CONFIG_PM +- +- +--static int brcmf_pcie_suspend(struct pci_dev *pdev, pm_message_t state) +-+static int brcmf_pcie_pm_enter_D3(struct device *dev) +- { +- struct brcmf_pciedev_info *devinfo; +- struct brcmf_bus *bus; +-- int err; +- +-- brcmf_dbg(PCIE, "Enter, state=%d, pdev=%p\n", state.event, pdev); +-+ brcmf_err("Enter\n"); +- +-- bus = dev_get_drvdata(&pdev->dev); +-+ bus = dev_get_drvdata(dev); +- devinfo = bus->bus_priv.pcie->devinfo; +- +- brcmf_bus_change_state(bus, BRCMF_BUS_DOWN); +-@@ -1984,62 +1979,45 @@ static int brcmf_pcie_suspend(struct pci +- brcmf_err("Timeout on response for entering D3 substate\n"); +- return -EIO; +- } +-- brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D0_INFORM_IN_USE); +- +-- err = pci_save_state(pdev); +-- if (err) +-- brcmf_err("pci_save_state failed, err=%d\n", err); +-- if ((err) || (!devinfo->wowl_enabled)) { +-- brcmf_chip_detach(devinfo->ci); +-- devinfo->ci = NULL; +-- brcmf_pcie_remove(pdev); +-- return 0; +-- } +-+ devinfo->state = BRCMFMAC_PCIE_STATE_DOWN; +- +-- return pci_prepare_to_sleep(pdev); +-+ return 0; +- } +- +--static int brcmf_pcie_resume(struct pci_dev *pdev) +-+ +-+static int brcmf_pcie_pm_leave_D3(struct device *dev) +- { +- struct brcmf_pciedev_info *devinfo; +- struct brcmf_bus *bus; +-+ struct pci_dev *pdev; +- int err; +- +-- bus = dev_get_drvdata(&pdev->dev); +-- brcmf_dbg(PCIE, "Enter, pdev=%p, bus=%p\n", pdev, bus); +-+ brcmf_err("Enter\n"); +- +-- err = pci_set_power_state(pdev, PCI_D0); +-- if (err) { +-- brcmf_err("pci_set_power_state failed, err=%d\n", err); +-- goto cleanup; +-- } +-- pci_restore_state(pdev); +-- pci_enable_wake(pdev, PCI_D3hot, false); +-- pci_enable_wake(pdev, PCI_D3cold, false); +-+ bus = dev_get_drvdata(dev); +-+ devinfo = bus->bus_priv.pcie->devinfo; +-+ brcmf_dbg(PCIE, "Enter, dev=%p, bus=%p\n", dev, bus); +- +- /* Check if device is still up and running, if so we are ready */ +-- if (bus) { +-- devinfo = bus->bus_priv.pcie->devinfo; +-- if (brcmf_pcie_read_reg32(devinfo, +-- BRCMF_PCIE_PCIE2REG_INTMASK) != 0) { +-- if (brcmf_pcie_send_mb_data(devinfo, +-- BRCMF_H2D_HOST_D0_INFORM)) +-- goto cleanup; +-- brcmf_dbg(PCIE, "Hot resume, continue....\n"); +-- brcmf_pcie_select_core(devinfo, BCMA_CORE_PCIE2); +-- brcmf_bus_change_state(bus, BRCMF_BUS_UP); +-- brcmf_pcie_intr_enable(devinfo); +-- return 0; +-- } +-+ if (brcmf_pcie_read_reg32(devinfo, BRCMF_PCIE_PCIE2REG_INTMASK) != 0) { +-+ brcmf_dbg(PCIE, "Try to wakeup device....\n"); +-+ if (brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D0_INFORM)) +-+ goto cleanup; +-+ brcmf_dbg(PCIE, "Hot resume, continue....\n"); +-+ devinfo->state = BRCMFMAC_PCIE_STATE_UP; +-+ brcmf_pcie_select_core(devinfo, BCMA_CORE_PCIE2); +-+ brcmf_bus_change_state(bus, BRCMF_BUS_UP); +-+ brcmf_pcie_intr_enable(devinfo); +-+ return 0; +- } +- +- cleanup: +-- if (bus) { +-- devinfo = bus->bus_priv.pcie->devinfo; +-- brcmf_chip_detach(devinfo->ci); +-- devinfo->ci = NULL; +-- brcmf_pcie_remove(pdev); +-- } +-+ brcmf_chip_detach(devinfo->ci); +-+ devinfo->ci = NULL; +-+ pdev = devinfo->pdev; +-+ brcmf_pcie_remove(pdev); +-+ +- err = brcmf_pcie_probe(pdev, NULL); +- if (err) +- brcmf_err("probe after resume failed, err=%d\n", err); +-@@ -2048,6 +2026,14 @@ cleanup: +- } +- +- +-+static const struct dev_pm_ops brcmf_pciedrvr_pm = { +-+ .suspend = brcmf_pcie_pm_enter_D3, +-+ .resume = brcmf_pcie_pm_leave_D3, +-+ .freeze = brcmf_pcie_pm_enter_D3, +-+ .restore = brcmf_pcie_pm_leave_D3, +-+}; +-+ +-+ +- #endif /* CONFIG_PM */ +- +- +-@@ -2086,9 +2072,8 @@ static struct pci_driver brcmf_pciedrvr +- .probe = brcmf_pcie_probe, +- .remove = brcmf_pcie_remove, +- #ifdef CONFIG_PM +-- .suspend = brcmf_pcie_suspend, +-- .resume = brcmf_pcie_resume +--#endif /* CONFIG_PM */ +-+ .driver.pm = &brcmf_pciedrvr_pm, +-+#endif +- }; +- +- +diff --git a/package/kernel/mac80211/patches/374-0009-brcmfmac-Add-wowl-wake-indication-report.patch b/package/kernel/mac80211/patches/374-0009-brcmfmac-Add-wowl-wake-indication-report.patch +deleted file mode 100644 +index 4324cc7..0000000 +--- a/package/kernel/mac80211/patches/374-0009-brcmfmac-Add-wowl-wake-indication-report.patch ++++ /dev/null +@@ -1,129 +0,0 @@ +-From: Hante Meuleman +-Date: Thu, 29 Oct 2015 20:33:19 +0100 +-Subject: [PATCH] brcmfmac: Add wowl wake indication report. +- +-On wakeup of the system (resume) a wowl wakeup indication report +-can be sent to cfg80211. This patch adds support for this. The +-report specifies if the device was responsible for the wakeup +-and if so, will specify the exact reason. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -3061,6 +3061,67 @@ static s32 brcmf_config_wowl_pattern(str +- return ret; +- } +- +-+#ifdef CPTCFG_PM +-+ +-+static void brcmf_report_wowl_wakeind(struct wiphy *wiphy, struct brcmf_if *ifp) +-+{ +-+ struct brcmf_wowl_wakeind_le wake_ind_le; +-+ struct cfg80211_wowlan_wakeup wakeup_data; +-+ struct cfg80211_wowlan_wakeup *wakeup; +-+ u32 wakeind; +-+ s32 err; +-+ +-+ err = brcmf_fil_iovar_data_get(ifp, "wowl_wakeind", &wake_ind_le, +-+ sizeof(wake_ind_le)); +-+ if (!err) { +-+ brcmf_err("Get wowl_wakeind failed, err = %d\n", err); +-+ return; +-+ } +-+ +-+ wakeind = le32_to_cpu(wake_ind_le.ucode_wakeind); +-+ if (wakeind & (BRCMF_WOWL_MAGIC | BRCMF_WOWL_DIS | BRCMF_WOWL_BCN | +-+ BRCMF_WOWL_RETR | BRCMF_WOWL_NET)) { +-+ wakeup = &wakeup_data; +-+ memset(&wakeup_data, 0, sizeof(wakeup_data)); +-+ wakeup_data.pattern_idx = -1; +-+ +-+ if (wakeind & BRCMF_WOWL_MAGIC) { +-+ brcmf_dbg(INFO, "WOWL Wake indicator: BRCMF_WOWL_MAGIC\n"); +-+ wakeup_data.magic_pkt = true; +-+ } +-+ if (wakeind & BRCMF_WOWL_DIS) { +-+ brcmf_dbg(INFO, "WOWL Wake indicator: BRCMF_WOWL_DIS\n"); +-+ wakeup_data.disconnect = true; +-+ } +-+ if (wakeind & BRCMF_WOWL_BCN) { +-+ brcmf_dbg(INFO, "WOWL Wake indicator: BRCMF_WOWL_BCN\n"); +-+ wakeup_data.disconnect = true; +-+ } +-+ if (wakeind & BRCMF_WOWL_RETR) { +-+ brcmf_dbg(INFO, "WOWL Wake indicator: BRCMF_WOWL_RETR\n"); +-+ wakeup_data.disconnect = true; +-+ } +-+ if (wakeind & BRCMF_WOWL_NET) { +-+ brcmf_dbg(INFO, "WOWL Wake indicator: BRCMF_WOWL_NET\n"); +-+ /* For now always map to pattern 0, no API to get +-+ * correct information available at the moment. +-+ */ +-+ wakeup_data.pattern_idx = 0; +-+ } +-+ } else { +-+ wakeup = NULL; +-+ } +-+ cfg80211_report_wowlan_wakeup(&ifp->vif->wdev, wakeup, GFP_KERNEL); +-+} +-+ +-+#else +-+ +-+static void brcmf_report_wowl_wakeind(struct wiphy *wiphy, struct brcmf_if *ifp) +-+{ +-+} +-+ +-+#endif /* CPTCFG_PM */ +-+ +- static s32 brcmf_cfg80211_resume(struct wiphy *wiphy) +- { +- struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); +-@@ -3070,11 +3131,12 @@ static s32 brcmf_cfg80211_resume(struct +- brcmf_dbg(TRACE, "Enter\n"); +- +- if (cfg->wowl_enabled) { +-+ brcmf_report_wowl_wakeind(wiphy, ifp); +-+ brcmf_fil_iovar_int_set(ifp, "wowl_clear", 0); +-+ brcmf_config_wowl_pattern(ifp, "clr", NULL, 0, NULL, 0); +- brcmf_configure_arp_offload(ifp, true); +- brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, +- cfg->pre_wowl_pmmode); +-- brcmf_fil_iovar_int_set(ifp, "wowl_clear", 0); +-- brcmf_config_wowl_pattern(ifp, "clr", NULL, 0, NULL, 0); +- cfg->wowl_enabled = false; +- } +- return 0; +-@@ -3108,6 +3170,7 @@ static void brcmf_configure_wowl(struct +- wowl->patterns[i].pkt_offset); +- } +- } +-+ brcmf_fil_iovar_data_set(ifp, "wowl_wakeind", "clear", strlen("clear")); +- brcmf_fil_iovar_int_set(ifp, "wowl", wowl_config); +- brcmf_fil_iovar_int_set(ifp, "wowl_activate", 1); +- brcmf_bus_wowl_config(cfg->pub->bus_if, true); +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-@@ -634,4 +634,16 @@ struct brcmf_assoclist_le { +- u8 mac[BRCMF_MAX_ASSOCLIST][ETH_ALEN]; +- }; +- +-+/** +-+ * struct brcmf_wowl_wakeind_le - Wakeup indicators +-+ * Note: note both fields contain same information. +-+ * +-+ * @pci_wakeind: Whether PCI PMECSR PMEStatus bit was set. +-+ * @ucode_wakeind: What wakeup-event indication was set by ucode +-+ */ +-+struct brcmf_wowl_wakeind_le { +-+ __le32 pci_wakeind; +-+ __le32 ucode_wakeind; +-+}; +-+ +- #endif /* FWIL_TYPES_H_ */ +diff --git a/package/kernel/mac80211/patches/375-brcmfmac-constify-brcmf_bus_ops-structures.patch b/package/kernel/mac80211/patches/375-brcmfmac-constify-brcmf_bus_ops-structures.patch +deleted file mode 100644 +index a0cc231..0000000 +--- a/package/kernel/mac80211/patches/375-brcmfmac-constify-brcmf_bus_ops-structures.patch ++++ /dev/null +@@ -1,57 +0,0 @@ +-From: Julia Lawall +-Date: Sat, 14 Nov 2015 17:22:07 +0100 +-Subject: [PATCH] brcmfmac: constify brcmf_bus_ops structures +- +-The brcmf_bus_ops structures are never modified, so declare them as const. +- +-Done with the help of Coccinelle. +- +-Signed-off-by: Julia Lawall +-Acked-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/bus.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/bus.h +-@@ -137,7 +137,7 @@ struct brcmf_bus { +- bool always_use_fws_queue; +- bool wowl_supported; +- +-- struct brcmf_bus_ops *ops; +-+ const struct brcmf_bus_ops *ops; +- struct brcmf_bus_msgbuf *msgbuf; +- }; +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -1413,7 +1413,7 @@ static int brcmf_pcie_get_memdump(struct +- } +- +- +--static struct brcmf_bus_ops brcmf_pcie_bus_ops = { +-+static const struct brcmf_bus_ops brcmf_pcie_bus_ops = { +- .txdata = brcmf_pcie_tx, +- .stop = brcmf_pcie_down, +- .txctl = brcmf_pcie_tx_ctlpkt, +---- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-@@ -4025,7 +4025,7 @@ brcmf_sdio_watchdog(unsigned long data) +- } +- } +- +--static struct brcmf_bus_ops brcmf_sdio_bus_ops = { +-+static const struct brcmf_bus_ops brcmf_sdio_bus_ops = { +- .stop = brcmf_sdio_bus_stop, +- .preinit = brcmf_sdio_bus_preinit, +- .txdata = brcmf_sdio_bus_txdata, +---- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c +-@@ -1163,7 +1163,7 @@ static void brcmf_usb_wowl_config(struct +- device_set_wakeup_enable(devinfo->dev, false); +- } +- +--static struct brcmf_bus_ops brcmf_usb_bus_ops = { +-+static const struct brcmf_bus_ops brcmf_usb_bus_ops = { +- .txdata = brcmf_usb_tx, +- .stop = brcmf_usb_down, +- .txctl = brcmf_usb_tx_ctlpkt, +diff --git a/package/kernel/mac80211/patches/376-0001-brcmfmac-Cleanup-ssid-storage.patch b/package/kernel/mac80211/patches/376-0001-brcmfmac-Cleanup-ssid-storage.patch +deleted file mode 100644 +index 83f1ebe..0000000 +--- a/package/kernel/mac80211/patches/376-0001-brcmfmac-Cleanup-ssid-storage.patch ++++ /dev/null +@@ -1,251 +0,0 @@ +-From: Hante Meuleman +-Date: Wed, 25 Nov 2015 11:32:37 +0100 +-Subject: [PATCH] brcmfmac: Cleanup ssid storage. +- +-SSIDs used for connect and p2p got stored, but never used. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -959,7 +959,7 @@ brcmf_run_escan(struct brcmf_cfg80211_in +- params_size += sizeof(u32) * ((request->n_channels + 1) / 2); +- +- /* Allocate space for populating ssids in struct */ +-- params_size += sizeof(struct brcmf_ssid) * request->n_ssids; +-+ params_size += sizeof(struct brcmf_ssid_le) * request->n_ssids; +- } +- +- params = kzalloc(params_size, GFP_KERNEL); +-@@ -1291,6 +1291,7 @@ brcmf_cfg80211_join_ibss(struct wiphy *w +- s32 wsec = 0; +- s32 bcnprd; +- u16 chanspec; +-+ u32 ssid_len; +- +- brcmf_dbg(TRACE, "Enter\n"); +- if (!check_vif_up(ifp->vif)) +-@@ -1368,17 +1369,15 @@ brcmf_cfg80211_join_ibss(struct wiphy *w +- memset(&join_params, 0, sizeof(struct brcmf_join_params)); +- +- /* SSID */ +-- profile->ssid.SSID_len = min_t(u32, params->ssid_len, 32); +-- memcpy(profile->ssid.SSID, params->ssid, profile->ssid.SSID_len); +-- memcpy(join_params.ssid_le.SSID, params->ssid, profile->ssid.SSID_len); +-- join_params.ssid_le.SSID_len = cpu_to_le32(profile->ssid.SSID_len); +-+ ssid_len = min_t(u32, params->ssid_len, IEEE80211_MAX_SSID_LEN); +-+ memcpy(join_params.ssid_le.SSID, params->ssid, ssid_len); +-+ join_params.ssid_le.SSID_len = cpu_to_le32(ssid_len); +- join_params_size = sizeof(join_params.ssid_le); +- +- /* BSSID */ +- if (params->bssid) { +- memcpy(join_params.params_le.bssid, params->bssid, ETH_ALEN); +-- join_params_size = sizeof(join_params.ssid_le) + +-- BRCMF_ASSOC_PARAMS_FIXED_SIZE; +-+ join_params_size += BRCMF_ASSOC_PARAMS_FIXED_SIZE; +- memcpy(profile->bssid, params->bssid, ETH_ALEN); +- } else { +- eth_broadcast_addr(join_params.params_le.bssid); +-@@ -1728,7 +1727,6 @@ brcmf_cfg80211_connect(struct wiphy *wip +- { +- struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); +- struct brcmf_if *ifp = netdev_priv(ndev); +-- struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; +- struct ieee80211_channel *chan = sme->channel; +- struct brcmf_join_params join_params; +- size_t join_params_size; +-@@ -1739,6 +1737,7 @@ brcmf_cfg80211_connect(struct wiphy *wip +- struct brcmf_ext_join_params_le *ext_join_params; +- u16 chanspec; +- s32 err = 0; +-+ u32 ssid_len; +- +- brcmf_dbg(TRACE, "Enter\n"); +- if (!check_vif_up(ifp->vif)) +-@@ -1824,15 +1823,6 @@ brcmf_cfg80211_connect(struct wiphy *wip +- goto done; +- } +- +-- profile->ssid.SSID_len = min_t(u32, (u32)sizeof(profile->ssid.SSID), +-- (u32)sme->ssid_len); +-- memcpy(&profile->ssid.SSID, sme->ssid, profile->ssid.SSID_len); +-- if (profile->ssid.SSID_len < IEEE80211_MAX_SSID_LEN) { +-- profile->ssid.SSID[profile->ssid.SSID_len] = 0; +-- brcmf_dbg(CONN, "SSID \"%s\", len (%d)\n", profile->ssid.SSID, +-- profile->ssid.SSID_len); +-- } +-- +- /* Join with specific BSSID and cached SSID +- * If SSID is zero join based on BSSID only +- */ +-@@ -1845,9 +1835,12 @@ brcmf_cfg80211_connect(struct wiphy *wip +- err = -ENOMEM; +- goto done; +- } +-- ext_join_params->ssid_le.SSID_len = cpu_to_le32(profile->ssid.SSID_len); +-- memcpy(&ext_join_params->ssid_le.SSID, sme->ssid, +-- profile->ssid.SSID_len); +-+ ssid_len = min_t(u32, sme->ssid_len, IEEE80211_MAX_SSID_LEN); +-+ ext_join_params->ssid_le.SSID_len = cpu_to_le32(ssid_len); +-+ memcpy(&ext_join_params->ssid_le.SSID, sme->ssid, ssid_len); +-+ if (ssid_len < IEEE80211_MAX_SSID_LEN) +-+ brcmf_dbg(CONN, "SSID \"%s\", len (%d)\n", +-+ ext_join_params->ssid_le.SSID, ssid_len); +- +- /* Set up join scan parameters */ +- ext_join_params->scan_le.scan_type = -1; +-@@ -1895,8 +1888,8 @@ brcmf_cfg80211_connect(struct wiphy *wip +- memset(&join_params, 0, sizeof(join_params)); +- join_params_size = sizeof(join_params.ssid_le); +- +-- memcpy(&join_params.ssid_le.SSID, sme->ssid, profile->ssid.SSID_len); +-- join_params.ssid_le.SSID_len = cpu_to_le32(profile->ssid.SSID_len); +-+ memcpy(&join_params.ssid_le.SSID, sme->ssid, ssid_len); +-+ join_params.ssid_le.SSID_len = cpu_to_le32(ssid_len); +- +- if (sme->bssid) +- memcpy(join_params.params_le.bssid, sme->bssid, ETH_ALEN); +-@@ -2775,9 +2768,7 @@ CleanUp: +- static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg, +- struct brcmf_if *ifp) +- { +-- struct brcmf_cfg80211_profile *profile = ndev_to_prof(ifp->ndev); +- struct brcmf_bss_info_le *bi; +-- struct brcmf_ssid *ssid; +- const struct brcmf_tlv *tim; +- u16 beacon_interval; +- u8 dtim_period; +-@@ -2789,8 +2780,6 @@ static s32 brcmf_update_bss_info(struct +- if (brcmf_is_ibssmode(ifp->vif)) +- return err; +- +-- ssid = &profile->ssid; +-- +- *(__le32 *)cfg->extra_buf = cpu_to_le32(WL_EXTRA_BUF_MAX); +- err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO, +- cfg->extra_buf, WL_EXTRA_BUF_MAX); +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-@@ -124,13 +124,11 @@ struct brcmf_cfg80211_security { +- /** +- * struct brcmf_cfg80211_profile - profile information. +- * +-- * @ssid: ssid of associated/associating ap. +- * @bssid: bssid of joined/joining ibss. +- * @sec: security information. +- * @key: key information +- */ +- struct brcmf_cfg80211_profile { +-- struct brcmf_ssid ssid; +- u8 bssid[ETH_ALEN]; +- struct brcmf_cfg80211_security sec; +- struct brcmf_wsec_key key[BRCMF_MAX_DEFAULT_KEYS]; +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-@@ -282,14 +282,9 @@ struct brcm_rateset_le { +- u8 rates[BRCMF_MAXRATES_IN_SET]; +- }; +- +--struct brcmf_ssid { +-- u32 SSID_len; +-- unsigned char SSID[32]; +--}; +-- +- struct brcmf_ssid_le { +- __le32 SSID_len; +-- unsigned char SSID[32]; +-+ unsigned char SSID[IEEE80211_MAX_SSID_LEN]; +- }; +- +- struct brcmf_scan_params_le { +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -642,7 +642,6 @@ static s32 brcmf_p2p_escan(struct brcmf_ +- struct brcmf_cfg80211_vif *vif; +- struct brcmf_p2p_scan_le *p2p_params; +- struct brcmf_scan_params_le *sparams; +-- struct brcmf_ssid ssid; +- +- memsize += num_chans * sizeof(__le16); +- memblk = kzalloc(memsize, GFP_KERNEL); +-@@ -655,16 +654,16 @@ static s32 brcmf_p2p_escan(struct brcmf_ +- ret = -EINVAL; +- goto exit; +- } +-+ p2p_params = (struct brcmf_p2p_scan_le *)memblk; +-+ sparams = &p2p_params->eparams.params_le; +- +- switch (search_state) { +- case WL_P2P_DISC_ST_SEARCH: +- /* +- * If we in SEARCH STATE, we don't need to set SSID explictly +-- * because dongle use P2P WILDCARD internally by default +-+ * because dongle use P2P WILDCARD internally by default, use +-+ * null ssid, which it is already due to kzalloc. +- */ +-- /* use null ssid */ +-- ssid.SSID_len = 0; +-- memset(ssid.SSID, 0, sizeof(ssid.SSID)); +- break; +- case WL_P2P_DISC_ST_SCAN: +- /* +-@@ -673,8 +672,10 @@ static s32 brcmf_p2p_escan(struct brcmf_ +- * P2P WILDCARD because we just do broadcast scan unless +- * setting SSID. +- */ +-- ssid.SSID_len = BRCMF_P2P_WILDCARD_SSID_LEN; +-- memcpy(ssid.SSID, BRCMF_P2P_WILDCARD_SSID, ssid.SSID_len); +-+ sparams->ssid_le.SSID_len = +-+ cpu_to_le32(BRCMF_P2P_WILDCARD_SSID_LEN); +-+ memcpy(sparams->ssid_le.SSID, BRCMF_P2P_WILDCARD_SSID, +-+ BRCMF_P2P_WILDCARD_SSID_LEN); +- break; +- default: +- brcmf_err(" invalid search state %d\n", search_state); +-@@ -687,11 +688,9 @@ static s32 brcmf_p2p_escan(struct brcmf_ +- /* +- * set p2p scan parameters. +- */ +-- p2p_params = (struct brcmf_p2p_scan_le *)memblk; +- p2p_params->type = 'E'; +- +- /* determine the scan engine parameters */ +-- sparams = &p2p_params->eparams.params_le; +- sparams->bss_type = DOT11_BSSTYPE_ANY; +- if (p2p->cfg->active_scan) +- sparams->scan_type = 0; +-@@ -699,9 +698,6 @@ static s32 brcmf_p2p_escan(struct brcmf_ +- sparams->scan_type = 1; +- +- eth_broadcast_addr(sparams->bssid); +-- if (ssid.SSID_len) +-- memcpy(sparams->ssid_le.SSID, ssid.SSID, ssid.SSID_len); +-- sparams->ssid_le.SSID_len = cpu_to_le32(ssid.SSID_len); +- sparams->home_time = cpu_to_le32(P2PAPI_SCAN_HOME_TIME_MS); +- +- /* +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.h +-@@ -112,7 +112,6 @@ struct afx_hdl { +- * @int_addr: P2P interface address. +- * @bss_idx: informate for P2P bss types. +- * @listen_timer: timer for @WL_P2P_DISC_ST_LISTEN discover state. +-- * @ssid: ssid for P2P GO. +- * @listen_channel: channel for @WL_P2P_DISC_ST_LISTEN discover state. +- * @remain_on_channel: contains copy of struct used by cfg80211. +- * @remain_on_channel_cookie: cookie counter for remain on channel cmd +-@@ -133,7 +132,6 @@ struct brcmf_p2p_info { +- u8 int_addr[ETH_ALEN]; +- struct p2p_bss bss_idx[P2PAPI_BSSCFG_MAX]; +- struct timer_list listen_timer; +-- struct brcmf_ssid ssid; +- u8 listen_channel; +- struct ieee80211_channel remain_on_channel; +- u32 remain_on_channel_cookie; +diff --git a/package/kernel/mac80211/patches/376-0002-brcmfmac-Return-actual-error-by-fwil.patch b/package/kernel/mac80211/patches/376-0002-brcmfmac-Return-actual-error-by-fwil.patch +deleted file mode 100644 +index 8672c18..0000000 +--- a/package/kernel/mac80211/patches/376-0002-brcmfmac-Return-actual-error-by-fwil.patch ++++ /dev/null +@@ -1,31 +0,0 @@ +-From: Hante Meuleman +-Date: Wed, 25 Nov 2015 11:32:38 +0100 +-Subject: [PATCH] brcmfmac: Return actual error by fwil. +- +-FWIL is always mapping back errors to EBADE. This is not very +-conventient when trying to understand problems by reading logs. +-Some callers print the error code, but that is quite useless +-when the exact error code is not returned. It also makes it +-impossible to differentiate based on error code. This patch +-changes the return of EBADE into the actual error code. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +-@@ -126,7 +126,8 @@ brcmf_fil_cmd_data(struct brcmf_if *ifp, +- +- brcmf_dbg(FIL, "Failed: %s (%d)\n", +- brcmf_fil_get_errstr((u32)(-err)), err); +-- return -EBADE; +-+ +-+ return err; +- } +- +- s32 +diff --git a/package/kernel/mac80211/patches/376-0003-brcmfmac-Change-error-print-on-wlan0-existence.patch b/package/kernel/mac80211/patches/376-0003-brcmfmac-Change-error-print-on-wlan0-existence.patch +deleted file mode 100644 +index 1cfab21..0000000 +--- a/package/kernel/mac80211/patches/376-0003-brcmfmac-Change-error-print-on-wlan0-existence.patch ++++ /dev/null +@@ -1,41 +0,0 @@ +-From: Hante Meuleman +-Date: Wed, 25 Nov 2015 11:32:39 +0100 +-Subject: [PATCH] brcmfmac: Change error print on wlan0 existence. +- +-During initialization of the device, but also on some other +-moments the driver prints an error that the netdev already exists. +-This is a result of the way the driver is initializing the +-firmware and not really an error. The code is not treating it as +-an error either. This error print has resulted in many questions +-by users and is confusing and incorrect. This patch changes the +-error log into a debug info log. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -811,14 +811,15 @@ struct brcmf_if *brcmf_add_if(struct brc +- * in case we missed the BRCMF_E_IF_DEL event. +- */ +- if (ifp) { +-- brcmf_err("ERROR: netdev:%s already exists\n", +-- ifp->ndev->name); +- if (ifidx) { +-+ brcmf_err("ERROR: netdev:%s already exists\n", +-+ ifp->ndev->name); +- netif_stop_queue(ifp->ndev); +- brcmf_net_detach(ifp->ndev); +- drvr->iflist[bsscfgidx] = NULL; +- } else { +-- brcmf_err("ignore IF event\n"); +-+ brcmf_dbg(INFO, "netdev:%s ignore IF event\n", +-+ ifp->ndev->name); +- return ERR_PTR(-EINVAL); +- } +- } +diff --git a/package/kernel/mac80211/patches/376-0004-brcmfmac-no-retries-on-rxglom-superframe-errors.patch b/package/kernel/mac80211/patches/376-0004-brcmfmac-no-retries-on-rxglom-superframe-errors.patch +deleted file mode 100644 +index dfc3a98..0000000 +--- a/package/kernel/mac80211/patches/376-0004-brcmfmac-no-retries-on-rxglom-superframe-errors.patch ++++ /dev/null +@@ -1,76 +0,0 @@ +-From: Franky Lin +-Date: Wed, 25 Nov 2015 11:32:40 +0100 +-Subject: [PATCH] brcmfmac: no retries on rxglom superframe errors +- +-Aborting the current read attempt on the superframe also removes the +-packet from the pipeline. Retries should not be attempted on the next +-packet since it would not be a superframe(either a superframe descriptor +-or other data packet) and should not be handled by brcmf_sdio_rxglom +- +-Reviewed-by: Hante Meuleman +-Reviewed-by: Pieter-Paul Giesberts +-Reviewed-by: Arend Van Spriel +-Signed-off-by: Franky Lin +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-@@ -460,7 +460,6 @@ struct brcmf_sdio { +- +- struct sk_buff *glomd; /* Packet containing glomming descriptor */ +- struct sk_buff_head glom; /* Packet list for glommed superframe */ +-- uint glomerr; /* Glom packet read errors */ +- +- u8 *rxbuf; /* Buffer for receiving control packets */ +- uint rxblen; /* Allocated length of rxbuf */ +-@@ -1654,20 +1653,15 @@ static u8 brcmf_sdio_rxglom(struct brcmf +- sdio_release_host(bus->sdiodev->func[1]); +- bus->sdcnt.f2rxdata++; +- +-- /* On failure, kill the superframe, allow a couple retries */ +-+ /* On failure, kill the superframe */ +- if (errcode < 0) { +- brcmf_err("glom read of %d bytes failed: %d\n", +- dlen, errcode); +- +- sdio_claim_host(bus->sdiodev->func[1]); +-- if (bus->glomerr++ < 3) { +-- brcmf_sdio_rxfail(bus, true, true); +-- } else { +-- bus->glomerr = 0; +-- brcmf_sdio_rxfail(bus, true, false); +-- bus->sdcnt.rxglomfail++; +-- brcmf_sdio_free_glom(bus); +-- } +-+ brcmf_sdio_rxfail(bus, true, false); +-+ bus->sdcnt.rxglomfail++; +-+ brcmf_sdio_free_glom(bus); +- sdio_release_host(bus->sdiodev->func[1]); +- return 0; +- } +-@@ -1708,19 +1702,11 @@ static u8 brcmf_sdio_rxglom(struct brcmf +- } +- +- if (errcode) { +-- /* Terminate frame on error, request +-- a couple retries */ +-+ /* Terminate frame on error */ +- sdio_claim_host(bus->sdiodev->func[1]); +-- if (bus->glomerr++ < 3) { +-- /* Restore superframe header space */ +-- skb_push(pfirst, sfdoff); +-- brcmf_sdio_rxfail(bus, true, true); +-- } else { +-- bus->glomerr = 0; +-- brcmf_sdio_rxfail(bus, true, false); +-- bus->sdcnt.rxglomfail++; +-- brcmf_sdio_free_glom(bus); +-- } +-+ brcmf_sdio_rxfail(bus, true, false); +-+ bus->sdcnt.rxglomfail++; +-+ brcmf_sdio_free_glom(bus); +- sdio_release_host(bus->sdiodev->func[1]); +- bus->cur_read.len = 0; +- return 0; +diff --git a/package/kernel/mac80211/patches/376-0005-brcmfmac-Remove-redundant-parameter-action-from-scan.patch b/package/kernel/mac80211/patches/376-0005-brcmfmac-Remove-redundant-parameter-action-from-scan.patch +deleted file mode 100644 +index ede1f47..0000000 +--- a/package/kernel/mac80211/patches/376-0005-brcmfmac-Remove-redundant-parameter-action-from-scan.patch ++++ /dev/null +@@ -1,108 +0,0 @@ +-From: Hante Meuleman +-Date: Wed, 25 Nov 2015 11:32:41 +0100 +-Subject: [PATCH] brcmfmac: Remove redundant parameter action from scan. +- +-ESCAN is always performed using action start scan. No need to +-pass this parameter on to different functions. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -945,7 +945,7 @@ static void brcmf_escan_prep(struct brcm +- +- static s32 +- brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, +-- struct cfg80211_scan_request *request, u16 action) +-+ struct cfg80211_scan_request *request) +- { +- s32 params_size = BRCMF_SCAN_PARAMS_FIXED_SIZE + +- offsetof(struct brcmf_escan_params_le, params_le); +-@@ -970,7 +970,7 @@ brcmf_run_escan(struct brcmf_cfg80211_in +- BUG_ON(params_size + sizeof("escan") >= BRCMF_DCMD_MEDLEN); +- brcmf_escan_prep(cfg, ¶ms->params_le, request); +- params->version = cpu_to_le32(BRCMF_ESCAN_REQ_VERSION); +-- params->action = cpu_to_le16(action); +-+ params->action = cpu_to_le16(WL_ESCAN_ACTION_START); +- params->sync_id = cpu_to_le16(0x1234); +- +- err = brcmf_fil_iovar_data_set(ifp, "escan", params, params_size); +-@@ -1012,7 +1012,7 @@ brcmf_do_escan(struct brcmf_cfg80211_inf +- results->count = 0; +- results->buflen = WL_ESCAN_RESULTS_FIXED_SIZE; +- +-- err = escan->run(cfg, ifp, request, WL_ESCAN_ACTION_START); +-+ err = escan->run(cfg, ifp, request); +- if (err) +- brcmf_scan_config_mpc(ifp, 1); +- return err; +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-@@ -231,7 +231,7 @@ struct escan_info { +- struct wiphy *wiphy; +- struct brcmf_if *ifp; +- s32 (*run)(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, +-- struct cfg80211_scan_request *request, u16 action); +-+ struct cfg80211_scan_request *request); +- }; +- +- /** +---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +-@@ -625,11 +625,10 @@ exit: +- * @num_chans: number of channels to scan. +- * @chanspecs: channel parameters for @num_chans channels. +- * @search_state: P2P discover state to use. +-- * @action: scan action to pass to firmware. +- * @bss_type: type of P2P bss. +- */ +- static s32 brcmf_p2p_escan(struct brcmf_p2p_info *p2p, u32 num_chans, +-- u16 chanspecs[], s32 search_state, u16 action, +-+ u16 chanspecs[], s32 search_state, +- enum p2p_bss_type bss_type) +- { +- s32 ret = 0; +-@@ -738,7 +737,7 @@ static s32 brcmf_p2p_escan(struct brcmf_ +- +- /* set the escan specific parameters */ +- p2p_params->eparams.version = cpu_to_le32(BRCMF_ESCAN_REQ_VERSION); +-- p2p_params->eparams.action = cpu_to_le16(action); +-+ p2p_params->eparams.action = cpu_to_le16(WL_ESCAN_ACTION_START); +- p2p_params->eparams.sync_id = cpu_to_le16(0x1234); +- /* perform p2p scan on primary device */ +- ret = brcmf_fil_bsscfg_data_set(vif->ifp, "p2p_scan", memblk, memsize); +-@@ -762,8 +761,7 @@ exit: +- */ +- static s32 brcmf_p2p_run_escan(struct brcmf_cfg80211_info *cfg, +- struct brcmf_if *ifp, +-- struct cfg80211_scan_request *request, +-- u16 action) +-+ struct cfg80211_scan_request *request) +- { +- struct brcmf_p2p_info *p2p = &cfg->p2p; +- s32 err = 0; +-@@ -823,7 +821,7 @@ static s32 brcmf_p2p_run_escan(struct br +- num_nodfs++; +- } +- err = brcmf_p2p_escan(p2p, num_nodfs, chanspecs, search_state, +-- action, P2PAPI_BSSCFG_DEVICE); +-+ P2PAPI_BSSCFG_DEVICE); +- kfree(chanspecs); +- } +- exit: +-@@ -1092,8 +1090,7 @@ static s32 brcmf_p2p_act_frm_search(stru +- default_chan_list[2] = ch.chspec; +- } +- err = brcmf_p2p_escan(p2p, channel_cnt, default_chan_list, +-- WL_P2P_DISC_ST_SEARCH, WL_ESCAN_ACTION_START, +-- P2PAPI_BSSCFG_DEVICE); +-+ WL_P2P_DISC_ST_SEARCH, P2PAPI_BSSCFG_DEVICE); +- kfree(default_chan_list); +- exit: +- return err; +diff --git a/package/kernel/mac80211/patches/376-0006-brcmfmac-Cleanup-roaming-configuration.patch b/package/kernel/mac80211/patches/376-0006-brcmfmac-Cleanup-roaming-configuration.patch +deleted file mode 100644 +index 41b8770..0000000 +--- a/package/kernel/mac80211/patches/376-0006-brcmfmac-Cleanup-roaming-configuration.patch ++++ /dev/null +@@ -1,180 +0,0 @@ +-From: Hante Meuleman +-Date: Wed, 25 Nov 2015 11:32:42 +0100 +-Subject: [PATCH] brcmfmac: Cleanup roaming configuration. +- +-Put all roaming configuration related code in one place and +-configure timeout based upon roaming setting. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -4755,7 +4755,6 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v +- vif->wdev.iftype = type; +- +- vif->pm_block = pm_block; +-- vif->roam_off = -1; +- +- brcmf_init_prof(&vif->profile); +- +-@@ -5305,35 +5304,33 @@ static void init_vif_event(struct brcmf_ +- mutex_init(&event->vif_event_lock); +- } +- +--static s32 +--brcmf_dongle_roam(struct brcmf_if *ifp, u32 bcn_timeout) +-+static s32 brcmf_dongle_roam(struct brcmf_if *ifp) +- { +-- s32 err = 0; +-+ s32 err; +-+ u32 bcn_timeout; +- __le32 roamtrigger[2]; +- __le32 roam_delta[2]; +- +-- /* +-- * Setup timeout if Beacons are lost and roam is +-- * off to report link down +-- */ +-- if (brcmf_roamoff) { +-- err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout); +-- if (err) { +-- brcmf_err("bcn_timeout error (%d)\n", err); +-- goto dongle_rom_out; +-- } +-+ /* Configure beacon timeout value based upon roaming setting */ +-+ if (brcmf_roamoff) +-+ bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_OFF; +-+ else +-+ bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_ON; +-+ err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout); +-+ if (err) { +-+ brcmf_err("bcn_timeout error (%d)\n", err); +-+ goto roam_setup_done; +- } +- +-- /* +-- * Enable/Disable built-in roaming to allow supplicant +-- * to take care of roaming +-+ /* Enable/Disable built-in roaming to allow supplicant to take care of +-+ * roaming. +- */ +- brcmf_dbg(INFO, "Internal Roaming = %s\n", +- brcmf_roamoff ? "Off" : "On"); +- err = brcmf_fil_iovar_int_set(ifp, "roam_off", !!(brcmf_roamoff)); +- if (err) { +- brcmf_err("roam_off error (%d)\n", err); +-- goto dongle_rom_out; +-+ goto roam_setup_done; +- } +- +- roamtrigger[0] = cpu_to_le32(WL_ROAM_TRIGGER_LEVEL); +-@@ -5342,7 +5339,7 @@ brcmf_dongle_roam(struct brcmf_if *ifp, +- (void *)roamtrigger, sizeof(roamtrigger)); +- if (err) { +- brcmf_err("WLC_SET_ROAM_TRIGGER error (%d)\n", err); +-- goto dongle_rom_out; +-+ goto roam_setup_done; +- } +- +- roam_delta[0] = cpu_to_le32(WL_ROAM_DELTA); +-@@ -5351,10 +5348,10 @@ brcmf_dongle_roam(struct brcmf_if *ifp, +- (void *)roam_delta, sizeof(roam_delta)); +- if (err) { +- brcmf_err("WLC_SET_ROAM_DELTA error (%d)\n", err); +-- goto dongle_rom_out; +-+ goto roam_setup_done; +- } +- +--dongle_rom_out: +-+roam_setup_done: +- return err; +- } +- +-@@ -6069,7 +6066,7 @@ static s32 brcmf_config_dongle(struct br +- brcmf_dbg(INFO, "power save set to %s\n", +- (power_mode ? "enabled" : "disabled")); +- +-- err = brcmf_dongle_roam(ifp, WL_BEACON_TIMEOUT); +-+ err = brcmf_dongle_roam(ifp); +- if (err) +- goto default_conf_out; +- err = brcmf_cfg80211_change_iface(wdev->wiphy, ndev, wdev->iftype, +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h +-@@ -28,7 +28,6 @@ +- #define WL_EXTRA_BUF_MAX 2048 +- #define WL_ROAM_TRIGGER_LEVEL -75 +- #define WL_ROAM_DELTA 20 +--#define WL_BEACON_TIMEOUT 3 +- +- #define WL_SCAN_CHANNEL_TIME 40 +- #define WL_SCAN_UNASSOC_TIME 40 +-@@ -77,6 +76,9 @@ +- +- #define BRCMF_MAX_DEFAULT_KEYS 4 +- +-+/* beacon loss timeout defaults */ +-+#define BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_ON 2 +-+#define BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_OFF 4 +- +- /** +- * enum brcmf_scan_status - scan engine status +-@@ -178,7 +180,6 @@ struct vif_saved_ie { +- * @ifp: lower layer interface pointer +- * @wdev: wireless device. +- * @profile: profile information. +-- * @roam_off: roaming state. +- * @sme_state: SME state using enum brcmf_vif_status bits. +- * @pm_block: power-management blocked. +- * @list: linked list. +-@@ -189,7 +190,6 @@ struct brcmf_cfg80211_vif { +- struct brcmf_if *ifp; +- struct wireless_dev wdev; +- struct brcmf_cfg80211_profile profile; +-- s32 roam_off; +- unsigned long sme_state; +- bool pm_block; +- struct vif_saved_ie saved_ie; +---- a/drivers/net/wireless/brcm80211/brcmfmac/common.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/common.c +-@@ -29,7 +29,6 @@ +- +- const u8 ALLFFMAC[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +- +--#define BRCMF_DEFAULT_BCN_TIMEOUT 3 +- #define BRCMF_DEFAULT_SCAN_CHANNEL_TIME 40 +- #define BRCMF_DEFAULT_SCAN_UNASSOC_TIME 40 +- +-@@ -107,26 +106,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_i +- goto done; +- } +- +-- /* +-- * Setup timeout if Beacons are lost and roam is off to report +-- * link down +-- */ +-- err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", +-- BRCMF_DEFAULT_BCN_TIMEOUT); +-- if (err) { +-- brcmf_err("bcn_timeout error (%d)\n", err); +-- goto done; +-- } +-- +-- /* Enable/Disable build-in roaming to allowed ext supplicant to take +-- * of romaing +-- */ +-- err = brcmf_fil_iovar_int_set(ifp, "roam_off", 1); +-- if (err) { +-- brcmf_err("roam_off error (%d)\n", err); +-- goto done; +-- } +-- +- /* Setup join_pref to select target by RSSI(with boost on 5GHz) */ +- join_pref_params[0].type = BRCMF_JOIN_PREF_RSSI_DELTA; +- join_pref_params[0].len = 2; +diff --git a/package/kernel/mac80211/patches/376-0007-brcmfmac-Add-beamforming-support.patch b/package/kernel/mac80211/patches/376-0007-brcmfmac-Add-beamforming-support.patch +deleted file mode 100644 +index 395166b..0000000 +--- a/package/kernel/mac80211/patches/376-0007-brcmfmac-Add-beamforming-support.patch ++++ /dev/null +@@ -1,115 +0,0 @@ +-From: Hante Meuleman +-Date: Wed, 25 Nov 2015 11:32:43 +0100 +-Subject: [PATCH] brcmfmac: Add beamforming support. +- +-Some devices support beamforming. This patch enables tx beamforming +-if supported and reports beamforming capabilities per channel if +-supported. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -5671,7 +5671,8 @@ static __le16 brcmf_get_mcs_map(u32 ncha +- } +- +- static void brcmf_update_vht_cap(struct ieee80211_supported_band *band, +-- u32 bw_cap[2], u32 nchain) +-+ u32 bw_cap[2], u32 nchain, u32 txstreams, +-+ u32 txbf_bfe_cap, u32 txbf_bfr_cap) +- { +- __le16 mcs_map; +- +-@@ -5690,6 +5691,25 @@ static void brcmf_update_vht_cap(struct +- mcs_map = brcmf_get_mcs_map(nchain, IEEE80211_VHT_MCS_SUPPORT_0_9); +- band->vht_cap.vht_mcs.rx_mcs_map = mcs_map; +- band->vht_cap.vht_mcs.tx_mcs_map = mcs_map; +-+ +-+ /* Beamforming support information */ +-+ if (txbf_bfe_cap & BRCMF_TXBF_SU_BFE_CAP) +-+ band->vht_cap.cap |= IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE; +-+ if (txbf_bfe_cap & BRCMF_TXBF_MU_BFE_CAP) +-+ band->vht_cap.cap |= IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE; +-+ if (txbf_bfr_cap & BRCMF_TXBF_SU_BFR_CAP) +-+ band->vht_cap.cap |= IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE; +-+ if (txbf_bfr_cap & BRCMF_TXBF_MU_BFR_CAP) +-+ band->vht_cap.cap |= IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE; +-+ +-+ if ((txbf_bfe_cap || txbf_bfr_cap) && (txstreams > 1)) { +-+ band->vht_cap.cap |= +-+ (2 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT); +-+ band->vht_cap.cap |= ((txstreams - 1) << +-+ IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT); +-+ band->vht_cap.cap |= +-+ IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB; +-+ } +- } +- +- static int brcmf_setup_wiphybands(struct wiphy *wiphy) +-@@ -5704,6 +5724,9 @@ static int brcmf_setup_wiphybands(struct +- int err; +- s32 i; +- struct ieee80211_supported_band *band; +-+ u32 txstreams = 0; +-+ u32 txbf_bfe_cap = 0; +-+ u32 txbf_bfr_cap = 0; +- +- (void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode); +- err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode); +-@@ -5732,6 +5755,14 @@ static int brcmf_setup_wiphybands(struct +- return err; +- } +- +-+ if (vhtmode) { +-+ (void)brcmf_fil_iovar_int_get(ifp, "txstreams", &txstreams); +-+ (void)brcmf_fil_iovar_int_get(ifp, "txbf_bfe_cap", +-+ &txbf_bfe_cap); +-+ (void)brcmf_fil_iovar_int_get(ifp, "txbf_bfr_cap", +-+ &txbf_bfr_cap); +-+ } +-+ +- wiphy = cfg_to_wiphy(cfg); +- for (i = 0; i < ARRAY_SIZE(wiphy->bands); i++) { +- band = wiphy->bands[i]; +-@@ -5741,7 +5772,8 @@ static int brcmf_setup_wiphybands(struct +- if (nmode) +- brcmf_update_ht_cap(band, bw_cap, nchain); +- if (vhtmode) +-- brcmf_update_vht_cap(band, bw_cap, nchain); +-+ brcmf_update_vht_cap(band, bw_cap, nchain, txstreams, +-+ txbf_bfe_cap, txbf_bfr_cap); +- } +- +- return 0; +---- a/drivers/net/wireless/brcm80211/brcmfmac/common.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/common.c +-@@ -153,6 +153,9 @@ int brcmf_c_preinit_dcmds(struct brcmf_i +- goto done; +- } +- +-+ /* Enable tx beamforming, errors can be ignored (not supported) */ +-+ (void)brcmf_fil_iovar_int_set(ifp, "txbf", 1); +-+ +- /* do bus specific preinit here */ +- err = brcmf_bus_preinit(ifp->drvr->bus_if); +- done: +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +-@@ -121,6 +121,11 @@ +- +- #define BRCMF_MAX_ASSOCLIST 128 +- +-+#define BRCMF_TXBF_SU_BFE_CAP BIT(0) +-+#define BRCMF_TXBF_MU_BFE_CAP BIT(1) +-+#define BRCMF_TXBF_SU_BFR_CAP BIT(0) +-+#define BRCMF_TXBF_MU_BFR_CAP BIT(1) +-+ +- /* join preference types for join_pref iovar */ +- enum brcmf_join_pref_types { +- BRCMF_JOIN_PREF_RSSI = 1, +diff --git a/package/kernel/mac80211/patches/376-0008-brcmfmac-assure-net_ratelimit-is-declared-before-use.patch b/package/kernel/mac80211/patches/376-0008-brcmfmac-assure-net_ratelimit-is-declared-before-use.patch +deleted file mode 100644 +index d471eb5..0000000 +--- a/package/kernel/mac80211/patches/376-0008-brcmfmac-assure-net_ratelimit-is-declared-before-use.patch ++++ /dev/null +@@ -1,25 +0,0 @@ +-From: Arend van Spriel +-Date: Wed, 25 Nov 2015 11:32:45 +0100 +-Subject: [PATCH] brcmfmac: assure net_ratelimit() is declared before use +- +-Under some kernel configuration we get build issue with implicit +-declaration of net_ratelimit() function. Fix this by explicitly +-including the file providing the prototype. +- +-Reviewed-by: Hante Meuleman +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/debug.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/debug.h +-@@ -17,6 +17,8 @@ +- #ifndef BRCMFMAC_DEBUG_H +- #define BRCMFMAC_DEBUG_H +- +-+#include /* net_ratelimit() */ +-+ +- /* message levels */ +- #define BRCMF_TRACE_VAL 0x00000002 +- #define BRCMF_INFO_VAL 0x00000004 +diff --git a/package/kernel/mac80211/patches/376-0009-brcmfmac-Unify-methods-to-define-and-map-firmware-fi.patch b/package/kernel/mac80211/patches/376-0009-brcmfmac-Unify-methods-to-define-and-map-firmware-fi.patch +deleted file mode 100644 +index 0ec9d10..0000000 +--- a/package/kernel/mac80211/patches/376-0009-brcmfmac-Unify-methods-to-define-and-map-firmware-fi.patch ++++ /dev/null +@@ -1,664 +0,0 @@ +-From: Hante Meuleman +-Date: Wed, 25 Nov 2015 11:32:46 +0100 +-Subject: [PATCH] brcmfmac: Unify methods to define and map firmware files. +- +-All bus drivers (sdio, usb and pcie) require firmware files which +-needs to be downloaded to the device, The definitions and mapping +-of device id and revision to firmware and nvram file is done by +-each bus driver. This patch creates common functions and defines +-to simplify and unify the definition of these firmware and nvram +-files and mapping. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Franky (Zhenhui) Lin +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/firmware.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/firmware.c +-@@ -27,9 +27,9 @@ +- #define BRCMF_FW_NVRAM_DEVPATH_LEN 19 /* devpath0=pcie/1/4/ */ +- #define BRCMF_FW_NVRAM_PCIEDEV_LEN 10 /* pcie/1/4/ + \0 */ +- +--char brcmf_firmware_path[BRCMF_FW_PATH_LEN]; +-+static char brcmf_firmware_path[BRCMF_FW_NAME_LEN]; +- module_param_string(alternative_fw_path, brcmf_firmware_path, +-- BRCMF_FW_PATH_LEN, 0440); +-+ BRCMF_FW_NAME_LEN, 0440); +- +- enum nvram_parser_state { +- IDLE, +-@@ -531,3 +531,43 @@ int brcmf_fw_get_firmwares(struct device +- 0); +- } +- +-+int brcmf_fw_map_chip_to_name(u32 chip, u32 chiprev, +-+ struct brcmf_firmware_mapping mapping_table[], +-+ u32 table_size, char fw_name[BRCMF_FW_NAME_LEN], +-+ char nvram_name[BRCMF_FW_NAME_LEN]) +-+{ +-+ u32 i; +-+ char end; +-+ +-+ for (i = 0; i < table_size; i++) { +-+ if (mapping_table[i].chipid == chip && +-+ mapping_table[i].revmask & BIT(chiprev)) +-+ break; +-+ } +-+ +-+ if (i == table_size) { +-+ brcmf_err("Unknown chipid %d [%d]\n", chip, chiprev); +-+ return -ENODEV; +-+ } +-+ +-+ /* check if firmware path is provided by module parameter */ +-+ if (brcmf_firmware_path[0] != '\0') { +-+ strlcpy(fw_name, brcmf_firmware_path, BRCMF_FW_NAME_LEN); +-+ if ((nvram_name) && (mapping_table[i].nvram)) +-+ strlcpy(nvram_name, brcmf_firmware_path, +-+ BRCMF_FW_NAME_LEN); +-+ +-+ end = brcmf_firmware_path[strlen(brcmf_firmware_path) - 1]; +-+ if (end != '/') { +-+ strlcat(fw_name, "/", BRCMF_FW_NAME_LEN); +-+ if ((nvram_name) && (mapping_table[i].nvram)) +-+ strlcat(nvram_name, "/", BRCMF_FW_NAME_LEN); +-+ } +-+ } +-+ strlcat(fw_name, mapping_table[i].fw, BRCMF_FW_NAME_LEN); +-+ if ((nvram_name) && (mapping_table[i].nvram)) +-+ strlcat(nvram_name, mapping_table[i].nvram, BRCMF_FW_NAME_LEN); +-+ +-+ return 0; +-+} +-+ +---- a/drivers/net/wireless/brcm80211/brcmfmac/firmware.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/firmware.h +-@@ -21,11 +21,51 @@ +- #define BRCMF_FW_REQ_FLAGS 0x00F0 +- #define BRCMF_FW_REQ_NV_OPTIONAL 0x0010 +- +--#define BRCMF_FW_PATH_LEN 256 +--#define BRCMF_FW_NAME_LEN 32 +-+#define BRCMF_FW_NAME_LEN 320 +- +--extern char brcmf_firmware_path[]; +-+#define BRCMF_FW_DEFAULT_PATH "brcm/" +- +-+/** +-+ * struct brcmf_firmware_mapping - Used to map chipid/revmask to firmware +-+ * filename and nvram filename. Each bus type implementation should create +-+ * a table of firmware mappings (using the macros defined below). +-+ * +-+ * @chipid: ID of chip. +-+ * @revmask: bitmask of revisions, e.g. 0x10 means rev 4 only, 0xf means rev 0-3 +-+ * @fw: name of the firmware file. +-+ * @nvram: name of nvram file. +-+ */ +-+struct brcmf_firmware_mapping { +-+ u32 chipid; +-+ u32 revmask; +-+ const char *fw; +-+ const char *nvram; +-+}; +-+ +-+#define BRCMF_FW_NVRAM_DEF(fw_nvram_name, fw, nvram) \ +-+static const char BRCM_ ## fw_nvram_name ## _FIRMWARE_NAME[] = \ +-+ BRCMF_FW_DEFAULT_PATH fw; \ +-+static const char BRCM_ ## fw_nvram_name ## _NVRAM_NAME[] = \ +-+ BRCMF_FW_DEFAULT_PATH nvram; \ +-+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw); \ +-+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH nvram) +-+ +-+#define BRCMF_FW_DEF(fw_name, fw) \ +-+static const char BRCM_ ## fw_name ## _FIRMWARE_NAME[] = \ +-+ BRCMF_FW_DEFAULT_PATH fw; \ +-+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw) \ +-+ +-+#define BRCMF_FW_NVRAM_ENTRY(chipid, mask, name) \ +-+ { chipid, mask, \ +-+ BRCM_ ## name ## _FIRMWARE_NAME, BRCM_ ## name ## _NVRAM_NAME } +-+ +-+#define BRCMF_FW_ENTRY(chipid, mask, name) \ +-+ { chipid, mask, BRCM_ ## name ## _FIRMWARE_NAME, NULL } +-+ +-+int brcmf_fw_map_chip_to_name(u32 chip, u32 chiprev, +-+ struct brcmf_firmware_mapping mapping_table[], +-+ u32 table_size, char fw_name[BRCMF_FW_NAME_LEN], +-+ char nvram_name[BRCMF_FW_NAME_LEN]); +- void brcmf_fw_nvram_free(void *nvram); +- /* +- * Request firmware(s) asynchronously. When the asynchronous request +---- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +-@@ -44,25 +44,29 @@ enum brcmf_pcie_state { +- BRCMFMAC_PCIE_STATE_UP +- }; +- +-- +--#define BRCMF_PCIE_43602_FW_NAME "brcm/brcmfmac43602-pcie.bin" +--#define BRCMF_PCIE_43602_NVRAM_NAME "brcm/brcmfmac43602-pcie.txt" +--#define BRCMF_PCIE_4350_FW_NAME "brcm/brcmfmac4350-pcie.bin" +--#define BRCMF_PCIE_4350_NVRAM_NAME "brcm/brcmfmac4350-pcie.txt" +--#define BRCMF_PCIE_4356_FW_NAME "brcm/brcmfmac4356-pcie.bin" +--#define BRCMF_PCIE_4356_NVRAM_NAME "brcm/brcmfmac4356-pcie.txt" +--#define BRCMF_PCIE_43570_FW_NAME "brcm/brcmfmac43570-pcie.bin" +--#define BRCMF_PCIE_43570_NVRAM_NAME "brcm/brcmfmac43570-pcie.txt" +--#define BRCMF_PCIE_4358_FW_NAME "brcm/brcmfmac4358-pcie.bin" +--#define BRCMF_PCIE_4358_NVRAM_NAME "brcm/brcmfmac4358-pcie.txt" +--#define BRCMF_PCIE_4359_FW_NAME "brcm/brcmfmac4359-pcie.bin" +--#define BRCMF_PCIE_4359_NVRAM_NAME "brcm/brcmfmac4359-pcie.txt" +--#define BRCMF_PCIE_4365_FW_NAME "brcm/brcmfmac4365b-pcie.bin" +--#define BRCMF_PCIE_4365_NVRAM_NAME "brcm/brcmfmac4365b-pcie.txt" +--#define BRCMF_PCIE_4366_FW_NAME "brcm/brcmfmac4366b-pcie.bin" +--#define BRCMF_PCIE_4366_NVRAM_NAME "brcm/brcmfmac4366b-pcie.txt" +--#define BRCMF_PCIE_4371_FW_NAME "brcm/brcmfmac4371-pcie.bin" +--#define BRCMF_PCIE_4371_NVRAM_NAME "brcm/brcmfmac4371-pcie.txt" +-+BRCMF_FW_NVRAM_DEF(43602, "brcmfmac43602-pcie.bin", "brcmfmac43602-pcie.txt"); +-+BRCMF_FW_NVRAM_DEF(4350, "brcmfmac4350-pcie.bin", "brcmfmac4350-pcie.txt"); +-+BRCMF_FW_NVRAM_DEF(4356, "brcmfmac4356-pcie.bin", "brcmfmac4356-pcie.txt"); +-+BRCMF_FW_NVRAM_DEF(43570, "brcmfmac43570-pcie.bin", "brcmfmac43570-pcie.txt"); +-+BRCMF_FW_NVRAM_DEF(4358, "brcmfmac4358-pcie.bin", "brcmfmac4358-pcie.txt"); +-+BRCMF_FW_NVRAM_DEF(4359, "brcmfmac4359-pcie.bin", "brcmfmac4359-pcie.txt"); +-+BRCMF_FW_NVRAM_DEF(4365B, "brcmfmac4365b-pcie.bin", "brcmfmac4365b-pcie.txt"); +-+BRCMF_FW_NVRAM_DEF(4366B, "brcmfmac4366b-pcie.bin", "brcmfmac4366b-pcie.txt"); +-+BRCMF_FW_NVRAM_DEF(4371, "brcmfmac4371-pcie.bin", "brcmfmac4371-pcie.txt"); +-+ +-+static struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43602_CHIP_ID, 0xFFFFFFFF, 43602), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4350_CHIP_ID, 0xFFFFFFFF, 4350), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43567_CHIP_ID, 0xFFFFFFFF, 43570), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43569_CHIP_ID, 0xFFFFFFFF, 43570), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43570_CHIP_ID, 0xFFFFFFFF, 43570), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4358_CHIP_ID, 0xFFFFFFFF, 4358), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4365_CHIP_ID, 0xFFFFFFFF, 4365B), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4366_CHIP_ID, 0xFFFFFFFF, 4366B), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371), +-+}; +- +- #define BRCMF_PCIE_FW_UP_TIMEOUT 2000 /* msec */ +- +-@@ -202,26 +206,6 @@ enum brcmf_pcie_state { +- #define BRCMF_PCIE_LINK_STATUS_CTRL_ASPM_ENAB 3 +- +- +--MODULE_FIRMWARE(BRCMF_PCIE_43602_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_43602_NVRAM_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4350_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4350_NVRAM_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4356_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4356_NVRAM_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_43570_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_43570_NVRAM_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4358_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4358_NVRAM_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4359_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4359_NVRAM_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4365_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4365_NVRAM_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4366_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4366_NVRAM_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4371_FW_NAME); +--MODULE_FIRMWARE(BRCMF_PCIE_4371_NVRAM_NAME); +-- +-- +- struct brcmf_pcie_console { +- u32 base_addr; +- u32 buf_addr; +-@@ -258,8 +242,8 @@ struct brcmf_pciedev_info { +- enum brcmf_pcie_state state; +- bool in_irq; +- struct pci_dev *pdev; +-- char fw_name[BRCMF_FW_PATH_LEN + BRCMF_FW_NAME_LEN]; +-- char nvram_name[BRCMF_FW_PATH_LEN + BRCMF_FW_NAME_LEN]; +-+ char fw_name[BRCMF_FW_NAME_LEN]; +-+ char nvram_name[BRCMF_FW_NAME_LEN]; +- void __iomem *regs; +- void __iomem *tcm; +- u32 tcm_size; +-@@ -1478,84 +1462,6 @@ brcmf_pcie_init_share_ram_info(struct br +- } +- +- +--static int brcmf_pcie_get_fwnames(struct brcmf_pciedev_info *devinfo) +--{ +-- char *fw_name; +-- char *nvram_name; +-- uint fw_len, nv_len; +-- char end; +-- +-- brcmf_dbg(PCIE, "Enter, chip 0x%04x chiprev %d\n", devinfo->ci->chip, +-- devinfo->ci->chiprev); +-- +-- switch (devinfo->ci->chip) { +-- case BRCM_CC_43602_CHIP_ID: +-- fw_name = BRCMF_PCIE_43602_FW_NAME; +-- nvram_name = BRCMF_PCIE_43602_NVRAM_NAME; +-- break; +-- case BRCM_CC_4350_CHIP_ID: +-- fw_name = BRCMF_PCIE_4350_FW_NAME; +-- nvram_name = BRCMF_PCIE_4350_NVRAM_NAME; +-- break; +-- case BRCM_CC_4356_CHIP_ID: +-- fw_name = BRCMF_PCIE_4356_FW_NAME; +-- nvram_name = BRCMF_PCIE_4356_NVRAM_NAME; +-- break; +-- case BRCM_CC_43567_CHIP_ID: +-- case BRCM_CC_43569_CHIP_ID: +-- case BRCM_CC_43570_CHIP_ID: +-- fw_name = BRCMF_PCIE_43570_FW_NAME; +-- nvram_name = BRCMF_PCIE_43570_NVRAM_NAME; +-- break; +-- case BRCM_CC_4358_CHIP_ID: +-- fw_name = BRCMF_PCIE_4358_FW_NAME; +-- nvram_name = BRCMF_PCIE_4358_NVRAM_NAME; +-- break; +-- case BRCM_CC_4359_CHIP_ID: +-- fw_name = BRCMF_PCIE_4359_FW_NAME; +-- nvram_name = BRCMF_PCIE_4359_NVRAM_NAME; +-- break; +-- case BRCM_CC_4365_CHIP_ID: +-- fw_name = BRCMF_PCIE_4365_FW_NAME; +-- nvram_name = BRCMF_PCIE_4365_NVRAM_NAME; +-- break; +-- case BRCM_CC_4366_CHIP_ID: +-- fw_name = BRCMF_PCIE_4366_FW_NAME; +-- nvram_name = BRCMF_PCIE_4366_NVRAM_NAME; +-- break; +-- case BRCM_CC_4371_CHIP_ID: +-- fw_name = BRCMF_PCIE_4371_FW_NAME; +-- nvram_name = BRCMF_PCIE_4371_NVRAM_NAME; +-- break; +-- default: +-- brcmf_err("Unsupported chip 0x%04x\n", devinfo->ci->chip); +-- return -ENODEV; +-- } +-- +-- fw_len = sizeof(devinfo->fw_name) - 1; +-- nv_len = sizeof(devinfo->nvram_name) - 1; +-- /* check if firmware path is provided by module parameter */ +-- if (brcmf_firmware_path[0] != '\0') { +-- strncpy(devinfo->fw_name, brcmf_firmware_path, fw_len); +-- strncpy(devinfo->nvram_name, brcmf_firmware_path, nv_len); +-- fw_len -= strlen(devinfo->fw_name); +-- nv_len -= strlen(devinfo->nvram_name); +-- +-- end = brcmf_firmware_path[strlen(brcmf_firmware_path) - 1]; +-- if (end != '/') { +-- strncat(devinfo->fw_name, "/", fw_len); +-- strncat(devinfo->nvram_name, "/", nv_len); +-- fw_len--; +-- nv_len--; +-- } +-- } +-- strncat(devinfo->fw_name, fw_name, fw_len); +-- strncat(devinfo->nvram_name, nvram_name, nv_len); +-- +-- return 0; +--} +-- +-- +- static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, +- const struct firmware *fw, void *nvram, +- u32 nvram_len) +-@@ -1891,7 +1797,10 @@ brcmf_pcie_probe(struct pci_dev *pdev, c +- bus->wowl_supported = pci_pme_capable(pdev, PCI_D3hot); +- dev_set_drvdata(&pdev->dev, bus); +- +-- ret = brcmf_pcie_get_fwnames(devinfo); +-+ ret = brcmf_fw_map_chip_to_name(devinfo->ci->chip, devinfo->ci->chiprev, +-+ brcmf_pcie_fwnames, +-+ ARRAY_SIZE(brcmf_pcie_fwnames), +-+ devinfo->fw_name, devinfo->nvram_name); +- if (ret) +- goto fail_bus; +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +-@@ -596,136 +596,41 @@ static const struct sdiod_drive_str sdio +- {4, 0x1} +- }; +- +--#define BCM43143_FIRMWARE_NAME "brcm/brcmfmac43143-sdio.bin" +--#define BCM43143_NVRAM_NAME "brcm/brcmfmac43143-sdio.txt" +--#define BCM43241B0_FIRMWARE_NAME "brcm/brcmfmac43241b0-sdio.bin" +--#define BCM43241B0_NVRAM_NAME "brcm/brcmfmac43241b0-sdio.txt" +--#define BCM43241B4_FIRMWARE_NAME "brcm/brcmfmac43241b4-sdio.bin" +--#define BCM43241B4_NVRAM_NAME "brcm/brcmfmac43241b4-sdio.txt" +--#define BCM43241B5_FIRMWARE_NAME "brcm/brcmfmac43241b5-sdio.bin" +--#define BCM43241B5_NVRAM_NAME "brcm/brcmfmac43241b5-sdio.txt" +--#define BCM4329_FIRMWARE_NAME "brcm/brcmfmac4329-sdio.bin" +--#define BCM4329_NVRAM_NAME "brcm/brcmfmac4329-sdio.txt" +--#define BCM4330_FIRMWARE_NAME "brcm/brcmfmac4330-sdio.bin" +--#define BCM4330_NVRAM_NAME "brcm/brcmfmac4330-sdio.txt" +--#define BCM4334_FIRMWARE_NAME "brcm/brcmfmac4334-sdio.bin" +--#define BCM4334_NVRAM_NAME "brcm/brcmfmac4334-sdio.txt" +--#define BCM43340_FIRMWARE_NAME "brcm/brcmfmac43340-sdio.bin" +--#define BCM43340_NVRAM_NAME "brcm/brcmfmac43340-sdio.txt" +--#define BCM4335_FIRMWARE_NAME "brcm/brcmfmac4335-sdio.bin" +--#define BCM4335_NVRAM_NAME "brcm/brcmfmac4335-sdio.txt" +--#define BCM43362_FIRMWARE_NAME "brcm/brcmfmac43362-sdio.bin" +--#define BCM43362_NVRAM_NAME "brcm/brcmfmac43362-sdio.txt" +--#define BCM4339_FIRMWARE_NAME "brcm/brcmfmac4339-sdio.bin" +--#define BCM4339_NVRAM_NAME "brcm/brcmfmac4339-sdio.txt" +--#define BCM43430_FIRMWARE_NAME "brcm/brcmfmac43430-sdio.bin" +--#define BCM43430_NVRAM_NAME "brcm/brcmfmac43430-sdio.txt" +--#define BCM43455_FIRMWARE_NAME "brcm/brcmfmac43455-sdio.bin" +--#define BCM43455_NVRAM_NAME "brcm/brcmfmac43455-sdio.txt" +--#define BCM4354_FIRMWARE_NAME "brcm/brcmfmac4354-sdio.bin" +--#define BCM4354_NVRAM_NAME "brcm/brcmfmac4354-sdio.txt" +-- +--MODULE_FIRMWARE(BCM43143_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM43143_NVRAM_NAME); +--MODULE_FIRMWARE(BCM43241B0_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM43241B0_NVRAM_NAME); +--MODULE_FIRMWARE(BCM43241B4_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM43241B4_NVRAM_NAME); +--MODULE_FIRMWARE(BCM43241B5_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM43241B5_NVRAM_NAME); +--MODULE_FIRMWARE(BCM4329_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM4329_NVRAM_NAME); +--MODULE_FIRMWARE(BCM4330_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM4330_NVRAM_NAME); +--MODULE_FIRMWARE(BCM4334_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM4334_NVRAM_NAME); +--MODULE_FIRMWARE(BCM43340_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM43340_NVRAM_NAME); +--MODULE_FIRMWARE(BCM4335_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM4335_NVRAM_NAME); +--MODULE_FIRMWARE(BCM43362_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM43362_NVRAM_NAME); +--MODULE_FIRMWARE(BCM4339_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM4339_NVRAM_NAME); +--MODULE_FIRMWARE(BCM43430_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM43430_NVRAM_NAME); +--MODULE_FIRMWARE(BCM43455_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM43455_NVRAM_NAME); +--MODULE_FIRMWARE(BCM4354_FIRMWARE_NAME); +--MODULE_FIRMWARE(BCM4354_NVRAM_NAME); +-- +--struct brcmf_firmware_names { +-- u32 chipid; +-- u32 revmsk; +-- const char *bin; +-- const char *nv; +-+BRCMF_FW_NVRAM_DEF(43143, "brcmfmac43143-sdio.bin", "brcmfmac43143-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(43241B0, "brcmfmac43241b0-sdio.bin", +-+ "brcmfmac43241b0-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(43241B4, "brcmfmac43241b4-sdio.bin", +-+ "brcmfmac43241b4-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(43241B5, "brcmfmac43241b5-sdio.bin", +-+ "brcmfmac43241b5-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(4329, "brcmfmac4329-sdio.bin", "brcmfmac4329-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(4330, "brcmfmac4330-sdio.bin", "brcmfmac4330-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(4334, "brcmfmac4334-sdio.bin", "brcmfmac4334-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(43340, "brcmfmac43340-sdio.bin", "brcmfmac43340-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(4335, "brcmfmac4335-sdio.bin", "brcmfmac4335-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(43362, "brcmfmac43362-sdio.bin", "brcmfmac43362-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(4339, "brcmfmac4339-sdio.bin", "brcmfmac4339-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(43430, "brcmfmac43430-sdio.bin", "brcmfmac43430-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(43455, "brcmfmac43455-sdio.bin", "brcmfmac43455-sdio.txt"); +-+BRCMF_FW_NVRAM_DEF(4354, "brcmfmac4354-sdio.bin", "brcmfmac4354-sdio.txt"); +-+ +-+static struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43241_CHIP_ID, 0xFFFFFFC0, 43241B5), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4329_CHIP_ID, 0xFFFFFFFF, 4329), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4335_CHIP_ID, 0xFFFFFFFF, 4335), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43430_CHIP_ID, 0xFFFFFFFF, 43430), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFFC0, 43455), +-+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354) +- }; +- +--enum brcmf_firmware_type { +-- BRCMF_FIRMWARE_BIN, +-- BRCMF_FIRMWARE_NVRAM +--}; +-- +--#define BRCMF_FIRMWARE_NVRAM(name) \ +-- name ## _FIRMWARE_NAME, name ## _NVRAM_NAME +-- +--static const struct brcmf_firmware_names brcmf_fwname_data[] = { +-- { BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM43143) }, +-- { BRCM_CC_43241_CHIP_ID, 0x0000001F, BRCMF_FIRMWARE_NVRAM(BCM43241B0) }, +-- { BRCM_CC_43241_CHIP_ID, 0x00000020, BRCMF_FIRMWARE_NVRAM(BCM43241B4) }, +-- { BRCM_CC_43241_CHIP_ID, 0xFFFFFFC0, BRCMF_FIRMWARE_NVRAM(BCM43241B5) }, +-- { BRCM_CC_4329_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4329) }, +-- { BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4330) }, +-- { BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4334) }, +-- { BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM43340) }, +-- { BRCM_CC_4335_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4335) }, +-- { BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, BRCMF_FIRMWARE_NVRAM(BCM43362) }, +-- { BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4339) }, +-- { BRCM_CC_43430_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM43430) }, +-- { BRCM_CC_4345_CHIP_ID, 0xFFFFFFC0, BRCMF_FIRMWARE_NVRAM(BCM43455) }, +-- { BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4354) } +--}; +-- +--static int brcmf_sdio_get_fwnames(struct brcmf_chip *ci, +-- struct brcmf_sdio_dev *sdiodev) +--{ +-- int i; +-- char end; +-- +-- for (i = 0; i < ARRAY_SIZE(brcmf_fwname_data); i++) { +-- if (brcmf_fwname_data[i].chipid == ci->chip && +-- brcmf_fwname_data[i].revmsk & BIT(ci->chiprev)) +-- break; +-- } +-- +-- if (i == ARRAY_SIZE(brcmf_fwname_data)) { +-- brcmf_err("Unknown chipid %d [%d]\n", ci->chip, ci->chiprev); +-- return -ENODEV; +-- } +-- +-- /* check if firmware path is provided by module parameter */ +-- if (brcmf_firmware_path[0] != '\0') { +-- strlcpy(sdiodev->fw_name, brcmf_firmware_path, +-- sizeof(sdiodev->fw_name)); +-- strlcpy(sdiodev->nvram_name, brcmf_firmware_path, +-- sizeof(sdiodev->nvram_name)); +-- +-- end = brcmf_firmware_path[strlen(brcmf_firmware_path) - 1]; +-- if (end != '/') { +-- strlcat(sdiodev->fw_name, "/", +-- sizeof(sdiodev->fw_name)); +-- strlcat(sdiodev->nvram_name, "/", +-- sizeof(sdiodev->nvram_name)); +-- } +-- } +-- strlcat(sdiodev->fw_name, brcmf_fwname_data[i].bin, +-- sizeof(sdiodev->fw_name)); +-- strlcat(sdiodev->nvram_name, brcmf_fwname_data[i].nv, +-- sizeof(sdiodev->nvram_name)); +-- +-- return 0; +--} +-- +- static void pkt_align(struct sk_buff *p, int len, int align) +- { +- uint datalign; +-@@ -4252,7 +4157,10 @@ struct brcmf_sdio *brcmf_sdio_probe(stru +- brcmf_sdio_debugfs_create(bus); +- brcmf_dbg(INFO, "completed!!\n"); +- +-- ret = brcmf_sdio_get_fwnames(bus->ci, sdiodev); +-+ ret = brcmf_fw_map_chip_to_name(bus->ci->chip, bus->ci->chiprev, +-+ brcmf_sdio_fwnames, +-+ ARRAY_SIZE(brcmf_sdio_fwnames), +-+ sdiodev->fw_name, sdiodev->nvram_name); +- if (ret) +- goto fail; +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.h +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.h +-@@ -195,8 +195,8 @@ struct brcmf_sdio_dev { +- uint max_segment_size; +- uint txglomsz; +- struct sg_table sgtable; +-- char fw_name[BRCMF_FW_PATH_LEN + BRCMF_FW_NAME_LEN]; +-- char nvram_name[BRCMF_FW_PATH_LEN + BRCMF_FW_NAME_LEN]; +-+ char fw_name[BRCMF_FW_NAME_LEN]; +-+ char nvram_name[BRCMF_FW_NAME_LEN]; +- bool wowl_enabled; +- enum brcmf_sdiod_state state; +- struct brcmf_sdiod_freezer *freezer; +---- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c +-@@ -43,10 +43,20 @@ +- #define BRCMF_USB_CBCTL_READ 1 +- #define BRCMF_USB_MAX_PKT_SIZE 1600 +- +--#define BRCMF_USB_43143_FW_NAME "brcm/brcmfmac43143.bin" +--#define BRCMF_USB_43236_FW_NAME "brcm/brcmfmac43236b.bin" +--#define BRCMF_USB_43242_FW_NAME "brcm/brcmfmac43242a.bin" +--#define BRCMF_USB_43569_FW_NAME "brcm/brcmfmac43569.bin" +-+BRCMF_FW_DEF(43143, "brcmfmac43143.bin"); +-+BRCMF_FW_DEF(43236B, "brcmfmac43236b.bin"); +-+BRCMF_FW_DEF(43242A, "brcmfmac43242a.bin"); +-+BRCMF_FW_DEF(43569, "brcmfmac43569.bin"); +-+ +-+static struct brcmf_firmware_mapping brcmf_usb_fwnames[] = { +-+ BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143), +-+ BRCMF_FW_ENTRY(BRCM_CC_43235_CHIP_ID, 0x00000008, 43236B), +-+ BRCMF_FW_ENTRY(BRCM_CC_43236_CHIP_ID, 0x00000008, 43236B), +-+ BRCMF_FW_ENTRY(BRCM_CC_43238_CHIP_ID, 0x00000008, 43236B), +-+ BRCMF_FW_ENTRY(BRCM_CC_43242_CHIP_ID, 0xFFFFFFFF, 43242A), +-+ BRCMF_FW_ENTRY(BRCM_CC_43566_CHIP_ID, 0xFFFFFFFF, 43569), +-+ BRCMF_FW_ENTRY(BRCM_CC_43569_CHIP_ID, 0xFFFFFFFF, 43569) +-+}; +- +- #define TRX_MAGIC 0x30524448 /* "HDR0" */ +- #define TRX_MAX_OFFSET 3 /* Max number of file offsets */ +-@@ -139,6 +149,7 @@ struct brcmf_usbdev_info { +- struct brcmf_usbreq *tx_reqs; +- struct brcmf_usbreq *rx_reqs; +- +-+ char fw_name[BRCMF_FW_NAME_LEN]; +- const u8 *image; /* buffer for combine fw and nvram */ +- int image_len; +- +-@@ -983,45 +994,15 @@ static int brcmf_usb_dlrun(struct brcmf_ +- return 0; +- } +- +--static bool brcmf_usb_chip_support(int chipid, int chiprev) +--{ +-- switch(chipid) { +-- case BRCM_CC_43143_CHIP_ID: +-- return true; +-- case BRCM_CC_43235_CHIP_ID: +-- case BRCM_CC_43236_CHIP_ID: +-- case BRCM_CC_43238_CHIP_ID: +-- return (chiprev == 3); +-- case BRCM_CC_43242_CHIP_ID: +-- return true; +-- case BRCM_CC_43566_CHIP_ID: +-- case BRCM_CC_43569_CHIP_ID: +-- return true; +-- default: +-- break; +-- } +-- return false; +--} +-- +- static int +- brcmf_usb_fw_download(struct brcmf_usbdev_info *devinfo) +- { +-- int devid, chiprev; +- int err; +- +- brcmf_dbg(USB, "Enter\n"); +- if (devinfo == NULL) +- return -ENODEV; +- +-- devid = devinfo->bus_pub.devid; +-- chiprev = devinfo->bus_pub.chiprev; +-- +-- if (!brcmf_usb_chip_support(devid, chiprev)) { +-- brcmf_err("unsupported chip %d rev %d\n", +-- devid, chiprev); +-- return -EINVAL; +-- } +-- +- if (!devinfo->image) { +- brcmf_err("No firmware!\n"); +- return -ENOENT; +-@@ -1071,25 +1052,6 @@ static int check_file(const u8 *headers) +- return -1; +- } +- +--static const char *brcmf_usb_get_fwname(struct brcmf_usbdev_info *devinfo) +--{ +-- switch (devinfo->bus_pub.devid) { +-- case BRCM_CC_43143_CHIP_ID: +-- return BRCMF_USB_43143_FW_NAME; +-- case BRCM_CC_43235_CHIP_ID: +-- case BRCM_CC_43236_CHIP_ID: +-- case BRCM_CC_43238_CHIP_ID: +-- return BRCMF_USB_43236_FW_NAME; +-- case BRCM_CC_43242_CHIP_ID: +-- return BRCMF_USB_43242_FW_NAME; +-- case BRCM_CC_43566_CHIP_ID: +-- case BRCM_CC_43569_CHIP_ID: +-- return BRCMF_USB_43569_FW_NAME; +-- default: +-- return NULL; +-- } +--} +-- +- +- static +- struct brcmf_usbdev *brcmf_usb_attach(struct brcmf_usbdev_info *devinfo, +-@@ -1274,9 +1236,16 @@ static int brcmf_usb_probe_cb(struct brc +- bus->chip = bus_pub->devid; +- bus->chiprev = bus_pub->chiprev; +- +-+ ret = brcmf_fw_map_chip_to_name(bus_pub->devid, bus_pub->chiprev, +-+ brcmf_usb_fwnames, +-+ ARRAY_SIZE(brcmf_usb_fwnames), +-+ devinfo->fw_name, NULL); +-+ if (ret) +-+ goto fail; +-+ +- /* request firmware here */ +-- ret = brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo), +-- NULL, brcmf_usb_probe_phase2); +-+ ret = brcmf_fw_get_firmwares(dev, 0, devinfo->fw_name, NULL, +-+ brcmf_usb_probe_phase2); +- if (ret) { +- brcmf_err("firmware request failed: %d\n", ret); +- goto fail; +-@@ -1472,8 +1441,7 @@ static int brcmf_usb_reset_resume(struct +- +- brcmf_dbg(USB, "Enter\n"); +- +-- return brcmf_fw_get_firmwares(&usb->dev, 0, +-- brcmf_usb_get_fwname(devinfo), NULL, +-+ return brcmf_fw_get_firmwares(&usb->dev, 0, devinfo->fw_name, NULL, +- brcmf_usb_probe_phase2); +- } +- +-@@ -1491,10 +1459,6 @@ static struct usb_device_id brcmf_usb_de +- }; +- +- MODULE_DEVICE_TABLE(usb, brcmf_usb_devid_table); +--MODULE_FIRMWARE(BRCMF_USB_43143_FW_NAME); +--MODULE_FIRMWARE(BRCMF_USB_43236_FW_NAME); +--MODULE_FIRMWARE(BRCMF_USB_43242_FW_NAME); +--MODULE_FIRMWARE(BRCMF_USB_43569_FW_NAME); +- +- static struct usb_driver brcmf_usbdrvr = { +- .name = KBUILD_MODNAME, +diff --git a/package/kernel/mac80211/patches/376-0010-brcmfmac-Fix-double-free-on-exception-at-module-load.patch b/package/kernel/mac80211/patches/376-0010-brcmfmac-Fix-double-free-on-exception-at-module-load.patch +deleted file mode 100644 +index 2174d09..0000000 +--- a/package/kernel/mac80211/patches/376-0010-brcmfmac-Fix-double-free-on-exception-at-module-load.patch ++++ /dev/null +@@ -1,22 +0,0 @@ +-From: Hante Meuleman +-Date: Wed, 25 Nov 2015 11:32:47 +0100 +-Subject: [PATCH] brcmfmac: Fix double free on exception at module load. +- +-Reviewed-by: Arend Van Spriel +-Reviewed-by: Pieter-Paul Giesberts +-Signed-off-by: Hante Meuleman +-Signed-off-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -1083,6 +1083,8 @@ fail: +- brcmf_net_detach(ifp->ndev); +- if (p2p_ifp) +- brcmf_net_detach(p2p_ifp->ndev); +-+ drvr->iflist[0] = NULL; +-+ drvr->iflist[1] = NULL; +- return ret; +- } +- return 0; +diff --git a/package/kernel/mac80211/patches/377-brcmfmac-only-lock-and-unlock-fws-if-fws-is-not-null.patch b/package/kernel/mac80211/patches/377-brcmfmac-only-lock-and-unlock-fws-if-fws-is-not-null.patch +deleted file mode 100644 +index 8ec1441..0000000 +--- a/package/kernel/mac80211/patches/377-brcmfmac-only-lock-and-unlock-fws-if-fws-is-not-null.patch ++++ /dev/null +@@ -1,30 +0,0 @@ +-From: Colin Ian King +-Date: Wed, 2 Dec 2015 11:45:10 +0000 +-Subject: [PATCH] brcmfmac: only lock and unlock fws if fws is not null +- +-There is a null ptr check for fws to set bcmc_credit_check, however, +-there a lock and unlock on fws should only performed if fwts is +-also not null to also avoid a potential null pointer deference. +- +-Signed-off-by: Colin Ian King +-Acked-by: Arend van Spriel +-Signed-off-by: Kalle Valo +---- +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +-@@ -1609,10 +1609,11 @@ static int brcmf_fws_notify_bcmc_credit_ +- { +- struct brcmf_fws_info *fws = ifp->drvr->fws; +- +-- brcmf_fws_lock(fws); +-- if (fws) +-+ if (fws) { +-+ brcmf_fws_lock(fws); +- fws->bcmc_credit_check = true; +-- brcmf_fws_unlock(fws); +-+ brcmf_fws_unlock(fws); +-+ } +- return 0; +- } +- diff --git a/package/kernel/mac80211/patches/400-ath_move_debug_code.patch b/package/kernel/mac80211/patches/400-ath_move_debug_code.patch index 298f722..72e9a41 100644 --- a/package/kernel/mac80211/patches/400-ath_move_debug_code.patch @@ -23368,19 +29336,120 @@ index ac58dba..dd82ce5 100644 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; +diff --git a/package/kernel/mac80211/patches/860-brcmfmac-use-bcm47xx-platform-NVRAM-as-fallback.patch b/package/kernel/mac80211/patches/860-brcmfmac-use-bcm47xx-platform-NVRAM-as-fallback.patch +index 44bb779..dbfb158 100644 +--- a/package/kernel/mac80211/patches/860-brcmfmac-use-bcm47xx-platform-NVRAM-as-fallback.patch ++++ b/package/kernel/mac80211/patches/860-brcmfmac-use-bcm47xx-platform-NVRAM-as-fallback.patch +@@ -69,9 +69,9 @@ Signed-off-by: Rafał Miłecki + } + --- a/drivers/net/wireless/brcm80211/brcmfmac/debug.h + +++ b/drivers/net/wireless/brcm80211/brcmfmac/debug.h +-@@ -19,6 +19,8 @@ +- +- #include /* net_ratelimit() */ ++@@ -17,6 +17,8 @@ ++ #ifndef BRCMFMAC_DEBUG_H ++ #define BRCMFMAC_DEBUG_H + + +#include + + +diff --git a/package/kernel/mac80211/patches/861-brcmfmac-register-wiphy-s-during-module_init.patch b/package/kernel/mac80211/patches/861-brcmfmac-register-wiphy-s-during-module_init.patch +index 14f8a00..685a5f9 100644 +--- a/package/kernel/mac80211/patches/861-brcmfmac-register-wiphy-s-during-module_init.patch ++++ b/package/kernel/mac80211/patches/861-brcmfmac-register-wiphy-s-during-module_init.patch +@@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki + + --- a/drivers/net/wireless/brcm80211/brcmfmac/core.c + +++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +-@@ -1226,6 +1226,7 @@ static int __init brcmfmac_module_init(v ++@@ -1213,6 +1213,7 @@ static int __init brcmfmac_module_init(v + #endif + if (!schedule_work(&brcmf_driver_work)) + return -EBUSY; diff --git a/package/kernel/mac80211/patches/862-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch b/package/kernel/mac80211/patches/862-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch -index 1cba2b3..5fdfa37 100644 +index 32c4a6f..5fdfa37 100644 --- a/package/kernel/mac80211/patches/862-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch +++ b/package/kernel/mac80211/patches/862-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch @@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c --@@ -691,9 +691,37 @@ static struct wireless_dev *brcmf_cfg802 +-@@ -608,9 +608,37 @@ static struct wireless_dev *brcmf_cfg802 +@@ -692,9 +692,37 @@ static struct wireless_dev *brcmf_cfg802 u32 *flags, struct vif_params *params) { +diff --git a/package/kernel/mac80211/patches/863-brcmfmac-fix-setting-primary-channel-for-80-MHz-widt.patch b/package/kernel/mac80211/patches/863-brcmfmac-fix-setting-primary-channel-for-80-MHz-widt.patch +deleted file mode 100644 +index d6b9e37..0000000 +--- a/package/kernel/mac80211/patches/863-brcmfmac-fix-setting-primary-channel-for-80-MHz-widt.patch ++++ /dev/null +@@ -1,65 +0,0 @@ +-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +-Date: Wed, 20 Jan 2016 16:35:12 +0100 +-Subject: [PATCH] brcmfmac: fix setting primary channel for 80 MHz width +-MIME-Version: 1.0 +-Content-Type: text/plain; charset=UTF-8 +-Content-Transfer-Encoding: 8bit +- +-First of all it changes the way we calculate primary channel offset. If +-we use e.g. 80 MHz channel with primary frequency 5180 MHz (which means +-center frequency is 5210 MHz) it makes sense to calculate primary offset +-as -30 MHz. +-Then it fixes values we compare primary_offset with. We were comparing +-offset in MHz against -2 or 2 which was resulting in picking a wrong +-primary channel. +- +-Signed-off-by: Rafał Miłecki +---- +- .../brcm80211/brcmfmac/cfg80211.c | 23 ++++++++++------------ +- 1 file changed, 10 insertions(+), 13 deletions(-) +- +---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +-@@ -246,7 +246,7 @@ static u16 chandef_to_chanspec(struct br +- brcmf_dbg(TRACE, "chandef: control %d center %d width %d\n", +- ch->chan->center_freq, ch->center_freq1, ch->width); +- ch_inf.chnum = ieee80211_frequency_to_channel(ch->center_freq1); +-- primary_offset = ch->center_freq1 - ch->chan->center_freq; +-+ primary_offset = ch->chan->center_freq - ch->center_freq1; +- switch (ch->width) { +- case NL80211_CHAN_WIDTH_20: +- case NL80211_CHAN_WIDTH_20_NOHT: +-@@ -255,24 +255,21 @@ static u16 chandef_to_chanspec(struct br +- break; +- case NL80211_CHAN_WIDTH_40: +- ch_inf.bw = BRCMU_CHAN_BW_40; +-- if (primary_offset < 0) +-+ if (primary_offset > 0) +- ch_inf.sb = BRCMU_CHAN_SB_U; +- else +- ch_inf.sb = BRCMU_CHAN_SB_L; +- break; +- case NL80211_CHAN_WIDTH_80: +- ch_inf.bw = BRCMU_CHAN_BW_80; +-- if (primary_offset < 0) { +-- if (primary_offset < -CH_10MHZ_APART) +-- ch_inf.sb = BRCMU_CHAN_SB_UU; +-- else +-- ch_inf.sb = BRCMU_CHAN_SB_UL; +-- } else { +-- if (primary_offset > CH_10MHZ_APART) +-- ch_inf.sb = BRCMU_CHAN_SB_LL; +-- else +-- ch_inf.sb = BRCMU_CHAN_SB_LU; +-- } +-+ if (primary_offset == -30) +-+ ch_inf.sb = BRCMU_CHAN_SB_LL; +-+ else if (primary_offset == -10) +-+ ch_inf.sb = BRCMU_CHAN_SB_LU; +-+ else if (primary_offset == 10) +-+ ch_inf.sb = BRCMU_CHAN_SB_UL; +-+ else +-+ ch_inf.sb = BRCMU_CHAN_SB_UU; +- break; +- case NL80211_CHAN_WIDTH_80P80: +- case NL80211_CHAN_WIDTH_160: diff --git a/package/kernel/mac80211/patches/900-wlcore-Add-support-for-DT-platform-data.patch b/package/kernel/mac80211/patches/900-wlcore-Add-support-for-DT-platform-data.patch deleted file mode 100644 index 856dea8..0000000 diff --git a/patches/openwrt/0009-ar71xx-add-support-for-tp-link-wr740n-v5.0-EU.patch b/patches/openwrt/0009-ar71xx-add-support-for-tp-link-wr740n-v5.0-EU.patch index 20af4e8d..903e7e5f 100644 --- a/patches/openwrt/0009-ar71xx-add-support-for-tp-link-wr740n-v5.0-EU.patch +++ b/patches/openwrt/0009-ar71xx-add-support-for-tp-link-wr740n-v5.0-EU.patch @@ -10,7 +10,7 @@ tested it on my own v5.0 router and it works. Signed-off-by: Daniel Petre diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile -index 013a215..37ce8a4 100644 +index 4336697..1fe88d5 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -501,6 +501,14 @@ define Device/tl-wr740n-v4 diff --git a/patches/openwrt/0010-ar71xx-add-support-for-TL-WR741ND-v5.patch b/patches/openwrt/0010-ar71xx-add-support-for-TL-WR741ND-v5.patch index e8bf32dc..94af335c 100644 --- a/patches/openwrt/0010-ar71xx-add-support-for-TL-WR741ND-v5.patch +++ b/patches/openwrt/0010-ar71xx-add-support-for-TL-WR741ND-v5.patch @@ -6,7 +6,7 @@ This device is identical to the TL-WR740N v5, it even uses the same HWID (which wasn't the case for older TL-WR741ND revisions). diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile -index 37ce8a4..8a25832 100644 +index 1fe88d5..78d35e1 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -531,6 +531,14 @@ define Device/tl-wr741nd-v4 diff --git a/patches/openwrt/0011-brcm2708-Implement-sysupgrade.patch b/patches/openwrt/0011-brcm2708-Implement-sysupgrade.patch deleted file mode 100644 index 4c205284..00000000 --- a/patches/openwrt/0011-brcm2708-Implement-sysupgrade.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Matthias Schiffer -Date: Fri, 17 Jul 2015 20:51:23 +0200 -Subject: brcm2708: Implement sysupgrade - -Implement sysupgrade for Raspberry Pi, similar to the way it is done on x86: -The config files are saved in the boot partition and moved to where they are -normally expected in preinit. - -Also add optional gzip compression for the SD card image, since this can save -a lot of space (76M vs 6M), also similar to x86. - -Signed-off-by: Bruno Randolf - -diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile -index 30f6e1d..015aa9c 100644 ---- a/target/linux/brcm2708/Makefile -+++ b/target/linux/brcm2708/Makefile -@@ -19,7 +19,7 @@ SUBTARGETS:=bcm2708 bcm2709 - KERNEL_PATCHVER:=3.18 - - include $(INCLUDE_DIR)/target.mk --DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core kmod-sound-arm-bcm2835 -+DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core kmod-sound-arm-bcm2835 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 - - define Target/Description - Build firmware image for Broadcom BCM2708/BCM2709 SoC devices. -diff --git a/target/linux/brcm2708/base-files/lib/preinit/79_move_config b/target/linux/brcm2708/base-files/lib/preinit/79_move_config -new file mode 100644 -index 0000000..7bcea7b ---- /dev/null -+++ b/target/linux/brcm2708/base-files/lib/preinit/79_move_config -@@ -0,0 +1,18 @@ -+#!/bin/sh -+# Copyright (C) 2015 OpenWrt.org -+ -+BOOTPART=/dev/mmcblk0p1 -+ -+move_config() { -+ if [ -b $BOOTPART ]; then -+ insmod nls_cp437 -+ insmod nls_iso8859-1 -+ insmod fat -+ insmod vfat -+ mount -t vfat -o rw,noatime $BOOTPART /mnt -+ [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz / -+ umount /mnt -+ fi -+} -+ -+boot_hook_add preinit_mount_root move_config -diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh -new file mode 100644 -index 0000000..3e1ee00 ---- /dev/null -+++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh -@@ -0,0 +1,17 @@ -+platform_check_image() { -+ # i know no way to verify the image -+ return 0; -+} -+ -+platform_do_upgrade() { -+ sync -+ get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync -+ sleep 1 -+} -+ -+platform_copy_config() { -+ mount -t vfat -o rw,noatime /dev/mmcblk0p1 /mnt -+ cp -af "$CONF_TAR" /mnt/ -+ sync -+ umount /mnt -+} -diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile -index e70bdd0..2c18baf 100644 ---- a/target/linux/brcm2708/image/Makefile -+++ b/target/linux/brcm2708/image/Makefile -@@ -28,6 +28,9 @@ define Image/Build/RaspberryPi - mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img # Copy OpenWrt built kernel - ./gen_rpi_sdcard_img.sh $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img $(KDIR)/boot.img $(KDIR)/root.$(1) \ - $(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE) -+ ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) -+ gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img -+ endif - endef - - define Image/Build diff --git a/patches/openwrt/0012-sunxi-fix-uboot-install-location.patch b/patches/openwrt/0011-sunxi-fix-uboot-install-location.patch similarity index 100% rename from patches/openwrt/0012-sunxi-fix-uboot-install-location.patch rename to patches/openwrt/0011-sunxi-fix-uboot-install-location.patch diff --git a/patches/openwrt/0013-sunxi-respect-CONFIG_TARGET_IMAGES_GZIP.patch b/patches/openwrt/0012-sunxi-respect-CONFIG_TARGET_IMAGES_GZIP.patch similarity index 100% rename from patches/openwrt/0013-sunxi-respect-CONFIG_TARGET_IMAGES_GZIP.patch rename to patches/openwrt/0012-sunxi-respect-CONFIG_TARGET_IMAGES_GZIP.patch diff --git a/patches/openwrt/0014-odhcp6c-add-option-sourcefilter-to-disable-source-filter.patch b/patches/openwrt/0013-odhcp6c-add-option-sourcefilter-to-disable-source-filter.patch similarity index 100% rename from patches/openwrt/0014-odhcp6c-add-option-sourcefilter-to-disable-source-filter.patch rename to patches/openwrt/0013-odhcp6c-add-option-sourcefilter-to-disable-source-filter.patch diff --git a/patches/openwrt/0016-mac80211-set-mcast-rate-for-mesh-point-interfaces.patch b/patches/openwrt/0014-mac80211-set-mcast-rate-for-mesh-point-interfaces.patch similarity index 100% rename from patches/openwrt/0016-mac80211-set-mcast-rate-for-mesh-point-interfaces.patch rename to patches/openwrt/0014-mac80211-set-mcast-rate-for-mesh-point-interfaces.patch diff --git a/patches/openwrt/0015-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2.patch b/patches/openwrt/0015-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2.patch deleted file mode 100644 index 743177ea..00000000 --- a/patches/openwrt/0015-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Matthias Schiffer -Date: Thu, 23 Jul 2015 01:31:05 +0200 -Subject: ar71xx: fix wndr3700_board_detect for some NETGEAR WNDR3700v2 - -There are a few NETGEAR devices which don't terminate the model name in the -ART with a NUL byte, at least some NETGEAR WNDR3700v2. The current awk -expression doesn't match 0xFF bytes, so AR71XX_MODEL contains lots of -trailing 0xFF garbage in this case. - -Fix this by matching for the first non-printable character and explicitly -setting LC_CTYPE=C (probably not strictly necessary on OpenWrt, but will -definitely work like this, even when awk supports locales and LANG is set). - -diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index 839abc7..af92b01 100755 ---- a/target/linux/ar71xx/base-files/lib/ar71xx.sh -+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh -@@ -38,7 +38,7 @@ wndr3700_board_detect() { - ;; - "33373031") - # Use awk to remove everything after the first zero byte -- model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')" -+ model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')" - case $model in - $'\xff'*) - if [ "${model:24:1}" = 'N' ]; then diff --git a/patches/openwrt/0017-hostapd-prevent-channel-switch-for-5GHz.patch b/patches/openwrt/0015-hostapd-prevent-channel-switch-for-5GHz.patch similarity index 100% rename from patches/openwrt/0017-hostapd-prevent-channel-switch-for-5GHz.patch rename to patches/openwrt/0015-hostapd-prevent-channel-switch-for-5GHz.patch diff --git a/patches/openwrt/0018-ar71xx-fix-ethernet-initialization-on-QCA953x-based-boards-TP-Link-TL-WR841N-ND-v9-Compex-WPJ531.patch b/patches/openwrt/0016-ar71xx-fix-ethernet-initialization-on-QCA953x-based-boards-TP-Link-TL-WR841N-ND-v9-Compex-WPJ531.patch similarity index 100% rename from patches/openwrt/0018-ar71xx-fix-ethernet-initialization-on-QCA953x-based-boards-TP-Link-TL-WR841N-ND-v9-Compex-WPJ531.patch rename to patches/openwrt/0016-ar71xx-fix-ethernet-initialization-on-QCA953x-based-boards-TP-Link-TL-WR841N-ND-v9-Compex-WPJ531.patch diff --git a/patches/openwrt/0019-ar71xx-rework-patch-for-qca953x-956x.patch b/patches/openwrt/0017-ar71xx-rework-patch-for-qca953x-956x.patch similarity index 84% rename from patches/openwrt/0019-ar71xx-rework-patch-for-qca953x-956x.patch rename to patches/openwrt/0017-ar71xx-rework-patch-for-qca953x-956x.patch index eb1d12f4..5b2b234f 100644 --- a/patches/openwrt/0019-ar71xx-rework-patch-for-qca953x-956x.patch +++ b/patches/openwrt/0017-ar71xx-rework-patch-for-qca953x-956x.patch @@ -103,25 +103,16 @@ index ae3db4c..ff94e2e 100644 break; diff --git a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch -index 5041619..403897a 100644 +index f3b4446..cf10af3 100644 --- a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch +++ b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch -@@ -44,7 +44,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - config ATH79_NVRAM - --- a/arch/mips/ath79/clock.c - +++ b/arch/mips/ath79/clock.c --@@ -350,6 +350,91 @@ static void __init ar934x_clocks_init(vo -+@@ -350,6 +350,91 @@ static void __init ar934x_clocks_init(void) - iounmap(dpll_base); - } - @@ -175,6 +175,48 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. soc_is_qca955x()) { ath79_uart_data[0].uartclk = uart_clk_rate; platform_device_register(&ath79_uart_device); +--- a/arch/mips/ath79/dev-usb.c ++++ b/arch/mips/ath79/dev-usb.c -+@@ -236,6 +236,30 @@ static void __init ar934x_usb_setup(void) ++@@ -236,6 +236,30 @@ static void __init ar934x_usb_setup(void + &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2)); + } + @@ -164,26 +155,6 @@ index 5041619..403897a 100644 --- a/arch/mips/ath79/dev-wmac.c +++ b/arch/mips/ath79/dev-wmac.c @@ -101,7 +101,7 @@ static int ar933x_wmac_reset(void) -@@ -186,7 +228,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - { - return ath79_soc_rev; - } --@@ -126,7 +126,7 @@ static void __init ar933x_wmac_setup(voi -+@@ -126,7 +126,7 @@ static void __init ar933x_wmac_setup(void) - ath79_wmac_data.is_clk_25mhz = true; - - if (ath79_soc_rev == 1) -@@ -195,8 +237,8 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - - ath79_wmac_data.external_reset = ar933x_wmac_reset; - } --@@ -149,6 +149,26 @@ static void ar934x_wmac_setup(void) -- ath79_wmac_data.is_clk_25mhz = true; -+@@ -151,6 +151,26 @@ static void ar934x_wmac_setup(void) -+ ath79_wmac_data.get_mac_revision = ar93xx_get_soc_revision; - } - - +static void qca953x_wmac_setup(void) @@ -207,8 +249,8 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. + + ath79_wmac_resources[0].start = QCA953X_WMAC_BASE; @@ -195,20 +166,11 @@ index 5041619..403897a 100644 + + t = ath79_reset_rr(QCA953X_RESET_REG_BOOTSTRAP); + if (t & QCA953X_BOOTSTRAP_REF_CLK_40) -@@ -222,7 +264,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - static void qca955x_wmac_setup(void) - { - u32 t; --@@ -366,6 +386,8 @@ void __init ath79_register_wmac(u8 *cal_ -+@@ -368,6 +388,8 @@ void __init ath79_register_wmac(u8 *cal_data, u8 *mac_addr) - ar933x_wmac_setup(); - else if (soc_is_ar934x()) - ar934x_wmac_setup(); @@ -244,6 +286,24 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. _prom_putchar = prom_putchar_ar71xx; --- a/arch/mips/ath79/gpio.c +++ b/arch/mips/ath79/gpio.c -+@@ -148,7 +148,7 @@ static void __iomem *ath79_gpio_get_function_reg(void) ++@@ -148,7 +148,7 @@ static void __iomem *ath79_gpio_get_func + soc_is_ar913x() || + soc_is_ar933x()) + reg = AR71XX_GPIO_REG_FUNC; @@ -217,7 +179,7 @@ index 5041619..403897a 100644 + reg = AR934X_GPIO_REG_FUNC; + else + BUG(); -+@@ -187,7 +187,7 @@ void __init ath79_gpio_output_select(unsigned gpio, u8 val) ++@@ -187,7 +187,7 @@ void __init ath79_gpio_output_select(uns + unsigned int reg; + u32 t, s; + @@ -229,16 +191,7 @@ index 5041619..403897a 100644 @@ -224,6 +224,8 @@ void __init ath79_gpio_init(void) ath79_gpio_count = AR933X_GPIO_COUNT; else if (soc_is_ar934x()) -@@ -264,7 +324,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - } - --- a/arch/mips/ath79/irq.c - +++ b/arch/mips/ath79/irq.c --@@ -106,6 +106,7 @@ static void __init ath79_misc_irq_init(v -+@@ -106,6 +106,7 @@ static void __init ath79_misc_irq_init(void) - else if (soc_is_ar724x() || - soc_is_ar933x() || - soc_is_ar934x() || -@@ -272,19 +332,80 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. +@@ -272,16 +332,77 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. soc_is_qca955x()) ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack; else @@ -317,40 +270,9 @@ index 5041619..403897a 100644 + } --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c --@@ -59,6 +59,7 @@ static void __init ath79_detect_sys_type -+@@ -60,6 +60,7 @@ static void __init ath79_detect_sys_type(void) - u32 major; - u32 minor; - u32 rev = 0; -@@ -292,7 +413,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - - id = ath79_reset_rr(AR71XX_RESET_REG_REV_ID); - major = id & REV_ID_MAJOR_MASK; --@@ -151,6 +152,16 @@ static void __init ath79_detect_sys_type -+@@ -152,6 +153,16 @@ static void __init ath79_detect_sys_type(void) - rev = id & AR934X_REV_ID_REVISION_MASK; - break; - -@@ -309,38 +430,60 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - case REV_ID_MAJOR_QCA9556: - ath79_soc = ATH79_SOC_QCA9556; - chip = "9556"; --@@ -169,9 +180,9 @@ static void __init ath79_detect_sys_type -+@@ -170,7 +181,7 @@ static void __init ath79_detect_sys_type(void) - - ath79_soc_rev = rev; - - - if (soc_is_qca955x()) --- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", --- chip, rev); - + if (soc_is_qca953x() || soc_is_qca955x()) --+ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", --+ chip, ver, rev); -+ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", -+ chip, rev); - else -- sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); -- pr_info("SoC: %s\n", ath79_sys_type); + @@ -59,6 +59,7 @@ static void __init ath79_detect_sys_type +@@ -329,23 +450,49 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. + pr_info("SoC: %s\n", ath79_sys_type); --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -105,6 +105,9 @@ @@ -401,7 +323,7 @@ index 5041619..403897a 100644 +#define QCA953X_PLL_ETH_XMII_CONTROL_REG 0x2c +#define QCA953X_PLL_ETH_SGMII_CONTROL_REG 0x48 + -@@ -351,7 +494,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. +@@ -356,7 +503,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. +#define QCA953X_PLL_CPU_CONFIG_REFDIV_SHIFT 12 +#define QCA953X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f +#define QCA953X_PLL_CPU_CONFIG_OUTDIV_SHIFT 19 @@ -410,7 +332,7 @@ index 5041619..403897a 100644 + +#define QCA953X_PLL_DDR_CONFIG_NFRAC_SHIFT 0 +#define QCA953X_PLL_DDR_CONFIG_NFRAC_MASK 0x3ff -@@ -378,27 +521,85 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. +@@ -383,27 +530,85 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. #define QCA955X_PLL_CPU_CONFIG_REG 0x00 #define QCA955X_PLL_DDR_CONFIG_REG 0x04 #define QCA955X_PLL_CLK_CTRL_REG 0x08 @@ -500,7 +422,7 @@ index 5041619..403897a 100644 #define REV_ID_MAJOR_AR9341 0x0120 #define REV_ID_MAJOR_AR9342 0x1120 #define REV_ID_MAJOR_AR9344 0x2120 -@@ -407,7 +608,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. +@@ -412,7 +617,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. #define REV_ID_MAJOR_QCA9556 0x0130 #define REV_ID_MAJOR_QCA9558 0x1130 @@ -509,7 +431,7 @@ index 5041619..403897a 100644 #define AR934X_REV_ID_REVISION_MASK 0xf -@@ -416,14 +617,81 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. +@@ -421,14 +626,81 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. #define QCA955X_REV_ID_REVISION_MASK 0xf /* @@ -594,7 +516,7 @@ index 5041619..403897a 100644 +++ b/arch/mips/include/asm/mach-ath79/ath79.h @@ -32,6 +32,7 @@ enum ath79_soc_type { diff --git a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch -index 491a7aa..2bdc744 100644 +index ab2bc38..eecccdc 100644 --- a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch +++ b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch @@ -142,74 +142,9 @@ @@ -743,32 +665,8 @@ index 491a7aa..2bdc744 100644 else if (soc_is_qca955x()) qca955x_irq_init(); + else if (soc_is_qca956x()) -@@ -519,7 +452,7 @@ - return -ENODEV; - --- a/arch/mips/ath79/setup.c - +++ b/arch/mips/ath79/setup.c --@@ -175,15 +175,30 @@ static void __init ath79_detect_sys_type -+@@ -175,14 +175,29 @@ static void __init ath79_detect_sys_type - rev = id & QCA955X_REV_ID_REVISION_MASK; - break; - -@@ -542,18 +475,18 @@ - ath79_soc_rev = rev; - - - if (soc_is_qca953x() || soc_is_qca955x()) -+- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", - + if (soc_is_qca953x() || soc_is_qca955x() || soc_is_qca9561()) -- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", -- chip, ver, rev); -++ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", -++ chip, ver, rev); - + else if (soc_is_tp9343()) - + sprintf(ath79_sys_type, "Qualcomm Atheros TP%s rev %u", --+ chip, rev); -+ chip, rev); - else - sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); -- pr_info("SoC: %s\n", ath79_sys_type); +@@ -554,7 +487,7 @@ + pr_info("SoC: %s\n", ath79_sys_type); --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -131,6 +131,23 @@ @@ -776,7 +674,7 @@ index 491a7aa..2bdc744 100644 #define QCA955X_NFC_BASE 0x1b800200 #define QCA955X_NFC_SIZE 0xb8 -@@ -577,7 +510,7 @@ +@@ -578,7 +511,7 @@ #define AR9300_OTP_BASE 0x14000 #define AR9300_OTP_STATUS 0x15f18 #define AR9300_OTP_STATUS_TYPE 0x7 @@ -785,7 +683,7 @@ index 491a7aa..2bdc744 100644 #define QCA955X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21) #define QCA955X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24) -@@ -627,7 +560,7 @@ +@@ -628,7 +561,7 @@ /* * USB_CONFIG block */ @@ -794,7 +692,7 @@ index 491a7aa..2bdc744 100644 #define QCA955X_RESET_REG_BOOTSTRAP 0xb0 #define QCA955X_RESET_REG_EXT_INT_STATUS 0xac -@@ -639,7 +572,7 @@ +@@ -640,7 +573,7 @@ #define MISC_INT_ETHSW BIT(12) #define MISC_INT_TIMER4 BIT(10) #define MISC_INT_TIMER3 BIT(9) @@ -803,7 +701,7 @@ index 491a7aa..2bdc744 100644 #define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4) -@@ -648,7 +581,7 @@ +@@ -649,7 +582,7 @@ #define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0) #define AR934X_PCIE_WMAC_INT_WMAC_TX BIT(1) #define AR934X_PCIE_WMAC_INT_WMAC_RXLP BIT(2) @@ -812,7 +710,7 @@ index 491a7aa..2bdc744 100644 QCA955X_EXT_INT_PCIE_RC2_INT1 | QCA955X_EXT_INT_PCIE_RC2_INT2 | \ QCA955X_EXT_INT_PCIE_RC2_INT3) -@@ -686,7 +619,7 @@ +@@ -687,7 +620,7 @@ #define REV_ID_MAJOR_MASK 0xfff0 #define REV_ID_MAJOR_AR71XX 0x00a0 #define REV_ID_MAJOR_AR913X 0x00b0 @@ -821,7 +719,7 @@ index 491a7aa..2bdc744 100644 #define REV_ID_MAJOR_QCA9533_V2 0x0160 #define REV_ID_MAJOR_QCA9556 0x0130 #define REV_ID_MAJOR_QCA9558 0x1130 -@@ -695,7 +628,7 @@ +@@ -696,7 +629,7 @@ #define AR71XX_REV_ID_MINOR_MASK 0x3 #define AR71XX_REV_ID_MINOR_AR7130 0x0 @@ -830,7 +728,7 @@ index 491a7aa..2bdc744 100644 #define QCA955X_REV_ID_REVISION_MASK 0xf -@@ -704,9 +637,9 @@ +@@ -705,9 +638,9 @@ /* * SPI block */ @@ -843,7 +741,7 @@ index 491a7aa..2bdc744 100644 +#define QCA956X_GPIO_REG_OUT_FUNC0 0x2c +#define QCA956X_GPIO_REG_OUT_FUNC1 0x30 -@@ -724,9 +657,9 @@ +@@ -725,9 +658,9 @@ #define AR71XX_GPIO_COUNT 16 #define AR7240_GPIO_COUNT 18 #define AR7241_GPIO_COUNT 20 diff --git a/patches/openwrt/0020-base-files-default_postinst-propagate-the-real-postinst-return-code.patch b/patches/openwrt/0018-base-files-default_postinst-propagate-the-real-postinst-return-code.patch similarity index 100% rename from patches/openwrt/0020-base-files-default_postinst-propagate-the-real-postinst-return-code.patch rename to patches/openwrt/0018-base-files-default_postinst-propagate-the-real-postinst-return-code.patch diff --git a/patches/openwrt/0021-opkg-work-around-unconditional-libopenssl-build-dependency.patch b/patches/openwrt/0019-opkg-work-around-unconditional-libopenssl-build-dependency.patch similarity index 100% rename from patches/openwrt/0021-opkg-work-around-unconditional-libopenssl-build-dependency.patch rename to patches/openwrt/0019-opkg-work-around-unconditional-libopenssl-build-dependency.patch diff --git a/patches/openwrt/0022-hostapd-work-around-unconditional-libopenssl-build-dependency.patch b/patches/openwrt/0020-hostapd-work-around-unconditional-libopenssl-build-dependency.patch similarity index 100% rename from patches/openwrt/0022-hostapd-work-around-unconditional-libopenssl-build-dependency.patch rename to patches/openwrt/0020-hostapd-work-around-unconditional-libopenssl-build-dependency.patch diff --git a/patches/openwrt/0023-odhcp6c-minor-fixes.patch b/patches/openwrt/0021-odhcp6c-minor-fixes.patch similarity index 100% rename from patches/openwrt/0023-odhcp6c-minor-fixes.patch rename to patches/openwrt/0021-odhcp6c-minor-fixes.patch diff --git a/patches/openwrt/0024-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch b/patches/openwrt/0022-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch similarity index 100% rename from patches/openwrt/0024-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch rename to patches/openwrt/0022-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch diff --git a/patches/openwrt/0026-base-files-add-etc-profile.d-support.patch b/patches/openwrt/0023-base-files-add-etc-profile.d-support.patch similarity index 98% rename from patches/openwrt/0026-base-files-add-etc-profile.d-support.patch rename to patches/openwrt/0023-base-files-add-etc-profile.d-support.patch index 93543e8e..0295626e 100644 --- a/patches/openwrt/0026-base-files-add-etc-profile.d-support.patch +++ b/patches/openwrt/0023-base-files-add-etc-profile.d-support.patch @@ -24,7 +24,7 @@ v4 keep it simple and mimic OpenWrt style Signed-off-by: Bastian Bittorf diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile -index 3dd58e1..577b63b 100644 +index 170f487..bd008a8 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -14,3 +14,10 @@ export PS1='\u@\h:\w\$ ' diff --git a/patches/openwrt/0027-Kernel-Realtek-8150-and-Realtek-8152-based-USB-to-Ethernet-converters.patch b/patches/openwrt/0024-Kernel-Realtek-8150-and-Realtek-8152-based-USB-to-Ethernet-converters.patch similarity index 100% rename from patches/openwrt/0027-Kernel-Realtek-8150-and-Realtek-8152-based-USB-to-Ethernet-converters.patch rename to patches/openwrt/0024-Kernel-Realtek-8150-and-Realtek-8152-based-USB-to-Ethernet-converters.patch diff --git a/patches/openwrt/0025-ar71xx-add-support-for-TP-LINK-TL-WR841N-ND-v10.patch b/patches/openwrt/0025-ar71xx-add-support-for-TP-LINK-TL-WR841N-ND-v10.patch deleted file mode 100644 index 84f6505c..00000000 --- a/patches/openwrt/0025-ar71xx-add-support-for-TP-LINK-TL-WR841N-ND-v10.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Matthias Schiffer -Date: Sun, 11 Oct 2015 18:00:27 +0200 -Subject: ar71xx: add support for TP-LINK TL-WR841N/ND v10 - -diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile -index 8a25832..3a17420 100644 ---- a/target/linux/ar71xx/image/Makefile -+++ b/target/linux/ar71xx/image/Makefile -@@ -562,6 +562,13 @@ define Device/tl-wr841n-v9 - TPLINK_HWID := 0x08410009 - endef - -+define Device/tl-wr841n-v10 -+ $(Device/tplink-4mlzma) -+ BOARDNAME := TL-WR841N-v9 -+ DEVICE_PROFILE := TLWR841 -+ TPLINK_HWID := 0x08410010 -+endef -+ - define Device/tl-wr842n-v2 - $(Device/tplink-8mlzma) - BOARDNAME := TL-WR842N-v2 -@@ -582,7 +589,7 @@ define Device/tl-wr847n-v8 - DEVICE_PROFILE := TLWR841 - TPLINK_HWID := 0x08470008 - endef --TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8 -+TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr841n-v10 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8 - - define Device/tl-wr941nd-v5 - $(Device/tplink-4mlzma) diff --git a/patches/openwrt/0028-tools-firmware-utils-tplink-safeloader-clean-up-code.patch b/patches/openwrt/0025-tools-firmware-utils-tplink-safeloader-clean-up-code.patch similarity index 100% rename from patches/openwrt/0028-tools-firmware-utils-tplink-safeloader-clean-up-code.patch rename to patches/openwrt/0025-tools-firmware-utils-tplink-safeloader-clean-up-code.patch diff --git a/patches/openwrt/0029-tools-firmware-utils-tplink-safeloader-fix-support-list-format-clean-up-vendor-information.patch b/patches/openwrt/0026-tools-firmware-utils-tplink-safeloader-fix-support-list-format-clean-up-vendor-information.patch similarity index 100% rename from patches/openwrt/0029-tools-firmware-utils-tplink-safeloader-fix-support-list-format-clean-up-vendor-information.patch rename to patches/openwrt/0026-tools-firmware-utils-tplink-safeloader-fix-support-list-format-clean-up-vendor-information.patch diff --git a/patches/openwrt/0030-tools-firmware-utils-tplink-safeloader-add-version-1.1-support-to-CPE210-220-510-520.patch b/patches/openwrt/0027-tools-firmware-utils-tplink-safeloader-add-version-1.1-support-to-CPE210-220-510-520.patch similarity index 100% rename from patches/openwrt/0030-tools-firmware-utils-tplink-safeloader-add-version-1.1-support-to-CPE210-220-510-520.patch rename to patches/openwrt/0027-tools-firmware-utils-tplink-safeloader-add-version-1.1-support-to-CPE210-220-510-520.patch diff --git a/patches/openwrt/0032-ipv6-fix-crash-on-ICMPv6-redirects-with-prohibited-blackholed-source.patch b/patches/openwrt/0028-ipv6-fix-crash-on-ICMPv6-redirects-with-prohibited-blackholed-source.patch similarity index 100% rename from patches/openwrt/0032-ipv6-fix-crash-on-ICMPv6-redirects-with-prohibited-blackholed-source.patch rename to patches/openwrt/0028-ipv6-fix-crash-on-ICMPv6-redirects-with-prohibited-blackholed-source.patch diff --git a/patches/openwrt/0033-mac80211-fix-crash-when-using-mesh-11s-VIF-together-with-another-VIF.patch b/patches/openwrt/0029-mac80211-fix-crash-when-using-mesh-11s-VIF-together-with-another-VIF.patch similarity index 100% rename from patches/openwrt/0033-mac80211-fix-crash-when-using-mesh-11s-VIF-together-with-another-VIF.patch rename to patches/openwrt/0029-mac80211-fix-crash-when-using-mesh-11s-VIF-together-with-another-VIF.patch diff --git a/patches/openwrt/0034-ath10k-add-Candelatech-community-firmware-as-an-additional-choice.patch b/patches/openwrt/0030-ath10k-add-Candelatech-community-firmware-as-an-additional-choice.patch similarity index 100% rename from patches/openwrt/0034-ath10k-add-Candelatech-community-firmware-as-an-additional-choice.patch rename to patches/openwrt/0030-ath10k-add-Candelatech-community-firmware-as-an-additional-choice.patch diff --git a/patches/openwrt/0031-ar71xx-fix-ath79_soc_rev-value-for-QCA9531-ver.-2.patch b/patches/openwrt/0031-ar71xx-fix-ath79_soc_rev-value-for-QCA9531-ver.-2.patch deleted file mode 100644 index e1b0ed2d..00000000 --- a/patches/openwrt/0031-ar71xx-fix-ath79_soc_rev-value-for-QCA9531-ver.-2.patch +++ /dev/null @@ -1,181 +0,0 @@ -From: Matthias Schiffer -Date: Thu, 22 Oct 2015 00:33:25 +0200 -Subject: ar71xx: fix ath79_soc_rev value for QCA9531 ver. 2 - -ath9k expects to get revision id 2 for the QCA9531 ver. 2 rev. 0. This -fixes the very low TX power on some devices like the TP-LINK -TL-WR841ND v10. - -As ath79_soc_rev is only used to get the revision number to ath9k on the -QCA9533, just set it to the expected value on the ver. 2. - -diff --git a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch -index 403897a..cf10af3 100644 ---- a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch -+++ b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch -@@ -44,7 +44,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - config ATH79_NVRAM - --- a/arch/mips/ath79/clock.c - +++ b/arch/mips/ath79/clock.c --@@ -350,6 +350,91 @@ static void __init ar934x_clocks_init(void) -+@@ -350,6 +350,91 @@ static void __init ar934x_clocks_init(vo - iounmap(dpll_base); - } - -@@ -177,7 +177,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - platform_device_register(&ath79_uart_device); - --- a/arch/mips/ath79/dev-usb.c - +++ b/arch/mips/ath79/dev-usb.c --@@ -236,6 +236,30 @@ static void __init ar934x_usb_setup(void) -+@@ -236,6 +236,30 @@ static void __init ar934x_usb_setup(void - &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2)); - } - -@@ -228,7 +228,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - { - return ath79_soc_rev; - } --@@ -126,7 +126,7 @@ static void __init ar933x_wmac_setup(void) -+@@ -126,7 +126,7 @@ static void __init ar933x_wmac_setup(voi - ath79_wmac_data.is_clk_25mhz = true; - - if (ath79_soc_rev == 1) -@@ -237,8 +237,8 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - - ath79_wmac_data.external_reset = ar933x_wmac_reset; - } --@@ -151,6 +151,26 @@ static void ar934x_wmac_setup(void) -- ath79_wmac_data.get_mac_revision = ar93xx_get_soc_revision; -+@@ -149,6 +149,26 @@ static void ar934x_wmac_setup(void) -+ ath79_wmac_data.is_clk_25mhz = true; - } - - +static void qca953x_wmac_setup(void) -@@ -264,7 +264,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - static void qca955x_wmac_setup(void) - { - u32 t; --@@ -368,6 +388,8 @@ void __init ath79_register_wmac(u8 *cal_data, u8 *mac_addr) -+@@ -366,6 +386,8 @@ void __init ath79_register_wmac(u8 *cal_ - ar933x_wmac_setup(); - else if (soc_is_ar934x()) - ar934x_wmac_setup(); -@@ -286,7 +286,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - _prom_putchar = prom_putchar_ar71xx; - --- a/arch/mips/ath79/gpio.c - +++ b/arch/mips/ath79/gpio.c --@@ -148,7 +148,7 @@ static void __iomem *ath79_gpio_get_function_reg(void) -+@@ -148,7 +148,7 @@ static void __iomem *ath79_gpio_get_func - soc_is_ar913x() || - soc_is_ar933x()) - reg = AR71XX_GPIO_REG_FUNC; -@@ -295,7 +295,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - reg = AR934X_GPIO_REG_FUNC; - else - BUG(); --@@ -187,7 +187,7 @@ void __init ath79_gpio_output_select(unsigned gpio, u8 val) -+@@ -187,7 +187,7 @@ void __init ath79_gpio_output_select(uns - unsigned int reg; - u32 t, s; - -@@ -324,7 +324,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - } - --- a/arch/mips/ath79/irq.c - +++ b/arch/mips/ath79/irq.c --@@ -106,6 +106,7 @@ static void __init ath79_misc_irq_init(void) -+@@ -106,6 +106,7 @@ static void __init ath79_misc_irq_init(v - else if (soc_is_ar724x() || - soc_is_ar933x() || - soc_is_ar934x() || -@@ -405,7 +405,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - } - --- a/arch/mips/ath79/setup.c - +++ b/arch/mips/ath79/setup.c --@@ -60,6 +60,7 @@ static void __init ath79_detect_sys_type(void) -+@@ -59,6 +59,7 @@ static void __init ath79_detect_sys_type - u32 major; - u32 minor; - u32 rev = 0; -@@ -413,12 +413,13 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - - id = ath79_reset_rr(AR71XX_RESET_REG_REV_ID); - major = id & REV_ID_MAJOR_MASK; --@@ -152,6 +153,16 @@ static void __init ath79_detect_sys_type(void) -+@@ -151,6 +152,17 @@ static void __init ath79_detect_sys_type - rev = id & AR934X_REV_ID_REVISION_MASK; - break; - - + case REV_ID_MAJOR_QCA9533_V2: - + ver = 2; -++ ath79_soc_rev = 2; - + /* drop through */ - + - + case REV_ID_MAJOR_QCA9533: -@@ -430,15 +431,23 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. - case REV_ID_MAJOR_QCA9556: - ath79_soc = ATH79_SOC_QCA9556; - chip = "9556"; --@@ -170,7 +181,7 @@ static void __init ath79_detect_sys_type(void) -+@@ -167,11 +179,12 @@ static void __init ath79_detect_sys_type -+ panic("ath79: unknown SoC, id:0x%08x", id); -+ } - -- ath79_soc_rev = rev; -+- ath79_soc_rev = rev; -++ if (ver == 1) -++ ath79_soc_rev = rev; - - - if (soc_is_qca955x()) -+- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", -+- chip, rev); - + if (soc_is_qca953x() || soc_is_qca955x()) -- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", -- chip, rev); -++ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", -++ chip, ver, rev); - else -+ sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); -+ pr_info("SoC: %s\n", ath79_sys_type); - --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h - +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h - @@ -105,6 +105,21 @@ -diff --git a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch -index 2bdc744..eecccdc 100644 ---- a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch -+++ b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch -@@ -452,7 +452,7 @@ - return -ENODEV; - --- a/arch/mips/ath79/setup.c - +++ b/arch/mips/ath79/setup.c --@@ -175,14 +175,29 @@ static void __init ath79_detect_sys_type -+@@ -176,6 +176,18 @@ static void __init ath79_detect_sys_type - rev = id & QCA955X_REV_ID_REVISION_MASK; - break; - -@@ -471,19 +471,20 @@ - default: - panic("ath79: unknown SoC, id:0x%08x", id); - } -- -- ath79_soc_rev = rev; -+@@ -183,9 +195,12 @@ static void __init ath79_detect_sys_type -+ if (ver == 1) -+ ath79_soc_rev = rev; - - - if (soc_is_qca953x() || soc_is_qca955x()) --- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", - + if (soc_is_qca953x() || soc_is_qca955x() || soc_is_qca9561()) --+ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", --+ chip, ver, rev); -+ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u", -+ chip, ver, rev); - + else if (soc_is_tp9343()) - + sprintf(ath79_sys_type, "Qualcomm Atheros TP%s rev %u", -- chip, rev); -++ chip, rev); - else - sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); -+ pr_info("SoC: %s\n", ath79_sys_type); - --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h - +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h - @@ -143,6 +143,23 @@ diff --git a/patches/openwrt/0035-mac80211-ath9k-add-correct-MAC-BB-name-for-ar9561.patch b/patches/openwrt/0031-mac80211-ath9k-add-correct-MAC-BB-name-for-ar9561.patch similarity index 100% rename from patches/openwrt/0035-mac80211-ath9k-add-correct-MAC-BB-name-for-ar9561.patch rename to patches/openwrt/0031-mac80211-ath9k-add-correct-MAC-BB-name-for-ar9561.patch diff --git a/patches/openwrt/0036-ar71xx-add-support-for-TP-LINK-TL-WR941ND-v6-international-version.patch b/patches/openwrt/0032-ar71xx-add-support-for-TP-LINK-TL-WR941ND-v6-international-version.patch similarity index 98% rename from patches/openwrt/0036-ar71xx-add-support-for-TP-LINK-TL-WR941ND-v6-international-version.patch rename to patches/openwrt/0032-ar71xx-add-support-for-TP-LINK-TL-WR941ND-v6-international-version.patch index 8bc91f15..f74c7922 100644 --- a/patches/openwrt/0036-ar71xx-add-support-for-TP-LINK-TL-WR941ND-v6-international-version.patch +++ b/patches/openwrt/0032-ar71xx-add-support-for-TP-LINK-TL-WR941ND-v6-international-version.patch @@ -37,7 +37,7 @@ index 5241db2..11b3fa0 100644 ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network -index 5c38c54..2f0855c 100755 +index 8143d2d..5a74461 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -226,6 +226,7 @@ tl-mr3420-v2 |\ @@ -49,10 +49,10 @@ index 5c38c54..2f0855c 100755 wnr2000-v4 |\ wnr2200 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index af92b01..9c7c139 100755 +index 0b2857d..46af69a 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh -@@ -799,6 +799,9 @@ ar71xx_board_detect() { +@@ -800,6 +800,9 @@ ar71xx_board_detect() { *"TL-WR941N/ND v5") name="tl-wr941nd-v5" ;; @@ -75,7 +75,7 @@ index f11ea8c..fd337e1 100644 wnr2200 |\ wnr612-v2 |\ diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh -index ab69e4f..f181a63 100755 +index 8dea48f..2fc1d10 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -354,6 +354,7 @@ platform_check_image() { @@ -254,7 +254,7 @@ index 0000000..8c788e2 +MIPS_MACHINE(ATH79_MACH_TL_WR941ND_V6, "TL-WR941ND-v6", "TP-LINK TL-WR941N/ND v6", + tl_wr941nd_v6_setup); diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile -index 3a17420..cc25be7 100644 +index 78d35e1..11fb568 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -600,7 +600,7 @@ endef diff --git a/patches/openwrt/0037-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch b/patches/openwrt/0033-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch similarity index 98% rename from patches/openwrt/0037-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch rename to patches/openwrt/0033-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch index 5e781e21..0518a00b 100644 --- a/patches/openwrt/0037-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch +++ b/patches/openwrt/0033-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch @@ -3,7 +3,7 @@ Date: Thu, 5 Nov 2015 15:48:09 +0100 Subject: ar71xx: add support for TP-Link TL-WR1043ND v3 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile -index cc25be7..4b29d9c 100644 +index 11fb568..dd224d4 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -2023,6 +2023,7 @@ $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,tt diff --git a/patches/openwrt/0038-ar71xx-backport-ath10k-calibration-data-load-changes.patch b/patches/openwrt/0034-ar71xx-backport-ath10k-calibration-data-load-changes.patch similarity index 100% rename from patches/openwrt/0038-ar71xx-backport-ath10k-calibration-data-load-changes.patch rename to patches/openwrt/0034-ar71xx-backport-ath10k-calibration-data-load-changes.patch diff --git a/patches/openwrt/0039-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch b/patches/openwrt/0035-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch similarity index 88% rename from patches/openwrt/0039-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch rename to patches/openwrt/0035-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch index 4d10da30..9916aa81 100644 --- a/patches/openwrt/0039-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch +++ b/patches/openwrt/0035-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch @@ -6,10 +6,10 @@ The hwid check was wrong, causing the AR71XX_MODEL value to end with a space (as $hwver was unset). diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index 9c7c139..388cf38 100755 +index 46af69a..d0abf42 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh -@@ -122,7 +122,7 @@ tplink_board_detect() { +@@ -123,7 +123,7 @@ tplink_board_detect() { "3C0002"*) model="MINIBOX_V1" ;; diff --git a/patches/openwrt/0042-acx-mac80211-mark-as-BROKEN-to-avoid-compile-failure-on-mipsel-targets.patch b/patches/openwrt/0036-acx-mac80211-mark-as-BROKEN-to-avoid-compile-failure-on-mipsel-targets.patch similarity index 100% rename from patches/openwrt/0042-acx-mac80211-mark-as-BROKEN-to-avoid-compile-failure-on-mipsel-targets.patch rename to patches/openwrt/0036-acx-mac80211-mark-as-BROKEN-to-avoid-compile-failure-on-mipsel-targets.patch diff --git a/patches/openwrt/0043-OpenSSL-Added-source-old-to-PKG_SOURCE_URL.patch b/patches/openwrt/0037-OpenSSL-Added-source-old-to-PKG_SOURCE_URL.patch similarity index 92% rename from patches/openwrt/0043-OpenSSL-Added-source-old-to-PKG_SOURCE_URL.patch rename to patches/openwrt/0037-OpenSSL-Added-source-old-to-PKG_SOURCE_URL.patch index 8c5e166f..4d18a727 100644 --- a/patches/openwrt/0043-OpenSSL-Added-source-old-to-PKG_SOURCE_URL.patch +++ b/patches/openwrt/0037-OpenSSL-Added-source-old-to-PKG_SOURCE_URL.patch @@ -11,7 +11,7 @@ of OpenSSL to avoid breaking the build whenever OpenSSL releases a new version. diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile -index 7f0da8b..039e1ab 100644 +index ad93678..9a16599 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -16,6 +16,7 @@ PKG_BUILD_PARALLEL:=1 @@ -21,4 +21,4 @@ index 7f0da8b..039e1ab 100644 + http://www.openssl.org/source/old/1.0.2/ \ ftp://ftp.funet.fi/pub/crypt/mirrors/ftp.openssl.org/source \ ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ - PKG_MD5SUM:=38dd619b2e77cbac69b99f52a053d25a + PKG_MD5SUM:=b3bf73f507172be9292ea2a8c28b659d diff --git a/patches/openwrt/0046-lua-fix-installation-of-headers-for-host-build.patch b/patches/openwrt/0038-lua-fix-installation-of-headers-for-host-build.patch similarity index 100% rename from patches/openwrt/0046-lua-fix-installation-of-headers-for-host-build.patch rename to patches/openwrt/0038-lua-fix-installation-of-headers-for-host-build.patch diff --git a/patches/openwrt/0047-kernel-fs-seq_file-fallback-to-vmalloc-instead-of-oom-kill-processes.patch b/patches/openwrt/0039-kernel-fs-seq_file-fallback-to-vmalloc-instead-of-oom-kill-processes.patch similarity index 100% rename from patches/openwrt/0047-kernel-fs-seq_file-fallback-to-vmalloc-instead-of-oom-kill-processes.patch rename to patches/openwrt/0039-kernel-fs-seq_file-fallback-to-vmalloc-instead-of-oom-kill-processes.patch diff --git a/patches/openwrt/0040-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2-again.patch b/patches/openwrt/0040-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2-again.patch deleted file mode 100644 index cc078e54..00000000 --- a/patches/openwrt/0040-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2-again.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Matthias Schiffer -Date: Fri, 20 Nov 2015 15:09:03 +0100 -Subject: ar71xx: fix wndr3700_board_detect for some NETGEAR WNDR3700v2 (again) - -When fixing the model string for WNDR3700v2 which contain a model string -followed by 0xff in r46455, the match for other versions of the WNDR3700v2 -which just contain lots of 0xff broke (as the 0xff $model is checked for -is stripped off). - -Fix by stripping off non-printable characters only for the actual output -string, but not for the internal matching. - -diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index 388cf38..daebaa4 100755 ---- a/target/linux/ar71xx/base-files/lib/ar71xx.sh -+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh -@@ -37,8 +37,9 @@ wndr3700_board_detect() { - machine="NETGEAR WNDR3700" - ;; - "33373031") -- # Use awk to remove everything after the first zero byte -- model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')" -+ model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c)" -+ # Use awk to remove everything unprintable -+ model_stripped="$(echo -n "$model" | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')" - case $model in - $'\xff'*) - if [ "${model:24:1}" = 'N' ]; then -@@ -48,14 +49,14 @@ wndr3700_board_detect() { - fi - ;; - '29763654+16+64'*) -- machine="NETGEAR ${model:14}" -+ machine="NETGEAR ${model_stripped:14}" - ;; - '29763654+16+128'*) -- machine="NETGEAR ${model:15}" -+ machine="NETGEAR ${model_stripped:15}" - ;; - *) - # Unknown ID -- machine="NETGEAR $model" -+ machine="NETGEAR ${model_stripped}" - esac - esac - diff --git a/patches/openwrt/0049-x86-generic-refresh-kernel-config.patch b/patches/openwrt/0040-x86-generic-refresh-kernel-config.patch similarity index 100% rename from patches/openwrt/0049-x86-generic-refresh-kernel-config.patch rename to patches/openwrt/0040-x86-generic-refresh-kernel-config.patch diff --git a/patches/openwrt/0041-CC-base-files-add-missing-public-key.patch b/patches/openwrt/0041-CC-base-files-add-missing-public-key.patch deleted file mode 100644 index 12cff28d..00000000 --- a/patches/openwrt/0041-CC-base-files-add-missing-public-key.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Matthias Schiffer -Date: Sat, 21 Nov 2015 18:35:49 +0100 -Subject: CC: base-files: add missing public key - -Add the secondary package signature key to the 15.05 sources so that people -building the release have the same keys as people using precompiled images. - -Signed-off-by: Jo-Philipp Wich - -diff --git a/package/base-files/files/etc/opkg/keys/de98a2dd1d0f8a07 b/package/base-files/files/etc/opkg/keys/de98a2dd1d0f8a07 -new file mode 100644 -index 0000000..5e3088c ---- /dev/null -+++ b/package/base-files/files/etc/opkg/keys/de98a2dd1d0f8a07 -@@ -0,0 +1,2 @@ -+untrusted comment: openwrt.org 15.05 release key -+RWTemKLdHQ+KBxOILy8gyk+5PaDVdfyJ32TFnY/jnQOrBAd1wobbLNYz diff --git a/patches/openwrt/0050-x86-generic-enable-pata_atiixp-driver.patch b/patches/openwrt/0041-x86-generic-enable-pata_atiixp-driver.patch similarity index 100% rename from patches/openwrt/0050-x86-generic-enable-pata_atiixp-driver.patch rename to patches/openwrt/0041-x86-generic-enable-pata_atiixp-driver.patch diff --git a/patches/openwrt/0044-Revert-bzip2-extend-fix-the-Host-Install-rule-to-install-libbz2.so-files.patch b/patches/openwrt/0044-Revert-bzip2-extend-fix-the-Host-Install-rule-to-install-libbz2.so-files.patch deleted file mode 100644 index 53e88b42..00000000 --- a/patches/openwrt/0044-Revert-bzip2-extend-fix-the-Host-Install-rule-to-install-libbz2.so-files.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Matthias Schiffer -Date: Tue, 8 Dec 2015 19:51:05 +0100 -Subject: Revert "bzip2: extend/fix the Host/Install rule to install libbz2.so files" - -This reverts commit f5ebfb02fc5f539e89393b8186f7ecd768402f12. - -diff --git a/package/utils/bzip2/Makefile b/package/utils/bzip2/Makefile -index ba47cfb..e1c7b97 100644 ---- a/package/utils/bzip2/Makefile -+++ b/package/utils/bzip2/Makefile -@@ -97,10 +97,9 @@ HOST_CONFIGURE_ARGS+= \ - --prefix=$(STAGING_DIR_HOST) - - define Host/Install -- $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ $(STAGING_DIR_HOST)/usr/lib -+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ - $(MAKE) -C $(HOST_BUILD_DIR) PREFIX=$(STAGING_DIR_HOST)/usr/ install -- $(CP) $(HOST_BUILD_DIR)/libbz2.so* $(STAGING_DIR_HOST)/usr/lib/ -- $(CP) $(HOST_BUILD_DIR)/libbz2.so.1.0 $(STAGING_DIR_HOST)/usr/lib/libbz2.so -+# $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2 - endef - - $(eval $(call HostBuild)) diff --git a/patches/openwrt/0045-ar71xx-another-fix-to-wndr3700_board_detect.patch b/patches/openwrt/0045-ar71xx-another-fix-to-wndr3700_board_detect.patch deleted file mode 100644 index e6671e98..00000000 --- a/patches/openwrt/0045-ar71xx-another-fix-to-wndr3700_board_detect.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Matthias Schiffer -Date: Sat, 2 Jan 2016 23:36:25 +0100 -Subject: ar71xx: another fix to wndr3700_board_detect - -My last bugfix (r47538) introduced a new bug in wndr3700_board_detect -(again...). - -Assigning the result of ar71xx_get_mtd_offset_size_format to the model -variable before stripping of garbage using awk will cause all NUL bytes to -be removed before awk is applied, leading to model strings like -"NETGEAR WNDRMACv2NETGEAR", where a NUL byte after the v2 is supposed to -terminate the string. - -Fix by calling ar71xx_get_mtd_offset_size_format twice, once piping to awk -directly. - -diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index daebaa4..d0abf42 100755 ---- a/target/linux/ar71xx/base-files/lib/ar71xx.sh -+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh -@@ -39,7 +39,7 @@ wndr3700_board_detect() { - "33373031") - model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c)" - # Use awk to remove everything unprintable -- model_stripped="$(echo -n "$model" | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')" -+ model_stripped="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')" - case $model in - $'\xff'*) - if [ "${model:24:1}" = 'N' ]; then diff --git a/patches/openwrt/0048-kernel-fix-keyring-reference-leak-CVE-2016-0728.patch b/patches/openwrt/0048-kernel-fix-keyring-reference-leak-CVE-2016-0728.patch deleted file mode 100644 index 406be868..00000000 --- a/patches/openwrt/0048-kernel-fix-keyring-reference-leak-CVE-2016-0728.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Matthias Schiffer -Date: Sat, 6 Feb 2016 07:35:33 +0100 -Subject: kernel: fix keyring reference leak (CVE-2016-0728) - -Signed-off-by: Felix Fietkau - -diff --git a/target/linux/generic/patches-3.18/010-KEYS-Fix-keyring-ref-leak-in-join_session_keyring.patch b/target/linux/generic/patches-3.18/010-KEYS-Fix-keyring-ref-leak-in-join_session_keyring.patch -new file mode 100644 -index 0000000..9c6a969 ---- /dev/null -+++ b/target/linux/generic/patches-3.18/010-KEYS-Fix-keyring-ref-leak-in-join_session_keyring.patch -@@ -0,0 +1,75 @@ -+From 7ca88764d45c209791e8813131c1457c2e9e51e7 Mon Sep 17 00:00:00 2001 -+From: Yevgeny Pats -+Date: Mon, 11 Jan 2016 12:05:28 +0000 -+Subject: KEYS: Fix keyring ref leak in join_session_keyring() -+ -+If a thread is asked to join as a session keyring the keyring that's already -+set as its session, we leak a keyring reference. -+ -+This can be tested with the following program: -+ -+ #include -+ #include -+ #include -+ #include -+ -+ int main(int argc, const char *argv[]) -+ { -+ int i = 0; -+ key_serial_t serial; -+ -+ serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING, -+ "leaked-keyring"); -+ if (serial < 0) { -+ perror("keyctl"); -+ return -1; -+ } -+ -+ if (keyctl(KEYCTL_SETPERM, serial, -+ KEY_POS_ALL | KEY_USR_ALL) < 0) { -+ perror("keyctl"); -+ return -1; -+ } -+ -+ for (i = 0; i < 100; i++) { -+ serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING, -+ "leaked-keyring"); -+ if (serial < 0) { -+ perror("keyctl"); -+ return -1; -+ } -+ } -+ -+ return 0; -+ } -+ -+If, after the program has run, there something like the following line in -+/proc/keys: -+ -+3f3d898f I--Q--- 100 perm 3f3f0000 0 0 keyring leaked-keyring: empty -+ -+with a usage count of 100 * the number of times the program has been run, -+then the kernel is malfunctioning. If leaked-keyring has zero usages or -+has been garbage collected, then the problem is fixed. -+ -+Reported-by: Yevgeny Pats -+Signed-off-by: David Howells -+--- -+ security/keys/process_keys.c | 1 + -+ 1 file changed, 1 insertion(+) -+ -+diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c -+index a3f85d2..e6d50172 100644 -+--- a/security/keys/process_keys.c -++++ b/security/keys/process_keys.c -+@@ -794,6 +794,7 @@ long join_session_keyring(const char *name) -+ ret = PTR_ERR(keyring); -+ goto error2; -+ } else if (keyring == new->session_keyring) { -++ key_put(keyring); -+ ret = 0; -+ goto error2; -+ } -+-- -+2.7.0.rc3 -+