openwrt/openwrt.git
2 years agohostapd: refresh patches
Felix Fietkau [Tue, 23 Nov 2021 16:28:44 +0000 (17:28 +0100)]
hostapd: refresh patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: fix a race condition on adding AP mode wds sta interfaces
Felix Fietkau [Wed, 20 Oct 2021 19:13:10 +0000 (21:13 +0200)]
hostapd: fix a race condition on adding AP mode wds sta interfaces

Both hostapd and netifd attempt to add a VLAN device to a bridge.
Depending on which one wins the race, bridge vlan settings might be incomplete,
or hostapd might run into an error and refuse to service the client.
Fix this by preventing hostapd from adding interfaces to the bridge and
instead rely entirely on netifd handling this properly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit da4be02fcd5d642954b1c9d9855d9e8d1e6205f4)
(cherry-picked from commit 63c01ad025981eaa841353dc0fc27e5017febe21)

2 years agohostapd: fix max_oper_chwidth setting for HE
Felix Fietkau [Tue, 18 May 2021 17:08:28 +0000 (19:08 +0200)]
hostapd: fix max_oper_chwidth setting for HE

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 2319cf4ec048e50a7d3885d19dc27663b45e258d)

2 years agohostapd: let netifd set bridge port attributes for snooping
Felix Fietkau [Wed, 1 Sep 2021 17:12:27 +0000 (19:12 +0200)]
hostapd: let netifd set bridge port attributes for snooping

Avoids race conditions on bridge member add/remove

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 17d19a7d4398789ae8da3daf8e0db167d58b0782)

2 years agohostapd: respect fixed channel BW in HE20 mode
Jesus Fernandez Manzano [Tue, 20 Jul 2021 10:13:49 +0000 (12:13 +0200)]
hostapd: respect fixed channel BW in HE20 mode

When using htmode 'HE20' with a radio mode that uses wpa-supplicant
(like mesh or sta), it will default to 40 MHz bw if disable_ht40 is not
set. This commit fixes this behaviour.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
(cherry-picked from commit af83e3ce0ff40dcecbe913676343bf86846294f7)

2 years agohostapd: make proxyarp work with libnl-tiny
Felix Fietkau [Wed, 28 Jul 2021 03:54:29 +0000 (05:54 +0200)]
hostapd: make proxyarp work with libnl-tiny

Remove a dependency on libnl3-route

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit ae1c5d0d6af60d0467899f5730a2f01aa72137f7)

2 years agohostapd: fix a segfault on sta disconnect with proxy arp enabled
Felix Fietkau [Wed, 28 Jul 2021 03:48:38 +0000 (05:48 +0200)]
hostapd: fix a segfault on sta disconnect with proxy arp enabled

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 5dd1bd5b80feb2dbaad8bdf93779acad74ed199a)

2 years agohostapd: make the snooping interface (for proxyarp) configurable
Felix Fietkau [Tue, 27 Jul 2021 18:28:58 +0000 (20:28 +0200)]
hostapd: make the snooping interface (for proxyarp) configurable

Use the VLAN interface instead of the bridge, to ensure that hostapd receives
untagged DHCP packets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 7b46377a0cd9d809a3c340358121de77f005d4cc)
(cherry-picked from commit f1b98fa4fa8a86a9daf2a7177235f28cbd7c53ef)

2 years agohostapd: configure inter-AP communication interface for 802.11r
Felix Fietkau [Fri, 4 Jun 2021 07:12:07 +0000 (09:12 +0200)]
hostapd: configure inter-AP communication interface for 802.11r

In setups using VLAN bridge filtering, hostapd may need to communicate using
a VLAN interface on top of the bridge, instead of using the bridge directly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 305c1b8d746b363f655c2f8d5a6497cca10a5d4e)

2 years agohostapd: add additional radius options
John Crispin [Tue, 18 May 2021 15:53:45 +0000 (17:53 +0200)]
hostapd: add additional radius options

- add functionality to configure RADIUS NAS-Id and Operator-Name
- add functionality to configure RADIUS accounting interval
- enable RADIUS "Chargeable User Identity"

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 3bd6c8c728e72444bdf23b8904ef9c52ebb46bb7)

2 years agohostapd: add extra options for hotspot 2.0 / interworking
Felix Fietkau [Tue, 18 May 2021 15:06:48 +0000 (17:06 +0200)]
hostapd: add extra options for hotspot 2.0 / interworking

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit c76f1d8330c679774eb568a423feb57d956b3ca4)

2 years agohostapd: fix civic location option
John Crispin [Tue, 6 Apr 2021 11:24:43 +0000 (13:24 +0200)]
hostapd: fix civic location option

Signed-off-by: John Crispin <john@phrozen.org>
(cherry-picked from commit 937dd79e2a4457a316d67b3091f6da7d14a99168)

2 years agohostapd: enable airtime policy for the -basic variants
Rui Salvaterra [Wed, 25 Nov 2020 23:03:48 +0000 (23:03 +0000)]
hostapd: enable airtime policy for the -basic variants

Airtime policy configuration is extremely useful in multiple BSS scenarios.
Since nowadays most people configure both private and guest networks (at
least), it makes sense to enable it by default, except for the most limited
of the variants.

Size of the hostapd-basic-openssl binary (mipsel 24Kc -O2):
543944 bytes (airtime policy disabled)
548040 bytes (airtime policy enabled)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Daniel Golle <daniel@makrotopia.org>
(cherry-picked from commit d38f4565828264731f2a9cfe646491fba80315d3)

2 years agohostapd: add patch for disabling automatic bridging of vlan interfaces
Felix Fietkau [Tue, 18 May 2021 10:50:17 +0000 (12:50 +0200)]
hostapd: add patch for disabling automatic bridging of vlan interfaces

netifd is responsible for handling that, except if the vlan bridge
was provided by the config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit cf45caeff16256f9db777e0e652ec3a38cd476a4)

2 years agomt76: update to the latest version
Felix Fietkau [Tue, 23 Nov 2021 16:05:45 +0000 (17:05 +0100)]
mt76: update to the latest version

