Commit Graph
2805 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix Fietkau f44ca79c9a mt76: mt7915: introduce mt7915_mac_add_twt_setup routine
Introduce individual TWT support to mt7915 in AP mode.
Implement the two following mac80211 callbacks:
- add_twt_setup
- twt_teardown_request

Tested-by: Peter Chiu <[email protected]>
Tested-by: Evelyn Tsai <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 11:53:39 +02:00
Lorenzo BianconiandFelix Fietkau 9d49c611a2 mt76: mt7915: introduce mt7915_mcu_twt_agrt_update mcu command
This is a preliminary patch to add TWT support to mt7915

Tested-by: Peter Chiu <[email protected]>
Tested-by: Evelyn Tsai <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 11:53:39 +02:00
Lorenzo BianconiandFelix Fietkau 4c455e8b1a mt76: mt7915: introduce __mt7915_get_tsf routine
Introduce an unlocked verion of mt7915_get_tsf routine.
This is a preliminary patch to add TWT support to mt7915.

Tested-by: Peter Chiu <[email protected]>
Tested-by: Evelyn Tsai <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 11:53:39 +02:00
Sean WangandFelix Fietkau e8e2eae41f mt76: drop MCU header size from buffer size in __mt76_mcu_send_firmware
Each firmware piece with mt7915 and mt7921 do not have the MCU header to
reroute the packet to the internal RAM. So we do not need to consider the
MCU header size in __mt76_mcu_send_firmware.
Move the MCU header overhead calculation to mt76_mcu_send_firmware (for
older chipsets)

Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Fixes: 1c099ab44727 ("mt76: mt7921: add MCU support")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 09:33:11 +02:00
Lorenzo BianconiandFelix Fietkau 75615480b3 mt76: introduce __mt76_mcu_send_firmware routine
Introduce __mt76_mcu_send_firmware routine to specify mcu message max
length. This is a preliminary patch to support mt7921s driver.

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 09:30:40 +02:00
Daniel GolleandFelix Fietkau 03a9926453 mt76: support reading EEPROM data embedded in fdt
Some platforms boot from SD card and don't come with calibration data
stored anywhere on the board.
As EEPROM data is rather small it can be embedded into the device tree
to be loaded from there by the mt76.

Signed-off-by: Daniel Golle <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 09:27:12 +02:00
Lorenzo BianconiandFelix Fietkau 69bb59df89 mt76: schedule status timeout at dma completion
Reduce MT_TX_STATUS_SKB_TIMEOUT to 250ms

Tested-by: [email protected]
Co-developed-by: Ben Greear <[email protected]>
Signed-off-by: Ben Greear <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 09:19:04 +02:00
Lorenzo BianconiandFelix Fietkau ccbd847631 mt76: substitute sk_buff_head status_list with spinlock_t status_lock
Substitute sk_buff_head status_list with spinlock_t status_lock since we
just need it for locking

Tested-by: [email protected]
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 09:19:04 +02:00
Lorenzo BianconiandFelix Fietkau bcc8d9e03a mt76: remove mt76_wcid pointer from mt76_tx_status_check signature
Remove mt76_wcid pointer from mt76_tx_status_check signature since it is
always set to NULL

Tested-by: [email protected]
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 09:19:04 +02:00
Lorenzo BianconiandFelix Fietkau f143aedc1d mt76: introduce packet_id idr
Introduce per-wcid idr to manage packet id for txs. This allow fast idr
lookup and skb queueing at the same time.

Tested-by: [email protected]
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 09:19:04 +02:00
Lorenzo BianconiandFelix Fietkau de8c4f9262 mt76: mt7921: add 6GHz support
Unlock 6GHz band if supported by the device. Configure HE 6G
capabilities.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Lorenzo BianconiandFelix Fietkau 91ed2b256c mt76: add 6GHz support
Introduce 6GHz channel list in mt76 module. This is a preliminary patch
to unlock 6GHz band for mt7921 devices.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Lorenzo BianconiandFelix Fietkau c3dd12b4c8 mt76: connac: enable hw amsdu @ 6GHz
This is a preliminary patch to enable 6GHz band for mt7921 devices.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Lorenzo BianconiandFelix Fietkau d2e192ea81 mt76: connac: add 6GHz support to mt76_connac_mcu_uni_add_bss
This is a preliminary patch to enable 6GHz band for mt7921 devices.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Lorenzo BianconiandFelix Fietkau ca4f47028a mt76: connac: add 6GHz support to mt76_connac_mcu_sta_tlv
Introduce sta_rec_he_6g_capa tlv in order configure the mcu with 6GHz
capabilities. This is a preliminary patch to enable 6GHz band for
mt7921 devices.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Lorenzo BianconiandFelix Fietkau a6ab81c210 mt76: connac: set 6G phymode in single-sku support
Configure tx rate power for 6GHz channels. This is a preliminary patch
to enable 6GHz band for mt7921 devices.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Lorenzo BianconiandFelix Fietkau 817a41826b mt76: connac: add 6GHz support to mt76_connac_mcu_set_channel_domain
Configure 6GHz channels defining mcu channel domain. This is a
preliminary patch to enable 6GHz band on mt7921 devices.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Lorenzo BianconiandFelix Fietkau 3f2a5d3963 mt76: connac: enable 6GHz band for hw scan
This is a preliminary patch to support 6GHz band on mt7921 devices.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Lorenzo BianconiandFelix Fietkau 4ca80a749e mt76: connac: set 6G phymode in mt76_connac_get_phy_mode{,v2}
This is a preliminary patch to support 6GHz band on mt7921 devices.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:11:21 +02:00
Ben GreearandFelix Fietkau 4727415017 mt76: mt7915: add mib counters to ethtool stats
This adds the new mib counters from last patch into ethtool
stats.

