- 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 19 次提交
-
-
由 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>
-
由 Lorenzo Bianconi 提交于
Remove mt76_queue dependency from tx_queue_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>
-
由 Lorenzo Bianconi 提交于
Move mt76x02_init_tx_queue and mt76x02_init_rx_queue in mt76 module in order to be reused adding support for mt7603 driver and remove duplicated code. Squash mt76x02_init_tx_queue and mt76x02_init_rx_queue in mt76_dma_alloc_queue Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 07 3月, 2019 2 次提交
-
-
由 Felix Fietkau 提交于
Useful in case the hardware reset clobbers these values Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce mt76_queue stopped parameter in order to run ieee80211_wake_queue only when mac80211 queues have been previously stopped and avoid to disable interrupts when it is not necessary Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 19 2月, 2019 3 次提交
-
-
由 Ryder Lee 提交于
There is no need to retun 0 in mt76_dma_attach(), so switch it to void. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Remove add_buf function pointer in mt76_queue_ops data structure since it is no longer used Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Move mt76_dma_tx_queue_skb_raw routine in dma.c and add the corresponding entry in mt76_queue_ops data structure. mt76_dma_tx_queue_skb_raw will be reused adding support for mt7603 driver Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 11 1月, 2019 4 次提交
-
-
由 Lorenzo Bianconi 提交于
Call mt76_dma_add_buf routine directly in mt76_dma_tx_queue_skb and avoid indirect call if not necessary Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Precompute data length in order to avoid to allocate the related skb data structure if reported length does not fit in queue buf_size Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Remove napi from mt76_dma_rx_fill routine signature since it is a leftover of a previous implementation and it is no longer used Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
So far the code only validates the buffer size of the first skb. Extend this check to cover additional fragments as well, in case the size is corrupted during a DMA reset. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 30 11月, 2018 3 次提交
-
-
由 Felix Fietkau 提交于
While the queue is being cleaned up, the stack must not attempt to add any extra packets Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
There is some code in the mac80211 tx status processing code that could potentially call back into the tx codepath. To avoid deadlocks, make sure that no tx related spinlocks are taken during the ieee80211_tx_status call. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
MT76x2/MT76x0 has somewhat unreliable tx status reporting, and for that reason the driver currently does not report per-skb tx ack status at all. This breaks things like client idle polling, which relies on the tx ack status of a transmitted nullfunc frame. This patch adds code to report skb-attached tx status if requested by mac80211 or the rate control module. Since tx status is polled from a simple FIFO register, the code needs to account for the possibility of tx status events getting lost. The code keeps a list of skbs for which tx status is required and passes them to mac80211 once tx status has been filled in and the DMA queue is done with it. If a tx status event is not received after one second, the status rates are cleared, and a succesful ACK is indicated to avoid spurious disassoc during assoc or client polling. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
- 19 9月, 2018 1 次提交
-
-
由 Felix Fietkau 提交于
Using the NAPI or netdev frag cache along with other drivers can lead to 32 KiB pages being held for a long time, despite only being used for very few page fragments. This can happen if the driver grabs one or two fragments for rx ring refill, while other drivers use (and free up) the remaining fragments. The 32 KiB higher-order page can only be freed once all users have freed their fragments. Depending on the traffic patterns, this can waste a lot of memory and look a lot like a memory leak. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-