Commit Graph
232 Commits
Author SHA1 Message Date
Peter ChiuandFelix Fietkau 39079b5e44 wifi: mt76: drop the incorrect scatter and gather frame
The scatter and gather frame may be incorrect because WED and WO may
send frames to host driver interleaved.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Lorenzo BianconiandFelix Fietkau 4b229d2da5 wifi: mt76: mt7915: add mt7915 wed reset callbacks
Introduce mt7915_mmio_wed_reset_complete and
mt7915_mmio_wed_reset_complete callbacks and the related wait
queues in order to wait for wed reset completion during wlan reset.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:03:57 +01:00
Sujuan ChenandFelix Fietkau 3dace36e29 wifi: mt76: dma: reset wed queues in mt76_dma_rx_reset
This is a preliminary patch to introduce proper wed reset support.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:03:57 +01:00
Sujuan ChenandFelix Fietkau c67f57d2cd wifi: mt76: dma: add reset to mt76_dma_wed_setup signature
Export mt76_dma_wed_setup routine. This is a preliminary patch to
introduce proper wed reset support.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:03:57 +01:00
Lorenzo BianconiandFelix Fietkau 715b3ed970 net: ethernet: mtk_wed: add reset to tx_ring_setup callback
Introduce reset parameter to mtk_wed_tx_ring_setup signature.
This is a preliminary patch to add Wireless Ethernet Dispatcher reset
support.

Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
2023-02-01 13:42:22 +01:00
Lorenzo BianconiandFelix Fietkau 0cf0ede7cc net: ethernet: mtk_wed: add reset to rx_ring_setup callback
This patch adds reset parameter to mtk_wed_rx_ring_setup signature
in order to align rx_ring_setup callback to tx_ring_setup one introduced
in 'commit 23dca7a90017 ("net: ethernet: mtk_wed: add reset to
tx_ring_setup callback")'

Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Link: https://lore.kernel.org/r/29c6e7a5469e784406cf3e2920351d1207713d05.1670239984.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski <[email protected]>
2023-02-01 13:39:17 +01:00
Sujuan ChenandFelix Fietkau 1af4a911eb wifi: mt76: mt7915: release rxwi in mt7915_wed_release_rx_buf
Free rxwi cache releasing WED rx buffers in mt7915_wed_release_rx_buf
routine

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-01-25 20:12:27 +01:00
Lorenzo BianconiandFelix Fietkau 9686cd7cc6 wifi: mt76: switch to page_pool allocator
In order to reduce possible memory allocation failures due to memory
fragmentation caused by page_frag_cache allocator, switch to page_pool
allocator for dma and usb mt76 drivers.
Remove per rx-queue page_frag_cache

Co-developed-by: Felix Fietkau <[email protected]>
Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-01-25 20:11:29 +01:00
Lorenzo BianconiandFelix Fietkau 0c750cf08f wifi: mt76: dma: fix memory leak running mt76_dma_tx_cleanup
Fix device unregister memory leak and alway cleanup all configured
rx queues in mt76_dma_tx_cleanup routine.

Fixes: 52546e27787e ("wifi: mt76: add WED RX support to dma queue alloc")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-01-23 10:32:49 +01:00
Lorenzo BianconiandFelix Fietkau 683760461d wifi: mt76: dma: free rx_head in mt76_dma_rx_cleanup
Free rx_head skb in mt76_dma_rx_cleanup routine in order to avoid
possible memory leak at module unload.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-01-23 10:32:48 +01:00
Lorenzo BianconiandFelix Fietkau 3c162384d8 wifi: mt76: introduce mt76_queue_is_wed_rx utility routine
This patch does not change any logic, just improve code readability.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-01-23 10:32:48 +01:00
Felix Fietkau 6c256218e5 wifi: mt76: dma: use napi_build_skb
Improves performance by using bulk allocation

Signed-off-by: Felix Fietkau <[email protected]>
2022-12-31 08:47:20 +01:00
Felix Fietkau 5b509e8038 wifi: mt76: dma: fix a regression in adding rx buffers
When adding WED support, mt76_dma_add_buf was accidentally changed to set
the skip_buf0 flag for tx buffers on the wrong queue descriptor entry.
Additionally, there is a rxwi leak when rx buffer allocation fails.

