Commit Graph

4119 Commits

Author SHA1 Message Date
Felix Fietkau cdb867b73a mac80211: fix processing HE capabilities (FS#3871)
Use the right argument to fix setting unsupported capabilities to 0

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 49ef4dbee5)
2021-11-23 18:30:04 +01:00
Felix Fietkau 7b7b494d56 mac80211: fix typo
Remove stray parenthesis

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 2cd1a10829)
2021-11-23 18:30:04 +01:00
Felix Fietkau 8e3b3fa577 mac80211: do not enable VHT in the default config on 2.4 GHz
Some drivers advertise it, but it's not supported at the moment

Reported-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 42a99b18ff)
2021-11-23 18:30:04 +01:00
Felix Fietkau 4edda0c544 mac80211: fix detecting VHT capabilities when generating the default config
The colon does not directly follow the "VHT Capabilities" string

Reported-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 3518b793a2)
2021-11-23 18:30:04 +01:00
Felix Fietkau 8133d59da9 mac80211: add more HE capabilities
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit fbd6f099f5)
2021-11-23 18:30:04 +01:00
Felix Fietkau 42d542e04f mac80211: fix center freq selection for 6 GHz
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 8d79915327)
2021-11-23 18:30:04 +01:00
Felix Fietkau b535ec25eb mac80211: set hostapd op_class for 6 GHz
This is needed to disambiguate it from 5 GHz channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit c8bcdd5619)
2021-11-23 18:30:04 +01:00
Felix Fietkau 7a2405efc6 mac80211: rework default config script
Emit the new band option instead of hwmode
Support 6 GHz band and HE options

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 8504212f65)
2021-11-23 18:30:04 +01:00
Felix Fietkau d0b33833ae mac80211: make use of the new 'band' option
Use it to look up frequencies only in the configured band to better deal
with channel number overlap

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 8b8c1cb09b)
2021-11-23 18:30:04 +01:00
Christian Lamparter 6fe4b7aa2b gpio-button-hotplug: convert to gpio descriptor (gpiod_) API
OpenWrt's special gpio-button-hotplug driver is still using
exclusively the legacy GPIO Subsystem gpio_ API.

While it still does work fine for most devices, upstream
linux is starting to convert platform support like that of
the APU2/3/4 to the new GPIOD LOOKUP tables that are not
supported by it.

Hence, this patch replaces the gpio_ calls present in
gpio-button-hotplug with gpiod_ equivalent wherever
it's possible. This allows the driver to use the
gpiod lookup tables and still have a fallback for
legacy platform data code that just sets button->gpio
set to the real button/switch GPIO.

As a bonus: the active_low logic is now being handled
by the linux's gpio subsystem too. Another issue that
was address is the of_handle leak in the dt parser
error path.

Tested with legacy platform data: x86_64: APU2, MX-100
Tested on OF: ATH79; MR18, APM821xx: Netgear WNDR4700,
	      RAMIPS: WL-330N3G
	      LANTIQ: AVM FritzBox 7360v1

Reported-by: Chris Blake <chrisrblake93@gmail.com>
Tested-by: Chris Blake <chrisrblake93@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 2b0378cf9f)
2021-11-05 21:24:04 +01:00
Andrew Robbins 284f8a64b7 ath10k-ct: update to version from 2021-09-22
Add in a fix for 160Mhz dfs on 5.10 and higher.
Add support for 5.13 and 5.15 kernels.
Add of_get_mac_address support for 5.15 driver.

Signed-off-by: Andrew Robbins <andrew@robbinsa.me>
(cherry picked from commit 1d2bc94f78)
2021-10-21 00:19:43 +02:00
Hauke Mehrtens 65835e0d5f mac80211: Update to backports-5.10.68
Refresh all patches.
The removed patches were integrated upstream.

This contains fixes for CVE-2020-3702

1. These patches (ath, ath9k, mac80211)  were included in kernel
versions since 4.14.245 and 4.19.205. They fix security vulnerability
CVE-2020-3702 [1] similar to KrØØk, which was found by ESET [2].

Thank you Josef Schlehofer for reporting this problem.

[1] https://nvd.nist.gov/vuln/detail/CVE-2020-3702
[2] https://www.welivesecurity.com/2020/08/06/beyond-kr00k-even-more-wifi-chips-vulnerable-eavesdropping/

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-09-22 22:36:15 +02:00
Michael Yartys 86f6171788 ath10k-ct: fix typo in Makefile
Add forgotten colon to Makefile.

Signed-off-by: Michael Yartys <michael.yartys@protonmail.com>
(cherry picked from commit f0f1d68d52)
2021-07-02 16:19:33 +02:00
Michael Yartys 24cfa5005e ath10k-ct: update to latest version
Changelog:
- ath10k-ct: Add security fixes.
- ath10k-ct: Add 5.12 kernel version.
- ath10k-ct: Fix the beacon/mcast/bcast override issue
- ath10k-ct 5.7: Fix setting mcast/bcast/beacon rate from debugfs.
- ath10k-ct: Add 5.11 driver.

Delete upstreamed patch and refresh the rest. Also, use the opportunity to
set PKG_RELEASE to $(AUTORELEASE).

Runtime-tested on ipq806x (Netgear R7800).

Signed-off-by: Michael Yartys <michael.yartys@protonmail.com>
(cherry picked from commit 2e10ed925e)
2021-07-02 16:19:33 +02:00
DENG Qingfang 69c10497c7 kernel/modules: move act_gact into kmod-sched-core
As the name suggests, act_gact has the generic actions such as dropping
and accepting packets, so move it into kmod-sched-core.

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
(cherry-picked from commit 10aacb9a6c)
2021-07-02 13:31:11 +02:00
Bob Cantor 6f13a39035 mac80211: print an error if wifi teardown fails
drv_mac80211_teardown fails silently if the device to be torn down is
not defined.  This commit prints an error message.

branches affected: trunk, 21.02

Signed-off-by: Bob Cantor <coxede6557@w3boats.com>
(cherry-picked from commit 3933e29d1b)
2021-06-30 19:24:55 +02:00
Bob Cantor 9302e63d1a mac80211: always call wireless_set_data (FS#3784)
When wifi is turned off, drv_mac80211_teardown sometimes fails (silently)
because the device to be torn down is not defined.

This situation arises if drv_mac80211_setup was called twice when
wifi was turned on.

This commit ensures that the device to be torn down is always defined
in drv_mac80211_teardown.

Steps to reproduce:

1) Use /sbin/wifi to turn on wifi.
   uci set wireless.@wifi-iface[0].disabled=0
   uci set wireless.@wifi-device[0].disabled=0
   uci commit
   wifi

2) Use /sbin/wifi to turn off wifi.
   uci set wireless.@wifi-device[0].disabled=1
   uci commit
   wifi

3) Observe that wifi is still up.

branches affected: trunk, 21.02

Signed-off-by: Bob Cantor <coxede6557@w3boats.com>
(cherry-picked from commit d515f6b6cd)
2021-06-30 19:24:55 +02:00
Bob Cantor bea9380149 mac80211: fix no_reload logic (FS#3902)
If drv_mac80211_setup is called twice with the same wifi configuration,
then the second call returns early with error HOSTAPD_START_FAILED.
(wifi works nevertheless, despite the fact that setup is incomplete.  But
"ubus call network.wireless status" erroneously reports that radio0 is down.)

The relevant part of drv_mac80211_setup is,

if [ "$no_reload" != "0" ]; then
        add_ap=1
        ubus wait_for hostapd
        local hostapd_res="$(ubus call hostapd config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}")"
        ret="$?"
        [ "$ret" != 0 -o -z "$hostapd_res" ] && {
                wireless_setup_failed HOSTAPD_START_FAILED
                return
        }
        wireless_add_process "$(jsonfilter -s "$hostapd_res" -l 1 -e @.pid)" "/usr/sbin/hostapd" 1 1
fi

This commit sets no_reload = 0 during the second call of drv_mac80211_setup.

It is perhaps worth providing a way to reproduce the situation
where drv_mac80211_setup is called twice.

