History log of /linux-master/drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h
Revision Date Author Comments
# 633f77b5 21-Nov-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt76x02: introduce SAR support

Add SAR spec support to mt76x02 driver to allow configuring SAR power
limitations on the frequency ranges from the userland.

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


# 40ba9a93 29-Jun-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt76x2: fix pci suspend/resume on mt7612e

Fix the following mt7612e hw hangs during suspend/resume reported on
Dell Vostro 3360

mt76x2e 0000:01:00.0: MCU message 2 (seq 11) timed out
mt76x2e 0000:01:00.0: MCU message 30 (seq 12) timed out
mt76x2e 0000:01:00.0: MCU message 30 (seq 13) timed out
mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
mt76x2e 0000:01:00.0: Build: 1
mt76x2e 0000:01:00.0: Build Time: 201507311614____
mt76x2e 0000:01:00.0: Firmware running!
ieee80211 phy0: Hardware restart was requested
mt76x2e 0000:01:00.0: MCU message 2 (seq 1) timed out
mt76x2e 0000:01:00.0: MCU message 30 (seq 2) timed out
mt76x2e 0000:01:00.0: MCU message 30 (seq 3) timed out
mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
mt76x2e 0000:01:00.0: Build: 1
mt76x2e 0000:01:00.0: Build Time: 201507311614____
mt76x2e 0000:01:00.0: Firmware running!
ieee80211 phy0: Hardware restart was requested
mt76x2e 0000:01:00.0: MCU message 31 (seq 5) timed out
mt76x2e 0000:01:00.0: MCU message 31 (seq 6) timed out
mt76x2e 0000:01:00.0: MCU message 31 (seq 7) timed out
mt76x2e 0000:01:00.0: MCU message 31 (seq 8) timed out
mt76x2e 0000:01:00.0: MCU message 31 (seq 9) timed out
mt76x2e 0000:01:00.0: MCU message 31 (seq 10) timed out
mt76x2e 0000:01:00.0: MCU message 31 (seq 11) timed out
mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
mt76x2e 0000:01:00.0: Build: 1
mt76x2e 0000:01:00.0: Build Time: 201507311614____
mt76x2e 0000:01:00.0: Firmware running!
ieee80211 phy0: Hardware restart was requested
------------[ cut here ]-----------
CPU: 3 PID: 11956 Comm: kworker/3:1 Not tainted 5.7.0-pf2 #1
Hardware name: Dell Inc. Vostro 3360/0F5DWF, BIOS A18 09/25/2013
Workqueue: events_freezable ieee80211_restart_work [mac80211]
RIP: 0010:ieee80211_reconfig+0x234/0x1700 [mac80211]
RSP: 0018:ffffb803c23ffdf0 EFLAGS: 00010286
RAX: 00000000fffffff0 RBX: ffff9595a7564900 RCX: 0000000000000008
RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000100
RBP: ffff9595a7ec07e0 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: ffff9595a7ec18d0
R13: 00000000ffffffff R14: 0000000000000000 R15: 00000000fffffff0
FS: 0000000000000000(0000) GS:ffff9595af2c0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e56d7de000 CR3: 000000042200a001 CR4: 00000000001706e0
Call Trace:
ieee80211_restart_work+0xb7/0xe0 [mac80211]
process_one_work+0x1d4/0x3c0
worker_thread+0x228/0x470
? process_one_work+0x3c0/0x3c0
kthread+0x19c/0x1c0
? __kthread_init_worker+0x30/0x30
ret_from_fork+0x35/0x40
wlp1s0: Failed check-sdata-in-driver check, flags: 0x0
CPU: 3 PID: 11956 Comm: kworker/3:1 Tainted: G W 5.7.0-pf2 #1
Hardware name: Dell Inc. Vostro 3360/0F5DWF, BIOS A18 09/25/2013
Workqueue: events_freezable ieee80211_restart_work [mac80211]
RIP: 0010:drv_remove_interface+0x11f/0x130 [mac80211]
RSP: 0018:ffffb803c23ffc80 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff9595a7564900 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000082 RDI: 00000000ffffffff
RBP: ffff9595a7ec1930 R08: 00000000000004b6 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000006f08 R12: ffff9595a7ec1000
R13: ffff9595a75654b8 R14: ffff9595a7ec0ca0 R15: ffff9595a7ec07e0
FS: 0000000000000000(0000) GS:ffff9595af2c0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e56d7de000 CR3: 000000042200a001 CR4: 00000000001706e0
Call Trace:
ieee80211_do_stop+0x5af/0x8c0 [mac80211]
ieee80211_stop+0x16/0x20 [mac80211]
__dev_close_many+0xaa/0x120
dev_close_many+0xa1/0x2b0
dev_close+0x6d/0x90
cfg80211_shutdown_all_interfaces+0x71/0xd0 [cfg80211]
ieee80211_reconfig+0xa2/0x1700 [mac80211]
ieee80211_restart_work+0xb7/0xe0 [mac80211]
process_one_work+0x1d4/0x3c0
worker_thread+0x228/0x470
? process_one_work+0x3c0/0x3c0
kthread+0x19c/0x1c0
? __kthread_init_worker+0x30/0x30
ret_from_fork+0x35/0x40

Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Tested-by: Oleksandr Natalenko <oleksandr@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 96747a51 12-Oct-2019 Felix Fietkau <nbd@nbd.name>