624c681ef0c6 mt76: mt7921: enable VHT BFee capability
a27dfcb63ccf mt76: connac: fix UC entry is being overwritten
6b691e62470e mt76: connac: add mt76_connac_power_save_sched in mt76_connac_pm_unref
b14365bea586 mt76: mt7921: wake the device before dumping power table
82af16bddfc0 mt76: mt7921: make mt7921_set_channel static
b24598b1c1a9 mt76: connac: add mt76_connac_mcu_get_nic_capability utility routine
5954e3381ff9 mt76: testmode: move chip-specific stats dump before common stats
fd5b612f9aa4 mt76: mt7915: fix rx fcs error count in testmode
d9d26a294f7b mt76: connac: fix the maximum interval schedule scan can support
ed39c882f388 mt76: reduce rx buffer size to 2048
60f3d3adbba6 mt76: move mt76_get_next_pkt_id in mt76.h
67ed4d902c84 mt76: connac: check band caps in mt76_connac_mcu_set_rate_txpower
23c6ec49c000 mt76: make mt76_update_survey() per phy
5ca602fb9455 mt76: mt7915: introduce mt7915_mcu_set_txbf()
c13df42282e9 mt76: mt7915: improve MU stability
dee7dcddcaa0 mt76: use SPDX header file comment style
6fbd47153b3d mt76: mt7915: fix IEEE80211_HE_PHY_CAP7_MAX_NC for station mode
1b97dd1762ca mt76: mt7921: fix sta_state incorrect implementation
1b89053b5a6f mt76: mt7921: improve code readability for mt7921_update_txs
126649816785 mt76: mt7921: limit txpower according to userlevel power
a5163ac09be2 mt76: mt7921: introduce dedicated control for deep_sleep
e47c04db4d7e mt76: mt7921: fix kernel warning when reset on vif is not sta
063d3611662c mt76: mt7921: fix the coredump is being truncated
12bf28feba7c mt76: fix iv and CCMP header insertion
949327e76ee4 mt76: disable TWT capabilities for the moment
3530254c1bc9 mt76: mt7921: enable HE BFee capability
599e35f5d9b8 mt76: sdio: do not run mt76_txq_schedule directly
3b6d30c28946 mt76: mt7663s: rely on pm reference counting
529d55a79088 mt76: mt7663s: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path
ef44ff116ee2 mt76: mt7663s: enable runtime-pm
3a71e71a555e mt76: mt7615: set macwork timeout according to runtime-pm
925d96e443a4 mt76: mt7921: allow chip reset during device restart
63b114d84361 mt76: mt76x0e: fix device hang during suspend/resume
7f5ea5e2fd10 mt7915: check return code of sysfs_create_link
ca64a36908b7 mt76: fix mt76_rates for the multiple devices
f517116bf14c mt76: add mt76_default_basic_rate more devices can rely on
6c70b0100513 mt76: mt7921: fix mgmt frame using unexpected bitrate
c00a9a6b52af mt76: mt7915: fix mgmt frame using unexpected bitrate
0e4089949565 mt76: mt7921: fix endianness in mt7921_mcu_tx_done_event
55f314120ef2 mt76: mt7921: avoid unnecessary spin_lock/spin_unlock in mt7921_mcu_tx_done_event
541cd3276488 mt76: mt7915: fix endianness warning in mt7915_mac_add_txs_skb
817761e87c4f mt76: mt7921: fix endianness warning in mt7921_update_txs
b8eca74bbd7b mt76: mt7615: fix endianness warning in mt7615_mac_write_txwi
5e5e07f0def3 mt76: mt7915: fix potential overflow of eeprom page index
abda4cded420 mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()
535899f81a46 mt76: mt7915: fix calling mt76_wcid_alloc with incorrect parameter
adfa1b9a3ca0 mt76: connac: fix mt76_connac_gtk_rekey_tlv usage
2a65b105ea4a mt76: mt7921: enable aspm by default
c57158c82804 mt76: fix build error implicit enumeration conversion
41f607cab83c mt76: mt7921: fix survey-dump reporting
25b4f885a937 mt76: mt76x02: fix endianness warnings in mt76x02_mac.c
e63fadb87fe1 mt76: mt7915: report HE MU radiotap
135ef3e9827a mt76: mt7915: adapt new firmware to update BA winsize for Rx session
7118eacb7ce4 mt76: mt7921: add .set_sar_specs support
f1f6569da408 mt76: mt7915: fix an off-by-one bound check
f7da39467965 mt76 mt7915: take RCU read lock when calling ieee80211_bss_get_elem()
87af8e5c72b1 mt76: mt7915: cleanup -Wunused-but-set-variable
8e2d383fbd92 mt76: mt7915: report tx rate directly from tx status
ddce30977591 mt76: mt7915: remove mt7915_sta_stats
4ccd42029519 mt76: mt7921: introduce testmode support
bbebea7d6dc6 Revert "mt76: fix mt76_rates for the multiple devices"
74dedf9352c5 mt76: mt7615: fix skb use-after-free on mac reset
7201290eda43 mt76: mt7921: Fix out of order process by invalid event pkt
ca1b57e9971a mt76: mt7915: add a missing HT flag for GI parsing
4932c5d80153 of: net: pass the dst buffer to of_get_mac_address()
51d9eb3e6f52 mt76: mt7915: fix endianness warnings in mu radiotap
833ca13014ab mt76: mt7921: Add mt7922 support
8f8ed44d026e mt76: mt7915: add control knobs for thermal throttling
16f18bab6b11 mt76: mt7915: send EAPOL frames at lowest rate
affea639c586 mt76: mt7921: send EAPOL frames at lowest rate
ac00fed412d4 mt76: mt7915: fix potential overflow of eeprom page index [update]
e576ddb76dfa mt76: mt7915: switch proper tx arbiter mode in testmode
222847c3d5eb mt76: mt7915: fix bit fields for HT rate idx
d04814366c83 mt76: add support for setting mcast rate
4602acc9271a mt76: mt7921: fix dma hang in rmmod
ec2cf3bf96fd mt76: connac: fix GTK rekey offload failure on WPA mixed mode
2fdb9d621431 mt76: connac: add support for limiting to maximum regulatory Tx power
489ace63d42c mt76: mt7921: get rid of monitor_vif
22da8d28fcc8 mt76: mt7921: get rid of mt7921_mac_set_beacon_filter
c94130519786 mt76: mt7921: introduce mt7921_mcu_set_beacon_filter utility routine
51cff39d7ad3 mt76: overwrite default reg_ops if necessary
da11c1c6edef mt76: mt7615: move mt7615_mcu_set_p2p_oppps in mt76_connac module
47f50b0aa4b8 mt76: mt7921: report HE MU radiotap
4f48ba4b0254 mt76: mt7915: checkpatch cleanup
bc7ee7d7bdea mt76: mt7915: add HE-LTF into fixed rate command
6a19e40820aa mt76: mt7921: continue to probe driver when fw already downloaded
8b3d8e2de084 mt76: mt7921: fix firmware usage of RA info using legacy rates
17305a54b166 mt76: mt7921: fix kernel warning from cfg80211_calculate_bitrate
801c15577293 mt76: mt7921: fix endianness warnings in mt7921_mac_decode_he_mu_radiotap
0182a5b99a7a mt76: mt7915: update mac timing settings
e2ee9d0a33ed mt76: use IEEE80211_OFFLOAD_ENCAP_ENABLED instead of MT_DRV_AMSDU_OFFLOAD
fa6504aceb4f Revert "mt76: mt7915: checkpatch cleanup"
56b842b72a72 mt76: mt7915: fix wmm index on DBDC cards
8044311f5de5 mt76: mt7915: fix potential NPE in TXS processing
28da4baec7c5 mt76: mt7915: fix he_mcs capabilities for 160mhz
f7088ebe7452 mt76: mt7915: add LED support
ee019046284d mt76: mt7915: introduce bss coloring support
9848094e4bb5 mt76: mt7921: Fix fall-through warning for Clang
5710d0643418 mt76: add a bound check in mt76_calculate_default_rate()
a509cf2b654e mt76: mt7921: move mt7921_queue_rx_skb to mac.c
5a0f2382fcfe mt76: mt7915: rework debugfs queue info
62ffc31f4d7b mt76: mt7915: rename debugfs tx-queues
4750b5c918e5 mt76: mt7921: always wake device if necessary in debugfs
ac6adf74b3f2 mt76: mt7921: update mib counters dumping phy stats
eb75b9266ce6 net:wireless:mt76: fix boolreturn.cocci warnings
d7c4698435b3 mt76: mt7921: fix the inconsistent state between bind and unbind
9dcfba3169c4 mt76: switch from 'pci_' to 'dma_' API
d8b5e42c9a73 mt76: fill boottime_ns in Rx path
8ee6446075f2 mt76: disable BH around napi_schedule() calls
e17d730bf2f6 mt76: mt7915: add LED support [update to v3]
80fe40c9457e mt76: mt7915: enable configured beacon tx rate
c8f0d1d81d05 mt76: mt7915: fix hwmon temp sensor mem use-after-free
3b9ba7e02076 mt76: mt7615: fix hwmon temp sensor mem use-after-free
5e82eceb45cb mt76: mt7921: start reworking tx rate reporting
eb66b5c9ff77 mt76: mt7921: add support for tx status reporting
c8010f170e76 mt76: mt7921: report tx rate directly from tx status
4dc7f3db572b mt76: mt7921: remove mcu rate reporting code
db89c6f86724 mt76: mt7921: remove mt7921_sta_stats
6bb8b4267dbe mt76: move spin_lock_bh to spin_lock in tasklet
0eacf41985da mt76: mt7915: honor all possible error conditions in mt7915_mcu_init()
4dfff296ee6e mt76: mt7915: fix possible infinite loop release semaphore
537ed88dd2d0 mt76: mt7921: robustify hardware initialization flow
e0b846159221 mt76: mt7921: fix retrying release semaphore without end
c55dedcea268 mt76: mt7915: add ethtool stats support
d1d5e8cd3a3e mt76: mt7915: add tx stats gathered from tx-status callbacks
1687189d68b7 mt76: mt7915: add some per-station tx stats to ethtool
f4dde5f765af mt76: mt7915: add tx mu/su counters to mib
9752bf0643c9 mt76: mt7915: add more MIB registers
4727415017c9 mt76: mt7915: add mib counters to ethtool stats
4ca80a749e7f mt76: connac: set 6G phymode in mt76_connac_get_phy_mode{,v2}
3f2a5d39631e mt76: connac: enable 6GHz band for hw scan
817a41826bd7 mt76: connac: add 6GHz support to mt76_connac_mcu_set_channel_domain
a6ab81c21080 mt76: connac: set 6G phymode in single-sku support
ca4f47028a44 mt76: connac: add 6GHz support to mt76_connac_mcu_sta_tlv
d2e192ea81e2 mt76: connac: add 6GHz support to mt76_connac_mcu_uni_add_bss
c3dd12b4c8ae mt76: connac: enable hw amsdu @ 6GHz
91ed2b256c20 mt76: add 6GHz support
de8c4f92621f mt76: mt7921: add 6GHz support
f143aedc1d57 mt76: introduce packet_id idr
bcc8d9e03a5d mt76: remove mt76_wcid pointer from mt76_tx_status_check signature
ccbd84763153 mt76: substitute sk_buff_head status_list with spinlock_t status_lock
69bb59df894c mt76: schedule status timeout at dma completion
03a992645310 mt76: support reading EEPROM data embedded in fdt
75615480b3fe mt76: introduce __mt76_mcu_send_firmware routine
e8e2eae41f94 mt76: drop MCU header size from buffer size in __mt76_mcu_send_firmware
4c455e8b1a20 mt76: mt7915: introduce __mt7915_get_tsf routine
9d49c611a2d7 mt76: mt7915: introduce mt7915_mcu_twt_agrt_update mcu command
f44ca79c9aed mt76: mt7915: introduce mt7915_mac_add_twt_setup routine
2f9555a2f18f mt76: mt7915: enable twt responder capability
440e2db8d541 mt76: mt7915: add twt_stats knob in debugfs
eb5f640f8afa mt76: debugfs: improve queue node readability
53d7eb3b4884 mt76: mt7615: fix monitor mode tear down crash
2aa3d4414826 mt76: mt7921: add delay config for sched scan
47e8e96e8e4d mt76: use a separate CCMP PN receive counter for management frames
5560b08f8e2d mt76: do not access 802.11 header in ccmp check for 802.3 rx skbs
1af0242d1241 mt76: mt7915: replace a 64 bit divsion with a call to div_u64_rem
83598c2e872f mt76: avoid possible infinite loop in mt76_tx_status_check
ebf5b2336591 mt7615/mt7915: fix hwmon device name
8d12f9ed275d mt76: mt7615: mt7622: fix ibss and meshpoint
e7883cdc0b4e mt76: mt7915: improve code readability in mt7915_mcu_sta_bfer_ht
831d5967abb9 wireless: fix spelling of A-MSDU in HE capabilities
f09cb04be261 wireless: align some HE capabilities with the spec
0eeba8f2952d wireless: align HE capabilities A-MPDU Length Exponent Extension
655a6c65b8a7 mt76: mt7915: introduce mt7915_mcu_beacon_check_caps()
4440025d0ba9 mt76: mt7915: fix txbf starec TLV issues
87d2fb6fbff5 mt76: mt7915: improve starec readability of txbf
53c6a3cb7f6b mt76: mt7915: fix sta_rec_wtbl tag len
f517845e4f28 mt76: mt7915: rework starec TLV tags
1df017bc39a3 mt76: mt7915: fix muar_idx in mt7915_mcu_alloc_sta_req()
6724b0a9a748 mt76: mt7915: set VTA bit in tx descriptor
f1f505cbbb30 mt76: mt7915: set muru platform type
8c9d4b38d258 mt76: mt7915: remove dead code in mt7915_get_et_stats
d0ccc4297935 mt76: rely on phy pointer in mt76_register_debugfs_fops routine signature
0af0af82bb97 mt76: mt7915: introduce mt76 debugfs sub-dir for ext-phy
10e85d62f213 mt76: mt7915: improve code readability for xmit-queue handler
b6051f7713d2 mt76: sdio: export mt76s_alloc_rx_queue and mt76s_alloc_tx routines
9a97c38a309d mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb
c02847c05884 mt76: mt7921: get rid of unused variable in mt7921_mac_tx_free
60dd47a0a62e mt76: mt7915: remove dead code in debugfs code
ce74fc020d81 mt76: mt7921: add MU EDCA cmd support
c062f6920356 mt76: mt7921: refactor mac.c to be bus independent
bfa909c833e8 mt76: mt7921: refactor dma.c to be pcie specific
6556bddf26d2 mt76: mt7921: refactor mcu.c to be bus independent
1c8418207c86 mt76: mt7921: refactor init.c to be bus independent
6cf8248c1a44 mt76: mt7921: add MT7921_COMMON module
77600b0c10ac mt76: connac: move mcu reg access utility routines in mt76_connac_lib module
65362a00d07d mt76: mt7663s: rely on mcu reg access utility
956206bb55c3 mt76: mt7921: make all event parser reusable between mt7921s and mt7921e
f0dedcf6aaf0 mt76: mt7921: use physical addr to unify register access
5079d5b0b13c mt76: sdio: move common code in mt76_sdio module
26257594398b mt76: sdio: introduce parse_irq callback
e353424f1b07 mt76: sdio: extend sdio module to support CONNAC2
ddab3dd25f94 mt76: connac: extend mcu_get_nic_capability
b2d9a1748a41 mt76: mt7921: rely on mcu_get_nic_capability
e6ce5d9cbda0 mt76: mt7921: refactor mt7921_mcu_send_message
ce3706a65ccd mt76: mt7921: introduce mt7921s support
3143118baf53 mt76: mt7921s: add reset support
645eac64bece mt76: mt76x0: correct VHT MCS 8/9 tx power eeprom offset
d54796787cb7 mt76: move mt76_sta_stats in mt76.h
094e085abf5a mt76: move mt76_ethtool_worker_info in mt76 module
f80ab6dde63d mt76: mt7915: run mt7915_get_et_stats holding mt76 mutex
4a11cb67dc27 mt76: mt7915: move tx amsdu stats in mib_stats
486da6fa2512 mt76: do not reset MIB counters in get_stats callback
d8837b7c8dcd mt76: mt7921: add some more MIB counters
5ffe086fcd1b mt76: mt7921: introduce stats reporting through ethtool
69154ae23f6b mt76: mt7921: add sta stats accounting in mt7921_mac_add_txs_skb
4b65fbc4e203 mt76: mt7921: move tx amsdu stats in mib_stats
35b8025f466b mt76: mt7921: add per-vif counters in ethtool
cfbbd861eb12 mt76: mt7915: enable HE UL MU-MIMO
a0b94987df80 mt76: mt7915: rework mt7915_mcu_sta_muru_tlv()
5fbb686e9c0c mt76: mt7915: fix missing HE phy cap
b649678c18ca mt76: mt7915: change max rx len limit of hw modules
9d288d7c0c73 mt76: mt7615: apply cached RF data for DBDC
4d2e81d9ecab mt76: mt7915: remove mt7915_mcu_add_he()
2c8c3bcd766c mt76: mt7915: rework .set_bitrate_mask() to support more options
577d45f6e4a0 mt76: mt7915: rework debugfs fixed-rate knob
b68af355f707 mt76: mt7915: fix endiannes warning mt7915_mcu_beacon_check_caps
b52adf981561 mt76: mt7915: add WA firmware log support
ed3d8569c400 mt76: mt7915: add debugfs knobs for MCU utilization
0f49a22314a5 mt76: mt7921: disable 4addr capability
754d4a37ab71 mt76: mt7921: fix mt7921s Kconfig
f81f42fe875f mt76: Print error message when reading EEPROM from mtd failed
fd25a550965d mt76: Make use of the helper macro kthread_run()
1d01257662a6 wireless: mediatek: mt7921: fix Wformat build warning
f6bde7ba82ee mt76: connac: fix unresolved symbols when CONFIG_PM is unset
5dd32475c859 mt76: mt7915: get rid of mt7915_mcu_set_fixed_rate routine
f5cfaaff3dd1 mt76: mt7921: drop offload_flags overwritten
f5ad840ca5c0 mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()
29a8a08827b1 mt76: mt7921: fix MT7921E reset failure
f44685f2faee mt76: mt7915: fix return condition in mt7915_tm_reg_backup_restore()
ae8e02ddd2b0 mt76: mt7915: fix SMPS operation fail
e814e15716b0 mt76: reverse the first fragmented frame to 802.11
c9bca3ed9566 mt76: mt7915: fix NULL pointer dereference in mt7915_get_phy_mode
dd054b7e16e7 mt76: only set rx radiotap flag from within decoder functions
f1520c9bb332 mt76: mt7915: add default calibrated data support
0c489ea2865a mt76: testmode: add support to set MAC
91c5da3d0a7c mt76: mt7921: add support for PCIe ID 0x0608/0x0616
ca39b4bbc227 mt76: debugfs: fix queue reporting for mt76-usb
00b6f497e2e8 mt76: mt7921: introduce 160 MHz channel bandwidth support
c1574466c733 mt76: fix possible OOB issue in mt76_calculate_default_rate
9680a17b0aed mt76: mt7921: fix possible NULL pointer dereference in mt7921_mac_write_txwi
78fc0dcdcef0 mt76: connac: fix a theoretical NULL pointer dereference in mt76_connac_get_phy_mode
05953e7d6fe7 mt76: mt7615: remove dead code in get_omac_idx
39f6c37127c1 mt76: connac: remove PHY_MODE_AX_6G configuration in mt76_connac_get_phy_mode
526591b203f3 mt76: do not pass the received frame with decryption error
256789bb400f mt76: fix the wiphy's available antennas to the correct value
fa187f5cf068 mt76: fix timestamp check in tx_status
11ebf11a3587 mt76: mt7915: fix the wrong SMPS mode
8c69b815ee7f mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in mt7921_config
bc6798f729f9 mt76: move sar utilities to mt76-core module
b1d0ad2e74fe mt76: mt76x02: introduce SAR support
f0a5b1118fa4 mt76: mt7915: fix decap offload corner case with 4-addr VLAN frames
67f93aa9a207 mt76: mt7615: fix decap offload corner case with 4-addr VLAN frames
46261d4bbfb5 mt76: fix possible pktid leak
a7fdd272efee mt76: mt7921: move mt76_connac_mcu_set_hif_suspend to bus-related files
3d9e13f567a4 mt76: mt7921s: fix the device cannot sleep deeply in suspend
99225b985cbc mt76: mt7615: fix unused tx antenna mask in testmode

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(sync with master commit 5aa62cb7996803fa256a7b9f5beef818a7fe34d8)