Fix this and make the code more readable by adding a separate function for
adding rx buffers.

Reported-by: Mikhail Gavrilov <[email protected]>
Tested-by: Mikhail Gavrilov <[email protected]>
Fixes: cd372b8c99c5 ("wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf")
Signed-off-by: Felix Fietkau <[email protected]>
2022-12-22 16:17:39 +01:00
Lorenzo BianconiandFelix Fietkau 52d04463a6 wifi: mt76: dma: rely on queue page_frag_cache for wed rx queues
Since mt76_dma_rx_fill() acquires mt76_queue spinlock, rely on mt76_queue
page_frag_cache in mt76_dma_rx_fill() instead of wed rx_buf_ring
page_frag_cache. Get rid of mt76_dma_rx_get_frag_cache since it is no
longer used.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-12-10 13:11:05 +01:00
Lorenzo BianconiandFelix Fietkau 95c66d6511 wifi: mt76: handle possible mt76_rx_token_consume failures
Take into account possible error conditions of mt76_rx_token_consume
routine in mt7915_mmio_wed_init_rx_buf() and mt76_dma_add_buf()

Fixes: cd372b8c99c5 ("wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf")
Fixes: 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-12-10 13:11:05 +01:00
Lorenzo BianconiandFelix Fietkau 8e7e7e52fc wifi: mt76: dma: do not increment queue head if mt76_dma_add_buf fails
Do not increment queue head if mt76_dma_add_buf fails for Wireless
Ethernet Dispatcher rx queues.