When /sbin/wifi is used to turn on wifi,
   uci set wireless.@wifi-iface[0].disabled=0
   uci set wireless.@wifi-device[0].disabled=0
   uci commit
   wifi

/sbin/wifi makes the following ubus calls,
   ubus call network reload
   ubus call network.wireless down
   ubus call network.wireless up

The first and third ubus calls both call drv_mac80211_setup,
while the second ubus call triggers wireless_device_setup_cancel.
So the call sequence becomes,

   drv_mac80211_setup
   wireless_device_setup_cancel
   drv_mac80211_setup

In contrast, when LuCI is used to turn on wifi only a single call
is made to drv_mac80211_setup.

branches affected: trunk, 21.02

Signed-off-by: Bob Cantor <coxede6557@w3boats.com>
(cherry-picked from commit a29ab3b79a)
2021-06-30 19:24:55 +02:00
Felix Fietkau ccbe535604 mac80211: backport fix for nl80211 control port tx (fixes FS#3857)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit de49957300)
2021-06-30 19:24:55 +02:00
Felix Fietkau 4c29ff7cb8 mac80211: add support for 802.3 encap offload with software rate control
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit f2c6d892ca)
2021-06-30 19:24:55 +02:00
Felix Fietkau a078037ace mac80211: improve rate control performance
Call rate control handler after intermediate queueuing
Includes follow-up fixes

Signed-off-by: Felix Fietkau <nbd@nbd.name>

cherry-picked from commits:
- 7dd8829ef9
- a603e82dd3
- 8bb4437c01
2021-06-30 19:12:20 +02:00
Rosen Penev ab5010d170 exfat: update to 5.12.3
Major changes are:
    Avoid page allocation failure from upcase table allocation.
    Add support for FITRIM.
    Improve write perofmrance on dirsync mount.
    Improve lookup perofmrance.
    Fix a bug on discard mount.

Switch to AUTORELEASE to avoid having to bump it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-22 23:52:09 +02:00
Felix Fietkau 3d0ed7d763 mac80211: fix an issue with wds links on 802.11ax devices
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 89c9ccc3b2)
2021-06-19 12:17:54 +02:00
Felix Fietkau 3839a4c7e9 mac80211: fix minstrel sample time check
We need to skip sampling if the next sample time is after jiffies, not before.
This patch fixes an issue where in some cases only very little sampling (or none
at all) is performed, leading to really bad data rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-17 12:45:08 +02:00
Felix Fietkau 20f66649dd mt76: update to the latest version
bddc1db76d0f mt76: mt7915: drop the use of repeater entries for station interfaces
3c90f35dddac mt76: mt7915: add thermal sensor device support
afab0e8202ff mt76: mt7915: add thermal cooling device support
41cf02184699 mt76: mt7615: add thermal sensor device support
2ac6b8762565 mt76: connac: update BA win size in Rx direction
ddb301127291 mt76: mt7921: fix reset under the deep sleep is enabled
e4cbefd1d69a mt76: mt7921: avoid unnecessary consecutive WiFi resets
393eea2034d7 mt76: mt7921: fix invalid register access in wake_work
a15d46407ffa mt76: mt7921: fix OMAC idx usage
e4d267d8e900 mt76: mt7921: enable runtime pm by default
50fd8ce2412a mt76: connac: add bss color support for sta mode
e29058c3c860 mt76: mt7921: return proper error value in mt7921_mac_init
c89c8c347b1e mt76: mt7921: do not schedule hw reset if the device is not running
9f7bb428e587 mt76: mt7921: reset wfsys during hw probe
22ea365913b5 mt76: mt7915: add .offset_tsf callback
ad91f8e8e494 mt76: mt7615: add .offset_tsf callback
6f871f35e3c1 mt76: mt7915: use mt7915_mcu_get_txpower_sku() to get per-rate txpower
597b68b7daa3 mt76: mt7615: remove useless if condition in mt7615_add_interface()
3945264468eb mt76: testmode: fix memory leak in mt76_testmode_alloc_skb
bdcc57a11606 mt76: testmode: remove unnecessary function calls in mt76_testmode_free_skb
a9763452601d mt76: testmode: remove undefined behaviour in mt76_testmode_alloc_skb
4aef2a2be464 mt76: mt7615: fix potential overflow on large shift
d9dd7635b055 mt76: mt7915: use mt7915_mcu_get_mib_info() to get survey data
d740e921758a mt76: mt7921: introduce mac tx done handling
259ddfc7cb73 mt76: mt7921: update statistic in active mode only
757b93f4b179 mt76: mt7921: remove leftover 80+80 HE capability
1fcff599b2e1 mt76: allow hw driver code to overwrite wiphy interface_modes
c55c22e39b7d mt7915: update firmware to 2020110522
10548aef1f45 mt76: mt7915: improve error recovery reliability
ed6b0c79820c mt76: mt7921: set MT76_RESET during mac reset
321443258bea mt76: move mt76_rates in mt76 module
d1652e8af9e1 Revert "mt76: connac: do not schedule wake_work if the runtime-pm is disabled"
4f4cab39ed9f mt76: mt7915: read all eeprom fields from fw in efuse mode
71450535f164 mt76: mt7921: enable hw offloading for wep keys
833d577e430c mt76: mt7921: remove mt7921_get_wtbl_info routine
67b7a22d2b99 mt76: mt7921: enable random mac address during sched_scan
cf1ff7bf4f1b mt76: mt7915: setup drr group for peers
ef2f7aa8745f mt76: mt7615: update radar parameters
b9f09f530223 mt76: mt7915: fix MT_EE_CAL_GROUP_SIZE
22b690334c0f mt76: mt7915: do not fail if the cooling device could not be registered

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 3c46ba053d)
2021-06-17 12:44:58 +02:00
Felix Fietkau 05a8bf04ec mac80211: sync nl80211.h with upstream and backport a WPA3 related commit
Fixes compatibility issues with the latest hostapd update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 91abeebd3b)
2021-06-17 12:44:57 +02:00
Adrian Schmutzler ec8fe0a189 treewide: make AddDepends/usb-serial selective
Make packages depending on usb-serial selective, so we do not have
to add kmod-usb-serial manually for every device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 9397b22df1)
2021-06-08 22:50:32 +02:00
Hauke Mehrtens 00d7a459f3 mac80211: Update to backports-5.10.42
The removed patches were integrated upstream.

The brcmf_driver_work workqueue was removed in brcmfmac with kernel
5.10.42, the asynchronous call was covered to a synchronous call. There
is no need to wait any more.
This part was removed manually from this patch:
brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 04a260911c)
2021-06-06 17:54:58 +02:00
Felix Fietkau 43e4ba5863 mt76: update to the latest version
Includes fix for CVE-2020-24588

