Commit Graph
266 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix Fietkau b5138e7b89 mt76: mt7921: fix a possible race enabling/disabling runtime-pm
Fix a possible race enabling/disabling runtime-pm between
mt7921_pm_set() and mt7921_poll_rx() since mt7921_pm_wake_work()
always schedules rx-napi callback and it will trigger
mt7921_pm_power_save_work routine putting chip to in low-power state
during mt7921_pm_set processing.

Suggested-by: Deren Wu <[email protected]>
Tested-by: Deren Wu <[email protected]>
Fixes: 1d8efc741df8 ("mt76: mt7921: introduce Runtime PM support")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/0f3e075a2033dc05f09dab4059e5be8cbdccc239.1640094847.git.lorenzo@kernel.org
2021-12-23 11:19:47 +01:00
YN ChenandFelix Fietkau 944545855e mt76: mt7921s: update mt7921s_wfsys_reset sequence
MT7921S firmware expects driver to clear out the firmware download state
before FW is downloaded again in WiFi reset procedure.

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-22 20:35:40 +01:00
Sean WangandFelix Fietkau 4669882aa5 mt76: mt7921s: clear MT76_STATE_MCU_RUNNING immediately after reset
clear the flag MT76_STATE_MCU_RUNNING immediately after reset to indicate
the MCU has already stopped working at the point. That is a preliminary
patch for the following patch to perform the register access in the
remaining reset handler using SDIO mailbox way instead of MCU command
because the RAM firmware is cleared out.

Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-22 20:35:40 +01:00
Sean WangandFelix Fietkau 22fcff5ff2 mt76: sdio: lock sdio when it is needed
Acquire the SDIO as needed as possible because either MT7663S or MT7921S
is a multiple-function device that always includes Bluetooth that would
share with the same SDIO bus. So not to avoid breaking Bluetooth pairing,
audio, and HID such kind of time critical application on that, we only
lock sdio bus when it is necessary in WiFi driver.

Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-22 20:35:40 +01:00
Lorenzo BianconiandFelix Fietkau 4441db30c1 mt76: connac: move mt76_connac_mcu_add_key in connac module
Move key configuration code shared between mt7921 and mt7915 in
mt76-connac module and remove duplicated code.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-20 11:22:25 +01:00
Lorenzo BianconiandFelix Fietkau 60dcd9f09f mt76: connac: move mt76_connac_chan_bw in common code
Move mt76_connac_chan_bw in mt76-connac code and remove
duplicated code from mt7921 and mt7915 driver.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-20 11:22:25 +01:00
Lorenzo BianconiandFelix Fietkau 9cc58e254d mt76: connac: move mt76_connac_mcu_get_cipher in common code
Move mt76_connac_mcu_get_cipher in mt76-connac code and remove
duplicated code from mt7921 and mt7915 driver.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-20 11:22:25 +01:00
Sean WangandFelix Fietkau 8d6c68a7d0 mt76: mt7921: fix possible resume failure [update]
Fix the possible resume failure due to mt76_connac_mcu_set_hif_suspend
timeout.

That is because clearing the flag pm->suspended too early opened up a race
window, where mt7921_poll_tx/rx scheduled a ps_work to put the device in
doze mode, that is unexpected for the device is being resumed from the
suspend state and would make the remaining MCU comamnds in resume handler
failed to execute.

Fixes: ffa1bf97425b ("mt76: mt7921: introduce PM support")
Co-developed-by: YN Chen <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-16 19:25:16 +01:00
Sean WangandFelix Fietkau 928c4550e4 mt76: mt7921s: make pm->suspended usage consistent [update]
Update pm->suspended usage to be consistent with mt7921e driver.

Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-16 19:17:36 +01:00
Sean WangandFelix Fietkau 19cc7d8319 mt76: mt7921: clear pm->suspended in mt7921_mac_reset_work
clear pm->suspended in mt7921_mac_reset_work to allow pm runtime
can be enabled after wifi reset in any circumstance.

Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-16 19:16:39 +01:00
Lorenzo BianconiandFelix Fietkau b851a3e783 mt76: mt7921: remove dead definitions
to_wcid_lo and to_wcid_hi are no longer used in mt7921/mcu.c

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 21:24:12 +01:00
Sean WangandFelix Fietkau e2cc063238 mt76: mt7921s: fix suspend error with enlarging mcu timeout value
Fix the false positive suspend error that may occur on mt7921s
with enlarging mcu timeout value.