Fixes: cd372b8c99c5 ("wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-12-10 13:11:05 +01:00
Felix Fietkau ec46d7486a sync with upstream
Signed-off-by: Felix Fietkau <[email protected]>
2022-12-10 13:11:04 +01:00
Sujuan ChenandFelix Fietkau 1361519851 wifi: mt76: add info parameter to rx_skb signature
This is a preliminary patch to introduce WED RX support for mt7915.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-11-23 13:11:29 +01:00
Lorenzo BianconiandFelix Fietkau 86e94f4162 wifi: mt76: add WED RX support to dma queue alloc
Introduce the capability to allocate WED RX buffers in
mt76_dma_wed_setup routine.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-11-23 13:11:29 +01:00
Lorenzo BianconiandFelix Fietkau 13c2dc8993 wifi: mt76: add WED RX support to mt76_dma_rx_fill
Introduce the capability to refill WED RX buffers in mt76_dma_rx_fill
utility routine.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-11-23 13:11:29 +01:00
Lorenzo BianconiandFelix Fietkau 629f8631f5 wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf
Introduce the capability to configure RX WED in mt76_dma_{add,get}_buf
utility routines.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-11-23 13:11:29 +01:00
Sujuan ChenandFelix Fietkau 417cca39ba wifi: mt76: introduce rxwi and rx token utility routines
This is a preliminary patch to introduce WED RX support for mt7915.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-11-23 13:11:29 +01:00
Felix Fietkau 269df4b01f wifi: mt76: fix rx checksum offload on mt7615/mt7915/mt7921
Checking the relevant rxd bits for the checksum information only indicates
if the checksum verification was performed by the hardware and doesn't show
actual checksum errors. Checksum errors are indicated in the info field of
the DMA descriptor. Fix packets erroneously marked as CHECKSUM_UNNECESSARY
by checking the extra bits as well.
Those bits are only passed to the driver for MMIO devices at the moment, so
limit checksum offload to those.

Fixes: 2122dfbfd0bd ("mt76: mt7615: add rx checksum offload support")
Fixes: 94244d2ea503 ("mt76: mt7915: add rx checksum offload support")
Fixes: 0e75732764e8 ("mt76: mt7921: enable rx csum offload")
Signed-off-by: Felix Fietkau <[email protected]>
2022-10-05 15:05:43 +02:00
Lorenzo BianconiandFelix Fietkau eb19ac83c0 mt76: introduce phys array in mt76_dev structure
Introduce phys array in mt76_dev structure to reference mt76_phy
supported by the chipset. This is a preliminary patch to introduce
newer chipset support.

Signed-off-by: Lorenzo Bianconi <[email protected]>
2022-07-11 13:38:17 +02:00
Felix Fietkau 93e3fce916 mt76: pass original queue id from __mt76_tx_queue_skb to the driver
MT7615 and newer map multiple software tx queues to the hardware id

Signed-off-by: Felix Fietkau <[email protected]>
2022-07-03 17:52:25 +02:00
Felix Fietkau 87a962e060 mt76: mt7915: add Wireless Ethernet Dispatch support
This is used to support hardware flow offloading from Ethernet to WLAN

Signed-off-by: Felix Fietkau <[email protected]>
2022-04-07 11:56:24 +02:00
Felix Fietkau e0bc736d56 mt76: add support for overriding the device used for DMA mapping
WED support requires using non-coherent DMA, whereas the PCI device might
be configured for coherent DMA.
The WED driver will take care of changing the PCI HIF coherent IO setting
on attach.

Signed-off-by: Felix Fietkau <[email protected]>
2022-03-29 13:13:27 +02:00
Felix Fietkau 5beb87716e mt76: dma: add wrapper macro for accessing queue registers
Preparation for adding indirection used for Wireless Ethernet Dispatch support

Signed-off-by: Felix Fietkau <[email protected]>
2022-03-29 13:13:24 +02:00
Felix Fietkau eed44048ca Revert "mt76: dma: reduce lock contention in mt76_dma_tx_cleanup"
This reverts commit 2e51013b38.
2022-03-29 13:09:02 +02:00
Felix Fietkau 2e51013b38 mt76: dma: reduce lock contention in mt76_dma_tx_cleanup
Instead of taking q->lock for every single cleaned up frame, batch up to
16 cleaned up frames before taking it.

Signed-off-by: Felix Fietkau <[email protected]>
2022-03-19 23:24:57 +01:00
Felix Fietkau 0b1deb9292 mt76: dma: use kzalloc instead of devm_kzalloc for txwi
dma unmap is already needed for cleanup anyway, so we don't need the extra
tracking and can save a bit of memory here

Signed-off-by: Felix Fietkau <[email protected]>
2022-03-19 23:10:29 +01:00
Lorenzo BianconiandFelix Fietkau ab9b807842 mt76: dma: initialize skip_unmap in mt76_dma_rx_fill
Even if it is only a false-positive since skip_buf0/skip_buf1 are only
used in mt76_dma_tx_cleanup_idx routine, initialize skip_unmap in
mt76_dma_rx_fill in order to fix the following UBSAN report:

[   13.924906] UBSAN: invalid-load in linux-5.15.0/drivers/net/wireless/mediatek/mt76/dma.c:162:13
[   13.924909] load of value 225 is not a valid value for type '_Bool'
[   13.924912] CPU: 9 PID: 672 Comm: systemd-udevd Not tainted 5.15.0-18-generic #18-Ubuntu
[   13.924914] Hardware name: LENOVO 21A0000CMX/21A0000CMX, BIOS R1MET43W (1.13 ) 11/05/2021
[   13.924915] Call Trace:
[   13.924917]  <TASK>
[   13.924920]  show_stack+0x52/0x58
[   13.924925]  dump_stack_lvl+0x4a/0x5f
[   13.924931]  dump_stack+0x10/0x12
[   13.924932]  ubsan_epilogue+0x9/0x45
[   13.924934]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
[   13.924935]  ? __iommu_dma_map+0x84/0xf0
[   13.924939]  mt76_dma_add_buf.constprop.0.cold+0x23/0x85 [mt76]
[   13.924949]  mt76_dma_rx_fill.isra.0+0x102/0x1f0 [mt76]
[   13.924954]  mt76_dma_init+0xc9/0x150 [mt76]
[   13.924959]  ? mt7921_dma_enable+0x110/0x110 [mt7921e]
[   13.924966]  mt7921_dma_init+0x1e3/0x260 [mt7921e]
[   13.924970]  mt7921_register_device+0x29d/0x510 [mt7921e]
[   13.924975]  mt7921_pci_probe.part.0+0x17f/0x1b0 [mt7921e]
[   13.924980]  mt7921_pci_probe+0x43/0x60 [mt7921e]
[   13.924984]  local_pci_probe+0x4b/0x90
[   13.924987]  pci_device_probe+0x115/0x1f0
[   13.924989]  really_probe+0x21e/0x420
[   13.924992]  __driver_probe_device+0x115/0x190
[   13.924994]  driver_probe_device+0x23/0xc0
[   13.924996]  __driver_attach+0xbd/0x1d0
[   13.924998]  ? __device_attach_driver+0x110/0x110
[   13.924999]  bus_for_each_dev+0x7e/0xc0
[   13.925001]  driver_attach+0x1e/0x20
[   13.925003]  bus_add_driver+0x135/0x200
[   13.925005]  driver_register+0x95/0xf0
[   13.925008]  ? 0xffffffffc0766000
[   13.925010]  __pci_register_driver+0x68/0x70
[   13.925011]  mt7921_pci_driver_init+0x23/0x1000 [mt7921e]
[   13.925015]  do_one_initcall+0x48/0x1d0
[   13.925019]  ? kmem_cache_alloc_trace+0x19e/0x2e0
[   13.925022]  do_init_module+0x62/0x280
[   13.925025]  load_module+0xac9/0xbb0
[   13.925027]  __do_sys_finit_module+0xbf/0x120
[   13.925029]  __x64_sys_finit_module+0x18/0x20
[   13.925030]  do_syscall_64+0x5c/0xc0
[   13.925033]  ? do_syscall_64+0x69/0xc0
[   13.925034]  ? sysvec_reschedule_ipi+0x78/0xe0
[   13.925036]  ? asm_sysvec_reschedule_ipi+0xa/0x20
[   13.925039]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[   13.925040] RIP: 0033:0x7fbf2b90f94d
[   13.925045] RSP: 002b:00007ffe2ec7e5d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   13.925047] RAX: ffffffffffffffda RBX: 000056106b0634e0 RCX: 00007fbf2b90f94d
[   13.925048] RDX: 0000000000000000 RSI: 00007fbf2baa3441 RDI: 0000000000000013
[   13.925049] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000002
[   13.925050] R10: 0000000000000013 R11: 0000000000000246 R12: 00007fbf2baa3441
[   13.925051] R13: 000056106b062620 R14: 000056106b0610c0 R15: 000056106b0640d0
[   13.925053]  </TASK>

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-02-03 15:15:07 +01:00
Bo JiaoandFelix Fietkau de49cf43ef mt76: add MT_RXQ_MAIN_WA for mt7916
mt7916 add MT_RXQ_MAIN_WA to receive tx free event separately
This is an intermediate patch to add mt7916 support.

Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Co-developed-by: Ryder Lee <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Bo Jiao <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-20 10:57:00 +01:00
Felix Fietkau 833b9d7fcf mt76: allow drivers to drop rx packets early
This can be used to free received events without allocating an extra skb