2 years agomac80211: fix crash in drivers relying on mac80211 retransmitting packets for powersa...
Felix Fietkau [Tue, 23 Nov 2021 12:18:03 +0000 (13:18 +0100)]
mac80211: fix crash in drivers relying on mac80211 retransmitting packets for powersave clients

This showed up primarily on rt2x00

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit d1ea575baa1b53bb477a020974afcec1b1193edc)

2 years agomac80211: backport a few trivial patches
Felix Fietkau [Tue, 19 Oct 2021 09:19:26 +0000 (11:19 +0200)]
mac80211: backport a few trivial patches

No functional changes, just some renames to make it easier to keep mt76 in
sync with upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit e62c5504701c7a665c9cf89ddbcb062f5ade6e37)
(cherry-picked from commit a889dcd3f21e50dc3e7f827ff0e486020562a6f8)

2 years agomac80211: backport AP mode TWT support
Felix Fietkau [Mon, 11 Oct 2021 09:48:49 +0000 (11:48 +0200)]
mac80211: backport AP mode TWT support

Required for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 978e822db354daf974811f2717c6013fa3eb8079)
(cherry-picked from commit af9d31aacc286786a8765a44c2000d2eba02e61c)

2 years agomac80211: backport support for BSS color changes
Felix Fietkau [Fri, 24 Sep 2021 14:53:33 +0000 (16:53 +0200)]
mac80211: backport support for BSS color changes

This is needed for an upcoming mt76 update
also sync iw nl80211 with kernel backports

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 2bfac61483db32f8bd1f5b38702b39f206256265)
(cherry-picked from commit 36019ed5893cd11c86a7dbedca1c6a055654a3c0)

2 years agomac80211: add missing change for encap offload on devices with sw rate control
Felix Fietkau [Mon, 16 Aug 2021 12:10:19 +0000 (14:10 +0200)]
mac80211: add missing change for encap offload on devices with sw rate control

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 0f6887972adc48449a1f5efaa143fa3f740a8c36)
(cherry-picked from commit 6f2044c2d74dd0ae2cee3b25b2ac084513c0536a)

