Commit graph

1660 commits

Author SHA1 Message Date
David S. Miller 79201f358d wireless-drivers-next patches for v5.12
Second set of patches for v5.12. Last time there was a smaller pull
 request so unsurprisingly this time we have a big one. mt76 has new
 hardware support and lots of new features, iwlwifi getting new
 features and rtw88 got NAPI support. And the usual cleanups and fixes
 all over.
 
 Major changes:
 
 ath10k
 
 * support setting SAR limits via nl80211
 
 rtw88
 
 * support 8821 RFE type2 devices
 
 * NAPI support
 
 iwlwifi
 
 * add new FW API support
 
 * support for new So devices
 
 * support for RF interference mitigation (RFI)
 
 * support for PNVM (Platform Non-Volatile Memory, a firmware data
   file) from BIOS
 
 mt76
 
 * add new mt7921e driver
 
 * 802.11 encap offload support
 
 * support for multiple pcie gen1 host interfaces on 7915
 
 * 7915 testmode support
 
 * 7915 txbf support
 
 brcmfmac
 
 * support for CQM RSSI notifications
 
 wil6210
 
 * support for extended DMG MCS 12.1 rate
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJgJl5/AAoJEG4XJFUm622bCrcIAIwarm51aHq8R0Py0ZYBEiIM
 STe/x3gjxVhzYHd438APchEMnePY6pWZ6e00GnZwMyWxZpMHK+yOYzWrewLvYI29
 qyPFkjGdE6PhYjL+lJjYHn4M1cdAkO4t0FSvCy5OvOnuIgu0Yz3TXXQVxZtrzrIc
 2q+bOR1kKaVBe8NOjggnxTWe4mTj6efeTkD0D5M+IbppERtmpcVLra9FSgz5IcLl
 hlKyNNtiNo/CmQu0bGejXR7ip+JA08f5No6TOlEQKR6pBvBvwrvgXHsq9rfQO8qA
 CDhz4DqfPPYMNXnJuFVAzYsw4raZblwTg5GtIjH7e0cbXxSAx50Ne2Hd850nkO8=
 =eQGJ
 -----END PGP SIGNATURE-----

Merge tag 'wireless-drivers-next-2021-02-12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:
====================
wireless-drivers-next patches for v5.12

Second set of patches for v5.12. Last time there was a smaller pull
request so unsurprisingly this time we have a big one. mt76 has new
hardware support and lots of new features, iwlwifi getting new
features and rtw88 got NAPI support. And the usual cleanups and fixes
all over.

Major changes:

ath10k

* support setting SAR limits via nl80211

rtw88

* support 8821 RFE type2 devices

* NAPI support

iwlwifi

* add new FW API support

* support for new So devices

* support for RF interference mitigation (RFI)

* support for PNVM (Platform Non-Volatile Memory, a firmware data
  file) from BIOS

mt76

* add new mt7921e driver

* 802.11 encap offload support

* support for multiple pcie gen1 host interfaces on 7915

* 7915 testmode support

* 7915 txbf support

brcmfmac

* support for CQM RSSI notifications

wil6210

* support for extended DMG MCS 12.1 rate
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2021-02-12 16:43:13 -08:00
David S. Miller dc9d87581d Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-02-10 13:30:12 -08:00
Kalle Valo 1299616023 mt76 patches for 5.12
* add new mt7921e driver
 * factor out common code shared between 7615/7663 and 7921
 * performance optimizations
 * 7915 dbdc fixes
 * 802.11 encap offload support
 * support for multiple pcie gen1 host interfaces on 7915
 * 7915 testmode support
 * bugfixes
 * testmode support enhancements
 * endian fixes
 * 7915 txbf support
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - http://gpgtools.org
 
 iEYEABECAAYFAmAURZcACgkQ130UHQKnbvX3xACePCxN0DX5vTv+4Z79sTpnc4ZY
 acwAn2iE9ObgXOWlSx3+QTz8fM4f5vGd
 =JCVv
 -----END PGP SIGNATURE-----

Merge tag 'mt76-for-kvalo-2021-01-29' of https://github.com/nbd168/wireless

mt76 patches for 5.12

