summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
AgeCommit message (Collapse)AuthorFilesLines
2020-02-14mt76: move channel state to struct mt76_phyFelix Fietkau1-3/+3
Add support for an extra wiphy in mt76_set_channel and mt76_get_survey This is preparation for supporting multiple wiphys per device to support the concurrent dual-band feature of MT7615D Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt7603: fix some checkpatch warningsRyder Lee1-1/+1
This fixes the following checkpatch warnings: WARNING: Improper SPDX comment style CHECK: No space is necessary after a cast Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7603: fix sparse warnings: warning: incorrect type in assignment ↵Lorenzo Bianconi1-1/+1
(different base types) Fix the following sparse warning in mt7603_mcu_set_eeprom: drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: warning: incorrect type in assignment (different base types) drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: expected unsigned short [usertype] addr drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: got restricted __le16 [usertype] Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: mt7603: dynamically alloc mcu req in mt7603_mcu_set_eepromLorenzo Bianconi1-10/+20
Do not allocate mcu requests on the stack in mt7603_mcu_set_eeprom in order to avoid the following warning: Warning: the frame size of 1032 bytes is larger than 1024 bytes Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: mt7603: report firmware version using ethtoolLorenzo Bianconi1-0/+3
Print fw_ver and build_date members of struct mt7603_fw_trailer similarly to what appears in the output of 'dmesg' when the MCU firmware is loaded. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: mt7603: run __mt76_mcu_send_msg in mt7603_mcu_send_firmwareLorenzo Bianconi1-10/+5
Run __mt76_mcu_send_msg instead of __mt7603_mcu_msg_send and remove duplicated code. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: mt7603: init mcu_restart function pointerLorenzo Bianconi1-3/+4
Use common function wrapper in mt7603_mcu_exit since the code is shared with mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: mt7603: initialize mt76_mcu_ops data structureLorenzo Bianconi1-9/+19
Use __mt76_mcu_send_msg wrapper instead of mt7603_mcu_msg_send. This is a preliminary patch for mt7615-mt7603 mcu code unification Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: mt7603: use standard signature for mt7603_mcu_msg_sendLorenzo Bianconi1-34/+27
Use mt76 common signature for mt7603_mcu_msg_send. Move skb allocation in mt7603_mcu_msg_send and remove duplicated code. This is a preliminary patch for mt7615-mt7603 mcu code unification Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: mt7603: remove query from mt7603_mcu_msg_send signatureLorenzo Bianconi1-22/+14
Remove query parameter from mt7603_mcu_msg_send/__mt7603_mcu_msg_send routine signature since it can be obtained from cmd value. This is a preliminary patch for mcu code unification between mt7615 and mt7603 drivers Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt7603: remove mt7603_mcu_init routineLorenzo Bianconi1-9/+1
Remove mt7603_mcu_init since mcu.mutex has been already initialized in mt76_mmio_init. Run mt7603_load_firmware directly in mt7603_init_hardware Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-03-19mt76: mt7603: use the correct hweight8() functionFelix Fietkau1-1/+1
__sw_hweight8() is only defined if CONFIG_GENERIC_HWEIGHT is enabled. The function that works on all architectures is hweight8(). Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-26mt76: add driver for MT7603E and MT7628/7688Felix Fietkau1-0/+483
This driver is for a newer generation of 2x2 MediaTek 802.11n chipsets. MT7603E is a PCIe chip. MT7628 and MT7688 are MIPS SoC devices with built-in WLAN. MT7688 is limited to 1x1 This driver fully supports AP, station, mesh, ad-hoc and monitor mode. Signed-off-by: Felix Fietkau <nbd@nbd.name>