186af01047b2 mt76: mt7921: introduce MCU_EVENT_LP_INFO event parsing
93b5c28c97d5 mt76: mt7921: add rcu section in mt7921_mcu_tx_rate_report
a8e89c5a1d1f mt76: testmode: add support to send larger packet
a0cc9a9e3877 mt76: mt7915: rework mt7915_tm_set_tx_len()
c8b96630324e mt76: mt7915: fix rate setting of tx descriptor in testmode
22fd2958c42a mt76: mt7615: fix memleak when mt7615_unregister_device()
7401e0db3143 mt76: mt7915: fix memleak when mt7915_unregister_device()
c3656268b3f6 mt76: mt7915: only free skbs after mt7915_dma_reset() when reset happens
0ce955b04ba8 mt76: mt7615: only free skbs after mt7615_dma_reset() when reset happens
b03d1e62acf7 mt76: mt7615: use ieee80211_free_txskb() in mt7615_tx_token_put()
5ac02e22fb03 mt76: flush tx status queue on DMA reset
c71f609b398a mt76: sync with upstream changes
23ecadd4af77 mt76: mt7615: fix hardware error recovery for mt7663
57a899ee3c3c mt76: mt7615: fix entering driver-own state on mt7663
42a2dddb706b mt76: mt7615: load ROM patch before checking patch semaphore status
cf0e406af84a mt76: mt7915: add support for applying pre-calibration data
459940ccbc58 mt76: mt7921: move hw configuration in mt7921_register_device
0a094b11f3c0 mt76: improve mcu error logging
bf536832e37d mt76: mt7921: run mt7921_mcu_fw_log_2_host holding mt76 mutex
7616f4f78163 mt76: mt7921: add wifisys reset support in debugfs
e620bd881ef5 mt76: mt7921: abort uncompleted scan by wifi reset
e8dacf59ab1c mt76: mt7915: rework the flow of txpower setting
c8c78e577236 mt76: mt7915: directly read per-rate tx power from registers
1622bf4f8705 mt76: mt7921: add mt7921_dma_cleanup in mt7921_unregister_device
ef96fafad8a9 mt76: Convert to DEFINE_SHOW_ATTRIBUTE
90e4bfea2948 mt76: mt7921: do not use 0 as NULL pointer
0a139d7f5966 mt76: connac: move mcu_update_arp_filter in mt76_connac module
de26c73ce3c2 mt76: mt7921: remove leftover function declaration
1c0b6cb4f942 mt76: mt7921: fix a race between mt7921_mcu_drv_pmctrl and mt7921_mcu_fw_pmctrl
2923e3e2b8e4 mt76: mt7663: fix a race between mt7615_mcu_drv_pmctrl and mt7615_mcu_fw_pmctrl
74d0fdaa7a99 mt76: connac: introduce wake counter for fw_pmctrl synchronization
28c87e09a5ea mt76: mt7921: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path
36f664edc7db mt76: mt7663: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path
51b3d1a9a2b7 mt76: dma: add the capability to define a custom rx napi poll routine
4f1339c9fb72 mt76: mt7921: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx/rx napi
1bc5e67a60be mt76: mt7663: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx/rx napi
325f7b451c03 mt76: connac: unschedule ps_work in mt76_connac_pm_wake
12115052a02f mt76: connac: check wake refcount in mcu_fw_pmctrl
e5d28e3cef66 mt76: connac: remove MT76_STATE_PM in mac_tx_free
475112a3cdcc mt76: mt7921: get rid of useless MT76_STATE_PM in mt7921_mac_work
112998f32d85 mt76: connac: alaways wake the device before scanning
4334f3e2fc43 mt76: mt7615: rely on pm refcounting in mt7615_led_set_config
0562380659ad mt76: connac: do not run mt76_txq_schedule_all directly
acfa78df5708 mt76: connac: use waitqueue for runtime-pm
ca74a4cd0722 mt76: remove MT76_STATE_PM in tx path
0c2d3e74852e mt76: mt7921: add awake and doze time accounting
45e0eefffe9f mt76: mt7921: enable sw interrupts
fd2ff641166f mt76: mt7615: Fix a dereference of pointer sta before it is null checked
7e2521468767 mt76: mt7921: move mt7921_dma_reset in dma.c
c9dd6b1fa171 mt76: mt7921: introduce mt7921_wpdma_reset utility routine
2ac7c7e9c568 mt76: mt7921: introduce mt7921_dma_{enable,disable} utilities
662a89f2b9d1 mt76: mt7921: introduce mt7921_wpdma_reinit_cond utility routine
614efe9e9180 mt76: connac: introduce mt76_connac_mcu_set_deep_sleep utility
0dbb16ef39d8 mt76: mt7921: enable deep sleep when the device suspends
3c19f569cc70 mt76: mt7921: fix possible invalid register access
ade1f5aad4c6 mt76: move token_lock, token and token_count in mt76_dev
8d5c456be1ff mt76: move token utilities in mt76 common module
fb04d9df5e52 mt76: mt7915: do not read rf value from efuse in flash mode
2126b2176336 mt76: mt7921: get rid of mcu_reset function pointer
d325b7eff1b1 mt76: mt7921: improve doze opportunity
2ae25c7e547e mt76: mt7663: add awake and doze time accounting
349bbb9d6f13 mt76: connac: unschedule mac_work before going to sleep
98a235004dea mt76: mt7921: mt7921_stop should put device in fw_own state
63d80b9ab251 mt76: mt7921: introduce mt7921_mcu_sta_add routine
3c5bf837fdbd mt76: mt7615: fix a precision vs width bug in printk
ded14da5eacc mt76: mt7915: fix a precision vs width bug in printk
aaf0d254f9ea mt76: mt7921: fix a precision vs width bug in printk
757af5c67d32 mt76: move mt76_token_init in mt76_alloc_device
ed41ed73a495 mt76: mt7921: reinit wpdma during drv_own if necessary
92fb81e085c6 mt76: mt7921: fix possible AOOB issue in mt7921_mcu_tx_rate_report
53d915a23bc9 mt76: connac: do not schedule wake_work if the runtime-pm is disabled
23fe1bdcf15a mt76: connac: do not schedule mac_work if the device is not running
e5b19336c58e mt76: mt7615: do not set MT76_STATE_PM at bootstrap
0fc2136a61dd mt76_connac_mcu: move mt76_connac_mcu_update_arp_filter outside of CONFIG_PM
e693f3e23e06 mt76: mt7915: add MSI support
5231e7300fa4 mt7915: disable ASPM
554b50dabf54 mt76: connac: fix uninitialized HT A-MPDU setting field in STA_REC_PHY
43b9c0a838bb mt76: mt7921: fix max aggregation subframes setting
5a387a0a3004 mt76: mt7921: enable rx hw de-amsdu
c8cbcb87be07 mt76: connac: add missing configuration in mt76_connac_mcu_wtbl_hdr_trans_tlv
55921e57b380 mt76: mt7921: enable rx header traslation offload
01441f67d8b2 mt76: mt7921: enable rx csum offload
c9ab76dd93a0 mt76: mt7915: move mt7915_queue_rx_skb to mac.c
caedb4c4ee41 mt76: mt7615: fix fixed-rate tx status reporting
c6ae95d43e6d mt76: improve tx status codepath
27d468d094e6 mt76: mt7915: rework tx rate reporting
3b4ca5b09e2c mt76: mt7615: avoid use of ieee80211_tx_info_clear_status
e1f07d7f1cb9 mt76: mt7603: avoid use of ieee80211_tx_info_clear_status
18513ba5fbc2 mt76: mt7915: add support for tx status reporting
35f189cf81b2 mt76: mt7915: fix uninitialized variable in MSI error handling
9e928ac1ea9b mt76: dma: use ieee80211_tx_status_ext to free packets when tx fails
628eee9c386c mt76: fill queue entry wcid for all skbs with a station
a9bc4d94b7a1 mt76: intialize tx queue entry wcid to 0xffff by default
998ca8af7d17 mt76: mt7915: fix tssi indication field of DBDC NICs
7dd24b3cfacf mt76: mt7915: fix a signedness bug in mt7915_mcu_apply_tx_dpd()
535025d65d8d mt76: mt7915: cleanup mt7915_mcu_sta_rate_ctrl_tlv()
ff8bbe22dd87 mt76: mt7915: add .set_bitrate_mask() callback
c7dd54a22e30 mt76: connac: skip wtbl reset on sta disconnect
3511fd430356 mt76: validate rx A-MSDU subframes
aedc3145de6e mt76: fix possible NULL pointer dereference in mt76_tx
5c2baab92cd0 mt76: mt7615: fix NULL pointer dereference in tx_prepare_skb()
af21659ee834 mt76: mt76x0: use dev_debug instead of dev_err for hw_rf_ctrl
e423c16f16f7 mt76: mt7615: free irq if mt7615_mmio_probe fails
f2d0da8da9b7 mt76: mt7663: enable hw rx header translation
d2713a5d9de9 mt76: mt7921: fix mt7921_wfsys_reset sequence
ce5f32d84f33 mt76: mt7921: Don't alter Rx path classifier
8ab8c7747197 mt76: connac: fw_own rely on all packet memory all being free
a747b0bb4956 mt76: mt7921: enable deep sleep at runtime
2e6e999509b1 mt76: mt7921: add deep sleep control to runtime-pm knob
30bcb2338ce2 mt76: connac: fix WoW with disconnetion and bitmap pattern
56518f4a126e mt76: mt7921: consider the invalid value for to_rssi
e969ab10a034 mt76: mt7921: add back connection monitor support
28b162366d09 mt76: fix calling mt76_get_of_eeprom with an offset for pre-cal data
9d736545bb5a mt76: mt7915: disable pre-calibration support for now

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit f62aa9e781)
2021-05-16 08:48:22 +02:00
Felix Fietkau 5869423d21 mac80211: backport upstream fixes for FragAttacks
From the patch series description:

Several security issues in the 802.11 implementations were found by
Mathy Vanhoef (New York University Abu Dhabi), who has published all
the details at

	https://papers.mathyvanhoef.com/usenix2021.pdf

Specifically, the following CVEs were assigned:

 * CVE-2020-24586 - Fragmentation cache not cleared on reconnection
 * CVE-2020-24587 - Reassembling fragments encrypted under different
                    keys
 * CVE-2020-24588 - Accepting non-SPP A-MSDU frames, which leads to
                    payload being parsed as an L2 frame under an
                    A-MSDU bit toggling attack
 * CVE-2020-26139 - Forwarding EAPOL from unauthenticated sender
 * CVE-2020-26140 - Accepting plaintext data frames in protected
                    networks
 * CVE-2020-26141 - Not verifying TKIP MIC of fragmented frames
 * CVE-2020-26142 - Processing fragmented frames as full frames
 * CVE-2020-26143 - Accepting fragmented plaintext frames in
                    protected networks
 * CVE-2020-26144 - Always accepting unencrypted A-MSDU frames that
                    start with RFC1042 header with EAPOL ethertype
 * CVE-2020-26145 - Accepting plaintext broadcast fragments as full
                    frames
 * CVE-2020-26146 - Reassembling encrypted fragments with non-consecutive
                    packet numbers
 * CVE-2020-26147 - Reassembling mixed encrypted/plaintext fragments

In general, the scope of these attacks is that they may allow an
attacker to
 * inject L2 frames that they can more or less control (depending on the
   vulnerability and attack method) into an otherwise protected network;
 * exfiltrate (some) network data under certain conditions, this is
   specific to the fragmentation issues.

A subset of these issues is known to apply to the Linux IEEE 802.11
implementation (mac80211). Where it is affected, the attached patches
fix the issues, even if not all of them reference the exact CVE IDs.

In addition, driver and/or firmware updates may be necessary, as well
as potentially more fixes to mac80211, depending on how drivers are
using it.

Specifically, for Intel devices, firmware needs to be updated to the
most recently released versions (which was done without any reference
to the security issues) to address some of the vulnerabilities.

To have a single set of patches, I'm also including patches for the
ath10k and ath11k drivers here.

We currently don't have information about how other drivers are, if
at all, affected.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-16 08:48:22 +02:00
Rui Salvaterra c99f037493 mac80211/rtl: backport a rtl8192cu AP mode fix
Running USB devices in AP mode is never a good idea. That said, fix the TIM
issue in rtl8192cu [1], allowing these devices to "work" in AP mode.

[1] https://patchwork.kernel.org/project/linux-wireless/patch/20210419065956.6085-1-pkshih@realtek.com/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
(cherry picked from commit eeda8652f1)
2021-05-14 23:32:22 +02:00
Hauke Mehrtens ce41fc38ba mac80211: Update to version 5.10.34-1
The removed patches were applied upstream and are not needed anymore.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 17ac9849d3)
2021-05-04 22:29:34 +02:00
Felix Fietkau f066ee2ad5 mac80211: minstrel_ht: fix issue in calculating success probability
Missing braces in a macro were leading to badly working rates sometimes
getting a success probabilty of 1.0

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 12cb52bd06)
2021-04-28 21:11:15 +02:00
Jeroen Peelaerts 51a5053300 lantiq: enable G.INP retransmission counters
This commit adds monitoring for a couple of DSL line features that are
present in the lantiq firmware blobs.

* G.INP ON/OFF
* Trellis encoding ON/OFF
* Virtaul Noise ON/OFF
* Bitswap ON/OFF

Difference in size for ltq-vdsl-app = 1k
Difference in size for kmod-ltq-vdsl-vr9 < 1k

Reviewed-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Jeroen Peelaerts <jeroen.peelaerts@gmail.com>
(cherry picked from commit 48162e4c0c)
2021-04-19 23:24:36 +02:00
Rafał Miłecki 50f2f25d58 kernel: limit crypto-hw-ccp to the x86
CRYPTO_DEV_CCP depends on X86 or ARM64
CRYPTO_DEV_CCP_DD depends on CPU_SUP_AMD or ARM64

Compiling this driver makes sense for x86 mainly. If one day support for
ARM64 board with AMD Secure Processor gets added this package may be
updated.

Trying to build this package on bcm4908 was causing:
ERROR: module 'build_dir/target-aarch64_cortex-a53_musl/linux-bcm4908_generic/linux-5.4.110/drivers/crypto/ccp/ccp-crypto.ko' is missing.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit cb3fb45ed1)
2021-04-14 08:42:38 +02:00
Rafał Miłecki 48262735d9 kernel: crypto: format "crypto-hw-ccp" dependencies
Use multiples lines for better readability and sort lines.