Signed-off-by: Ben Greear <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:03:30 +02:00
Ben GreearandFelix Fietkau 9752bf0643 mt76: mt7915: add more MIB registers
Add register definitions and read & accumulate them in
the mib polling logic.  Note that some registers should not
be read since firmware is already reading them.  If driver
reads those, they will be cleared-on-read, and so the firmware
stats will be incorrect.

For these 'do-not-read' stats, add them to the registers definition
so that other developers can be aware of these constraints, but do
not actually read them in the driver.

Signed-off-by: Ben Greear <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:03:30 +02:00
Ben GreearandFelix Fietkau f4dde5f765 mt76: mt7915: add tx mu/su counters to mib
These counters are clear-on-read, so we need to accumulate
them in the update_stats poll logic, and read the accumulated
values instead of directly doing register reads when reporting
to debugfs and ethtool stats.

Signed-off-by: Ben Greear <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:03:30 +02:00
Ben GreearandFelix Fietkau 1687189d68 mt76: mt7915: add some per-station tx stats to ethtool
The tx status callback is not called for every frame, so
those specific counters under-count, but at least they give
some idea of what is going on.

Signed-off-by: Ben Greear <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:03:30 +02:00
Ben GreearandFelix Fietkau d1d5e8cd3a mt76: mt7915: add tx stats gathered from tx-status callbacks
Add tx-mode (ofdma, ht, vht, HE) histogram,
tx-ru-idx histogram, and tx-bandwidth histogram.
Also add tx attempts and tx success counters.

All of this is per-station.

Signed-off-by: Ben Greear <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:03:30 +02:00
Ben GreearandFelix Fietkau c55dedcea2 mt76: mt7915: add ethtool stats support
This exposes some tx-path stats to the ethtool API, so that
ethtool -S wlanX provides some more useful info.

Signed-off-by: Ben Greear <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-11 08:03:30 +02:00
Sean WangandFelix Fietkau e0b8461592 mt76: mt7921: fix retrying release semaphore without end
We should pass the error code to the caller immediately
to avoid the possible infinite retry to release the semaphore.