The reason why we have to enlarge mcu timeout from HZ / 3 to HZ is
we should consider the additional overhead caused by running
concurrently with btmtksdio (a MT7921 bluetooth SDIO driver) that
would compete for the same SDIO bus in process context to complete
the suspend procedure.

Fixes: 48fab5bbef40 ("mt76: mt7921: introduce mt7921s support")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 21:22:55 +01:00
Sean WangandFelix Fietkau db105a722b mt76: mt7921s: make pm->suspended usage consistent
Update pm->suspended usage to be consistent with mt7921e driver.

Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 21:22:55 +01:00
Tzung-Bi ShihandFelix Fietkau b4ae1da1d1 mt76: mt7921: reduce log severity levels for informative messages
"ASIC revision" and "Firmware init done" shouldn't be error messages.
Reduces the severity levels.

Signed-off-by: Tzung-Bi Shih <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 21:22:55 +01:00
Lorenzo BianconiandFelix Fietkau 922f0d4084 mt76: mt7915: rely on mt76_connac definitions
Remove duplicated mcu definitions in mt7915 mcu.h and reused connac
ones.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:45 +01:00
Lorenzo BianconiandFelix Fietkau f96fbdf038 mt76: connac: rely on MCU_CMD macro
Similar to mt7915 driver, rely on MCU_CMD macro and do not command
definitions directly

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:45 +01:00
Lorenzo BianconiandFelix Fietkau 116109bee7 mt76: connac: introduce MCU_CE_CMD macro
Similar to MCU_EXT_CMD, introduce MCU_CE_CMD for CE commands

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:45 +01:00
Lorenzo BianconiandFelix Fietkau da5128a59e mt76: connac: introduce MCU_UNI_CMD macro
Similar to MCU_EXT_CMD, introduce MCU_UNI_CMD for unified commands

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:45 +01:00
Lorenzo BianconiandFelix Fietkau 5a87f5497c mt76: connac: align MCU_EXT definitions with 7915 driver
Align MCU_EXT and MCU_FW definitions between mt76_connac and mt7915
driver. This is a preliminary patch to reuse mt76_connac in mt7915
driver.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:45 +01:00
Lorenzo BianconiandFelix Fietkau e2b454b6fb mt76: connac: introduce MCU_EXT macros
Introduce MCU_EXT_CMD and MCU_EXT_QUERY macros in mt76_connac module.
This is a preliminary patch to reuse mt76_connac module in mt7915
driver.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:45 +01:00
Deren WuandFelix Fietkau bf105aa6cd mt76: mt7921: fix network buffer leak by txs missing
TXS in mt7921 may be forwared to tx_done event. Should try to catch
TXS information in tx_done event as well.

Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:45 +01:00
Sean WangandFelix Fietkau 4ed8c910b9 mt76: mt7921: fix possible resume failure
Fix the possible resume failure due to mt76_connac_mcu_set_hif_suspend
timeout.

That is because clearing the flag pm->suspended too early opened up a race
window, where mt7921_poll_tx/rx scheduled a ps_work to put the device in
doze mode, that is unexpected for the device is being resumed from the
suspend state and would make the remaining MCU comamnds in resume handler
failed to execute.

Fixes: ffa1bf97425b ("mt76: mt7921: introduce PM support")
Co-developed-by: YN Chen <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:45 +01:00
Felix Fietkau c9a4146404 sync with upstream
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-15 20:35:30 +01:00
Ryder LeeandFelix Fietkau 7cdbea1dc8 mt76: only access ieee80211_hdr after mt76_insert_ccmp_hdr
Get rid of unsafe access since mt76_insert_ccmp_hdr moves the header.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-03 10:18:57 +01:00
Lorenzo BianconiandFelix Fietkau 9a8fc6636d mt76: move sar_capa configuration in common code
Move wiphy SAR capability configuration in mt76 module and remove
duplicated code.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-03 10:18:57 +01:00
Sean WangandFelix Fietkau 3f402b0cf6 mt76: mt7921s: fix possible kernel crash due to invalid Rx count
Return the proper error code when out-of-range the Rx aggregation count
are reported from the hardware that would create the unreasonable extreme
large Rx buffer.

