summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c
AgeCommit message (Collapse)AuthorFilesLines
2021-10-20mt76: mt7921: rely on mcu_get_nic_capabilitySean Wang1-0/+1
Rely on mcu_get_nic_capability to obtain Tx quota information for the SDIO device, get PHY capability, MAC address and then we can totally drop mt7921/eeprom.c and any unnecessary code. Noting that mt76_connac_mcu_get_nic_capability should be run before set flag MT76_STATE_MCU_RUNNING being set to setup the proper parameters like Tx quota control before the device is started to running. Tested-by: Deren Wu <deren.wu@mediatek.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-20mt76: sdio: move common code in mt76_sdio moduleLorenzo Bianconi1-3/+3
Move sdio common code in mt76_sdio module. This is a preliminary patch to support mt7921s devices. 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>
2021-10-20mt76: mt7663s: rely on mcu reg access utilitySean Wang1-2/+2
rely on mcu reg access utility and drop the duplicated code. Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7663s: enable runtime-pmLorenzo Bianconi1-3/+10
Allow the user to enable runtime-pm for mt7663s driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7663s: rely on pm reference countingLorenzo Bianconi1-14/+22
As already done for mt7921 and mt7663e, rely on pm reference counting in drv/fw_own Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-30mt76: mt7615: do not set MT76_STATE_PM at bootstrapLorenzo Bianconi1-7/+12
Remove MT76_STATE_PM in mt7615_init_device() and introduce __mt7663s_mcu_drv_pmctrl for fw loading in mt7663s. This patch fixes a crash at bootstrap for device (e.g. mt7622) that do not support runtime-pm Fixes: 7f2bc8ba11a0 ("mt76: connac: introduce wake counter for fw_pmctrl synchronization") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/e5a2618574007113d844874420f7855891abf167.1621085028.git.lorenzo@kernel.org
2020-12-04mt76: move mcu queues to mt76_dev q_mcu arrayLorenzo Bianconi1-2/+2
Move mcu queue to a dedicated array q_mcu in mt76_dev structure. This is a preliminary patch to move data queues in mt76_phy and properly support dbdc Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: rely on mt76_queue in tx_queue_skb_raw signatureLorenzo Bianconi1-1/+1
This is a preliminary patch to move data queues in mt76_phy and properly support dbdc Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: sdio: get rid of sched.lockLorenzo Bianconi1-13/+8
sched quota is now updated in mt7663s_txrx_worker so there is no more need of sched.lock mutex Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: make mcu_ops->mcu_send_msg optionalFelix Fietkau1-1/+0
Remove it from mt7615 and mt7915 and implement it in core code instead Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: move waiting and locking out of mcu_ops->mcu_skb_send_msgFelix Fietkau1-11/+4
This removes some code duplication and prepares the code for making the MCU API more flexible Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: implement .mcu_parse_response in struct mt76_mcu_opsFelix Fietkau1-0/+1
Do not free skb inside that function Preparation for further cleanup Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: remove struct mt76_sw_queueFelix Fietkau1-1/+1
All members except for the struct mt76_queue pointer have been removed Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: mt7663s: use NULL instead of 0 in sdio codeLorenzo Bianconi1-2/+2
Fix the following sparse warnings in mt7663s driver: drivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c:78:62: warning: Using plain integer as NULL pointer drivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c:110:62: warning: Using plain integer as NULL pointer drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c:229:64: warning: Using plain integer as NULL pointer drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c:263:64: warning: Using plain integer as NULL pointer Fixes: a66cbdd6573d ("mt76: mt7615: introduce mt7663s support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: mt7663s: move drv_own/fw_own in mt7615_mcu_opsLorenzo Bianconi1-3/+13
Initialize set_drv_ctrl and set_fw_ctrl function pointers in mt7663s_mcu_init. This is a preliminary patch to enable runtime-pm for mt7663s chipset. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: mt7615: introduce mt7663s supportSean Wang1-0/+162
Introduce support for mt7663s 802.11ac 2x2:2 chipset to mt7615 driver. Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>