Suggested-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 107111adbb)
2021-04-14 08:42:38 +02:00
Felix Fietkau 04b22754d7 mt76: update to the latest version
6a3cf95733e2 mt76: fix tx skb error handling in mt76_dma_tx_queue_skb
ab9045153343 mt76: mt7915: only modify tx buffer list after allocating tx token id
7e1eff676257 mt76: mt7915: fix unused 'mode' variable
8a2e22fcbf69 mt76: mt7921: fix suspend/resume sequence
27a54e8b687f mt76: mt7921: fix memory leak in mt7921_coredump_work
c267322f0bdb mt76: mt7921: switch to new api for hardware beacon filter [v2 update]
fd2c59d9ba46 mt76: mt7921: fixup rx bitrate statistics [v2 update]
bfa8d5a6a9a1 mt76: adjust to upstream API for enabling threaded NAPI
1706fb6c48e8 mt76: mt7663s: fix rx buffer refcounting
c5aca6692c41 mt76: mt7615: enable hw rx-amsdu de-aggregation
9002b0b30aed mt76: mt7615: add rx checksum offload support
8e3f5bfe74f6 mt76: mt7615: add support for rx decapsulation offload
8e3bba8bd3ef mt76: mt7615: fix memory leak in mt7615_coredump_work
760adce29100 mt76: mt7921: fix aggr length histogram
84229a51845a mt76: mt7915: fix aggr len debugfs node
10a95da23cb7 mt76: mt7921: remove unneeded semicolon
2856dc8fb57e mt76: mt7921: fix stats register definitions
1b245e57549d mt76: mt7615: fix TSF configuration
1a2e2965b62b mt76: mt7615: remove hdr->fw_ver check
f60ec1b9473d mt76: mt7615: fix mib stats counter reporting to mac80211
8a5b036af48f mt76: mt7915: fix mib stats counter reporting to mac80211
ee6dbcc64f6d mt76: connac: fix kernel warning adding monitor interface
e46dd240ce72 mt76: check return value of mt76_txq_send_burst in mt76_txq_schedule_list
ddf95ead3bb3 mt76: mt7921: get rid of mt7921_sta_rc_update routine
fd2a51ea9dc8 mt76: mt7921: fix the base of PCIe interrupt
28f53d074bb0 mt76: mt7921: fix the base of the dynamic remap
8d737632b57f mt76: mt7921: check mcu returned values in mt7921_start
5ff25c915e62 mt76: mt7915: add missing capabilities for DBDC
58dd3f26c099 mt76: mt7615: fix CSA notification for DBDC
76f4959107ac mt76: mt7615: stop ext_phy queue when mac reset happens
7de0a0654054 mt76: mt7915: fix CSA notification for DBDC
e9e418fc7eb0 mt76: mt7915: stop ext_phy queue when mac reset happens
477b78301879 mt76: mt7915: fix PHY mode for DBDC
37b4dc0f7595 mt76: mt76x0u: Add support for TP-Link T2UHP(UN) v1
29a04583aecb mt76: mt7915: fix rxrate reporting
a4307e6ba054 mt76: mt7915: fix txrate reporting
256f324f8fcd mt76: mt7915: check mcu returned values in mt7915_ops
638b112188a5 mt76: mt7615: check mcu returned values in mt7615_ops
975cccfa96da mt76: mt7663: fix when beacon filter is being applied
aafe972e95b2 mt76: mt7663s: make all of packets 4-bytes aligned in sdio tx aggregation
0d5b1a702715 mt76: mt7663s: fix the possible device hang in high traffic
00628061b546 mt76: mt7615: add missing capabilities for DBDC
2303e1844afd mt76: mt7915: fix possible deadlock while mt7915_register_ext_phy()
6e2b9d258306 mt76: mt7921: reduce mcu timeouts for suspend, offload and hif_ctrl msg
3cf5afc02955 mt76: introduce mcu_reset function pointer in mt76_mcu_ops structure
9af9622df549 mt76: mt7921: introduce mt7921_run_firmware utility routine.
e12c44a7e165 mt76: mt7921: introduce __mt7921_start utility routine
7b56d5bf6ea0 mt76: dma: introduce mt76_dma_queue_reset routine
a80e50098b51 mt76: dma: export mt76_dma_rx_cleanup routine
e0708e296e27 mt76: mt7921: add wifi reset support
87e09e8482cf mt76: mt7921: remove leftovers from dbdc configuration
cc933b3669f7 mt76: mt7921: remove redundant check on type
ca22cc221ae7 linux-firmware: add firmware for MT7921
0b6c9a043f78 mt76: move de-amsdu buffer per-phy
48a905e23791 mt76: mt7615: fix CSA event format
fbef8bba038f mt76: mt7921: remove duplicated macros in mcu.h
6886b57a1534 mt76: connac: introcuce mt76_sta_cmd_info data structure
e529e8afe22a mt76: mt7921: properly configure rcpi adding a sta to the fw
e4d522776804 mt76: mt7921: fix airtime reporting
be2f67e8d3cb mt76: mt7915: fix key set/delete issue
09a1befde4b7 mt76: fix potential DMA mapping leak
f66f8f41d47b mt76: mt7915: refresh repeater entry MAC address when setting BSSID
035e2f6f1ddf mt76: mt7921: get rid of mt7921_mac_wtbl_lmac_addr
ee29cd5f3a6a mt76: mt7615: only enable DFS test knobs for mt7615
9a98b1a6f9c2 mt76: mt7615: cleanup mcu tx queue in mt7615_dma_reset()
3bd285424e7b mt76: mt7622: trigger hif interrupt for system reset
bf6d9ee4acd1 mt76: mt7615: keep mcu_add_bss_info enabled till interface removal
115b74282314 mt76: mt7915: keep mcu_add_bss_info enabled till interface removal
57432e701d1a mt76: mt7915: cleanup mcu tx queue in mt7915_dma_reset()
a519c49a6a42 mt76: mt7615: 0-terminate firmware log messages
4a22f2ffae2e mt76: mt7915: 0-terminate firmware log messages
b8609066893a mt76: mt7615: fix chip reset on MT7622 and MT7663e
465dda65ee84 mt7615,mt7915: replace fw log 0-terminating code with wiphy info length limit
62b13f5352b8 mt76: mt7921: fix key set/delete issue
0ff3a336a8d8 mt7615,mt7915: fix a compiler warning
113ba8a81d54 mt76: mt7615: remove redundant dev_err call in mt7622_wmac_probe()
be1ab3b9ae7c mt76: mt7921: fix typo in mt7921_pci_resume
4e22f0dc934b mt76: mt7915: fix txpower init for TSSI off chips
e66a0b9b8d66 mt76: mt7615: always wake the device in mt7615_remove_interface
38f656768a90 mt76: mt7921: always wake the device in mt7921_remove_interface
6ee4770de083 mt76: mt7921: rework mt7921_mcu_debug_msg_event routine
e578b4b8d56a mt76: mt7615: fix .add_beacon_offload()
f8c6c7cbf10f mt76: mt7915: fix mt7915_mcu_add_beacon
7d35b7a15d1d mt76: mt7915: add wifi subsystem reset
04122c89749d mt76: fix rx amsdu subframe processing
5e764ec9bece mt76: mt7921: introduce MT_WFDMA_DUMMY_CR definition
cf0badbc0497 mt76: mt7921: fix inappropriate WoW setup with the missing ARP informaiton
f32a4e15f5b2 mt76: mt7921: fix the dwell time control
54f52771a04a mt76: mt7921: fix kernel crash when the firmware fails to download
97189d2a045b mt76: mt7921: fix the insmod hangs
dcdbd7c89cf5 mt76: mt7921: fix MT_PCIE_MAC_INT_ENABLE access
813db729c02f mt76: mt7921: reduce the data latency during hw scan
028b7152b1a9 mt76: mt7921: remove 80+80 MHz support capabilities
7714dc914df6 mt76: report Rx timestamp
ffd4cf15fa0e mt76: mt7915: add mmio.c
fe8717dd573a mt76: mt7615: add missing SPDX tag in mmio.c
6b293c411d22 mt76: mt7615: always add rx header translation tlv when adding stations
bf45b30d8919 add missing file

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 8cc013981d)
2021-04-11 21:06:58 +02:00
Felix Fietkau 4ad1957eee mac80211: add client mode connection monitor fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit dfdb28c24a)
2021-04-11 19:45:26 +02:00
Felix Fietkau de00033bbb mac80211: support rx timestamps for HE rates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 7d8e14e44f)
2021-04-11 19:45:26 +02:00
Hauke Mehrtens 3da861ccca kernel: bump 5.4 to 5.4.111
Refreshed all patches.

The following patches were manually changed:
* 610-netfilter_match_bypass_default_checks.patch
* 611-netfilter_match_bypass_default_table.patch
* 802-can-0002-can-rx-offload-fix-long-lines.patch
* 802-can-0003-can-rx-offload-can_rx_offload_compare-fix-typo.patch
* 802-can-0004-can-rx-offload-can_rx_offload_irq_offload_timestamp-.patch
* 802-can-0005-can-rx-offload-can_rx_offload_reset-remove-no-op-fun.patch
* 802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch
* 802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch

The can-dev.ko model was moved in the upstream kernel.

Compile-tested on: x86/64, armvirt/64, ath79/generic
Runtime-tested on: x86/64, armvirt/64, ath79/generic

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-04-11 17:35:12 +02:00
Tony Ambardar 0d5e308664 kernel/modules: relocate teql hotplug from iproute2 to kmod-sched
The link equalizer sch_teql.ko of package kmod-sched relies on a hotplug
script historically included in iproute2's tc package. In previous
discussion [1], consensus was the hotplug script is best located together
with the module in kmod-sched, but this change was deferred at the time.

Relocate the hotplug script now. This change also simplifies adding a tc
variant for minimal size with reduced functionality.

[1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447923636

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
(cherry picked from commit 863ce4f15f)
2021-04-10 14:22:28 +02:00
Ilya Lipnitskiy 7114416fbe kernel: fix kmod-wireguard package fields
Use NETWORK_SUPPORT_MENU like all other modules in netsupport.mk. Drop
SECTION and CATEGORY fields as they are set by default and to match
other packages in netsupport.mk. Use better TITLE for kmod-wireguard
(taken from upstream drivers/net/Kconfig).

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
(cherry picked from commit 0b53d6f7fa)
2021-04-10 14:21:32 +02:00
Ilya Lipnitskiy a701d4b841 kernel: migrate wireguard into the kernel tree
On Linux 5.4, build WireGuard from backports. Linux 5.10 contains
wireguard in-tree.

Add in-kernel crypto libraries required by WireGuard along with
arch-specific optimizations.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
(cherry picked from commit 06351f1bd0)
(cherry picked from commit 464451d9ab)
2021-04-10 14:21:32 +02:00
Felix Fietkau 64ddac2c1c mac80211: merge a few pending tx related fixes
Improve performance and fix potential mgmt tx hangs/warnings

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 571aedbc6c)
2021-04-04 11:39:51 +02:00
Felix Fietkau 69794908b6 mac80211: backport upstream patches for driver disconnect
Needed for an mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 5dc5015072)
2021-04-04 11:39:51 +02:00
Felix Fietkau 95b838f75b build: use -nostdinc and -isystem in NOSTDINC_FLAGS for out-of-tree kernel modules
This resolves issues uncovered by musl updates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 9ac47ee469)
2021-04-04 11:39:51 +02:00
Mauri Sandberg b526fbb1ce packages: kernel: add gpio-nxp-74hc153
NXP 74HC153 is a GPIO expander. Its original source cide sits in ar71xx
architecture tree. It has been slightly modified to get GPIO pin
configuration from the device tree rather than a MACH file.

 Changes to the source file:
  - Remove struct nxp_74hc153_config
  - in nxp_74hc153_probe(), fetch GPIO configuration from device tree
  - allow GPIO framework decide the base number by passing -1 to it
  - remove support for kernel versions below 4.5.0
  - add OF device compatibility string

 Create a package for inclusion in image.