[  100.873810]  show_stack+0x20/0x2c
[  100.873823]  dump_stack+0xc4/0x140
[  100.873839]  bad_page+0x110/0x114
[  100.873854]  check_new_pages+0xf8/0xfc
[  100.873869]  rmqueue+0x5a0/0x640
[  100.873884]  get_page_from_freelist+0x124/0x20c
[  100.873898]  __alloc_pages_nodemask+0x114/0x2a4
[  100.873918]  mt76s_rx_run_queue+0xd4/0x2e4 [mt76_sdio 8280a88a0c8c9cf203f16e194f99ac293bdbb2f5]
[  100.873938]  mt76s_rx_handler+0xd4/0x2a0 [mt76_sdio 8280a88a0c8c9cf203f16e194f99ac293bdbb2f5]
[  100.873957]  mt76s_txrx_worker+0xac/0x17c [mt76_sdio 8280a88a0c8c9cf203f16e194f99ac293bdbb2f5]
[  100.873977]  mt7921s_txrx_worker+0x5c/0xd8 [mt7921s d0bdbc018082dbc8dc1407614be3c2e7bd64423b]
[  100.874003]  __mt76_worker_fn+0xe8/0x170 [mt76 b80af3483a8f9d48e916c12d8dbfaa0d3cd15337]
[  100.874018]  kthread+0x148/0x3ac
[  100.874032]  ret_from_fork+0x10/0x30
[  100.874067] Kernel Offset: 0x1fe2000000 from 0xffffffc010000000
[  100.874079] PHYS_OFFSET: 0xffffffe800000000
[  100.874090] CPU features: 0x0240002,2188200c

Fixes: 48fab5bbef40 ("mt76: mt7921: introduce mt7921s support")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-02 12:41:19 +01:00
Deren WuandFelix Fietkau 95acf97275 mt76: fix 802.3 RX fail by hdr_trans
Should not run hdr_trans process for 802.3 packets,
this would cause all data frame RX fail.

Fixes: d9930ec65b9f ("mt76: only set rx radiotap flag from within decoder functions")
Reviewed-by: Ryder Lee <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
2021-12-02 11:06:40 +01:00
Lorenzo BianconiandFelix Fietkau 6fad970893 mt76: fix key pointer overwrite in mt7921s_write_txwi/mt7663_usb_sdio_write_txwi
Fix pointer overwrite in mt7921s_tx_prepare_skb and
mt7663_usb_sdio_tx_prepare_skb routines since in
commit '2a9e9857473b ("mt76: fix possible pktid leak")
mt76_tx_status_skb_add() has been moved out of
mt7921s_write_txwi()/mt7663_usb_sdio_write_txwi() overwriting
hw key pointer in ieee80211_tx_info structure. Fix the issue saving
key pointer before running mt76_tx_status_skb_add().

Fixes: 2a9e9857473b ("mt76: fix possible pktid leak")
Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-29 15:09:54 +01:00
Deren WuandFelix Fietkau 8ec95c9104 mt76: mt7921s: fix bus hang with wrong privilege
Accroding to chip hw flow, mt7921s need to re-acquire privilege
again before normal running. Otherwise, the bus may be stuck in
an abnormal status.

Tested-by: Leon Yen <[email protected]>
Co-developed-by: Eric-SY Chang <[email protected]>
Signed-off-by: Eric-SY Chang <[email protected]>
Co-developed-by: YN Chen <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-28 22:20:34 +01:00
Shayne ChenandFelix Fietkau 586bad6020 mt76: mt7921: use correct iftype data on 6GHz cap init
Set 6GHz cap to iftype data which is matched to the type of
current interface.