Signed-off-by: Felix Fietkau <[email protected]>
2021-12-03 18:01:54 +01:00
Felix Fietkau a9bc4d94b7 mt76: intialize tx queue entry wcid to 0xffff by default
Avoid accidentally mapping them to WCID 0 on completion

Signed-off-by: Felix Fietkau <[email protected]>
2021-05-09 22:49:09 +02:00
Felix Fietkau 9e928ac1ea mt76: dma: use ieee80211_tx_status_ext to free packets when tx fails
Fixes AQL issues on full queues, especially with 802.3 encap offload

Signed-off-by: Felix Fietkau <[email protected]>
2021-05-09 20:26:08 +02:00
Lorenzo BianconiandFelix Fietkau 51b3d1a9a2 mt76: dma: add the capability to define a custom rx napi poll routine
Add the capability to define a custom rx napi callback for each driver.
This is a preliminary patch to properly support runtime-pm on rx side

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-04-21 13:49:02 +02:00
Felix Fietkau 09a1befde4 mt76: fix potential DMA mapping leak
With buf uninitialized in mt76_dma_tx_queue_skb_raw, its field skip_unmap
could potentially inherit a non-zero value from stack garbage.
If this happens, it will cause DMA mappings for MCU command frames to not be
unmapped after completion

Fixes: 27d5c528a7ca ("mt76: fix double DMA unmap of the first buffer on 7615/7915")
Cc: [email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2021-03-23 22:47:59 +01:00
Lorenzo BianconiandFelix Fietkau a80e50098b mt76: dma: export mt76_dma_rx_cleanup routine
Export mt76_dma_rx_cleanup routine in mt76_queue_ops data structure.
This is a preliminary patch to introduce mt7921 chip reset support.

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-03-14 23:39:22 +01:00
Lorenzo BianconiandFelix Fietkau 7b56d5bf6e mt76: dma: introduce mt76_dma_queue_reset routine
Introduce mt76_dma_queue_reset utility routine to reset a given hw
queue. This is a preliminary patch to introduce mt7921 chip reset
support.

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-03-14 23:39:22 +01:00
Felix Fietkau bfa8d5a6a9 mt76: adjust to upstream API for enabling threaded NAPI
Create a second dummy device for tx napi to avoid making it threaded

Signed-off-by: Felix Fietkau <[email protected]>
2021-03-14 17:36:54 +01:00
Felix Fietkau 6a3cf95733 mt76: fix tx skb error handling in mt76_dma_tx_queue_skb
When running out of room in the tx queue after calling drv->tx_prepare_skb,
the buffer list will already have been modified on MT7615 and newer drivers.
This can leak a DMA mapping and will show up as swiotlb allocation failures
on x86.

Fix this by moving the queue length check further up. This is less accurate,
since it can overestimate the needed room in the queue on MT7615 and newer,
but the difference is small enough to not matter in practice.

Signed-off-by: Felix Fietkau <[email protected]>
2021-02-16 14:46:04 +01:00
Lorenzo BianconiandFelix Fietkau b09cc86445 mt76: dma: do not report truncated frames to mac80211
If the fragment is discarded in mt76_add_fragment() since shared_info
frag array is full, discard truncated frames and do not forward them to
mac80211.

Signed-off-by: Lorenzo Bianconi <[email protected]>
2021-02-14 11:27:25 +01:00
Lorenzo BianconiandFelix Fietkau 8696919d9a 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: b102f0c522cf6 ("mt76: fix array overflow on receiving too many fragments for a packet")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
2021-01-27 17:25:22 +01:00
Shayne ChenandFelix Fietkau a897a69769 mt76: testmode: introduce dbdc support
Add testmode support for DBDC NICs (both MT7615D and MT7915D work).
Testmode data and parameters are moved from per-dev to per-phy
for maintaining the value of each band.

Signed-off-by: Shayne Chen <[email protected]>
Acked-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-01-04 18:30:34 +01:00
Felix Fietkau 066cc441eb mt76: attempt to free up more room when filling the tx queue
Run dma cleanup immediately if the queue is almost full, instead of waiting
for the tx interrupt

Signed-off-by: Felix Fietkau <[email protected]>
2020-11-21 18:23:36 +01:00
Felix Fietkau e361b6a71e mt76: improve tx queue stop/wake
Instead of stopping and waking only a single queue, handle all phy tx queues
mapped ot the same hardware queue.
Also allow the driver to block tx queues

Signed-off-by: Felix Fietkau <[email protected]>
2020-11-21 15:58:52 +01:00
Lorenzo BianconiandFelix Fietkau 2e217fb9e9 mt76: move tx hw data queues in mt76_phy
Move hw data queues in mt76_phy from mt76_dev since mt7915 supports per
phy hw queues in dbdc mode

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-11-12 14:59:29 +01:00
Lorenzo BianconiandFelix Fietkau ccd62467d0 mt76: move mcu queues to mt76_dev q_mcu array
Move mcu queue to a dedicated array q_mcu in mt76_dev structure.
This is a preliminary patch to move data queues in mt76_phy and properly
support dbdc

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-11-12 14:59:29 +01:00
Lorenzo BianconiandFelix Fietkau b0eb7edcc6 mt76: rely on mt76_queue in tx_queue_skb_raw signature
This is a preliminary patch to move data queues in mt76_phy and properly
support dbdc

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-11-12 14:59:29 +01:00