2 years agomac80211: backport SAR power limit support
Felix Fietkau [Wed, 14 Jul 2021 15:14:35 +0000 (17:14 +0200)]
mac80211: backport SAR power limit support

Needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 890bf06cef20015e2cec0274c87a9a2232691b6b)

2 years agomac80211: merge the virtual time based airtime scheduler
Felix Fietkau [Tue, 6 Jul 2021 12:12:11 +0000 (14:12 +0200)]
mac80211: merge the virtual time based airtime scheduler

Improves airtime fairness, especially for devices with larger firmware buffers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit a5888ad6b33840d913438ce664c0e7da7e7f53e6)

2 years agomac80211: set beamformer/beamformee number of antennas in VHT caps
Felix Fietkau [Mon, 22 Nov 2021 12:04:03 +0000 (13:04 +0100)]
mac80211: set beamformer/beamformee number of antennas in VHT caps

Without this, beamforming is probably not working

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit e2c4998f6dca7d9b74a8b01762040ff2c5e38fd7)

2 years agomac80211: fix IBSS/adhoc mode for brcmfmac
Bastian Bittorf [Sun, 19 Sep 2021 11:19:36 +0000 (11:19 +0000)]
mac80211: fix IBSS/adhoc mode for brcmfmac

On systems using brmcfmac (e.g. Raspberry Pi Zero W) without this fix,
the final setup-call:
iw dev wlan0 ibss join ...

fails with returncode 161 and message:
"command failed: Not supported (-95)"

So this patch calls an explicit:
iw dev wlan0 set type ibss
just prior to the 'ibss join' command.

I have tested several ath9k and mt76xx devices
with different revisions: this patch does not harm.

please also apply to stable branch.

Signed-off-by: Bastian Bittorf <bb@npl.de>
(cherry-picked from commit ea5fce3f4616df3e4331e6b4e8e79767bded442c)

2 years agomac80211: allow retry of wifi setup if an iw interface add command fails
Felix Fietkau [Thu, 30 Sep 2021 09:31:19 +0000 (11:31 +0200)]
mac80211: allow retry of wifi setup if an iw interface add command fails

In some cases, spurious failures might be cleared by teardown and retry

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 42dda0ed3e941bc36661e29b990e2ee2adf7f508)

2 years agomac80211: fix HT40 mode for 6G band
Felix Fietkau [Mon, 16 Aug 2021 08:05:14 +0000 (10:05 +0200)]
mac80211: fix HT40 mode for 6G band

The channel offset used for VHT segment calculation was missing for HT

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit a0d81ba0d5e9d055c55b5e478cb913c217122317)

2 years agomac80211: fix processing HE capabilities (FS#3871)
Felix Fietkau [Thu, 17 Jun 2021 09:04:27 +0000 (11:04 +0200)]
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 49ef4dbee519e006bb998de11e3bdf1c10c43e6a)

2 years agomac80211: fix typo
Felix Fietkau [Thu, 3 Jun 2021 03:38:53 +0000 (05:38 +0200)]
mac80211: fix typo

Remove stray parenthesis

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 2cd1a108290f48fd35373f91056c05277c289687)

2 years agomac80211: do not enable VHT in the default config on 2.4 GHz
Felix Fietkau [Wed, 2 Jun 2021 05:45:31 +0000 (07:45 +0200)]
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 42a99b18ff23fa768a6ae5f1076f15cbfa494f24)

2 years agomac80211: fix detecting VHT capabilities when generating the default config
Felix Fietkau [Wed, 2 Jun 2021 05:42:40 +0000 (07:42 +0200)]
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 3518b793a2f2293e7e9124b5beae7b09887c5e32)

2 years agomac80211: add more HE capabilities
Felix Fietkau [Tue, 25 May 2021 09:10:51 +0000 (11:10 +0200)]
mac80211: add more HE capabilities

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit fbd6f099f50e77d2bb95708c62e86a358779251a)

2 years agomac80211: fix center freq selection for 6 GHz
Felix Fietkau [Tue, 25 May 2021 08:57:01 +0000 (10:57 +0200)]
mac80211: fix center freq selection for 6 GHz

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 8d79915327b7b9ed221f513589281328e4fdc6ef)

2 years agomac80211: set hostapd op_class for 6 GHz
Felix Fietkau [Mon, 24 May 2021 16:45:57 +0000 (18:45 +0200)]
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 c8bcdd561909034a14cbfd785e13848cbd5f5e50)

2 years agomac80211: rework default config script
Felix Fietkau [Mon, 24 May 2021 12:56:02 +0000 (14:56 +0200)]
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 8504212f65865449dd6b9ed9daa0ba9781f8f287)

2 years agomac80211: make use of the new 'band' option
Felix Fietkau [Mon, 24 May 2021 12:55:01 +0000 (14:55 +0200)]
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 8b8c1cb09bf2259e647a15d0c881b5dea15330da)

2 years agonetifd: update to the master branch
Felix Fietkau [Tue, 23 Nov 2021 16:55:12 +0000 (17:55 +0100)]
netifd: update to the master branch

Sync with commit 4eba313065f372ef0edf4abdbe00538fdbe7538f

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agoiw: enable print wpa ie for scan
Jianhui Zhao [Mon, 2 Aug 2021 07:08:46 +0000 (07:08 +0000)]
iw: enable print wpa ie for scan

This increases the size of the iw_5.9-8fab0c9e-3_mips_24kc.ipk from
41166 to 41942 bytes by 776 bytes.

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
(cherry-picked from commit 9df7eadcfd3129cecfb30ec78a43ae9b3175869e)

2 years agonetifd: fix deletion of ip tunnels (FS#4058)
Hans Dedecker [Wed, 17 Nov 2021 19:43:19 +0000 (20:43 +0100)]
netifd: fix deletion of ip tunnels (FS#4058)

a68e805 system-linux: fix deletion of ip tunnels (FS#4058)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2 years agouboot-lantiq: danube: fix hanging lzma kernel uncompression
Mathias Kresin [Fri, 5 Nov 2021 09:41:26 +0000 (10:41 +0100)]
uboot-lantiq: danube: fix hanging lzma kernel uncompression

At least since gcc 7.3.0 (OpenWrt 18.06) lwr/lwl are used in the
assembly of LzmaProps_Decode. While the decission made by the compiler
looks perfect fine, it triggers some obscure hang on lantiq danube-s
v1.5 with MX29LV640EB NOR flash chips.

Only if the offset 1 is used, the hang can be observed. Using any other
offset works fine:

  lwl s0,0(a1) - s0 == 0x6d000080
  lwl s0,1(a1) - hangs
  lwl s0,2(a1) - s0 == 0x0080xxxx
  lwl s0,3(a1) - s0 == 0x80xxxxxx

It isn't clear whether it is a limitation of the flash chip, the EBU or
something else.

Force 8bit reads to prevent gcc optimizing the read with lwr/lwl
instructions.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2 years agowireless-regdb: update to version 2021.08.28
Christian Lamparter [Sat, 23 Oct 2021 16:08:51 +0000 (18:08 +0200)]
wireless-regdb: update to version 2021.08.28

e983a25 Update regulatory rules for Ecuador (EC)
a0bcb88 wireless-regdb: Update regulatory rules for Norway (NO) on 6 and 60 GHz
cdf854d wireless-regdb: Update regulatory rules for Germany (DE) on 6GHz
86cba52 wireless-regdb: reduce bandwidth for 5730-5850 and 5850-5895 MHz in US
6fa2384 wireless-regdb: remove PTMP-ONLY from 5850-5895 MHz for US
9839e1e wireless-regdb: recent FCC report and order allows 5850-5895 immediately
42dfaf4 wireless-regdb: update 5725-5850 MHz rule for GB

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit dbb4c47798b17112cb1eed2a309cdefd33b5f193)

2 years agokernel: bump 5.4 to 5.4.158
Hauke Mehrtens [Sat, 6 Nov 2021 19:29:39 +0000 (19:29 +0000)]
kernel: bump 5.4 to 5.4.158

Removed upstreamed:
  generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch

All others updated automatically.

Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agobase-files: chmod 1777 /var/lock
Deomid Ryabkov [Sat, 23 Oct 2021 13:22:39 +0000 (16:22 +0300)]
base-files: chmod 1777 /var/lock

Per FHS 3.0, /var/lock is the location for lock files [1].
However its current permissions (755) are too restrictive
for use by unprivileged processes.
Debian and Ubuntu set them to 1777, and now so do we.

[1] <https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlockLockFiles>

Signed-off-by: Deomid Ryabkov <rojer@rojer.me>
[fixed typo in commit message, had to remove "rojer" due to git hooks]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 430f69194388ad6a7826a51e0e2b2dd478e27f0f)

2 years agolibpcap: add rpcapd as package
Stephan Schmidtmer [Tue, 10 Aug 2021 20:21:30 +0000 (20:21 +0000)]
libpcap: add rpcapd as package

This enables building of rpcapd and adds it as a package.

It is a daemon that allows remote packet capturing from another machine.
E.g. Wireshark can talk to it using the Remote Capture Protocol (RPCAP).
https://www.tcpdump.org/manpages/rpcapd.8.html

Compile and run tested:
OpenWrt 21.02.0-rc4 r16256-2d5ee43dc6 on x86/64 and mvebu/cortexa9

Signed-off-by: Stephan Schmidtmer <hurz@gmx.org>
(cherry picked from commit 891c8676a1602d31adf3ab9f913664ae0d3b4029)

2 years agogpio-button-hotplug: convert to gpio descriptor (gpiod_) API
Christian Lamparter [Thu, 5 Aug 2021 13:29:25 +0000 (15:29 +0200)]
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 2b0378cf9f3163bac29fa9946b3aa1607fc03802)

