summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7615/usb_mcu.c
AgeCommit message (Collapse)AuthorFilesLines
2022-03-16mt76: mt7663u: introduce mt7663u_mcu_power_on routineLorenzo Bianconi1-10/+21
Introduce mt7663u_mcu_power_on utility routine since the code is shared between mt7663u_mcu_init() and mt7663u_probe(). Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-16mt76: mt7615: honor ret from mt7615_mcu_restart in mt7663u_mcu_initLorenzo Bianconi1-1/+4
Check return value of mt7615_mcu_restart routine in mt7663u_mcu_init(). Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-12-19mt76: connac: rely on MCU_CMD macroLorenzo Bianconi1-1/+1
Similar to mt7915 driver, rely on MCU_CMD macro and do not command definitions directly 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-3/+0
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: 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/+3
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: move pad estimation out of mt76_skb_adjust_padLorenzo Bianconi1-3/+3
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>
2020-09-24mt76: mt7663u: fix dma header initializationLorenzo Bianconi1-1/+3
Fix length field corruption in usb dma header introduced adding sdio support Fixes: 75b10f0cbd0b ("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>
2020-07-21mt76: mt76u: add mt76_skb_adjust_pad utility routineLorenzo Bianconi1-1/+2
Introduce mt76_skb_adjust_pad to reuse the code adding sdio support to mt7615 driver and remove code duplication. Move 4B header configuration for usb devices out of mt76_skb_adjust_pad Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: mt7663u: fix potential memory leak in mcu message handlerSean Wang1-1/+1
Fix potential memory leak in mcu message handler on error condition. Fixes: eb99cc95c3b6 ("mt76: mt7615: introduce mt7663u support") Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: mt7615: do not request {driver,fw}_own if already grantedLorenzo Bianconi1-0/+2
Check MT76_STATE_PM in mt7615_driver_own/mt7615_firmware_own in order to not requested power ownership if it is already granted Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: introduce mt7663u supportLorenzo Bianconi1-0/+93
Introduce support for mt7663u 802.11ac 2x2:2 chipset to mt7615 driver. Main difference respect to pcie code base is the usb code needs to configure wtbl from non-atomic context 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>