* add new mt7921e driver
* factor out common code shared between 7615/7663 and 7921
* performance optimizations
* 7915 dbdc fixes
* 802.11 encap offload support
* support for multiple pcie gen1 host interfaces on 7915
* 7915 testmode support
* bugfixes
* testmode support enhancements
* endian fixes
* 7915 txbf support
2021-02-08 19:04:02 +02:00
Jakub Kicinski c90597bdeb wireless-drivers-next patches for v5.12
First set of patches for v5.12. A smaller pull request this time,
 biggest feature being a better key handling for ath9k. And of course
 the usual fixes and cleanups all over.
 
 Major changes:
 
 ath9k
 
 * more robust encryption key cache management
 
 brcmfmac
 
 * support BCM4365E with 43666 ChipCommon chip ID
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJgHW7nAAoJEG4XJFUm622bgd0IAKtEBcjfqnR2wW7Rt6Ah/Uch
 vInrZ+5YOhjamoCvZHhTwdvUEmuRYJBT8ZqfO5x3X0GlIaJe1PlJhlvOs/9PkQ9G
 eMSFcy1D/uSb3KoRRLq8lNaAy7NAyajg11IhRAeQFLeBkZgI43PGq6j7sbYCerah
 87trNNlHagio9p4q9FGXVtJ2cJGQdNHM8jn4dw5Uue45YArkhj6VBh3EZl9dqV+F
 XmxK+qvIcK1KPzw6nZ/0dGf8B6dnXaljn0cAzAo8QPSaZI+jozY52y3XdoKVqYRF
 ekqDra4Xl/uKVZR1vb2jE5T/NtmzZI63uifndL6esEjwJMrrkRy9+alHwIxt2rU=
 =KZD7
 -----END PGP SIGNATURE-----

Merge tag 'wireless-drivers-next-2021-02-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
wireless-drivers-next patches for v5.12

First set of patches for v5.12. A smaller pull request this time,
biggest feature being a better key handling for ath9k. And of course
the usual fixes and cleanups all over.

Major changes:

ath9k
 * more robust encryption key cache management

brcmfmac
 * support BCM4365E with 43666 ChipCommon chip ID

* tag 'wireless-drivers-next-2021-02-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (35 commits)
  iwl4965: do not process non-QOS frames on txq->sched_retry path
  mt7601u: process tx URBs with status EPROTO properly
  wlcore: Fix command execute failure 19 for wl12xx
  mt7601u: use ieee80211_rx_list to pass frames to the network stack as a batch
  rtw88: 8723de: adjust the LTR setting
  rtlwifi: rtl8821ae: fix bool comparison in expressions
  rtlwifi: rtl8192se: fix bool comparison in expressions
  rtlwifi: rtl8188ee: fix bool comparison in expressions
  rtlwifi: rtl8192c-common: fix bool comparison in expressions
  rtlwifi: rtl_pci: fix bool comparison in expressions
  wlcore: Downgrade exceeded max RX BA sessions to debug
  wilc1000: use flexible-array member instead of zero-length array
  brcmfmac: clear EAP/association status bits on linkdown events
  brcmfmac: Delete useless kfree code
  qtnfmac_pcie: Use module_pci_driver
  mt7601u: check the status of device in calibration
  mt7601u: process URBs in status EPROTO properly
  brcmfmac: support BCM4365E with 43666 ChipCommon chip ID
  wilc1000: fix spelling mistake in Kconfig "devision" -> "division"
  mwifiex: pcie: Drop bogus __refdata annotation
  ...
====================

Link: https://lore.kernel.org/r/20210205161901.C7F83C433ED@smtp.codeaurora.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-02-06 09:36:04 -08:00
Lorenzo Bianconi d2bf7959d9 mt76: mt7663: introduce coredump support
Similar to mt7921 devices, introduce coredump support for mt7663 chipset

Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:10:02 +01:00
Sean Wang 0da3c795d0 mt76: mt7921: add coredump support
Introduce coredump support to mt7921 driver.

The coredump would be produced when MCU met the fatal error or driver
sent out the specific cmd to force trigger it.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:10:02 +01:00
Lorenzo Bianconi eaafabd285 mt76: mt7921: enable MSI interrupts
Enable MSI interrupts for mt7921 driver

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:10:01 +01:00
Lorenzo Bianconi 2c25f4e4cd mt76: mt7921: introduce regdomain notifier support
Register regdomain notifier to determine the channel domain the hw scan
should rely on.

Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:10:01 +01:00
Sean Wang 1d8efc741d mt76: mt7921: introduce Runtime PM support
Introduce runtime PM to mt7921 driver

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:10:00 +01:00
Lorenzo Bianconi 022159b0e1 mt76: mt7921: rely on mt76_connac_mcu module for suspend and WoW support
Rely on mt76_connac_mcu module for suspend and WoW support and remove
duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:10:00 +01:00
Lorenzo Bianconi 80fc1e37c0 mt76: mt7921: rely on mt76_connac_mcu module for sched_scan and hw_scan
Rely on mt76_connac_mcu module for sched_scan and hw_scan and remove
duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:10:00 +01:00
Lorenzo Bianconi 67aa27431c mt76: mt7921: rely on mt76_connac_mcu common library
Rely on mt76_connac_mcu common library and remove duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:59 +01:00
Sean Wang ffa1bf9742 mt76: mt7921: introduce PM support
Introduce suspend/resume and WoW (Wake-on-WoWLAN) support to mt7921
driver to allow remote wakeu-up from the suspend state.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:59 +01:00
Sean Wang b88f5c6473 mt76: mt7921: introduce beacon_loss mcu event
If device has enabled beacon hw filter rx beacons are not reported to
the host. Introduce beacon_loss mcu event to trigger mac80211 mlme
connection state machine in this configuration.
IEEE80211_VIF_BEACON_FILTER has not set in vif flags since hw beacon
filter is not enabled yet

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:59 +01:00
Sean Wang 4086ee28e2 mt76: mt7921: introduce support for hardware beacon filter
Introduce support for hw beacon filter available in the mt7921 firmware.