2 years agobcm4908: fix calculation of new cferam index
Sungbo Eo [Sun, 1 Aug 2021 13:17:04 +0000 (22:17 +0900)]
bcm4908: fix calculation of new cferam index

The arithmetic expansion fails when idx becomes a two digit number.
Fix this by relying on expr command.

root@OpenWrt:/# echo $(((028 + 0) % 1000))
/bin/ash: arithmetic syntax error
root@OpenWrt:/# echo $(($(expr 028 + 0) % 1000))
28

Fixes: a6a0b252baa6 ("bcm4908: add sysupgrade support")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit f4323538501d58298f4df73a034a51375a477cfc)

2 years agoramips: minew g1-c: Allow dynamic RAM sizes
Bruno Randolf [Mon, 25 Oct 2021 10:38:15 +0000 (11:38 +0100)]
ramips: minew g1-c: Allow dynamic RAM sizes

Allow RAM size to be passed thru U-Boot. There are 128MB and 64MB
versions of Minew G1-C. This is also in line with the behaviour of
most other RAMIPS boards.

Signed-off-by: Bruno Randolf <br1@einfach.org>
2 years agoiproute2: m_xt.so depends on dynsyms.list
Roman Yeryomin [Fri, 3 Sep 2021 14:31:11 +0000 (17:31 +0300)]
iproute2: m_xt.so depends on dynsyms.list

When doing parallel build on a fast machine with bottleneck in i/o,
m_xt.so may start linking faster than dynsyms.list gets populated,
resulting in error:

ld:dynsyms.list:0: syntax error in dynamic list

Fix this by adding dynsyms.list as make dependency to m_xt.so
Described also here:
https://bugs.openwrt.org/index.php?do=details&task_id=3353

Change from v1:
- add dynsysms.list dependancy only when shared libs are enabled

Signed-off-by: Roman Yeryomin <roman@advem.lv>
Fixes: FS#3353
(cherry-picked from commit edd53df16843a0a6380920ed17b88bfe7d26d71b)

2 years agoOpenWrt v21.02.1: revert to branch defaults
Hauke Mehrtens [Mon, 25 Oct 2021 19:45:09 +0000 (21:45 +0200)]
OpenWrt v21.02.1: revert to branch defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoOpenWrt v21.02.1: adjust config defaults v21.02.1
Hauke Mehrtens [Mon, 25 Oct 2021 19:44:54 +0000 (21:44 +0200)]
OpenWrt v21.02.1: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoipq40xx: ar40xx: reset port status register
David Bauer [Fri, 13 Aug 2021 21:28:44 +0000 (23:28 +0200)]
ipq40xx: ar40xx: reset port status register

This resolves incosnsitencies of the configured RX / TX flow control
modes between different boards or bootloaders.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 4d81f087715524994448ecaefd3ca87c8ba7e0a3)

2 years agowolfssl: fix compile when enable-devcrypto is set
Ivan Pavlov [Fri, 15 Oct 2021 05:11:10 +0000 (08:11 +0300)]
wolfssl: fix compile when enable-devcrypto is set

fixing linking error when --enable-devcrypto=yes
fixes: 7d92bb050961 wolfssl: update to 4.8.1-stable

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
(cherry picked from commit be3e260f92643a841f4f83b03cbb07b9a26cff66)

2 years agowolfssl: remove --enable-sha512 configure switch
Andre Heider [Sat, 2 Oct 2021 08:40:00 +0000 (10:40 +0200)]
wolfssl: remove --enable-sha512 configure switch

It's the default anyway and this just looks confusing, as if it wasn't.

Switch to AUTORELEASE while at it.

The binary size is unchanged.

Signed-off-by: Andre Heider <a.heider@gmail.com>
(cherry picked from commit 7cb5af30f48d6788cd471138820a772610a7f8e0)

2 years agowolfssl: always build with --enable-reproducible-build
Andre Heider [Sat, 2 Oct 2021 08:50:49 +0000 (10:50 +0200)]
wolfssl: always build with --enable-reproducible-build

This gates out anything that might introduce semantically frivolous jitter,
maximizing chance of identical object files.

The binary size shrinks by 8kb:
1244352 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f
1236160 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f

Signed-off-by: Andre Heider <a.heider@gmail.com>
(cherry picked from commit c76300707e8d705d9efc7ed4bb1b7449d0a5fe00)

2 years agoath79: mikrotik: use 64 KiB SPI NOR erase sectors
Roger Pueyo Centelles [Tue, 31 Aug 2021 14:45:17 +0000 (16:45 +0200)]
ath79: mikrotik: use 64 KiB SPI NOR erase sectors

This patch removes CONFIG_MTD_SPI_NOR_USE_4K_SECTORS from the default
symbols for the ath79/mikrotik target.

MikroTik devices hold some of their user-configurable settings in the
soft_config partition, which is typically sized 4 KiB, of the SPI NOR
flash memory. Previously, in the ar71xx target, it was possible to use
64 KiB erase sectors but also smaller 4 KiB ones when needed. This is
no longer the case in ath79 with newer kernels so, to be able to write
to these 4 KiB small partitions without erasing 60 KiB around, the
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS symbol was added to the defaults.
However, this ended up making sysupgrade images which were built with
64 KiB size blocks not to keep settings (e.g., the files under
/etc/config/) over the flashing process.

Using 4 KiB erase sector size on the sysupgrade images (by setting
BLOCKSIZE = 4k) allows keeping settings over a flashing process, but
renders the process terribly slow, possibly causing a user to
mistakenly force a manual device reboot while the process is still on-
going. Instead, ditching the 4 KiB erase sectors for the default
64 KiB erase size provides normal SPI write speed and sysupgrade times,
at the expense of not being able to modify the soft_config partition
(which is rarely a required thing).

An OpenWrt patch for MTD_SPI_NOR_USE_4K_SECTORS_LIMIT may once have
allowed to use different per-partition erase sector sizes. Due to
changes on recent kernels it now only works on a per-device basis.
Also, partial eraseblock write can be performed in ath79 with kernels
5.4 and lower, by copying the blocks from the 64 KiB, erasing the whole
sector and restoring those blocks not meant to be modified. A kernel
bump had that patch broken for a long time, but got fixed in bf2870c.

Note: the settings in the soft_config partition can be reset to their
defaults by holding the reset button for 5 seconds (and less than 10
seconds) at device boot.

Fixes: FS#3492 (sysupgrade […] loses settings...)
Fixes: a66eee63368e (ath79: add mikrotik subtarget)
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
(cherry picked from commit 68d91f08edd0efd47841a2e53d3437d570a61612)

2 years agowolfssl: update to 4.8.1-stable
Ivan Pavlov [Tue, 14 Sep 2021 15:06:32 +0000 (12:06 -0300)]
wolfssl: update to 4.8.1-stable

Changes from 4.7.0:
  Fix one high (OCSP verification issue) and two low vulnerabilities
  Improve compatibility layer
  Other improvements and fixes

For detailed changes refer to https://github.com/wolfSSL/wolfssl/releases

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
(cherry picked from commit 7d92bb0509615550b98e2dc71091073c8258d564)
[Added patch to allow compilation with libtool 2.4]
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2 years agowolfssl: fix build with GCC 10 on 32 x86 targets
Stijn Tintel [Tue, 14 Sep 2021 15:06:31 +0000 (12:06 -0300)]
wolfssl: fix build with GCC 10 on 32 x86 targets

Backport upstream patch to fix build with GCC 10 on 32 x86 targets.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 718a4f47806da8f68cb8f1fe2ebecf403e14ae96)

2 years agolayerscape: Add missing config option
Hauke Mehrtens [Fri, 22 Oct 2021 19:30:02 +0000 (21:30 +0200)]
layerscape: Add missing config option

This option is not set when building the target.
In master this is also unset.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agolayerscape: Fix build in dtb
Hauke Mehrtens [Fri, 22 Oct 2021 20:09:16 +0000 (22:09 +0200)]
layerscape: Fix build in dtb

This fixes a kernel build problem.
The removed parts of the patch are already applied upstream.

Fixes: b4ed8a92751f ("kernel: bump 5.4 to 5.4.154")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 9501ce909f54b87dab95f17c0408a4962365e130)

2 years agoncurses: add tmux terminfo
Jitao Lu [Sun, 17 Oct 2021 06:16:57 +0000 (14:16 +0800)]
ncurses: add tmux terminfo

They're preferred terminal descriptions for tmux, with additional support to
some special characters and italic fonts. More info can be found at:
https://github.com/tmux/tmux/wiki/FAQ

Fixes: FS#3404
Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
(cherry picked from commit 917126ff4cfb1ea4795cfc93820ed5d304b084c3)

2 years agoncurses: add screen-256color terminfo
Paul Spooren [Mon, 29 Mar 2021 08:31:21 +0000 (22:31 -1000)]
ncurses: add screen-256color terminfo

The terminfo is required by the popular terminal multiplexer screen and
tmux, offer it by default as the size impact is minimal with 885 Bytes.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 6a6b5a677e8c245f6c82ad40cc718e614aa9f7a1)

2 years agoncurses: split long line of supported terminfo
Paul Spooren [Mon, 29 Mar 2021 08:21:49 +0000 (22:21 -1000)]
ncurses: split long line of supported terminfo

The terminfo files were all in one row which is terrible to read.
Split them over multiple lines to improve readability.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 75ea474b9002c758e9a23023f7636258a467704c)

