summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mcu.c
AgeCommit message (Collapse)Author
2020-12-04mt76: move mcu queues to mt76_dev q_mcu arrayLorenzo Bianconi
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: dma: rely on mt76_queue in mt76_dma_tx_cleanup signatureLorenzo Bianconi
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: move mt76_mcu_send_firmware in common moduleLorenzo Bianconi
Move mt76_mcu_send_firmware routine in common code since it is actually shared between mt7615, mt7663, mt7603 and mt7915 devices Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: implement functions to get the response skb for MCU callsFelix Fietkau
Can be used by the caller to get the response data directly instead of using the hack of storing the result in internal data structures from .mcu_parse_response Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: make mcu_ops->mcu_send_msg optionalFelix Fietkau
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 Fietkau
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-05-12mt76: add headroom and tailroom to mt76_mcu_ops data structureLorenzo Bianconi
Introduce headroom and tailroom to mt76_mcu_ops data structure in order to unify the routine used for mcu message allocation. This is a preliminary patch to add mt7663u support Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-03-17mt76: always init to 0 mcu messagesLorenzo Bianconi
Always initialize to 0 mcu messages since if they are not propely configured they could hang the firmware. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: Introduce mt76_mcu data structureLorenzo Bianconi
Introduce mt76_mcu data structure to contain common fields between mt76u_mcu and mt76e_mcu. Initialize mcu common fields in mt76_alloc_device(). Rely on mt76_mcu in mt76_mcu_rx_event and in mt76_mcu_get_response in order to reuse them in usb code Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: implement hardware reset supportFelix Fietkau
When the firmware detects a problem, it needs the host to stop/reset DMA and resume it again when the hardware state has been reset. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: switch to SPDX tag instead of verbose boilerplate textRyder Lee
No functional change intended. Add SPDX identifiers to all remaining files in /mt76. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-02-18mt76: move mt76_mcu_rx_event in mt76-coreLorenzo Bianconi
Move mt76_mcu_rx_event i mt76-core module and remove duplicated code. mt76_mcu_rx_event will be reused adding support for mt7603 driver Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-02-18mt76: move mt76_mcu_get_response in mt76-coreLorenzo Bianconi
Move mt76_mcu_get_response in mt76-core module and remove duplicated code. mt76_mcu_get_response will be reused adding support for mt7603 driver Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-02-18mt76: move mt76_mcu_msg_alloc in mt76-coreLorenzo Bianconi
Move mt76_mcu_msg_alloc in mt76-core module and remove duplicated code. mt76_mcu_msg_alloc will be reused adding support for mt7603 driver Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>