According to mt7921e firmware, enabling hardware filter would rely on
mt7921_mcu_uni_bss_bcnft and disabling hardware filter still rely on legacy
mt7921_mcu_set_bss_pm.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:58 +01:00
Sean Wang 56d965da13 mt76: mt7921: introduce 802.11 PS support in sta mode
Enable 802.11 power-save support available in mt7921 firmware

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:58 +01:00
Sean Wang 29f9d8b08b mt76: mt7921: introduce schedule scan support
introduce schedule scan to control mt7921 firmware to do background scan in
defined plan to see if the matched SSID is available.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:58 +01:00
Sean Wang 474a9f21e2 mt76: mt7921: add debugfs support
Add debugfs support to dump driver statistics and hardware details.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:57 +01:00
Sean Wang 5c14a5f944 mt76: mt7921: introduce mt7921e support
Introduce support for mt7921e 802.11ax (Wi-Fi 6) 2x2:2SS chipset.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:57 +01:00
Sean Wang e0f9fdda81 mt76: mt7921: add ieee80211_ops
Filling ieee80211_ops with the mt7921 operations.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:57 +01:00
Sean Wang bb1f6aaf71 mt76: mt7921: add EEPROM support
Add EEPROM support to MT7921 to determine the capability the card has
such as indentificaiton, MAC address, the band and antenna number the
card able to support.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:56 +01:00
Sean Wang 12d1c31788 mt76: mt7921: add DMA support
Add DMA and register access support to MT7921e driver to set up the link
for the data movement between the host and MT7921 MAC, or the host and
MT7921 MCU.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:56 +01:00
Sean Wang 1c099ab447 mt76: mt7921: add MCU support
MT7921 contains a microprocessor with which the host can use command/event
to communicate to implement offload features such as establish connection,
hardware scan and so on. The host has to download the ROM patch, RAM
firmware and finally activate the MCU to complete the MT7921
initialization.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:56 +01:00
Sean Wang 163f4d22c1 mt76: mt7921: add MAC support
Add Rx packet description parsing, Tx packet description compositon, handle
packet recycling and provide MAC information mt76 core needs to support
mac80211.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 18:09:55 +01:00
Lorenzo Bianconi 1755f6ad0f mt76: mt76_connac: move pm utility routines in mt76_connac_lib module
Move power_save common code shared between mt7663 and mt7921 in
mt76_connac module

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 15:18:26 +01:00
Lorenzo Bianconi b7dd3c2e58 mt76: mt76_connac: move pm data struct in mt76_connac.h
Move pm mt7663 data structure in mt76_connac.h introducing
mt76_connac_pm data struct. This is a preliminary patch to share pm code
between mt7663 and mt7921

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 15:18:26 +01:00
Lorenzo Bianconi 55d4c19c93 mt76: mt76_connac: move WoW and suspend code in mt76_connac_mcu module
Move WoW and suspend code in mt76_connac_mcu module in order to be reused in
mt7615 and mt7921 drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 15:18:26 +01:00
Lorenzo Bianconi 399090ef96 mt76: mt76_connac: move hw_scan and sched_scan routine in mt76_connac_mcu module
Move hw_scan/sched_scan in mt76_connac_mcu module in order to be reused in
mt7615 and mt7921 drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 15:18:25 +01:00
Lorenzo Bianconi d0e274af2f mt76: mt76_connac: create mcu library
Introduce mt76_connac common mcu library for code sharing between mt7615 and
mt7921 devices

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 15:18:25 +01:00
Lorenzo Bianconi 85d9670453 mt76: introduce mt76_vif data structure
Introduce mt76_vif data structure to share common fields between
mt7615_vif and mt7921_vif and create a mcu common library

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29 15:18:25 +01:00
Lorenzo Bianconi 93a1d4791c mt76: dma: fix a possible memory leak in mt76_add_fragment()
Fix a memory leak in mt76_add_fragment routine returning the buffer
to the page_frag_cache when we receive a new fragment and the
skb_shared_info frag array is full.