Fixes: 1c099ab44727 ("mt76: mt7921: add MCU 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-09-24 20:37:04 +02:00
Sean WangandFelix Fietkau 537ed88dd2 mt76: mt7921: robustify hardware initialization flow
Robustify hardware initialization in the current driver probing flow
to get rid of the device is possibly lost after the machine boot due
to possible firmware abnormal state by trying to recover the failure
with more chances.

Tested-by: Leon Yen <[email protected]>
Tested-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 20:37:04 +02:00
Lorenzo BianconiandFelix Fietkau 4dfff296ee mt76: mt7915: fix possible infinite loop release semaphore
Fix possible infinite loop in mt7915_load_patch if
mt7915_mcu_patch_sem_ctrl always returns an error.

Fixes: e57b7901469fc ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:32:08 +02:00
Lorenzo BianconiandFelix Fietkau 0eacf41985 mt76: mt7915: honor all possible error conditions in mt7915_mcu_init()
Check all possible errors returned in mt7915_mcu_init routine.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:28:25 +02:00
Xingbang LiuandFelix Fietkau 6bb8b4267d mt76: move spin_lock_bh to spin_lock in tasklet
as you are already in a tasklet, it is unnecessary to call spin_lock_bh.

Signed-off-by: Xingbang Liu <[email protected]>
2021-09-24 19:27:54 +02:00
Lorenzo BianconiandFelix Fietkau db89c6f867 mt76: mt7921: remove mt7921_sta_stats
mt7921_sta_stats is no longer needed

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:27:14 +02:00
Lorenzo BianconiandFelix Fietkau 4dc7f3db57 mt76: mt7921: remove mcu rate reporting code
Remove unused tx rate reporting through mcu tx done event since
now tx status is fully supported

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:27:14 +02:00
Lorenzo BianconiandFelix Fietkau c8010f170e mt76: mt7921: report tx rate directly from tx status
Report tx rate from tx status packets instead of receiving periodic mcu
event. This improves flexibility, accuracy and AQL performance, and
simplifies code flow for better readability.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:27:13 +02:00
Lorenzo BianconiandFelix Fietkau eb66b5c9ff mt76: mt7921: add support for tx status reporting
Introduce infrastructure support for tx status reporting

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:27:13 +02:00
Lorenzo BianconiandFelix Fietkau 5e82eceb45 mt76: mt7921: start reworking tx rate reporting
Similar to mt7915, introduce mt7921_txwi_free to report tx rate to
mac80211. This is a preliminary patch to add proper tx status report.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:27:13 +02:00
Ryder LeeandFelix Fietkau 3b9ba7e020 mt76: mt7615: fix hwmon temp sensor mem use-after-free
Without this change, garbage is seen in the hwmon name and sensors output
for mt7615 is garbled.

Fixes: 109e505ad944 ("mt76: mt7615: add thermal sensor device support")
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:22:14 +02:00
Ben GreearandFelix Fietkau c8f0d1d81d mt76: mt7915: fix hwmon temp sensor mem use-after-free
Without this change, garbage is seen in the hwmon name and sensors output
for mt7915 is garbled. It appears that the hwmon logic does not make a
copy of the incoming string, but instead just copies a char* and expects
it to never go away.

Fixes: d6938251bb5b ("mt76: mt7915: add thermal sensor device support")
Signed-off-by: Ben Greear <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:22:14 +02:00
Ryder LeeandFelix Fietkau 80fe40c945 mt76: mt7915: enable configured beacon tx rate
The user is allowed to change beacon tx rate (HT/VHT/HE) from hostapd.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 19:11:08 +02:00
MeiChia ChiuandFelix Fietkau e17d730bf2 mt76: mt7915: add LED support [update to v3]
Initialize brightness_set and blink_set callbacks to enable LED support.
The base 0x7c000000 is MCU space so driver can't touch it, and should
map the LED base to 0x18000000 host's view.

Signed-off-by: MeiChia Chiu <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Money Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 18:03:18 +02:00
Felix Fietkau 8ee6446075 mt76: disable BH around napi_schedule() calls
napi_schedule() can call __raise_softirq_irqoff(), which can perform softirq
handling, so it must not be called in a pure process context with BH enabled.

Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:54:42 +02:00
Ryder LeeandFelix Fietkau d8b5e42c9a mt76: fill boottime_ns in Rx path
Give a proper boottime_ns value for netlink RX to avoid scan
issues with Android.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:43:16 +02:00
Christophe JAILLETandFelix Fietkau 9dcfba3169 mt76: switch from 'pci_' to 'dma_' API
The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below.

It has been compile tested.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&e1->dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&e1->dev, e2)

Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:42:12 +02:00
Sean WangandFelix Fietkau d7c4698435 mt76: mt7921: fix the inconsistent state between bind and unbind
We shouldn't put back the device into fw own state after wifi reset at
driver unbind stage to fix the following error because that is not the
consistent state the current driver bind stage expects.

localhost ~ # echo 0000:01:00.0 > /sys/bus/pci/drivers/mt7921e/unbind
localhost ~ # echo 0000:01:00.0 > /sys/bus/pci/drivers/mt7921e/bind
...
[  481.172969] mt7921e 0000:01:00.0: ASIC revision: feed0000
[  482.133547] mt7921e: probe of 0000:01:00.0 failed with error -110
-bash: echo: write error: No such device

Fixes: c1af184ba830 ("mt76: mt7921: fix dma hang in rmmod")
Co-developed-by: YN Chen <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Tested-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:42:06 +02:00
jing yangyangandFelix Fietkau eb75b9266c net:wireless:mt76: fix boolreturn.cocci warnings
./drivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:172:8-9:WARNING:
return of 0/1 in function 'mt7663_usb_sdio_tx_status_data' with return
type bool

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

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: jing yangyang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:40:52 +02:00
Lorenzo BianconiandFelix Fietkau ac6adf74b3 mt76: mt7921: update mib counters dumping phy stats
mt7921 mac work can be idle for a long time due to runtime-pm so
update mib counters dumping phy stats

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:39:43 +02:00
Lorenzo BianconiandFelix Fietkau 4750b5c918 mt76: mt7921: always wake device if necessary in debugfs
Add missing device wakeup in debugfs code if we are accessing chip
registers.

Fixes: 1d8efc741df8 ("mt76: mt7921: introduce Runtime PM support")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:39:43 +02:00
Ryder LeeandFelix Fietkau 62ffc31f4d mt76: mt7915: rename debugfs tx-queues
Rename "queues" to "tx-queues" to reflect its meaning.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:38:21 +02:00
Ryder LeeandFelix Fietkau 5a0f2382fc mt76: mt7915: rework debugfs queue info
Complete PSE/PLE queue statistics, including per-sta AC queue
information.

Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:36:42 +02:00
Lorenzo BianconiandFelix Fietkau a509cf2b65 mt76: mt7921: move mt7921_queue_rx_skb to mac.c
As for 7915 moving mt7921_queue_rx_skb makes it possible to make
some functions in mac.c static

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:34:33 +02:00
Ryder LeeandFelix Fietkau 5710d06434 mt76: add a bound check in mt76_calculate_default_rate()
basic_rate could be 0 ie. hidden AP. Always pick the lowest rate
for such cases.

Fixes: 75fb2e62d444 (mt76: add mt76_default_basic_rate more devices can rely on)
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-09-24 17:27:25 +02:00