- 21 Apr, 2021 40 commits
-
-
Lorenzo Bianconi authored
Introduce awake and doze time accounting for runtime pm. Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
since tx/rx path is now relying pm ref counting, get rid of MT76_STATE_PM check in the tx path Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Simplify the code using a wait_queue_head_t instead of a completion to wait the chip is fully awake in mt76_connac_pm_wake routine Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
In order to not break runtime-pm, do run mt76_txq_schedule_all in mt7615_set_channel/mt7921_set_channel but rely on mt76_worker_schedule Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Rely on mt76_connac_pm_ref/mt76_connac_pm_unref utility routines in mt7615_led_set_config Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
move scanning check from mt76_connac_power_save_sched routine to mt7921_pm_power_save_work/mt7615_pm_power_save_work ones Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Remove useless MT76_STATE_PM check in mt7921_mac_work since mt7921_mutex_acquire will wake up the device if necessary Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Get rid of MT76_STATE_PM chec in mt7615_mac_tx_free and mt7921_mac_tx_free since we already rely on mt76_connac_pm_unref in the NAPI callback. Remove mt76_connac_power_save_sched calls in mt7615_mac_tx_free and mt7921_mac_tx_free Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
In order to avoid synchronization races between tx and rx path, rely on mt76_connac_skip_fw_pmctrl putting the chip in sleep mode for mt7921 and mt7663 devices Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
In order to avoid synchronization issues between wake and ps works, cancel ps_work in mt76_connac_pm_wake routine Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce mt7615_poll_rx rx napi callback for mt7663. Do not access device registers in tx/rx napi if the device is not awake. Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce mt7921_poll_rx rx napi callback for mt7921. Do not access device registers in tx/rx napi if the device is not awake. Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
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 <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce mt7615_tx_worker routine as mt76 tx worker callback for mt7663. Rely on mt76_connac_pm_ref/mt76_connac_pm_unref to check PM state and increment/decrement wake counter Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce mt7921_tx_worker routine as mt76 tx worker callback for mt7921. Rely on mt76_connac_pm_ref/mt76_connac_pm_unref to check PM state and increment/decrement wake counter Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce wake counter and related spinlock in order to synchronize tx/rx path and fw_pmctrl request. Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce a mutex in order to avoid a race between mt7615_mcu_lp_drv_pmctrl and mt7615_mcu_fw_pmctrl routines since they are run two independent works Fixes: 1f549009 ("mt76: mt7615: do not request {driver,fw}_own if already granted") Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce a mutex in order to avoid a race between mt7921_mcu_drv_pmctrl and mt7921_mcu_fw_pmctrl routines since they are run two independent works Fixes: 1d8efc74 ("mt76: mt7921: introduce Runtime PM support") Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Get rid of leftover mt7921_mcu_add_bss_info routine declaration Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Move mt76_connac_mcu_update_arp_filter in mt76_connac module since the code is shared between mt7615 and mt7921 Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Fix the following sparse warning: drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1425:70: warning: Using plain integer as NULL pointer Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Since driver no longer handler per-rate tx power setting, we need to read the power values directly from registers. Tested-by:
Evelyn Tsai <evelyn.tsai@mediatek.com> Signed-off-by:
Shayne Chen <shayne.chen@mediatek.com> Signed-off-by:
Ryder Lee <ryder.lee@mediatek.com> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Clean up the flow of per-rate txpower limit setting to get rid of duplicate work since it has already been handled by firmware, and set proper max_power based on different channels and regdomains. Signed-off-by:
Shayne Chen <shayne.chen@mediatek.com> Signed-off-by:
Ryder Lee <ryder.lee@mediatek.com> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Enable to limit per-rate max txpower from DT. Tested-by:
Evelyn Tsai <evelyn.tsai@mediatek.com> Signed-off-by:
Shayne Chen <shayne.chen@mediatek.com> Signed-off-by:
Ryder Lee <ryder.lee@mediatek.com> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Sean Wang authored
Scan abort should be required for the uncompleted hardware scan interrupted by wifi reset. Otherwise, it is possible that the scan request after wifi reset gets error code -EBUSY from mac80211 and then blocks the reconnectting to the access point. Fixes: 0c1ce988 ("mt76: mt7921: add wifi reset support") Signed-off-by:
Sean Wang <sean.wang@mediatek.com> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Sean Wang authored
Introduce chip_reset knob in mt7921 debugfs to export a way to users able to trigger wifi reset, and group the similar operations previously defined in chip_config in the same knob. Signed-off-by:
Sean Wang <sean.wang@mediatek.com> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Wake the chip before configuring the mcu log level Fixes: 1d8efc74 ("mt76: mt7921: introduce Runtime PM support") Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Dump mcu command code in hex and related prefix to help debugging Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Get rid of init work since firmware loading is already performed in mt7921_init_hardware Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
When the EEPROM data is read from flash, it can contain pre-calibration data, which can save calibration time. Note that group_cal can save 30% bootup calibration time, and dpd_cal can save 75% channel switching time. Tested-by:
Bo Jiao <bo.jiao@mediatek.com> Signed-off-by:
Ryder Lee <ryder.lee@mediatek.com> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
For MT7663, the availability of the patch files is used to detect, which corresponding firmware is going to be used (AP firmware or STA offload firmware). If the ROM patch was already applied, it could attempt to load the wrong firmware (without considering the alternative). Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Fixes hardware wakeup issues Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
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>
-
Sean Wang authored
Dump the tx power table saved in offload firmware. 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
Introduce support for rate-txpower compensation for mt7663/mt7921 chipsets. Rate-txpower limit is specified through dts Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
mt7663 mcu relies on different APIs to configure APIs per-rate power limit respect to mt7615 driver. Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Limits are used to update the channel max_power settings and also passed to the firmware on channel changes Signed-off-by:
Felix Fietkau <nbd@nbd.name> Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Enable parsing per-rate txpower limits from DT for 11ax chipsets. Co-developed-by:
Felix Fietkau <nbd@nbd.name> Signed-off-by:
Felix Fietkau <nbd@nbd.name> Tested-by:
Evelyn Tsai <evelyn.tsai@mediatek.com> Signed-off-by:
Shayne Chen <shayne.chen@mediatek.com> Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
This subnode can be used to set per-rate tx power limits either per country code / regdomain or globally. These limits are typically provided by the device manufacturers and are used to limit sideband emissions and stay within regulatory limits Signed-off-by:
Felix Fietkau <nbd@nbd.name> Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce power-limits node in mt76 binding in order to specify per-rate power limit values for each 802.11n/802.11ac rate Signed-off-by:
Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Felix Fietkau <nbd@nbd.name>
-