References: https://lore.kernel.org/linux-gpio/545111184.50061.1615922388276@ichabod.co-bxl/
Signed-off-by: Mauri Sandberg <sandberg@mailfence.com>
[added link to driver usptreaming work in progress]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 6a6f9e73dd)
2021-03-27 07:46:14 +01:00
Daniel Golle aacf378608
mwlwifi: add PKG_FLAGS:=nonshared
This should fix the problem of mwlwifi-firmware-* not being found
when using the ImageBuilder.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 9b3aaf1cdb)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-24 20:52:59 +00:00
Rafał Miłecki 058e4c57aa bcm63xx-cfe: update to the latest master
d035016 tp-link: rename to tplink to match DT vendor prefix

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 4d961436c4)
2021-03-17 21:23:45 +01:00
Rafał Miłecki 217687c7ec bcm63xx-cfe: update to the latest master
3fb6f1c tp-link: c2300-v1: add cferam file
79f9578 sercomm: vox-2.5: add cferam file

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ac39c4bd60)
2021-03-17 21:23:45 +01:00
Álvaro Fernández Rojas be423be931 bcm27xx-gpu-fw: update to latest version
This is needed to add support for CM4 and RPI 400.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit f41e653da9)
2021-02-19 07:18:23 +01:00
Álvaro Fernández Rojas 3e807f0305 ath10k-ct: switch to 5.10
Let's switch to 5.10 now that mac80211 has been updated.
Runtime-tested on ipq806x (Netgear R7800).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit a5c4c40476)
2021-02-16 08:52:25 +01:00
Hauke Mehrtens 1132340a22 mac80211: Update to version 5.10.16-1
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-15 22:29:42 +01:00
Hauke Mehrtens 0cde9a0a65 mac80211: Refresh patches again
A wrong quilt configuration was used last time.

Fixes: ed1e234d87 ("mac80211: refresh patches")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-15 22:29:42 +01:00
Felix Fietkau f118be0712 ath9k: fix transmitting to stations in dynamic SMPS mode
When transmitting to a receiver in dynamic SMPS mode, all transmissions that
use multiple spatial streams need to be sent using CTS-to-self or RTS/CTS to
give the receiver's extra chains some time to wake up.
This fixes the tx rate getting stuck at <= MCS7 for some clients, especially
Intel ones, which make aggressive use of SMPS.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:55:45 +01:00
Felix Fietkau bc3963764d mt76: update to the latest version
261d184cebdc mt76: introduce mt76_vif data structure
50349a8664ef mt76: mt76_connac: create mcu library
c88859180c51 mt76: mt76_connac: move hw_scan and sched_scan routine in mt76_connac_mcu module
9856236ab4f9 mt76: mt76_connac: move WoW and suspend code in mt76_connac_mcu module
2da59aacdd50 mt76: mt76_connac: move pm data struct in mt76_connac.h
16be142e40fe mt76: mt76_connac: move pm utility routines in mt76_connac_lib module
c4ccfc66347d mt76: mt7921: add MAC support
8ecf3a50e7ad mt76: mt7921: add MCU support
92c1717f9a55 mt76: mt7921: add DMA support
1cecf9c3da8b mt76: mt7921: add EEPROM support
a9e68410b9ba mt76: mt7921: add ieee80211_ops
39d6f4851b06 mt76: mt7921: introduce mt7921e support
9f37baecf5d6 mt76: mt7921: add debugfs support
b16cf6e26998 mt76: mt7921: introduce schedule scan support
5aa798ee56c7 mt76: mt7921: introduce 802.11 PS support in sta mode
e67d5216f16d mt76: mt7921: introduce support for hardware beacon filter
cb99bf4655f9 mt76: mt7921: introduce beacon_loss mcu event
71f9f09ee987 mt76: mt7921: introduce PM support
2beb9c9530d4 mt76: mt7921: rely on mt76_connac_mcu common library
59e682497d12 mt76: mt7921: rely on mt76_connac_mcu module for sched_scan and hw_scan
1ccf6a9c60cd mt76: mt7921: rely on mt76_connac_mcu module for suspend and WoW support
f8d1ec5e6e11 mt76: mt7921: introduce Runtime PM support
633a1cbd8f4e mt76: mt7921: introduce regdomain notifier support
0d95c6ad1745 mt76: mt7921: enable MSI interrupts
5f4f6792fb37 mt76: mt7921: add coredump support
47eb00e13450 mt76: mt7663: introduce coredump support
26658849a465 mt76: mt7615: fix key set/delete issues
b0ba039bc2ef mt76: mt7615: fix tx skb dma unmap
892f74d37e88 mt76: mt7915: fix tx skb dma unmap
2659f6c6ea23 mt76: mt7615: support loading EEPROM for MT7613BE
b09cc8644529 mt76: dma: do not report truncated frames to mac80211
ae6473f1d2af mt76: mt7921: enable random mac addr during scanning
b59e3677476d mt76: mt7921: remove unnecessary variable
781911f167aa mt76: mt7921: removed unused definitions in mcu.h
994893d38d51 mt76: always use WTBL_MAX_SIZE for tlv allocation
e6c0948ada07 mt76: mt76x0: disable GTK offloading
a75302bcbfe1 mt76: connac: always check return value from mt76_connac_mcu_alloc_wtbl_req
8da10d6f9251 mt76: mt7915: always check return value from mt7915_mcu_alloc_wtbl_req
80a87412e9e9 mt76: mt7915: fix uninitialized variable in mt7915_tm_set_tx_cont()
c7d98fc35865 mt76: use PCI_VENDOR_ID_MEDIATEK to avoid open coded
b5228e75e422 mt76: mt7921: switch to new api for hardware beacon filter
73fce2cbfa41 mt76: connac: fix up the setting for ht40 mode in mt76_connac_mcu_uni_add_bss
2e2cb71901e8 mt76: mt7921: fixup rx bitrate statistics
2d7b1d72b43b mt76: mt7921: add flush operation
96b4c9874e16 mt76: mt7921: fix uninitialized pointer access in mt7921_get_wtbl_info
4492d801cbb5 mt76: connac: update sched_scan cmd usage
200c1b1c234b mac80211: rename csa counters to countdown counters
0d7564d0d899 mt76: add support for 802.3 rx frames
4c0811c647b9 mt76: mt7915: enable hw rx-amsdu de-aggregation
4b7a68634ff6 mt76: mt7915: add rx checksum offload support
289cd7804587 mt76: mt7915: add support for rx decapsulation offload

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:55:45 +01:00
Felix Fietkau 9cb63f5360 mac80211: fix a regression in processing rx stats
A logic error caused rx rate update to be missed for any driver not using
fast-rx

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau ed1e234d87 mac80211: refresh patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau 072bfe2113 mac80211: add minstrel performance improvements
Reduce fluctuations in rate selection / statistics

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau b6066846ad mac80211: add decapsulation offload support
On hardware that supports this, this will improve performance by passing
802.3 frames from the hardware to the stack

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau 8fc2cfea87 mac80211: fix a corner case in encapsulation offload support
Fix encryption key selection with WEP

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau 268210cec8 mac80211: add fq performace improvements
Improves performance under load

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Hauke Mehrtens 12424edff5 mac80211: Update to version 5.10-rc6-1
The removed patches were applied upstream.