2 years agoglibc: update to latest 2.33 HEAD (bug 28213)
Hans Dedecker [Sun, 12 Sep 2021 13:59:51 +0000 (15:59 +0200)]
glibc: update to latest 2.33 HEAD (bug 28213)

9b01145592 MIPS: Setup errno for {f,l,}xstat
9c676ef514 RISC-V: Update rv64 ULPs
c6cadbf83a linux: Remove shmmax check from tst-sysvshm-linux
22d37364ae librt: add test (bug 28213)
27a78fd712 librt: fix NULL pointer dereference (bug 28213)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit c6a2ffd505cf7b8ce7ea0424a7709bb8f73e6999)

2 years agotools/isl: update the download URL
Rui Salvaterra [Thu, 21 Oct 2021 19:09:49 +0000 (20:09 +0100)]
tools/isl: update the download URL

isl.gforge.inria.fr has been dead since early this month [1]. Switch to
libisl.sourceforge.io for the time being.

[1] https://groups.google.com/g/isl-development/c/JGaMo2VUu_8

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
(cherry picked from commit dd0ad9b661b604163d1736fcfe18714ff47c3728)

2 years agoath10k-ct: update to version from 2021-09-22
Andrew Robbins [Tue, 5 Oct 2021 15:00:16 +0000 (11:00 -0400)]
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 1d2bc94f786434e89bc87003b2a2202e92ad84e7)

2 years agotools/m4: update to 1.4.19
Rosen Penev [Thu, 4 Mar 2021 02:00:26 +0000 (18:00 -0800)]
tools/m4: update to 1.4.19

Remove upstreamed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit fc9682ed3961e098ace708ca1ca41c2239a4e2ee)

2 years agokernel: bump 5.4 to 5.4.154
Hauke Mehrtens [Tue, 19 Oct 2021 22:35:22 +0000 (00:35 +0200)]
kernel: bump 5.4 to 5.4.154

Removed upstreamed:
  generic/backport-5.4/070-v5.5-MIPS-BPF-Restore-MIPS32-cBPF-JIT.patch

All others updated automatically.

Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agowolfssl: bump PKG_RELEASE
David Bauer [Tue, 19 Oct 2021 07:08:30 +0000 (09:08 +0200)]
wolfssl: bump PKG_RELEASE

Fixes commit 4b212b1306a9 ("wolfssl: build with WOLFSSL_ALT_CERT_CHAINS")

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agowolfssl: build with WOLFSSL_ALT_CERT_CHAINS
Andre Heider [Wed, 6 Oct 2021 08:54:48 +0000 (10:54 +0200)]
wolfssl: build with WOLFSSL_ALT_CERT_CHAINS

"Alternate certification chains, as oppossed to requiring full chain
validataion. Certificate validation behavior is relaxed, similar to
openssl and browsers. Only the peer certificate must validate to a trusted
certificate. Without this, all certificates sent by a peer must be
used in the trust chain or the connection will be rejected."

This fixes e.g. uclient-fetch and curl connecting to servers using a Let's
Encrypt certificate which are cross-signed by the now expired
DST Root CA X3, see [0].

This is the recommended solution from upstream [1].

The binary size increases by ~12.3kb:
1236160 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f
1248704 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f

[0] https://github.com/openwrt/packages/issues/16674
[1] https://github.com/wolfSSL/wolfssl/issues/4443#issuecomment-934926793

Signed-off-by: Andre Heider <a.heider@gmail.com>
[bump PKG_RELEASE]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 28d8e6a8711ba78f1684a205e11b0dbd4ff2b2f3)

2 years agomvebu: add support for iEi Puzzle-M901/Puzzle-M902
Ian Chang [Thu, 2 Sep 2021 09:47:20 +0000 (17:47 +0800)]
mvebu: add support for iEi Puzzle-M901/Puzzle-M902

 Hardware specification
 ----------------------
 * CN9130 SoC, Quad-core ARMv8 Cortex-72 @ 2200 MHz
 * 4 GB DDR
 * 4 GB eMMC
 * mmcblk0
 - mmcblk0p1    64M  kernel_1
 - mmcblk0p2    64M  kernel_2
 - mmcblk0p3   512M  rootfs_1
 - mmcblk0p4   512M  rootfs_2
 - mmcblk0p5   512M  Reserved
 - mmcblk0p6    64M  Reserved
 - mmcblk0p7   1.8G  rootfs_data

 * 4 MB (SPI Flash)
 * 6 x 2.5 Gigabit  ports (Puzzle-M901)
 - External PHY with 6 ports (AQR112R)

 * 6 x 2.5 Gigabit ports (Puzzle-M902)
 - External PHY with 6 ports (AQR112R)
   3 x 10 Gigabit ports (Puzzle-M902)
 - External PHY with 3 ports (AQR113R)

 * 4 x Front panel LED
 * 1 x USB 3.0
 * Reset button on Rear panel
 * UART (115200 8N1,header on PCB)

 Flash instructions:
    The original firmware is based on OpenWrt.
    Flash firmware using LuCI and CLI

Signed-off-by: Ian Chang <ianchang@ieiworld.com>
(cherry picked from commit 70c75965a97799b44871249c205bad48fea9a4ae)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomvebu: backport CN9130 dts necessary files changes to 5.4
Ian Chang [Thu, 2 Sep 2021 09:47:01 +0000 (17:47 +0800)]
mvebu: backport CN9130 dts necessary files changes to 5.4

 1. Add support for Marvell CN9130 SoC
 2. Add support for CP115,and create an armada-cp11x.dtsi file which will be used to instantiate both CP110 and CP115
 3. Add support for AP807/AP807-quad,AP807 is a major component of CN9130 SoC series
 4. Drop PCIe I/O ranges from CP11x file and externalize PCIe macros from CP11x file

Signed-off-by: Ian Chang <ianchang@ieiworld.com>
(cherry picked from commit c98ddf0f019986bbb4c868bfcaf97e0d1f4ee2dc)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agobuild: prereq detect Python 3.10 for `python3` binary
Paul Spooren [Sun, 10 Oct 2021 09:09:46 +0000 (23:09 -1000)]
build: prereq detect Python 3.10 for `python3` binary

While the binary `python3.10` is correctly detected by the build system
the default `python3` binary is currently not detected if pointing to a
Python 3.10 installation.

Fix this by extending the grep regex.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 56ea2bf2eec431ccd3c566190a444ad63db39b65)

2 years agokernel: ar8216: add get_features method
David Bauer [Wed, 2 Jun 2021 17:34:01 +0000 (19:34 +0200)]
kernel: ar8216: add get_features method

Modifying PHY capabilities in the probe function broke with upstream
commit 92ed2eb7f4b7 ("net: phy: probe the PHY before determining the
supported features").

AR8316 switches only support 10/100 Mbit/s link modes because of this
change.

Provide a get_features method for the PHY driver, so Gigabit link mode
will be advertised to link partners again.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 766e0f584a325b0b80a97bbc86ca515d97c63001)

2 years agoprereq-build: recognize Python 3.10
Marcin Juszkiewicz [Tue, 28 Sep 2021 13:03:24 +0000 (15:03 +0200)]
prereq-build: recognize Python 3.10

Fedora 35 contains Python 3.10 as default version. Make use of it.

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
[fix commit subject]
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit e1c03ca18519f9683f6bfce1795e58d99575d895)

2 years agobuild: fix `which` detection on Fedora & MacOS
Paul Spooren [Sat, 2 Oct 2021 01:56:27 +0000 (15:56 -1000)]
build: fix `which` detection on Fedora & MacOS

Fix Fedora 34/35 issue where 'which' detection of 'which' wasn't working
because Fedora use alias and proc

Fixup of fca5ad55d2 prereq-build: fix `which` detection on Fedora

Reported-by: Jani Partanen <rtfm@iki.fi>
Suggest-by: Etienne Champetier <champetier.etienne@gmail.com>
Tested-by: Georgi Valkov <gvalkov@abv.bg>
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 0d1ebf0d6d20f0439ab45b293f9daa7662c44ba6)

2 years agouhttpd: make organization (O=) of the cert configurable via uci
Martin Schiller [Mon, 4 May 2020 14:13:13 +0000 (16:13 +0200)]
uhttpd: make organization (O=) of the cert configurable via uci

Make the organization (O=) of the cert configurable via uci. If not
configured, use a combination of "OpenWrt" and an unique id like it was
done before.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
(cherry picked from commit 2c6c1501af664490ec9b701b46a201e21c670b96)

2 years agouboot-lantiq: fix sha1.h header clash when system libmd installed
Alan Swanson [Fri, 1 Oct 2021 15:46:32 +0000 (16:46 +0100)]
uboot-lantiq: fix sha1.h header clash when system libmd installed

Backport of u-boot commit "includes: move openssl headers to include/u-boot"
https://github.com/u-boot/u-boot/commit/2b9912e6a7df7b1f60beb7942bd0e6fa5f9d0167

Fixes: FS#3955
Signed-off-by: Alan Swanson <reiver@improbability.net>
(cherry picked from commit 8db641049292035604f0e1fb788608fdea879eca)

2 years agokernel: bump 5.4 to 5.4.150
Hauke Mehrtens [Sat, 2 Oct 2021 13:29:16 +0000 (15:29 +0200)]
kernel: bump 5.4 to 5.4.150

Manually rebased:
  generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch
  generic/pending-5.4/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch
  mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch

Removed upstreamed:
  generic/backport-5.4/040-ARM-8918-2-only-build-return_address-if-needed.patch
  layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch

All others updated automatically.

Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoipq-wifi: Work around Plasma Cloud PA1200 5GHz crash
Sven Eckelmann [Wed, 22 Sep 2021 15:56:30 +0000 (17:56 +0200)]
ipq-wifi: Work around Plasma Cloud PA1200 5GHz crash

