summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7915
AgeCommit message (Collapse)AuthorFilesLines
2023-04-21Merge tag 'wireless-next-2023-04-21' of ↵Jakub Kicinski10-209/+64
git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.4 Most likely the last -next pull request for v6.4. We have changes all over. rtw88 now supports SDIO bus and iwlwifi continues to work on Wi-Fi 7 support. Not much stack changes this time. Major changes: cfg80211/mac80211 - fix some Fine Time Measurement (FTM) frames not being bufferable - flush frames before key removal to avoid potential unencrypted transmission depending on the hardware design iwlwifi - preparation for Wi-Fi 7 EHT and multi-link support rtw88 - SDIO bus support - RTL8822BS, RTL8822CS and RTL8821CS SDIO chipset support rtw89 - framework firmware backwards compatibility brcmfmac - Cypress 43439 SDIO support mt76 - mt7921 P2P support - mt7996 mesh A-MSDU support - mt7996 EHT support - mt7996 coredump support wcn36xx - support for pronto v3 hardware ath11k - PCIe DeviceTree bindings - WCN6750: enable SAR support ath10k - convert DeviceTree bindings to YAML * tag 'wireless-next-2023-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (261 commits) wifi: rtw88: Update spelling in main.h wifi: airo: remove ISA_DMA_API dependency wifi: rtl8xxxu: Simplify setting the initial gain wifi: rtl8xxxu: Add rtl8xxxu_write{8,16,32}_{set,clear} wifi: rtl8xxxu: Don't print the vendor/product/serial wifi: rtw88: Fix memory leak in rtw88_usb wifi: rtw88: call rtw8821c_switch_rf_set() according to chip variant wifi: rtw88: set pkg_type correctly for specific rtw8821c variants wifi: rtw88: rtw8821c: Fix rfe_option field width wifi: rtw88: usb: fix priority queue to endpoint mapping wifi: rtw88: 8822c: add iface combination wifi: rtw88: handle station mode concurrent scan with AP mode wifi: rtw88: prevent scan abort with other VIFs wifi: rtw88: refine reserved page flow for AP mode wifi: rtw88: disallow PS during AP mode wifi: rtw88: 8822c: extend reserved page number wifi: rtw88: add port switch for AP mode wifi: rtw88: add bitmap for dynamic port settings wifi: rtw89: mac: use regular int as return type of DLE buffer request wifi: mac80211: remove return value check of debugfs_create_dir() ... ==================== Link: https://lore.kernel.org/r/20230421104726.800BCC433D2@smtp.kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-04-19wifi: mt76: set NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 on supported driversFelix Fietkau1-0/+1
Drivers that do not generate IV/PN in software can safely rekey PTK0 Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: mt7921: enable p2p supportSean Wang1-2/+2
Introduce p2p-go/p2p-client support to mt7921 driver CONNECTION_P2P_GC/GO is not supported with the current firmware so we added mt76_dev to mt76_connac_mcu_sta_basic_tlv signature to use CONNECTION_INFRA_STA/AP instead for p2p-client and p2p-go respectively to make it work. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: mt7915: drop redundant prefix of mt7915_txpower_puts()Ryder Lee1-18/+18
Just a cosmetic patch to drop redundant prefix for txpower ouput text. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: move shared mac definitions in mt76_connac2_mac.hLorenzo Bianconi1-32/+1
Move some mac shared definitions between mt7996, mt7921 and mt7915 in mt76_connac2_mac.h. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: add mt76_connac_gen_ppe_thresh utility routineLorenzo Bianconi1-22/+1
gen_ppe_thresh routine is shared between mt7615, mt7915, mt7921 and mt7996 so move it in mt76_connac module. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: get rid of unused sta_ps callbacksLorenzo Bianconi3-6/+0
sta_ps callback is just an empty stub for most of the drivers, so get rid of them. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: move irq_tasklet in mt76_dev structLorenzo Bianconi4-7/+6
irq_tasklet struct is used by most of the drivers (e.g. mt7915, mt7921, mt7615, mt7663 and mt7996) so move it in common code. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: mt7915: remove mt7915_mcu_beacon_check_caps()Ryder Lee3-110/+12
Those capabilities have been added into ieee80211_bss_conf. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: mt7915: rework init flow in mt7915_thermal_init()Howard Hsu1-4/+4
If kernel do not enable CONFIG_HWMON, it may cause thermal initialization to be done with temperature value 0 and then can not transmit. This commit fixes it by setting trigger/restore temperature before checking CONFIG_HWMON. Fixes: 7d12b38ab6f6 ("wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work") Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: mt7915: add dev->hif2 support for mt7916 WED deviceSujuan Chen3-8/+16
Enable two PCIe interfaces (dev->hif2) support for mt7916 when WED is enabled. Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: mt7915: expose device tree match tableLorenz Brun1-0/+2
On MT7986 the WiFi driver currently does not get automatically loaded, requiring manual modprobing because the device tree compatibles are not exported into metadata. Add the missing MODULE_DEVICE_TABLE macro to fix this. Fixes: 99ad32a4ca3a2 ("mt76: mt7915: add support for MT7986") Signed-off-by: Lorenz Brun <lorenz@brun.one> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-17wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()Dan Carpenter1-0/+1
Drop the lock before returning -EINVAL. Fixes: ecaccdae7a7e ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()") Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-03wifi: mt76: ignore key disable commandsFelix Fietkau1-7/+6
This helps avoid cleartext leakage of already queued or powersave buffered packets, when a reassoc triggers the key deletion. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230330091259.61378-1-nbd@nbd.name
2023-03-13wifi: mt76: mt7915: add back 160MHz channel width support for MT7915Felix Fietkau1-10/+30
A number of users reported that this support was working fine before it got removed. Add it back, but leave out the unsupported 80+80 mode. Fixes: ac922bd60ace ("wifi: mt76: mt7915: remove BW160 and BW80+80 support") Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230301163739.52314-1-nbd@nbd.name
2023-02-03wifi: mt76: mt7915: complete wed reset supportLorenzo Bianconi2-5/+31
Stop Wireless Ethernet Dispatcher during mt7915 reset procedure. Tested-by: Daniel Golle <daniel@makrotopia.org> Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: add mt7915 wed reset callbacksLorenzo Bianconi2-0/+55
Introduce mt7915_mmio_wed_reset_complete and mt7915_mmio_wed_reset_complete callbacks and the related wait queues in order to wait for wed reset completion during wlan reset. Tested-by: Daniel Golle <daniel@makrotopia.org> Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: add EHT rate stats for ethtoolShayne Chen1-1/+1
Add support to get EHT rate stats from ethtool. This is the preliminary patch to add EHT support for mt7996. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: release rxwi in mt7915_wed_release_rx_bufSujuan Chen1-0/+2
Free rxwi cache releasing WED rx buffers in mt7915_wed_release_rx_buf routine Tested-by: Daniel Golle <daniel@makrotopia.org> Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: enable page_pool statsLorenzo Bianconi1-10/+16
Enable page_pool ethtool statistics for mt7915 and mt7921 chipsets. Tested-by: Felix Fietkau <nbd@nbd.name> Tested-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: switch to page_pool allocatorLorenzo Bianconi1-34/+21
In order to reduce possible memory allocation failures due to memory fragmentation caused by page_frag_cache allocator, switch to page_pool allocator for dma and usb mt76 drivers. Remove per rx-queue page_frag_cache Co-developed-by: Felix Fietkau <nbd@nbd.name> Tested-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: fix memory leak in mt7915_mmio_wed_init_rx_bufLorenzo Bianconi1-1/+8
Free mt76_txwi_cache pointer in mt7915_mmio_wed_init_rx_buf routine in case of failure. Fixes: 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: fix WED TxS reportingRyder Lee1-3/+0
The previous commit forgot to remove a leftover check. Fixes: 43eaa3689507 ("wifi: mt76: add PPDU based TxS support for WED device") Reported-By: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: wed: enable red per-band token dropPeter Chiu4-3/+51
Enable RED to limit the number of token used by each band. If single band uses too many tokens, it would hurt the throughput of the other bands.The software path can solve this problem by AQL so enable RED for HW path only. Reviewed-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: set sku initial value to zeroPeter Chiu1-0/+2
Set sku initial value before mcu starts to prevent mcu from getting an invalid value. Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: avoid mcu_restart function pointerLorenzo Bianconi1-3/+2
Run mt76_connac_mcu_restart routine directly and avoid mcu_restart function pointer whenever it is possible. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: fix memory leak in mt7915_mcu_exitLorenzo Bianconi1-1/+2
Always purge mcu skb queues in mt7915_mcu_exit routine even if mt7915_firmware_state fails. Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: introduce mt76_queue_is_wed_rx utility routineLorenzo Bianconi1-2/+1
This patch does not change any logic, just improve code readability. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: remove BW160 and BW80+80 supportMeiChia Chiu1-29/+9
Remove BW160 and BW80+80 capability in mt7915. Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com> Reviewed-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Money Wang<Money.Wang@mediatek.com> Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: add chip id condition in mt7915_check_eeprom()Shayne Chen1-1/+4
When flash mode is enabled, and the eeprom data in the flash is not for the current chipset, it'll still be checked valid, and the default eeprom bin won't be loaded. (e.g., mt7915 NIC inserted with mt7916 eeprom data in the flash.) Fix this kind of case by adding chip id into consideration in mt7915_check_eeprom(). Reported-by: Cheng-Ji Li <cheng-ji.li@mediatek.com> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: add error message in mt7915_thermal_set_cur_throttle_state()Howard Hsu2-5/+9
Add dev_err so that it is easier to see invalid setting while looking at dmesg. Co-developed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: rework mt7915_thermal_temp_store()Howard Hsu2-2/+19
Call mt7915_mcu_set_thermal_protect() through mt7915_thermal_temp_store() to update firmware trigger/restore temp directly. Fixes: 02ee68b95d81 ("mt76: mt7915: add control knobs for thermal throttling") Reviewed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: rework mt7915_mcu_set_thermal_throttlingHoward Hsu4-26/+37
This patch includes 2 changes: 1. Firmware expects to disable thermal protect first before reconfiguring. 2. Separate setting thermal_protect and setting thermal_tx_duty into different functions. These two firmware commands do not need to send together. Fixes: 34b877d972be ("mt76: mt7915: add thermal cooling device support") Reviewed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after ↵Howard Hsu2-2/+7
init_work Enable thermal management by default shall not be executed during mcu init. This causes thermal configuration being reset to the firmware default settings. Fixes: 0063b86c9120 ("mt76: mt7915e: Enable thermal management by default") Reviewed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: get rid of wed rx_buf_ring page_frag_cacheLorenzo Bianconi1-14/+11
Since wed rx_buf_ring page_frag_cache is no longer used in a hot path, remove it and rely on page allocation APIs in mt7915_mmio_wed_init_rx_buf() and mt7915_mmio_wed_release_rx_buf() Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: handle possible mt76_rx_token_consume failuresLorenzo Bianconi1-0/+7
Take into account possible error conditions of mt76_rx_token_consume routine in mt7915_mmio_wed_init_rx_buf() and mt76_dma_add_buf() Fixes: cd372b8c99c5 ("wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf") Fixes: 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: enable per-phy led supportLorenzo Bianconi2-29/+101
Introduce the capability to support per-phy led blinking. This is needed for devices supporting dbdc. Tested-by: Frank Wunderlich <frank-w@public-files.de> 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>
2022-12-09wifi: mt76: move leds struct in mt76_phyLorenzo Bianconi1-7/+7
Move leds struct in mt76_phy in order to have leds associated to phy (e.g. in dbdc mode) instead of per device. Tested-by: Frank Wunderlich <frank-w@public-files.de> 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>
2022-12-09wifi: mt76: move leds field in leds structLorenzo Bianconi1-5/+5
This is a preliminary patch to support per-phy leds. Tested-by: Frank Wunderlich <frank-w@public-files.de> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: fix unintended sign extension of mt7915_hw_queue_read()Ryder Lee1-1/+1
In the expression "map[i].qid << 24" starts as u8, but is promoted to "signed int", then sign-extended to type "unsigned long", which is not intended. Cast to u32 to avoid the sign extension. Fixes: 776ec4e77aa6 ("mt76: mt7915: rework debugfs queue info") Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: drop always true condition of __mt7915_reg_addr()Ryder Lee2-2/+1
smatch warnings: addr <= MT_CBTOP2_PHY_END(0xffffffff) is always true (<= u32max), so drop it. Fixes: cd4c314a65d3 ("mt76: mt7915: refine register definition") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: check the correctness of event dataRyder Lee1-4/+17
The mcu event might not be reliable, so check the correctness of data before handling it. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: check return value before accessing free_block_numRyder Lee2-11/+18
Check return value of mt7915_mcu_get_eeprom_free_block() first before accessing free_block_num. Fixes: bbc1d4154ec1 ("mt76: mt7915: add default calibrated data support") Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: split mcu chan_mib array upRyder Lee1-23/+27
The current flow confuses coverity check that leads to false reporting, so split the offs[] into two pieces according to chipset revision to silence coverity tool. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: fix mt7915_rate_txpower_get() resource leaksRyder Lee1-1/+3
Coverity message: variable "buf" going out of scope leaks the storage. Reported-by: coverity-bot <keescook+coverity-bot@chromium.org> Addresses-Coverity-ID: 1527799 ("Resource leaks") Fixes: e3296759f347 ("wifi: mt76: mt7915: enable per bandwidth power limit support") Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7915: add missing of_node_put()Wang Yufen1-0/+1
Add missing of_node_put() after of_reserved_mem_lookup() Fixes: 99ad32a4ca3a ("mt76: mt7915: add support for MT7986") Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-01wifi: mt76: mt7915: mmio: fix naming conventionLorenzo Bianconi1-5/+5
Rename mt7915_wed_release_rx_buf in mt7915_mmio_wed_release_rx_buf, mt7915_wed_init_rx_buf in mt7915_mmio_wed_init_rx_buf and mt7915_wed_release_rx_buf in mt7915_mmio_wed_release_rx_buf Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-01wifi: mt76: mt7915: rely on band_idx of mt76_phyRyder Lee10-166/+184
The commit dc44c45c8cd0 added band_idx into mt76_phy, so switching to rely on that. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-01wifi: mt76: mt7915: enable per bandwidth power limit supportRyder Lee3-32/+184
This power should override the per bandwidth max power that the device emits. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-01wifi: mt76: mt7915: introduce mt7915_get_power_bound()Ryder Lee2-7/+17
Add a helper for common boundary check. This is a preliminary patch to add per bandwidth power control. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>