- 25 9月, 2020 4 次提交
-
-
由 Felix Fietkau 提交于
Cleanup and preparation for changing tx scheduling behavior Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Ensure that descriptor memory has been fully written before letting the hardware read it Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Tx cleanup and tx enqueuing can run in parallel. In order to avoid queue starvation issues under load, update q->queued immediately. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
A small part of the first skb buffer is passed to the firmware for parsing via DMA, while the full buffer is passed as part of the TXP. Avoid calling DMA unmap on the first part (with a different length than map) Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 22 7月, 2020 1 次提交
-
-
由 Felix Fietkau 提交于
This can be used for calibration in the manufacturing process. It supports sending a configurable number of packets with a specific rate and configurable tx power levels / antenna settings. It also supports receiving packets and showing some statistics, including packet counters and detailed RSSI information. It will only be compiled in if CONFIG_NL80211_TESTMODE is enabled Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 28 5月, 2020 1 次提交
-
-
由 Felix Fietkau 提交于
Fixes the following reported crash: [ 2.361127] BUG: spinlock bad magic on CPU#0, modprobe/456 [ 2.361583] lock: 0xffffa1287525b3b8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 [ 2.362250] CPU: 0 PID: 456 Comm: modprobe Not tainted 4.14.177 #5 [ 2.362751] Hardware name: HP Meep/Meep, BIOS Google_Meep.11297.75.0 06/17/2019 [ 2.363343] Call Trace: [ 2.363552] dump_stack+0x97/0xdb [ 2.363826] ? spin_bug+0xa6/0xb3 [ 2.364096] do_raw_spin_lock+0x6a/0x9a [ 2.364417] mt76_dma_rx_fill+0x44/0x1de [mt76] [ 2.364787] ? mt76_dma_kick_queue+0x18/0x18 [mt76] [ 2.365184] mt76_dma_init+0x53/0x85 [mt76] [ 2.365532] mt7615_dma_init+0x3d7/0x546 [mt7615e] [ 2.365928] mt7615_register_device+0xe6/0x1a0 [mt7615e] [ 2.366364] mt7615_mmio_probe+0x14b/0x171 [mt7615e] [ 2.366771] mt7615_pci_probe+0x118/0x13b [mt7615e] [ 2.367169] pci_device_probe+0xaf/0x13d [ 2.367491] driver_probe_device+0x284/0x2ca [ 2.367840] __driver_attach+0x7a/0x9e [ 2.368146] ? driver_attach+0x1f/0x1f [ 2.368451] bus_for_each_dev+0xa0/0xdb [ 2.368765] bus_add_driver+0x132/0x204 [ 2.369078] driver_register+0x8e/0xcd [ 2.369384] do_one_initcall+0x160/0x257 [ 2.369706] ? 0xffffffffc0240000 [ 2.369980] do_init_module+0x60/0x1bb [ 2.370286] load_module+0x18c2/0x1a2b [ 2.370596] ? kernel_read_file+0x141/0x1b9 [ 2.370937] ? kernel_read_file_from_fd+0x46/0x71 [ 2.371320] SyS_finit_module+0xcc/0xf0 [ 2.371636] do_syscall_64+0x6b/0xf7 [ 2.371930] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 2.372344] RIP: 0033:0x7da218ae4199 [ 2.372637] RSP: 002b:00007fffd0608398 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 2.373252] RAX: ffffffffffffffda RBX: 00005a705449df90 RCX: 00007da218ae4199 [ 2.373833] RDX: 0000000000000000 RSI: 00005a7052e73bd8 RDI: 0000000000000006 [ 2.374411] RBP: 00007fffd06083e0 R08: 0000000000000000 R09: 00005a705449d540 [ 2.374989] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000000 [ 2.375569] R13: 00005a705449def0 R14: 00005a7052e73bd8 R15: 0000000000000000 Reported-by: NSean Wang <sean.wang@mediatek.com> Fixes: d3377b78 ("mt76: add HE phy modes and hardware queue") Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 03 3月, 2020 1 次提交
-
-
由 Felix Fietkau 提交于
If the hardware receives an oversized packet with too many rx fragments, skb_shinfo(skb)->frags can overflow and corrupt memory of adjacent pages. This becomes especially visible if it corrupts the freelist pointer of a slab page. Cc: stable@vger.kernel.org Signed-off-by: NFelix Fietkau <nbd@nbd.name> Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
-
- 14 2月, 2020 8 次提交
-
-
由 Felix Fietkau 提交于
The hardware should only start processing the ring after at least one buffer has been added Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Fixes a theoretical issue where it could potentially overwrite an existing descriptor entry (and leaking its skb) Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Avoids a theoretical corner case where the hardware could try to process a stale descriptor after a watchdog reset Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Fixes potential RCU issues and avoids calling ieee80211_rx_napi with softirq enabled. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
To avoid having the hardware potentially write to memory behind stale descriptors, set the dma-done flag on all of them before cleaning up allocated rx buffers Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Allows tracking tx scheduling separately per phy Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
This is preparation for supporting multiple wiphys per device to support the concurrent dual-band feature of MT7615D Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Reduces duplication and prepares for further rework Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 20 11月, 2019 3 次提交
-
-
由 zhengbin 提交于
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/dma.c: In function mt76_dma_rx_fill: drivers/net/wireless/mediatek/mt76/dma.c:377:6: warning: variable idx set but not used [-Wunused-but-set-variable] It is not used since commit 17f1de56 ("mt76: add common code shared between multiple chipsets") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: Nzhengbin <zhengbin13@huawei.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
if napi_complete() returns false, it means that polling is still pending. Interrupts should not fire until the polling is no longer scheduled Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
This reduces the struct size and is useful for adding more flags later Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 30 10月, 2019 1 次提交
-
-
由 Lorenzo Bianconi 提交于
mt76 dma layer is supposed to unmap skb data buffers while keep txwi mapped on hw dma ring. At the moment mt76 wrongly unmap txwi or does not unmap data fragments in even positions for non-linear skbs. This issue may result in hw hangs with A-MSDU if the system relies on IOMMU or SWIOTLB. Fix this behaviour properly unmapping data fragments on non-linear skbs. Fixes: 17f1de56 ("mt76: add common code shared between multiple chipsets") Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
-
- 05 9月, 2019 3 次提交
-
-
由 Felix Fietkau 提交于
Fixes rx of the first frame if a fragmented rx was interrupted by the reset Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Ryder Lee 提交于
This fixes the following checkpatch warnings: CHECK: Alignment should match open parenthesis CHECK: No space is necessary after a cast Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Ryder Lee 提交于
No functional change intended. Add SPDX identifiers to all remaining files in /mt76. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 25 6月, 2019 1 次提交
-
-
由 Lorenzo Bianconi 提交于
Move netif_napi_del in mt76_dma_cleanup routine since it is done by all drivers Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 01 5月, 2019 17 次提交
-
-
由 Ryder Lee 提交于
In the tx/rx fastpath, the funciton dma_map_single() rarely fails. This adds unlikely() optimization to this error check conditional. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce skb check for dummy address in mt76_dma_tx_cleanup_idx. This is a preliminary patch to add support for new chipsets (e.g. 7615) Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce skb field in mt76_txwi_cache. Moreover add txwi_flags to mt76_driver_ops since new chipsets will release mt76_txwi_cache/skbs at tx completion instead of dma one. This is a preliminary patch to add mt7615 support Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Pass skb pointer to tx_prepare_skb through mt76_tx_info data structure. This is a preliminary patch to properly support dma error path for new chipsets (e.g. 7615) Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Dynamically allocate txwi since new chipsets will use longer txwi descriptors Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Reduces lock contention from the tx path and improves performance Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
q->tail can be safely updated without locking, because there is no concurrent access. If called from outside of the tasklet (for flushing), the tasklet is always disabled. q->queued can be safely read without locking, as long as the decrement happens within the locked section. This patch allows cleaning up tx packets outside of the section that holds the queue lock for improved performance Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Performance improvement and preparation for adding airtime fairness support Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Switching to readl/writel is faster because it gets rid of an unnecessary wrapper with extra checks. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
As already done for mt76_dma_tx_queue_skb_raw, add static qualifier to mt76_dma_tx_queue_skb and introduce mt76_tx_queue_skb in order to run mt76_dma_tx_queue_skb in driver code Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Add mt76_tx_info as auxiliary data structure to pass values to tx_prepare_skb pointer. This is a preliminary patch to add support for new chipsets (e.g. mt7615) Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Move skb dma mapping before configuring txwi since new chipsets (mt7615) will need skb dma addresses in order to properly configure txwi Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce tx_aligned4_skbs in mt76_driver_ops and move mt76_insert_hdr_pad in mt76_dma_tx_queue_skb. This is a preliminary patch in order to unify tx dma mapping for mt76x02 and new chipsets Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Add mt76_txq_id field to mt76_queue_entry in order to properly track outstanding frames for mt7615 that relies on a single hw queue Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce mt76_sw_queue data structure in order to support new chipsets (e.g. mt7615) that have a shared hardware queue for all traffic identifiers. mt76_sw_queue will be used to track outstanding packets Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Remove mt76_queue dependency from tx_complete_skb function pointer and rely on mt76_tx_qid instead. Remove flush from tx_complete_skb signature. This is a preliminary patch to introduce mt76_sw_queue support Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Remove mt76_queue dependency from tx_prepare_skb function pointer and rely on mt76_tx_qid instead. This is a preliminary patch to introduce mt76_sw_queue support Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-