It was noticed [1] that the ath10k firmware crashes on 5GHz since OpenWrt
21.02.0. The problem seems to be triggered by the the nonLinearTxFir field
in the 5GHz BDF. If baseEepHeader.nonLinearTxFir (offset 0xc2) is 1 then
the firmware just crashes when setting up the 5Ghz radio using `ifconfig
wlan1 up`:

  ath10k_ahb a800000.wifi: firmware crashed! (guid 9e36ee82-4d2c-4c63-b20b-609a1eaca30c)
  ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
  ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
  ath10k_ahb a800000.wifi: firmware ver 10.4-3.6-00140 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps crc32 ba79b746
  ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17 crc32 5f400efc
  ath10k_ahb a800000.wifi: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 512 raw 0 hwcrypto 1
  ath10k_ahb a800000.wifi: firmware register dump:
  ath10k_ahb a800000.wifi: [00]: 0x0000000B 0x000015B3 0x009C3C27 0x00975B31
  ath10k_ahb a800000.wifi: [04]: 0x009C3C27 0x00060530 0x00000018 0x004176B8
  ath10k_ahb a800000.wifi: [08]: 0x00405A50 0x00412A30 0x00000000 0x00000000
  ath10k_ahb a800000.wifi: [12]: 0x00000009 0x00000000 0x009B9742 0x009B974F
  ath10k_ahb a800000.wifi: [16]: 0x00971238 0x009B9742 0x00000000 0x00000000
  ath10k_ahb a800000.wifi: [20]: 0x409C3C27 0x004053DC 0x00000D2C 0x00405A60
  ath10k_ahb a800000.wifi: [24]: 0x809C3E13 0x0040543C 0x00000000 0xC09C3C27
  ath10k_ahb a800000.wifi: [28]: 0x809B9AC5 0x0040547C 0x00412A30 0x0040549C
  ath10k_ahb a800000.wifi: [32]: 0x809B8ECD 0x0040549C 0x00000001 0x00412A30
  ath10k_ahb a800000.wifi: [36]: 0x809B8FF3 0x004054CC 0x00412838 0x00000014
  ath10k_ahb a800000.wifi: [40]: 0x809BEF98 0x0040551C 0x0041627C 0x00000002
  ath10k_ahb a800000.wifi: [44]: 0x80986D47 0x0040553C 0x0041627C 0x00416A88
  ath10k_ahb a800000.wifi: [48]: 0x809CBB0A 0x0040559C 0x0041ACC0 0x00000000
  ath10k_ahb a800000.wifi: [52]: 0x809864EE 0x0040560C 0x0041ACC0 0x00000001
  ath10k_ahb a800000.wifi: [56]: 0x809CA8A4 0x0040564C 0x0041ACC0 0x00000001
  ath10k_ahb a800000.wifi: Copy Engine register dump:
  ath10k_ahb a800000.wifi: [00]: 0x0004a000  14  14   3   3
  ath10k_ahb a800000.wifi: [01]: 0x0004a400  16  16  22  23
  ath10k_ahb a800000.wifi: [02]: 0x0004a800   3   3   2   3
  ath10k_ahb a800000.wifi: [03]: 0x0004ac00  15  15  15  15
  ath10k_ahb a800000.wifi: [04]: 0x0004b000   4   4  44   4
  ath10k_ahb a800000.wifi: [05]: 0x0004b400   3   3   2   3
  ath10k_ahb a800000.wifi: [06]: 0x0004b800   1   1   1   1
  ath10k_ahb a800000.wifi: [07]: 0x0004bc00   1   1   1   1
  ath10k_ahb a800000.wifi: [08]: 0x0004c000   0   0 127   0
  ath10k_ahb a800000.wifi: [09]: 0x0004c400   0   0   0   0
  ath10k_ahb a800000.wifi: [10]: 0x0004c800   0   0   0   0
  ath10k_ahb a800000.wifi: [11]: 0x0004cc00   0   0   0   0
  ath10k_ahb a800000.wifi: failed to update channel list: -108
  ath10k_ahb a800000.wifi: failed to set pdev regdomain: -108
  ath10k_ahb a800000.wifi: failed to create WMI vdev 0: -108
  ieee80211 phy1: Hardware restart was requested

Since no actual solution is known (besides downgrading the ath10k firmware)
it seems to be better to disable the nonLinearTxFir for now.

[1] https://lore.kernel.org/ath10k/3423718.UToCqzeSYe@ripper/

Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit 8b090708208501a60e71d0118b9860dd401d7d8d)

2 years agoipq-wifi: Update Plasma Cloud PA1200 BDFs to firmware 3.5.12
Sven Eckelmann [Wed, 22 Sep 2021 15:56:30 +0000 (17:56 +0200)]
ipq-wifi: Update Plasma Cloud PA1200 BDFs to firmware 3.5.12

The official Plasma Cloud firmware adjusted the BDFs to contain new
conformance test limits and target power values. These should be imported
to avoid emissions outside the allowed limits.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit e0721608f9620b570c7f18d94681e86b01c0b9a0)

2 years agohostapd: fix segfault when deinit mesh ifaces
Jesus Fernandez Manzano [Tue, 21 Sep 2021 10:49:30 +0000 (12:49 +0200)]
hostapd: fix segfault when deinit mesh ifaces

In hostapd_ubus_add_bss(), ubus objects are not registered for mesh
interfaces. This provokes a segfault when accessing the ubus object in
mesh deinit.

This commit adds the same condition to hostapd_ubus_free_bss() for
discarding those mesh interfaces.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
(cherry picked from commit 5269c47e8db549695ceaf6a19afdd0cb90074622)

2 years agorockchip: fix broken squashfs sysupgrade
David Bauer [Thu, 23 Sep 2021 19:01:37 +0000 (21:01 +0200)]
rockchip: fix broken squashfs sysupgrade

The rockchip platform supports squashfs SD card images. However, the
resulting image is not padded to completely fill the rootfs partition.

Because of that, the f2fs overlay might not be erased, resulting in
uci-defaults not bing executed or the configuration not being erased,
even though drop config was selected.

Modify the image generation process so the image is padded to cover the
entire root filesystem partition.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit b56f7407d999d29c200c8c5880655926ef9874b7)

2 years agoapm821xx: MBL: band-aid MBL DUO
Christian Lamparter [Thu, 23 Sep 2021 16:37:38 +0000 (18:37 +0200)]
apm821xx: MBL: band-aid MBL DUO

Takimata reported on the OpenWrt forum in thread [0], that his
MyBook Live Duo wasn't booting OpenWrt 21.02 after upgrading
from the previous OpenWrt 19.07.

The last logged entries on his console

|[    0.531599] sata1-regulator GPIO handle specifies active low - ignored
|[    0.538391] sata0-regulator GPIO handle specifies active low - ignored
|[    0.759791] ata2: SATA link down (SStatus 0 SControl 300)
|[    0.765251] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
|[    5.909555] ata1.00: qc timeout (cmd 0xec)
|[    5.913656] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
|[    6.231757] ata1: SATA link down (SStatus 0 SControl 300)

This extract clearly showed that the HDD on which OpenWrt is installed,
simply disappeared after the SATA power regulators had been initialized.

Since the device-tree regulators haven't changed since the OpenWrt 19.07
days this will require further investigation on the snapshot/master/trunk
branch.

For the time being, it was requested to just delete the nodes so,
the device will boot again. Which unfortunately,  will have to wait
until 21.02.1 is released.

He also confirmed that the My Book Live Single wasn't affected.
It works with or without this change.

[0] <https://forum.openwrt.org/t/21-02-0-and-snapshot-fail-to-boot-on-my-book-live-duo/106585>

Reported-by: Takimata (forum.openwrt.org/u/takimata)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agomac80211: Update to backports-5.10.68
Hauke Mehrtens [Tue, 14 Sep 2021 21:51:34 +0000 (23:51 +0200)]
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>
2 years agoramips: add support for minew g1-c
Alexander Couzens [Tue, 1 Jun 2021 21:09:26 +0000 (21:09 +0000)]
ramips: add support for minew g1-c

The minew g1-c is a smart home gateway / BLE gateway.
A Nordic nRF52832 is available via USB UART (cp210x) to support BLE.
The LED ring is a ring of 24x ws2812b connect to a generic GPIO (unsupported).
There is a small LED which is only visible when the device is open which
will be used as LED until the ws2812b is supported.
The board has also a micro sdcard/tfcard slot (untested).
The Nordic nRF52832 exposes SWD over a 5pin header (GND, VCC, SWD, SWC, RST).
The vendor uses an older OpenWrt version, sysupgrade can be used via
serial or ssh.

CPU: MT7628AN / 580MHz
RAM: DDR2 128 MiB RAM
Flash: SPI NOR 16 MiB W25Q128
Ethernet: 1x 100 mbit (Port 0) (PoE in)
USB: USB hub, 2x external, 1x internal to USB UART
Power: via micro usb or PoE 802.11af
UART: 3.3V, 115200 8n1

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2 years agoipq40xx: Fix board-2.bin package name for Plasma Cloud PA2200
Sven Eckelmann [Sat, 11 Sep 2021 06:33:30 +0000 (08:33 +0200)]
ipq40xx: Fix board-2.bin package name for Plasma Cloud PA2200

The board data file for the Plasma Cloud PA2200 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device
package name resulted in a not correctly selected package for the device
specific board-2.bin. The wifi driver has therefore loaded the wrong
calibration information into the wifi chip.

Fixes: 4871fd2616ac ("ipq40xx: add support for Plasma Cloud PA2200")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit c7e9335e4c23f3bd074cb2b215a289b8b75f319c)

