summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c
AgeCommit message (Collapse)Author
2021-06-19mt76: mt7615: set macwork timeout according to runtime-pmLorenzo Bianconi
Set macwork timeout value according to runtime-pm in order to reduce power consumption Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7615: fix NULL pointer dereference in tx_prepare_skb()Lorenzo Bianconi
Fix theoretical NULL pointer dereference in mt7615_tx_prepare_skb and mt7663_usb_sdio_tx_prepare_skb routines. This issue has been identified by code analysis. Fixes: 6aa4ed7927f11 ("mt76: mt7615: implement DMA support for MT7622") Fixes: 4bb586bc33b98 ("mt76: mt7663u: sync probe sampling with rate configuration") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-21mt76: move token utilities in mt76 common moduleLorenzo Bianconi
Move token management in mt76 common module since it is shared between mt7615, mt7915 and mt7921 drivers Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-21mt76: move token_lock, token and token_count in mt76_devLorenzo Bianconi
Move token_lock, token and token_count data structures in mt76_dev. This is a preliminary patch to move token management in mt76 common module since it is shared by mt7615, mt7915 and mt7921 drivers. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-21mt76: mt7615: fix hardware error recovery for mt7663Felix Fietkau
MT7663 uses different bits for communicating reset commands/status between MCU and host. Also add an extra initial reset command. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-21mt76: flush tx status queue on DMA resetFelix Fietkau
After DMA reset, tx status information for queued frames will never arrive. Flush the queue to free skbs immediately instead of waiting for a timeout Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-21mt76: mt7615: only free skbs after mt7615_dma_reset() when reset happensRyder Lee
In mt7615_mac_reset_work(), make sure freeing skbs after mt7615_dma_reset(). Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-12mt76: mt7615: fix chip reset on MT7622 and MT7663eFelix Fietkau
After chip reset, the DMA scheduler needs to be initialized as well. Since the code is PCI/SoC specific, move it to pci_mac.c, so that it can depend on a function in dma.c Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-29mt76: introduce mt76_vif data structureLorenzo Bianconi
Introduce mt76_vif data structure to share common fields between mt7615_vif and mt7921_vif and create a mcu common library Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: rely on AQL for burst size limits on tx queueingFelix Fietkau
Now that AQL works well on all mt76 drivers, completely replace the arbitrary burst sizing and number of bursts logic for tx scheduling. For the short period of time in which AQL does not work well yet, limit each stations to 16 in-flight packets that have no estimated tx time. This should avoid filling the queue if a station connects and queues up a large number of packets before rate control information is available, especially with hardware rate control Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: remove qid argument to drv->tx_complete_skbFelix Fietkau
It is not needed Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: fix double DMA unmap of the first buffer on 7615/7915Felix 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: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: mt7663u: sync probe sampling with rate configurationLorenzo Bianconi
On usb device rate configuration for sampling is performed relying on a workqueue since it is not possible to access the device in the interrupt context. Move the configuration of the probe_rate flag in the workqueue in order to keep probe sampling in sync with actual rate configuration Fixes: eb99cc95c3b6 ("mt76: mt7615: introduce mt7663u support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: move core shared code in mt7615-common moduleLorenzo Bianconi
Create mt7615-common module in order to collect shared code between usb and mmio code. Move the following source files in mt7615-common module: - main.c - init.c - mcu.c - mac.c - debugfs.c - eeprom.c - trace.c Create the following source files for mmio only source code and move them in mt7615e module: - pci_init.c - dma.c - pci_mac.c Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>