History log of /linux-master/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c
Revision Date Author Comments
# ec193b41 02-Apr-2023 Lorenzo Bianconi <lorenzo@kernel.org>

wifi: mt76: move irq_tasklet in mt76_dev struct

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>


# 12a88d4d 07-Dec-2022 Lorenzo Bianconi <lorenzo@kernel.org>

wifi: mt76: mt7615: enable per-phy led support

Introduce the capability to support per-phy led blinking. This is needed
for devices supporting dbdc.

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>


# 3abd46dd 07-Dec-2022 Lorenzo Bianconi <lorenzo@kernel.org>

wifi: mt76: move leds struct in mt76_phy

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>


# a00b7910 07-Dec-2022 Lorenzo Bianconi <lorenzo@kernel.org>

wifi: mt76: move leds field in leds struct

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>


# 8c55516d 31-Oct-2021 Peter Chiu <chui-hao.chiu@mediatek.com>

mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()

ieee80211_register_hw() is called with rtnl_lock held, and this could be
caused lockdep from a work item that's on a workqueue that is flushed
with the rtnl held.

Move mt7615_register_ext_phy() outside the init_work().

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 6ab079e2 02-Jun-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: connac: add mt76_connac_power_save_sched in mt76_connac_pm_unref

Schedule power_save work running mt76_connac_pm_unref in order to reduce
power consumption

Tested-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 109e505a 23-Apr-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7615: add thermal sensor device support

Similar to mt7915, switching to use standard hwmon sysfs.
For reading temperature, cat /sys/class/ieee80211/phy*/hwmon*/temp1_input

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 54b8fdeb 29-Apr-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move mt76_rates in mt76 module

Move mt76_rates array in mt76 module and remove duplicated code since it
is shared by all drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 51252cc5 21-Apr-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move mt76_token_init in mt76_alloc_device

In order to remove duplicated code, move mt76_token_init in
mt76_alloc_device routine

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# d089692b 20-Apr-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move token utilities in mt76 common module

Move token management in mt76 common module since it is shared between
mt7615, mt7915 and mt7921 drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# b17aff33 20-Apr-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move token_lock, token and token_count in mt76_dev

Move token_lock, token and token_count data structures in mt76_dev.
This is a preliminary patch to move token management in mt76 common
module since it is shared by mt7615, mt7915 and mt7921 drivers.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 75e83c20 18-Apr-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7615: rely on pm refcounting in mt7615_led_set_config

Rely on mt76_connac_pm_ref/mt76_connac_pm_unref utility routines in
mt7615_led_set_config

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 45387363 15-Apr-2021 Felix Fietkau <nbd@nbd.name>

mt76: mt7615: fix hardware error recovery for mt7663

MT7663 uses different bits for communicating reset commands/status between MCU
and host. Also add an extra initial reset command.

Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 8ab31da7 12-Apr-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7615: fix memleak when mt7615_unregister_device()

mt7615_tx_token_put() should get call before mt76_free_pending_txwi().

Fixes: a6275e934605 ("mt76: mt7615: reset token when mac_reset happens")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 1cb7ea2a 26-Mar-2021 Felix Fietkau <nbd@nbd.name>

mt76: mt7615: fix chip reset on MT7622 and MT7663e

After chip reset, the DMA scheduler needs to be initialized as well.
Since the code is PCI/SoC specific, move it to pci_mac.c, so that it
can depend on a function in dma.c

Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 95f381c5 18-Jan-2021 Felix Fietkau <nbd@nbd.name>

mt76: mt7615: unify init work

Reduce code duplication and remove unnecessary exports

Signed-off-by: Felix Fietkau <nbd@nbd.name>


# a6275e93 10-Dec-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7615: reset token when mac_reset happens

Reset token in mt7615_mac_reset_work() to avoid possible leakege.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# ced050ae 23-Sep-2020 Chuanhong Guo <gch981213@gmail.com>

mt76: mt7615: retry if mt7615_mcu_init returns -EAGAIN

mt7615_load_patch in mt7615/mcu.c sometimes fails with:
mt7622-wmac 18000000.wmac: Failed to get patch semaphore
and returns -EAGAIN. But this error is returned all the way up to
mt7615_init_work with no actual retrial performed, leaving a
broken wireless phy.
Wait a bit and retry for up to 10 times before giving up.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 7660a1bd 24-Jun-2020 Shayne Chen <shayne.chen@mediatek.com>

mt76: mt7615: register ext_phy if DBDC is detected

MT_EE_WIFI_CONF field can be used to detect if the chipset is MT7615D.
Thus, add support to automatically register ext_phy if DBDC is detected.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# a2b30bd4 03-Jul-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7615: check MT76_STATE_PM flag before accessing the device

Double-check if the device is in low-power state before accessing
registermap in mt7615_sta_rate_tbl_update() and in
mt7615_led_set_config()

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 53b42ae2 29-Apr-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7615: introduce mt7615_check_offload_capability routine

Introduce mt7615_check_offload_capability routine to set hw/wiphy
offload capabilities according to the running firmware

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 7f8ebafe 17-Apr-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7663: introduce 802.11 PS support in sta mode

Enable 802.11 power-save support available in mt7663 firmware

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>


# e90354e0 16-Apr-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7615: move core shared code in mt7615-common module

Create mt7615-common module in order to collect shared code between usb
and mmio code. Move the following source files in mt7615-common module:
- main.c
- init.c
- mcu.c
- mac.c
- debugfs.c
- eeprom.c
- trace.c

Create the following source files for mmio only source code and move them
in mt7615e module:
- pci_init.c
- dma.c
- pci_mac.c

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>