This adapts ath10k-ct and mt76 to changed APIs.
nl80211.h in iw is updated to match the version from backports.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-14 15:15:29 +01:00
Hauke Mehrtens bf6f7cf29b mac80211: Update to version 5.9.12-1
The removed patches were applied upstream.

Remove the 300-mac80211-optimize-skb-resizing.patch.
This patch was not applied upstream, but it conflicts with upstream
changes and needs bigger changes. It was applied with Felix to remove
this patch for now. It should be reworked and then send upstream later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-14 15:13:40 +01:00
Antti Seppälä 38646938a4 ltq-ptm: Update VR9 PTM firmware
After looking at various vendor GPL source code dumps I discovered that some
of them contain updated versions of ltq-ptm driver when compared to what
openwrt has.

The driver update is mostly cursory (simple changes to comments, whitespace,
formatting etc.) or adds debug features not used by openwrt.

However the updated driver also contains a later version of PTM firmware which
is extracted and included in this commit along with bits to correctly identify
its version when driver loads.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
2021-02-12 05:07:04 +00:00
Ilya Lipnitskiy 3b65b0c13f acx-mac80211: replace dead URLs with OpenWrt CDN
erley.org no longer exists; attempting to connect to it during package
download results in lengthy timeouts. Use the new OpenWrt CDN alias to
download from reliable OpenWrt mirrors.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-07 11:26:36 -10:00
Paul Spooren 8286f3a3d3 treewide: unify OpenWrt hosted source via @OPENWRT
Multiple sources are hosted on OpenWrts source server only. The source
URLs to point to the server vary based on different epochs in OpenWrts
history.

Replace all by @OPENWRT which is an "empty" mirror, therefore using the
fallback servers sources.cdn.openwrt.org and sources.openwrt.org.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-05 12:00:24 -10:00
Felix Fietkau 84fa59b5a8 mac80211: fix station rate table updates on assoc
If the driver uses .sta_add, station entries are only uploaded after the sta
is in assoc state. Fix early station rate table updates by deferring them
until the sta has been uploaded

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-01 10:00:23 +01:00
David Bauer 8019c54d8a mac80211: fix incorrect parameter
he_mu_beamformer only accepts values of 0 and 1 according to the hostapd
documentation.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-01 00:48:37 +01:00
David Bauer 0c499f6068 mac80211: convert UniFi Outdoor+ HSR support to OF
Enable support for the Ubiquiti UniFi Outdoor+ RF filter via
device-tree. The old way of using platform data is not required anymore,
as it was only used on the now removed ar71xx target.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-01 00:47:36 +01:00
Michael Yartys 5b66c447f3 ath10k-ct: update to latest version
Changelog:
- ath10k-ct: Pull in some upstream patches.

Runtime-tested on ipq806x (Netgear R7800).

Signed-off-by: Michael Yartys <michael.yartys@gmail.com>
2021-01-29 21:22:28 +01:00
Felix Fietkau ddc75ff704 mt76: update to the latest version
65abbcd9f6fb mt76: usb: process URBs with status EPROTO properly
3199ef5fa35e mt76: mt7615: set mcu country code in mt7615_mcu_set_channel_domain()
5c86d5bb079b mt76: mt7915: Remove unneeded semicolon
3f546330b59d mt76: mt7915: support TxBF for DBDC
032ad7e02545 mt76: mt7615: unify init work
cc3f23d1e654 mt76: mt7915: bring up the WA event rx queue for band1
fa3d334a0e22 mt76: fix crash on tearing down ext phy
c4c9c402d14a mt76: mt7915: fix vif sta index for DBDC
eca2f0ec0d4c mt76: mt7915: fix command id for txbf action
c828124ef9a5 mt76: mt7915: add support for using a secondary PCIe link for gen1
dbaf0f4679f3 mt76: mt7915: make vif index per adapter instead of per band
fb3e5ce1eb00 mt76: move vif_mask back from mt76_phy to mt76_dev
be2bea66d6e3 mt76: mt7915: detect wrong nss eeprom parameter on dbdc cards
8dc5d4a0da7c Revert "mt76: mt7915: fix vif sta index for DBDC"
8c796a33781c mt76: mt7915: only set int1 when using the second hif
4eb5caaf6cc1 mt76: reduce q->lock hold time
0714890bf0fd mt76: mt7615: reduce VHT maximum MPDU length
2f85aa5cbc62 mt76: mt7915: avoid writes to MT_PCIE_RECOG_ID when not using gen1 devices
8696919d9aae mt76: dma: fix a possible memory leak in mt76_add_fragment()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 21:02:24 +01:00
Felix Fietkau 7ca75a2d01 mac80211: fix an uninitialized variable warning
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 20:00:03 +01:00
Felix Fietkau 56c20f0a5a mac80211: minstrel_ht: fix regression in the max_prob_rate fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 16:46:45 +01:00
Felix Fietkau 1fdbb8779a mac80211: remove accidentally duplicated line in minstrel_ht patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 16:46:45 +01:00
Felix Fietkau 37752336bd mac80211: add significant minstrel_ht performance improvements
Completely redesign the rate sampling approach

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-25 12:19:22 +01:00
Rafał Miłecki f559b89bd0 bcm63xx-cfe: enable package for bcm4908
bcm4908 target needs to include cferam images in firmware files too

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-01-18 07:39:09 +01:00
Sungbo Eo 583e39e3d5 kernel: drop empty kmod-ledtrig-* packages
The following four led triggers are enabled in generic config.

* kmod-ledtrig-default-on
* kmod-ledtrig-heartbeat
* kmod-ledtrig-netdev
* kmod-ledtrig-timer

Drop the packages and remove them from DEVICE_PACKAGES.
There's no other package depending on them in this repo.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2021-01-15 18:24:31 +01:00
Sungbo Eo 218eff5bdb kernel: update kmod-thermal package
CONFIG_THERMAL option was changed to boolean in upstream linux commit
554b3529fe01 ("thermal/drivers/core: Remove the module Kconfig's option").
Switch it to 'y' and remove FILES and AUTOLOAD for non-existant module file.