2 years agoipq40xx: Fix board-2.bin package name for Plasma Cloud PA1200
Sven Eckelmann [Sat, 11 Sep 2021 06:33:30 +0000 (08:33 +0200)]
ipq40xx: Fix board-2.bin package name for Plasma Cloud PA1200

The board data file for the Plasma Cloud PA1200 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device
package name resulted in a not correctly selected package for the device
specific board-2.bin. The wifi driver has therefore loaded the wrong
calibration information into the wifi chip.

Fixes: ea5bb6bbfee0 ("ipq40xx: add support for Plasma Cloud PA1200")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit d0ffc175350f2be6174932dc0afd4d2737afe52d)

2 years agoipq40xx: Select correct board-2.bin for EnGenius EMR3500
Sven Eckelmann [Sat, 11 Sep 2021 06:33:30 +0000 (08:33 +0200)]
ipq40xx: Select correct board-2.bin for EnGenius EMR3500

The board data file for the EnGenius EMR3500 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong
calibration information will be loaded into the wifi chip.

Fixes: 3f61e5e1b97e ("ipq40xx: add support for EnGenius EMR3500")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit 14bd392a1cd0b8e267e4402ae27b3c5a8f66b933)

2 years agoipq40xx: Select correct board-2.bin for EnGenius EMD1
Sven Eckelmann [Sat, 11 Sep 2021 06:33:30 +0000 (08:33 +0200)]
ipq40xx: Select correct board-2.bin for EnGenius EMD1

The board data file for the EnGenius EMD1 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong
calibration information will be loaded into the wifi chip.

Fixes: 51f303597839 ("ipq40xx: add support for EnGenius EMD1")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit d9f4a4280e674ddb4ec75ae2d73b0f86e0c282cc)

2 years agokernel: backport switchdev fix for bridge in bridge configurations
Fabian Bläse [Sun, 29 Aug 2021 19:21:35 +0000 (21:21 +0200)]
kernel: backport switchdev fix for bridge in bridge configurations

This patch fixes the forwarding behavior of bridge in bridge
configurations with DSA.

Without it, the configuration of the upper bridge might overwrite
settings of the lower bridge. For example, a vlan-aware bridge
with DSA interfaces in it might be offloaded to the DSA hardware. If the
bridge interface itself gets slave of a different bridge without vlan
filtering, the vlan filtering setting of the lower bridge is overwritten
by the upper bridge, which results in an incorrect hardware
configuration.

This was backported from kernel 5.7.

Ref: https://lore.kernel.org/netdev/20191222192235.GK25745@shell.armlinux.org.uk/
Fixes: FS#3996
Signed-off-by: Fabian Bläse <fabian@blaese.de>
(cherry picked from commit c50ece58c41647880cc74c927d98b465cdfbdad8)

2 years agokernel: Add missing kernel config options
Hauke Mehrtens [Sun, 12 Sep 2021 11:05:30 +0000 (13:05 +0200)]
kernel: Add missing kernel config options

These options are selectable when some of the kernel debug options like
KERNEL_SOFTLOCKUP_DETECTOR are selected.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1a3b3dc7974c98843baeb22251dc4c580dc771d6)

2 years agobuild: Replace KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR
Hauke Mehrtens [Sun, 12 Sep 2021 10:56:48 +0000 (12:56 +0200)]
build: Replace KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR

The LOCKUP_DETECTOR configuration option split into the
SOFTLOCKUP_DETECTOR and HARDLOCKUP_DETECTOR configuration option some
time ago. The HARDLOCKUP_DETECTOR option is only working on some
architectures, but SOFTLOCKUP_DETECTOR should work everywhere. Replace
KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR.

LOCKUP_DETECTOR will be selected by SOFTLOCKUP_DETECTOR automatically.

Fixes: b951f53fbae3 ("build: Add additional kernel debug options")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d27f6e2c5d2a2315cc8fe684d117c80aa9984ca8)

2 years agokirkwood: increase kernel partition of Linksyses
Pawel Dembicki [Thu, 24 Jun 2021 11:10:09 +0000 (13:10 +0200)]
kirkwood: increase kernel partition of Linksyses

At this moment kernel partition in Linksyses EA3500/E4200/EA4500 is
ended before start of rootfs partition. It was introduced in 9808b9ae02
and it broke easy revert to stock. Sysupgrade, when OFW is used, write
whole stock image to kernel partition. Most likeley image will be bigger
than small kernel partition and it make stock system invalid.

This patch change size of kernel partitions and now it overlaps rootfs.
Revert to stock will be possible again.

Fixes: 9808b9ae02 ("kirkwood: switch to kernel 4.9")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2 years agomvebu: limit mvneta tx queue workaround to 32 bit SoC
Tomasz Maciej Nowak [Mon, 12 Jul 2021 16:16:30 +0000 (18:16 +0200)]
mvebu: limit mvneta tx queue workaround to 32 bit SoC

This patch has been carried since introduction throughout every kernel
major bump and no one has tested if the later kernels improved the
situation. The Armada 3720 SoC can only process GbE interrupts on Core 0
and this is already limited in all stable kernels, so ditch this
workaround for 64 bit SoCs.

Ref: https://git.kernel.org/torvalds/c/cf9bf871280d

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(cherry picked from commit cbdd2b62e4d5e0572204c37d874d32dc8610840e)

2 years agoOpenWrt v21.02.0: revert to branch defaults
Hauke Mehrtens [Wed, 1 Sep 2021 19:53:58 +0000 (21:53 +0200)]
OpenWrt v21.02.0: revert to branch defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoOpenWrt v21.02.0: adjust config defaults v21.02.0
Hauke Mehrtens [Wed, 1 Sep 2021 19:53:53 +0000 (21:53 +0200)]
OpenWrt v21.02.0: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoath79: add support for onion omega
Jan-Niklas Burfeind [Fri, 27 Aug 2021 17:25:47 +0000 (19:25 +0200)]
ath79: add support for onion omega

The Onion Omega is a hardware development platform with built-in WiFi.

https://onioniot.github.io/wiki/

Specifications:
 - QCA9331 @ 400 MHz (MIPS 24Kc Big-Endian Processor)
 - 64MB of DDR2 RAM running at 400 MHz
 - 16MB of on-board flash storage
 - Support for USB 2.0
 - Support for Ethernet at 100 Mbps
 - 802.11b/g/n WiFi at 150 Mbps
 - 18 digital GPIOs
 - A single Serial UART
 - Support for SPI
 - Support for I2S

Flash instructions:
The device is running OpenWrt upon release using the ar71xx target.
Both a sysupgrade
and uploading the factory image using u-boots web-UI do work fine.

Depending on the ssh client, it might be necessary to enable outdated
KeyExchange methods e.g. in the clients ssh-config:

Host 192.168.1.1
        KexAlgorithms +diffie-hellman-group1-sha1

The stock credentials are: root onioneer

For u-boots web-UI manually configure `192.168.1.2/24` on your computer,
connect to `192.168.1.1`.

MAC addresses as verified by OEM firmware:
2G       phy0      label
LAN      eth0      label - 1

LAN is only available in combination with an optional expansion dock.

Based on vendor acked commit:
commit 5cd49bb067ca ("ar71xx: add support for Onion Omega")

Partly reverts:
commit fc553c7e4c8e ("ath79: drop unused/incomplete dts")

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
(cherry picked from commit d98738b5c118fc45068b45f07b8b6938e91f35d2)

2 years agokernel: bump 5.4 to 5.4.143
Hauke Mehrtens [Sun, 29 Aug 2021 19:27:20 +0000 (21:27 +0200)]
kernel: bump 5.4 to 5.4.143

Manually rebased:
  bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch

Removed upstreamed:
  mvebu/patches-5.4/100-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch

All others updated automatically.

Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoopenssl: bump to 1.1.1l
Eneas U de Queiroz [Thu, 26 Aug 2021 17:37:56 +0000 (14:37 -0300)]
openssl: bump to 1.1.1l

This version fixes two vulnerabilities:
  - SM2 Decryption Buffer Overflow (CVE-2021-3711)
    Severity: High

  - Read buffer overruns processing ASN.1 strings (CVE-2021-3712)
    Severity: Medium

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 7119fd32d397567931e63dbbf72014e95624018f)

2 years agoprereq-build: require python3-distutils
Andre Heider [Tue, 10 Aug 2021 10:22:17 +0000 (12:22 +0200)]
prereq-build: require python3-distutils

Debian and Ubuntu ship a python3-minimal package which does not include
the distutils module. This is not supported by upstream and can be
considered a broken python distribution.

In practice, many scripts depend on said module, and this is a reoccuring
pain point for building various OpenWrt packages.

Require and check for said module, enough time has been wasted on this.

A list of just the most recent issues:
https://github.com/openwrt/packages/pull/16304
https://github.com/openwrt/packages/pull/16027
https://github.com/openwrt/packages/pull/15443
https://github.com/openwrt/packages/pull/14394
https://github.com/openwrt/packages/pull/12909
https://github.com/openwrt/packages/issues/12443
https://github.com/openwrt/packages/pull/11035
https://github.com/openwrt/packages/issues/10993

Signed-off-by: Andre Heider <a.heider@gmail.com>
(cherry picked from commit 60af8d753343691c4a647bfc7c51ef6eb92df9f2)

2 years agouboot-layerscape: fix dtc compilation on host gcc 10
Hauke Mehrtens [Sun, 8 Aug 2021 22:03:43 +0000 (00:03 +0200)]
uboot-layerscape: fix dtc compilation on host gcc 10

Backport a patch from upstream U-Boot to fix the compile with host GCC 10.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 8d143784cb8fafccdbcdc0bd5d1aa47d3d676f70)