- 24 Sep, 2020 40 commits
-
-
Lorenzo Bianconi authored
Move frame pad computation out of mt76_skb_adjust_pad routine. This is a preliminary patch to introduce sdio tx aggregation. Tested-by: Sean Wang <sean.wang@mediatek.com> Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
This is a preliminary patch to introduce sdio tx aggregation Tested-by: Sean Wang <sean.wang@mediatek.com> Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
In order to not update the available quota in case of a tx error, split mt7663s_tx_update_sched in mt7663s_tx_{pick,update}_quota routines Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Since the sdio engine does not report quota for altx queue, move ctl/mgmt traffic to standard data queues Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Set poll timeout to 3s for mt7622 devices in order to avoid fw hangs. Swap mt7622_trigger_hif_int and doorbell configuration order in mt7615_mcu_drv_pmctrl routine. Introduce mt7615_mcu_lp_drv_pmctrl routine to take care of drv_own configuration for runtime-pm. Fixes: 08523a2a ("mt76: mt7615: add mt7615_pm_wake utility routine") Fixes: 894b7767 ("mt76: mt7615: improve mt7615_driver_own reliability") Fixes: 757b0e7f ("mt76: mt7615: avoid polling in fw_own for mt7663") Co-developed-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Co-developed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
The MCU field should contain a boolean 0/1, not the flag itself. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Wang Hai authored
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/mt7615/testmode.c: In function mt7615_tm_set_tx_power drivers/net/wireless/mediatek/mt76/mt7615/testmode.c:83:7: warning: variable ‘index’ set but not used [-Wunused-but-set-variable]= commit 4f0bce1c ("mt76: mt7615: implement testmode support") involved this unused variable, remove it. Signed-off-by: Wang Hai <wanghai38@huawei.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Since the switch to using AQL by default, mtxq->retry_q is never filled anymore Remove it to get rid of a few more unnecessary cycles in the tx path Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
This way we can make some functions static Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Unlike 7615, 7915 uses the same AC index for rx and tx, which matches the LMAC queue mapping Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Compared to mac80211 ACs, MT7915 queue numbers are in reverse order There is no need for the defensive WARN_ON_ONCE, so we can simplify the function to avoid the array lookup Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Accessing them from uncached memory can be expensive, so it's cheaper to cache them Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
he_pe_duration and he_rts_thres have the same unit as the fields in the HE operation IE Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
This improves performance by allowing the scheduler to move the tx scheduling work to idle CPUs. Since tx scheduling work is very latency sensitive and kept short via AQL, sched_set_fifo_low is used to keep worker priority above normal tasks Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
In order to avoid keeping work like tx scheduling pinned to the CPU it was scheduled from, it makes sense to switch from tasklets to kernel threads. Unlike a workqueue, this one only allows one fixed worker function to be executed by the worker thread. Because of that, there is less locking and less code for scheduling involved. This is important because the tx worker is scheduled often in a hot path Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
This avoids running out of available tx tokens Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Do not alter the tx/rx chain settings during channel setup, antennas are remapped by the testmode specific register writes already Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
This is used for testmode tx antenna selection Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Chih-Min Chen authored
Avoid firmware falling into spectrum mode since that will set unexpected PSE/PLE thresholds which lead to Tx hang. This mode should be cleaned before firmware download stage. Signed-off-by: Chih-Min Chen <chih-min.chen@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Increase data queue size to improve performance. Reduce PS/mgmt queue size Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Stop relying on global tx ring size, reduce size for PS/mgmt queue Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
All members except for the struct mt76_queue pointer have been removed Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
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>
-
Felix Fietkau authored
Since txq selection was moved to mac80211, it is no longer used Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
It is not needed Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Cleanup and preparation for changing tx scheduling behavior Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Their use is reversed compared to DMA. The order for DMA makes more sense, so let's use that Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Their use is reversed compared to DMA. The order for DMA makes more sense, so let's use that Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Some devices using MT7628 or MT7603 have only one antenna chain connected. Detect these using the EEPROM rx/tx path settings Reported-by: Qin Wei <me@vonger.cn> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Ensure that descriptor memory has been fully written before letting the hardware read it Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Makes it possible to read/write them via debugfs, similar to mt7615/7603 Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
On 7615 and newer, DMA completion only triggers unmap, but not free of queued skbs, since pointers to packets are queued internally. Because of that, there is no need to process the main data queue immediately on DMA completion. To improve performance, mask out the DMA data queue completion interrupt and process the queue only when we receive a txfree event. This brings the number of interrupts under load down to a small fraction. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
On 7615 and newer, DMA completion only triggers unmap, but not free of queued skbs, since pointers to packets are queued internally. Because of that, there is no need to process the main data queue immediately on DMA completion. To improve performance, mask out the DMA data queue completion interrupt and process the queue only when we receive a txfree event. This brings the number of interrupts under load down to a small fraction. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
The previous scheduling round may have been limited by AQL. More frames might be available after the tx free run. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
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: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Since DMA completion does not imply tx completion, it makes more sense to poll for airtime from mt7915_mac_tx_free. Reduce the runtime of the function by moving all items from dev->sta_poll_list to a local list once and process any stations that were added afterwards on the next run Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
- change the WTBL LMAC access function to set the mapping window only once - use ac * 2 as offset, since each AC has separate words for rx and tx Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Fix length field corruption in usb dma header introduced adding sdio support Fixes: 75b10f0c ("mt76: mt76u: add mt76_skb_adjust_pad utility routine") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Fix a possible NULL pointer dereference in mt76_testmode_dump() since nla_nest_start returns NULL in case of error Fixes: f0efa862 ("mt76: add API for testmode support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Initialize wcid to global_wcid if msta is NULL in mt7615_pm_wake_work routine since wcid will be dereferenced running mt76_tx() Fixes: 2b8cdfb2 ("mt76: mt7615: wake device before pushing frames in mt7615_tx") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-