And update the descripton text for the package as in upstream linux commit
eb8504620381 ("thermal: Rephrase the Kconfig text for thermal").

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2021-01-15 17:47:33 +01:00
Felix Fietkau b0ad07e9a0 mac80211: fix rounding error in minstrel_ht throughput calculation
Fixes rate selection with lower data rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-15 13:05:40 +01:00
Felix Fietkau faeaf5a010 mac80211: fix an uninitialized stack variable in the minstrel update
It can lead to out-of-bounds access and invalid rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-14 20:12:29 +01:00
Felix Fietkau f841855f10 mt76: update to the latest version
a46f9a9160e9 mt76: mt7915: add vif check in mt7915_update_vif_beacon()
27ad12352ac9 mt76: mt7615: add vif check in mt7615_update_vif_beacon()
0a449cef024e mt76: mt7915: fix MT_CIPHER_BIP_CMAC_128 setkey
eacd2d493c61 mt76: mt7915: reset token when mac_reset happens
e4b23301e6c9 mt76: mt7615: reset token when mac_reset happens
6e22bbfe0360 mt76: mt7615: convert comma to semicolon
37865118ae2d mt76: mt7915: convert comma to semicolon
742c36b2e527 mt76: mt7915: run mt7915_configure_filter holding mt76 mutex
a515727e8423 mt76: mt7915: add support for flash mode
b6f7b3da5216 mt76: mt7915: fix endianness warning in mt7915_mcu_set_radar_th
062f3f4f06a2 mt76: mt7915: simplify mt7915_mcu_send_message routine
dbba9b993300 mt76: mt7915: drop zero-length packet to avoid Tx hang
36a745d0f71c mt76: Fix queue ID variable types after mcu queue split
a4539760b0b1 mt7915: update the testmode support to the latest upstream patch
64bd6f87e4c2 mt7915: fix crash on failure in pci_set_dma_mask
c202ace409e0 mt76: remove unused variable q
d1b827781f84 mt76: mt7915: add partial add_bss_info command on testmode init
a897a69769f5 mt76: testmode: introduce dbdc support
b44472e99822 mt76: testmode: move mtd part to mt76_dev
45e27e6cdc12 mt76: mt7915: move testmode data from dev to phy
b6673b005770 mt76: mt7615: move testmode data from dev to phy
abdd471e9f2d mt76: mt7915: fix ht mcs in mt7915_mcu_get_rx_rate()
d679b56b9585 mt76: move mac_work in mt76_core module
36cd48ab4454 mt76: move chainmask in mt76_phy
89a6781ed045 mt76: mt7915: force ldpc for bw larger than 20MHz in testmode
3d0834e78005 mt76: testmode: add support to set user-defined spe index
cc05f4679667 mt76: testmode: add attributes for ipg related parameters
77b18b16fe16 mt76: testmode: make tx queued limit adjustable
6365a58573cb mt76: mt7915: split edca update function
e56282bf67f6 mt76: mt7915: add support for ipg in testmode
6fa642903e4e mt76: mt7915: calculate new packet length when tx_time is set in testmode
729ec5daeba5 mt76: mt7915: clean hw queue before starting new testmode tx
981443da5cf7 mt76: testmode: add a new state for continuous tx
4793fc9b3d48 mt76: mt7915: rework set state part in testmode
11a1e86e5946 mt76: mt7915: add support for continuous tx in testmode
364affef82fc mt76: mt7615: mt7915: disable txpower sku when testmode enabled
9fc19db51293 mt76: mt7915: simplify peer's TxBF capability check
6377b7f330be mt76: mt7915: add implicit Tx beamforming support
983091a40633 mt76: mt7915: fix MESH ifdef block
bbb7a9e77751 mt76: mt76u: fix NULL pointer dereference in mt76u_status_worker
a28a8dd2f7de mt76: usb: fix crash on device removal
9c312f2ce2c5 mt76: mt7915: rework mcu API
e6fe82acb111 mt76: mt7915: disable RED support in the WA firmware
25d7429bdc41 mt76: mt7915: fix eeprom parsing for DBDC
7a93026dd3dc mt76: mt7915: fix eeprom DBDC band selection
4c8a09cc45d0 tools: Set mode for new file /tmp/mt76-test-%s

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-14 14:06:00 +01:00
Daniel Golle d9d6988434 mac80211: improve error handling when adding hostapd config
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-14 00:52:50 +00:00
Etan Kissling 39add246c1 nf-conntrack: allow querying conntrack info in nfqueue
This allows libnetfilter_queue to access connection tracking information
by requesting NFQA_CFG_F_CONNTRACK. Connection tracking information is
provided in the NFQA_CT attribute.
CONFIG_NETFILTER_NETLINK_GLUE_CT enables the interaction between
nf_queue and nf_conntrack_netlink. Without this option, trying to access
connection tracking information results in "Operation not supported".

Signed-off-by: Etan Kissling <etan_kissling@apple.com>
2021-01-14 00:52:49 +00:00
Daniel Golle cbd67dbdcd mac80211: use hostapd PID returned from config_add
Use PID returned from config_add instead of querying procd when adding
configuration to hostapd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-10 19:18:29 +00:00
Pawel Dembicki 9919a1e7ea kernel: add hid-cp2112 driver support
This patch adds kernel module for Silicon Labs CP2112 HID USB to SMBus
Master Bridge. This is a HID device driver which registers as an i2c
adapter and gpiochip to expose these functions of the CP2112.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2021-01-07 22:30:34 -10:00
Robert Marko 6442b8cbc2 mac80211: Add wil6210 driver
This patch adds wil6210 driver for Wilocity/QCA based 802.11ad
PCI cards.

Driver uses cfg80211 and nl80211 but not mac80211.
Integration for UCI and LuCI will come in other patches.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-01-05 02:16:24 +00:00
Gary Cooper d140d18990 mac80211: add 802.11ad-support
This adds logic to properly populate defaults in /etc/config/wireless.

Signed-off-by: Gary Cooper <gaco@bitmessage.de>
2021-01-05 02:16:24 +00:00
Felix Fietkau 3a12c6679e mac80211: replace legacy minstrel with minstrel_ht, improve rate selection
Legacy minstrel is essentially unmaintained and was showing poor performance
Replace it with minstrel_ht and improve rate selection and sampling behavior

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-03 12:56:40 +01:00
Rui Salvaterra 0f14aec8fc kernel/modules: remove fake users from udptunnel{4,6}
Since we're now able to select CONFIG_NET_UDP_TUNNEL at will, drop the fake
dependencies.

This is a partial revert of commit d7e040f8bc
"kernel: add fake users for udptunnel and iptunnel modules".

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-01-01 19:56:00 +01:00
Stijn Segers 59b5c52a6b cryptodev-linux: bump to 1.11, fix build against kernel 5.10.
This patch bumps cryptodev-linux to the latest stable release (1.11) and fixes
compilation against the next LTS (and likely OpenWrt) kernel 5.10.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2021-01-01 19:55:59 +01:00
Felix Fietkau e1851720f1 hostapd: do not restart hostapd instance on wireless restarts
Add the flag that prevents netifd from killing hostapd/wpa_supplicant

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-31 14:26:00 +01:00
Rafał Miłecki dbb542f194 bcm63xx-cfe: update to the latest master
c0b3691 netgear: r8000p: add cferam file
ae870eb asus: gt-ac5300: add cferam file
424b57c sfr: neufbox-6v-foxconn-r0: update cferam file
81a2a8b sfr: neufbox-6v-foxconn-r0: add cferam file
2730361 sercomm: h500-s: add cferam file

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2020-12-28 23:09:17 +01:00
Álvaro Fernández Rojas da9beb070d ath10k-ct: update to latest version
Changelog:
- ath10k-ct: Fix invalid use of ath-cb struct

Runtime-tested on ath79 (TP-Link Archer C7 v2) and ipq806x (Netgear R7800).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2020-12-28 18:07:29 +01:00
Yousong Zhou 1508841b4e kmod-tcp-hybla: new module for hybla congestion control algorithm
Just the module and no default sysctl conf file is provided

Link: https://forum.openwrt.org/t/20-xx-tcp-hybla/83076
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-12-26 10:08:08 +08:00
Yousong Zhou d45b50389d kmod-tcp-bbr: use AutoProbe
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-12-26 10:08:08 +08:00
Yousong Zhou 72447181bc kmod-tcp-bbr: leave CONFIG_TCP_CONG_ADVANCED to target config
Since generic has the option set to y and other targets now inherit that
choice, there is no behaviour change

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-12-26 10:08:08 +08:00
Dobroslaw Kijowski 1a9b896d8b treewide: nuke DRIVER_11W_SUPPORT
As of hostapd upstream commit 7d2ed8ba "Remove CONFIG_IEEE80211W build parameter"
https://w1.fi/cgit/hostap/commit?id=7d2ed8bae86a31dd2df45c24b3f7281d55315482
802.11w feature is always enabled in the build time.

It doesn't make sense to opt-in 802.11w per driver as hostapd will always
be compiled with this feature enabled.

As suggested by Hauke Mehrtens, for now keep 11w enabled in build_features.h
for compatibility reasons. This option will be dropped when LuCI is adjusted.

Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com>
2020-12-23 16:36:08 +01:00
Paul Fertser 39c8bc4422 mac80211: fix MAC address allocations when local bit set on base addr
Testing with hwsim reveals two problems:

1. phyX/addresses has two addresses and mac80211_get_addr keeps
returning the last one when asked for more;

2. The base address has the local bit set and the operation unsets it.

Fix both.

Fixes: 866790fd82
Reported-by: Zero_Chaos
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2020-12-22 18:59:10 +01:00
Rosen Penev 57ad2a9421 fs/cifs: update module dependencies
0fdfef9aa7ee68ddd508aef7c98630cfc054f8d6 upstream removed CIFS_SMB311.
Kernels 4.19 and above do not have it. Currently only kernels 4.19 and
5.4 are in the tree.

The Kconfig file in the kernel has more selection that what is in here.
Add the rest and reorder based on upstream ordering.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-22 18:59:10 +01:00