mt76: move channel state to struct mt76_phy

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>


# 0e3d6777 24-Jul-2019 Ryder Lee <ryder.lee@mediatek.com>

mt76: switch to SPDX tag instead of verbose boilerplate text

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>


# 00496042 27-Feb-2019 Felix Fietkau <nbd@nbd.name>

mt76: mt76x2: implement full device restart on watchdog reset

Restart the firmware and re-initialize the MAC to be able to recover
from more kinds of hang states

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


# ecd25b54 31-Jan-2019 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76x2: remove mt76x2_alloc_device routine

Remove mt76x2_alloc_device since it just runs mt76_alloc_device.
Move mt76_alloc_device call in mt76x2_probe

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# bf349ce1 09-Dec-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76x2: add static qualifier to mt76x2_init_hardware

Add static qualifier to mt76x2_init_hardware routine since it is
used just in pci_init.c

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 4ece1e0a 09-Nov-2018 Stanislaw Gruszka <sgruszka@redhat.com>

mt76: remove wait argument from mt76x02_mcu_calibrate

We always wait for CMD_CALIBRATION_OP mcu message, but wait argument is used
for do additional MT_MCU_COM_REG0 register operations, which are needed
for mt76x2e devices and we can use appropriate check instead of wait argument.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# e6cb3291 22-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move dfs support in mt76x02-lib module

Move mt76x2 DFS support in mt76x02-lib module in order to
be reused by mt76x0 driver and unlock DFS frequencies

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 317ed42b 19-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move tx protection routines in mt76x02-lib module

Move mt76x02_set_rts_threshold and mt76x02_mac_set_tx_protection
routines in mt76x02-lib module and remove duplicated code in mt76x0
and mt76x2 drivers. Remove pci_mac.c and mt76x0/mac.c since now are
empty files

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 36704051 19-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_set_tx_ackto in mt76x02-lib module

Move mt76x02_set_tx_ackto and mt76x02_set_coverage_class routines
in mt76x02-lib module in order to be reused by mt76x0 driver.
This is a preliminary patch to unify drv_bss_info_changed mac80211
callback between mt76x0 and mt76x2 drivers

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# f7c8a0f2 19-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_sta_ps in mt76x02-lib module

Move mt76x02_sta_ps utility routine in mt76x02_util.c
in order to be reused by mt76x0 driver adding AP support

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# dfe6c80c 19-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move tx beacon routines in mt76x02-lib module

Move mt76x02_tx beacon utility routines in mt76x02_mmio.c
in order to be reused by mt76x0 driver adding AP support

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 5cbace02 19-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_init_device in mt76x02-lib module

Move mt76x02_init_device routine in mt76x02_util.c in order to be
reused by mt76x0 driver and remove duplicated code. Move interface
combo definition supported by the driver in mt76x02_init_device routine

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 76055413 15-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_debugfs in mt76x02-lib module

Move mt76x02_debugfs in mt76x02-lib module in order to
be reused by mt76x0 driver and remove duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 7dd73588 15-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_mac_work routine in mt76x02-lib module

Move mt76x02_mac_work routine in mt76x02_mac.c in order to be reused by
mt76x0 driver to read device statistics

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 62503186 15-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76x0: pci: add get_survey support

Move mt76x02_update_channel routine in mt76x02-lib module in
order to be reused by mt76x0 driver adding get_survey support

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 989582e5 14-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76x2u: align channel gain logic to mt76x2 one

Update vga tuning algorithm to the one used in mt76x2 driver

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# cac97ed6 14-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76x2: align mt76x2 and mt76x2u firmware

Unify firmware version used on mt76x2e and mt76x2u drivers

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 370c6415 11-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_phy_set_band in mt76x02-lib module