Fixes: 50ac15a511e3 ("mt76: mt7921: add 6GHz support")
Signed-off-by: Shayne Chen <[email protected]>
Acked-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-28 22:20:34 +01:00
Changcheng DengandFelix Fietkau 1463cb4c6a mt76: mt7921: fix boolreturn.cocci warning
./drivers/net/wireless/mediatek/mt76/mt7921/sdio_mac.c: 223: 8-9: WARNING:
return of 0/1 in function 'mt7921s_tx_status_data' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Changcheng Deng <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-28 22:20:34 +01:00
Sean WangandFelix Fietkau 3d9e13f567 mt76: mt7921s: fix the device cannot sleep deeply in suspend
According to the MT7921S firmware, the cmd MCU_UNI_CMD_HIF_CTRL have to
be last MCU command to execute in suspend handler and all data traffic
have to be stopped before the cmd MCU_UNI_CMD_HIF_CTRL starts as well
in order that mt7921 can successfully fall into the deep sleep mode.

Where we reuse the flag MT76_STATE_SUSPEND and avoid creating
another global flag to stop all of the traffic onto the SDIO bus.

Fixes: 48fab5bbef40 ("mt76: mt7921: introduce mt7921s support")
Reported-by: Leon Yen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-23 13:33:02 +01:00
Sean WangandFelix Fietkau a7fdd272ef mt76: mt7921: move mt76_connac_mcu_set_hif_suspend to bus-related files
This is a preliminary patch for the following patch
("mt76: mt7921s: fix the device cannot sleep deeply in suspend).

mt76_connac_mcu_set_hif_suspend eventually would be handled in each
bus-level suspend/resume handler in either mt7921/sdio.c or mt7921/pci.c
depending on what type of the bus the device is running on. We can move
mt76_connac_mcu_set_hif_suspend to bus-related files to simplify the logic.

Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-23 13:33:02 +01:00
Lorenzo BianconiandFelix Fietkau 46261d4bbf mt76: fix possible pktid leak
Fix a possible idr pkt-id leak if the packet is dropped on tx side

Fixes: bd1e3e7b693c ("mt76: introduce packet_id idr")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-23 13:20:47 +01:00
Lorenzo BianconiandFelix Fietkau bc6798f729 mt76: move sar utilities to mt76-core module
Move mt76_get_sar_power and mt76_init_sar_power in the common code.
This is a preliminary patch to add sar support to mt76x02 drivers.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-22 16:05:20 +01:00
Lorenzo BianconiandFelix Fietkau 8c69b815ee mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in mt7921_config
Check return code from mt76_connac_mcu_set_rate_txpower() in mt7921_config
routine.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-22 16:05:20 +01:00
Xing SongandFelix Fietkau 526591b203 mt76: do not pass the received frame with decryption error
MAC80211 doesn't care any decryption error in 802.3 path, so received
frame will be dropped if HW tell us that the cipher configuration is not
matched as well as the header has been translated to 802.3. This case only
appears when IEEE80211_FCTL_PROTECTED is 0 and cipher suit is not none in
the corresponding HW entry.

The received frame is only reported to monitor interface if HW decryption
block tell us there is ICV error or CCMP/BIP/WPI MIC error. Note in this
case the reported frame is decrypted 802.11 frame and the payload may be
malformed due to mismatched key.

Signed-off-by: Xing Song <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-21 20:26:13 +01:00
Lorenzo BianconiandFelix Fietkau 9680a17b0a mt76: mt7921: fix possible NULL pointer dereference in mt7921_mac_write_txwi
Fix a possible NULL pointer deference issue in mt7921_mac_write_txwi
routine if vif is NULL.

Fixes: 33920b2bf0483 ("mt76: add support for setting mcast rate")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-21 20:26:13 +01:00
Deren WuandFelix Fietkau 00b6f497e2 mt76: mt7921: introduce 160 MHz channel bandwidth support
Introduce the basic configuration for BW160 capability in 7922

Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-21 20:26:13 +01:00
Deren WuandFelix Fietkau 91c5da3d0a mt76: mt7921: add support for PCIe ID 0x0608/0x0616
New mt7921 serials chip support

Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-21 20:26:13 +01:00
Ryder LeeandFelix Fietkau dd054b7e16 mt76: only set rx radiotap flag from within decoder functions
Only set RX_FLAG_RADIOTAP_HE and RX_FLAG_RADIOTAP_HE_MU from with their
own decoder functions to prevent header calculation error.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-21 20:26:13 +01:00
Xing SongandFelix Fietkau e814e15716 mt76: reverse the first fragmented frame to 802.11
The HW can apply header translation to first fragmented frame, and
ramaining fragmented frame can only keep 802.11 format. Check and
reverse the first fragmented frame to  802.11 format to make sure
them can be defragmented by mac80211.

Signed-off-by: Xing Song <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-12 13:13:18 +01:00
Sean WangandFelix Fietkau 29a8a08827 mt76: mt7921: fix MT7921E reset failure
There is a missing mt7921e_driver_own in the MT7921E reset procedure
since the mt7921 mcu.c has been refactored for MT7921S, that will
result in MT7921E reset failure, so add it back now.

Fixes: dfc7743de1eb ("mt76: mt7921: refactor mcu.c to be bus independent")
Reported-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-12 13:13:18 +01:00
Sean WangandFelix Fietkau f5cfaaff3d mt76: mt7921: drop offload_flags overwritten
offload_flags have to be dropped for mt7921 because mt76.omac_idx 0 would
always run as station mode that would cause Tx encapsulation setting
is not applied to mac80211.

Also, drop IEEE80211_OFFLOAD_ENCAP_4ADDR too because it is not really
being supported.

Fixes: e0f9fdda81bd ("mt76: mt7921: add ieee80211_ops")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-12 13:13:18 +01:00
Randy DunlapandFelix Fietkau 1d01257662 wireless: mediatek: mt7921: fix Wformat build warning
ARRAY_SIZE() is of type size_t, so the format specfier should
be %zu instead of %lu.

Fixes this build warning:

../drivers/net/wireless/mediatek/mt76/mt7921/main.c: In function ‘mt7921_get_et_stats’:
../drivers/net/wireless/mediatek/mt76/mt7921/main.c:1024:26: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
   dev_err(dev->mt76.dev, "ei: %d  SSTATS_LEN: %lu",

Signed-off-by: Randy Dunlap <[email protected]>
Cc: Sean Wang <[email protected]>
Cc: [email protected]
Cc: Felix Fietkau <[email protected]>
Cc: Lorenzo Bianconi <[email protected]>
Cc: Ryder Lee <[email protected]>
Cc: Kalle Valo <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-23 07:27:31 +02:00
Lorenzo BianconiandFelix Fietkau 754d4a37ab mt76: mt7921: fix mt7921s Kconfig
Add missing MMC dependency in mt7921s Kconfig

Fixes: 48fab5bbef409 ("mt76: mt7921: introduce mt7921s support")
Reported-by: Randy Dunlap <[email protected]>
Tested-by: Randy Dunlap <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-23 07:27:06 +02:00
Lorenzo BianconiandFelix Fietkau 0f49a22314 mt76: mt7921: disable 4addr capability
4addr is not supported by the driver/firmware yet

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-23 07:27:06 +02:00
Lorenzo BianconiandFelix Fietkau 35b8025f46 mt76: mt7921: add per-vif counters in ethtool
Similar to mt7915 driver, add per-vif tx counters in ethtool.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-19 12:33:21 +02:00
Lorenzo BianconiandFelix Fietkau 4b65fbc4e2 mt76: mt7921: move tx amsdu stats in mib_stats
Move tx_amsdu histogram stats in mib_stats structure since registers are
clear-on-read

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-19 12:33:21 +02:00
Lorenzo BianconiandFelix Fietkau 69154ae23f mt76: mt7921: add sta stats accounting in mt7921_mac_add_txs_skb
This is a preliminary patch to add ethtool stats to mt7921 driver.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-19 12:33:21 +02:00