Fixes: b102f0c522 ("mt76: fix array overflow on receiving too many fragments for a packet")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/4f9dd73407da88b2a552517ce8db242d86bf4d5c.1611616130.git.lorenzo@kernel.org
2021-01-28 09:30:37 +02:00
Felix Fietkau e2b2c390b0 mt76: mt7615: reduce VHT maximum MPDU length
With a maximum length of 7991, the radio sometimes locks up under load when
transmitting A-MSDU frames to lots of stations. Using the lower limit makes
it work reliably again

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:33:44 +01:00
Felix Fietkau 2fbcdb4386 mt76: reduce q->lock hold time
Instead of holding it for the duration of an entire station schedule run,
which can block out competing tasks for a significant amount of time,
only hold it for scheduling one batch of packets for one station.
Improves responsiveness under load

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:33:44 +01:00
Lorenzo Bianconi 9b0f100c19 mt76: usb: process URBs with status EPROTO properly
Similar to commit '0e40dbd56d67 ("mt7601u: process URBs in status EPROTO
properly")', do no schedule rx_worker for urb marked with status set
-EPROTO

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:33:43 +01:00
Felix Fietkau 2ab33b8d7d mt76: move vif_mask back from mt76_phy to mt76_dev
Since it is global for all drivers, it belongs to the main device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:33:43 +01:00
Felix Fietkau 51742a9e10 mt76: mt7915: make vif index per adapter instead of per band
The firmware treats it as global, so we need to avoid collisions here

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:33:43 +01:00
Felix Fietkau 9093cfff72 mt76: mt7915: add support for using a secondary PCIe link for gen1
For performance reasons, mt7915 supports using 2 PCIE gen1 links on
platforms that don't support gen2.
Add support for using this to move traffic for a second DBDC band onto
a dedicated link

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:33:43 +01:00
Felix Fietkau 94b6df08da mt76: fix crash on tearing down ext phy
Only clear dev->phy2 after the phy is gone, the driver may still need to access
it until shutdown is complete

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:30:01 +01:00
Felix Fietkau 76027f40f5 mt76: mt7915: bring up the WA event rx queue for band1
This is needed for DBDC cards to work correctly on both bands simultaneously

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:30:01 +01:00
Felix Fietkau 95f381c559 mt76: mt7615: unify init work
Reduce code duplication and remove unnecessary exports

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:30:01 +01:00
Ryder Lee 07c0d0012f mt76: mt7915: support TxBF for DBDC
With this patch, TxBF can be run on both bands simultaneously.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:30:01 +01:00
Xu Wang 5d3b50b30d mt76: mt7915: Remove unneeded semicolon
fix semicolon.cocci warnings:
drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1694:2-3: Unneeded semicolon

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:30:01 +01:00
Lorenzo Bianconi 5b257371ec mt76: mt7615: set mcu country code in mt7615_mcu_set_channel_domain()
Update mcu country code running mt7615_mcu_set_channel_domain routine in
mt7615_regd_notifier().
Filter out disabled channels in mt7615_mcu_set_channel_domain().

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:30:01 +01:00
Felix Fietkau 45a8b67a35 mt76: mt7915: fix eeprom DBDC band selection
When the EEPROM band fields contain default values, assign 2.4 GHz to the
first band and 5 GHz to the second.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:30:01 +01:00
Felix Fietkau f7fc2bbe46 mt76: mt7915: fix eeprom parsing for DBDC
Annotate WIFI_CONF eeprom mask values with the byte number
Fix parsing per-band number of chains

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-27 17:30:00 +01:00
Felix Fietkau f1fd2cae2e mt76: mt7915: disable RED support in the WA firmware
It causes high CPU load on the WA core, which can lead to extra latency when
using many stations. Dropping packets for long queues is managed by mac80211
fq_codel instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 20:07:50 +01:00
Felix Fietkau c203dd6217 mt76: mt7915: rework mcu API
Add support for passing flags for selecting the MCU target and query type
instead of trying to detect it based on the command id

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 20:07:50 +01:00
Felix Fietkau d027b64ca6 mt76: mt7915: do not set DRR group for stations
This is causing some extreme latency spikes when sending traffic to
multiple stations at the same time. Disable this until the firmware issue
is sorted out

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 20:07:49 +01:00
Felix Fietkau 0c2d098098 mt76: mt7915: ensure that init work completes before starting the device
Without this change, the start operation could potentially race against eeprom
or txbf init

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 20:07:49 +01:00
Felix Fietkau 17cb546551 mt76: mt7603: fix ED/CCA monitoring with single-stream devices
Do not use the RSSI values of the unavailable chain

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 20:07:49 +01:00