Move mt76x02_phy_set_band routine in mt76x02_phy.c since
it is shared between mt76x0 and mt76x2 drivers and remove
duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 032c08f4 11-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_phy_set_bw in mt76x02-lib module

Move mt76x02_phy_set_bw routine in mt76x02_phy.c since
it is shared between mt76x0 and mt76x2 drivers and remove
duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 9b43960b 05-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move irq handler in mt76x02-lib moudle

Move mt76x02_irq_handler handler in mt76x02_mmio.c in order to be
reused in mt76x0 driver. Move mt76x02_rx_poll_complete routine in
mt76x02-lib module. Moreover remove pci_core.c and mt76x2/trace.{c,h}
since are empty files

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 53d20fdb 05-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move tx_tasklet management in mt76x02-lib moudle

Move tx_tasklet management in mt76x02_mmio.c in order to
be reused by mt76x0 driver and remove duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 466495b1 05-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_tx_complete in mt76x02-lib module

Move mt76x02_tx_complete mt76x02-lib module in order to
be reused by mt76x0 drivers for irq unification.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 5ec57485 05-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_tx_prepare_skb in mt76x02_txrx.c

Move mt76x02_tx_prepare_skb routine in mt76x02-lib module in order
to be reused by mt76x0 driver in tx datapath

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 1ea0a1b1 05-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move tpc routines in mt76x02-lib module

Move mt76x02_tx_get_txpwr_adj and mt76x02_tx_set_txpwr_auto routines
in mt76x02-lib module since they are shared between mt76x0 and mt76x2
drivers. Moreover remove get_txpwr_adj function pointer

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 7cd79b8d 05-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76x2: remove leftover function declatarions

Remove following function declarations since they have been moved
to mt76x02-lib module:
- mt76x2_sta_add
- mt76x2_sta_remove
- mt76x2_remove_interface
- mt76x2_conf_tx
- mt76x2_txq_init

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 7a07adcd 05-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: rename mt76x02_util.h in mt76x02.h

Rename mt76x02_util.h header file in mt76x02.h since now contains
all mt76x02 related definitions and not just utility routines
declarations

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 2f0308d0 04-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_tx in mt76x02-lib module

Move mt76x02_tx shared routine in mt76x02-lib module and remove
duplicated code. Moreover remove mt76x0/tx.c since it is an empty
file

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 9ba1e0e6 04-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: unify rxwi parsing between mt76x2 and mt76x0 drivers

Unify rxwi parsing between mt76x2 and mt76x0. Remove the following
routines:
- mt76x0_phy_get_rssi
- mt76x0_queue_rx_skb
- mt76x0_mac_process_rx
Moreover remove mt76x2/common.c and mt76x0/mac.h since are empty files
Enable CCMP PN sw validation

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# d9f8934e 04-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_mac_process_rx in mt76x02-lib module

Move mt76x02_mac_process_rx utility routine in mt76x02-lib
in order to by reused by mt76x0 driver for rxwi parsing.
Add stream number check in mt76x02_mac_process_rx since mt76x0
chipsets are 1x1:1

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# e40803f2 04-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76x2: move mt76x2_dev in mt76x02_util.h

Move mt76x2_dev in mt76x02_util.h and rename it in mt76x02_dev
in order to be shared between mt76x2 and mt76x0 driver

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 50b9e8d5 04-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_phy_get_min_avg_rssi in mt76x02_phy.c

Move mt76x02_phy_get_min_avg_rssi in mt76x02-lib module since
it will be used by mt76x0 driver in order to unify rxwi parsing

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 1ef3aa889 01-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: add get_tx_txpwr_adj function pointer to mt76_driver_ops

Add get_tx_txpwr_adj function pointer to mt76_driver_ops data structure
as a preliminary patch to unify txwi configuration between mt76x0 and
mt76x2 drivers since tpc is currently supported just by mt76x2 driver

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# d697b00b 01-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76: move mt76x02_tx_get_max_txpwr_adj in mt76x02_util.c

Move mt76x02_tx_get_max_txpwr_adj routine in mt76x02-lib module
since now both mt76x0 and mt76x2 drivers read rate tx power gain from
rate_power data structure. Moreover remove get_max_txpwr_adj function
pointer from mt76_driver_ops data structure

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 1613c621 01-Oct-2018 Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

mt76x2: move mt76x2 source files to mt76x2 folder

Move mt76x2 and mt76x2u drivers to mt76x2 subfolder and
leave just shared code in mt76 root folder

Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>