History log of /linux-master/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
Revision Date Author Comments
# fe0ea395 25-Jul-2023 Felix Fietkau <nbd@nbd.name>

wifi: mt76: mt7603: fix tx filter/flush function

Setting MT_TX_ABORT does not abort any transmission for a wtbl index on its
own. Instead, it modifies the behavior of a queue flush to make it selectively
flush packets for a particular wtbl index.
Adjust powersave filtering to make use of this in order to avoid running into
unnecessary timeouts while flushing

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


# 2d29058e 22-Jun-2023 Lorenzo Bianconi <lorenzo@kernel.org>

wifi: mt76: mt7603: rely on shared poll_list field

Rely on poll_list field in mt76_wcid structure and get rid of
private copy.

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


# c55e898b 22-Jun-2023 Lorenzo Bianconi <lorenzo@kernel.org>

wifi: mt76: mt7603: rely on shared sta_poll_list and sta_poll_lock

Rely on sta_poll_list and sta_poll_lock fields in mt76_dev structure
and get rid of private copies.

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


# c3137942 12-Nov-2022 Sujuan Chen <sujuan.chen@mediatek.com>

wifi: mt76: add info parameter to rx_skb signature

This is a preliminary patch to introduce WED RX support for mt7915.

Tested-by: Daniel Golle <daniel@makrotopia.org>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# c560b137 10-Jun-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: make mt76_update_survey() per phy

Reduce duplicated survey for DBDC.

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


# 0fda6d7b 29-Mar-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: report Rx timestamp

Frame reception timestamp (low 32-bits) that indicates the value of the
local TSF timer value at the time the first bit of the MAC header in the
received frame (PPDU unit) arriving at the MAC.

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


# a782f8bf 04-Jan-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move mac_work in mt76_core module

Move mac_work delayed_work and mac_work_count in mt76_phy since it is
used by all drivers. This is a preliminary patch to create a common mcu
library used by mt7615 and mt7921 drivers

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>


# 5ee3e780 07-Oct-2020 Allen Pais <apais@linux.microsoft.com>

wireless: mt76: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 21fd4bb7 24-Aug-2020 Felix Fietkau <nbd@nbd.name>

mt76: mt7603: tune tx ring size

Stop relying on global tx ring size, reduce size for PS/mgmt queue

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


# d80e52c7 23-Aug-2020 Felix Fietkau <nbd@nbd.name>

mt76: remove qid argument to drv->tx_complete_skb

It is not needed

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


# beffe070 11-Jun-2020 Felix Fietkau <nbd@nbd.name>

mt76: vif_mask to struct mt76_phy

All drivers use this in pretty much the same way. Moving it to core helps with
some checks for the upcoming testmode support

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


# e9415009 26-Feb-2019 Felix Fietkau <nbd@nbd.name>

mt76: mt7603: make dynamic sensitivity adjustment configurable via debugfs

In some cases it may be useful for debugging to disable this feature

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


# 633348f2 22-Feb-2020 Felix Fietkau <nbd@nbd.name>

mt76: mt7603: add upper limit for dynamic sensitivity minimum receive power

If the minimum power is raised too much, it can make it impossible for weaker
clients to connect, and there are some scenarios where the false detects will
not go down no matter how much the sensitivity is adjusted.
Fixes connectivity issues in some rare cases

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


# e970e665 19-Jan-2020 Felix Fietkau <nbd@nbd.name>

mt76: mt7603: increase dma mcu rx ring size

The ring is used for looping back tx powersave filtered frames, so it could
use some more room, in case more than one aggregate was queued

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


# 30684481 06-Nov-2019 Felix Fietkau <nbd@nbd.name>

mt76: move ampdu_ref from mt76_dev to driver struct

It is only used by the driver

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


# ac24dd35 30-Sep-2019 Felix Fietkau <nbd@nbd.name>

mt76: introduce struct mt76_phy

This is preparation for supporting multiple wiphys per device to support the
concurrent dual-band feature of MT7615D

On the first wiphy, hw->priv will point to struct mt76_dev, which contains a
struct mt76_phy at the start. For the secondary wiphy, hw->priv will point
to a mt76_phy encapsulated in a driver specific struct

To simplify access to struct mt76_phy members from drivers, the driver specific
device struct is changed to add a union of struct mt76_dev and struct mt76_phy
as the first element

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


# ea565833 04-Sep-2019 Felix Fietkau <nbd@nbd.name>

mt76: mt7603: track tx airtime for airtime fairness and survey

Poll per-station hardware counters after tx status events

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


# d515fdca 28-Aug-2019 Felix Fietkau <nbd@nbd.name>

mt76: report rx a-mpdu subframe status

This can be used in monitor mode to figure out which subframes were sent as
part of which A-MPDU

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


# 055da6cf 28-Aug-2019 Felix Fietkau <nbd@nbd.name>

mt76: mt7603: remove q_rx field from struct mt7603_dev

It is no longer used

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


# 5a8d4678 13-Sep-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7603: collect aggregation stats

Introduce ampdu_stat entry in mt7603 debugfs in order to dump 802.11
aggr cumulative statistics

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


# fc98e670 05-Aug-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7603: move survey_time in mt76_dev

Move survey_time field in mt76_dev in order to be reused adding survey
support to mt7615 driver

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


# d8b8890d 21-Jun-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move nl80211_dfs_regions in mt76_dev data structure

Move dfs region field in mt76_dev data structure since it is
used by all drivers. This is a preliminary patch to add DFS support to
mt7615 driver

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


# c5211e99 24-Jun-2019 Felix Fietkau <nbd@nbd.name>

mt76: mt7603: rework and fix tx status reporting

Tx status reporting on mt7603 has a number of issues:

- the hardware can alter the first rate index, but it is not reported to
the driver
- probing is very imprecise, because it alters the per-client rate set,
but only considers info->status.rates for rate selection of a single probe
packet
- short/long GI selection has limitations, which are not accurately reported
to mac80211
- if rates are changed while packets are in flight, tx status reports for
the old rate set might be processed based on the new selection

This led to very suboptimal rate selection with minstrel_ht.

This patch completely reworks tx status reporting to get rid of these
limitations:

- Store the previous and current rate set in the driver + the TSF value
at the time of the switch.
- Use the tx status TSF value to determine which rate set needs to be used
as reference.
- Report only short or long GI rates for a single status event, not a mix.
- The hardware reports the last used rate index. Use it along with the
retry count to figure out what rate was used for the first attempt.
- Use the same retry count value for all rate slots to make this calculation
work.
- Derive the probe rate from the current rateset instead of the skb cb
- Do not wait for a status report for the probe frame before removing the
probe rate from the rate table. Do it immediately after it was referenced
in a tx status report.
- Use the first half of the first rate retry budget for the probe rate
in order to avoid using too many retries on that rate

With this patch, throughput under bad link conditions is improved
significantly, and there is a lot less rate fluctuation going on.

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


# 984d8854 12-May-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7603: add debugfs knob to enable/disable edcca

Introduce a knob in mt7603 debugfs in order to enable/disable
energy detection based on CCA thresholds

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


# dc6057f4 30-Apr-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move pre_tbtt_tasklet in mt76_dev

Move pre_tbtt_tasklet tasklet in mt76_dev data structure since
it is used by all drivers

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


# c8a04d98 29-Apr-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move beacon_mask in mt76_dev

Move beacon_mask in mt76_dev data structure since it is used by
all drivers

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


# 3041c445 29-Apr-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move beacon_int in mt76_dev

Move beacon_int in mt76_dev data structure since it is used by
all drivers

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


# cc173875 13-Apr-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7603: initialize mt76_mcu_ops data structure

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>


# cfaae9e6 02-Apr-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: add skb pointer to mt76_tx_info

Pass skb pointer to tx_prepare_skb through mt76_tx_info data structure.
This is a preliminary patch to properly support dma error path for
new chipsets (e.g. 7615)

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


# 37426fb6 18-Mar-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move mac_work in mt76_dev

Move mac_work delayed work in mt76_dev data structure since
it is used by all drivers and it will be reused adding mac work to
mt7615

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


# a33b8ab8 13-Mar-2019 Felix Fietkau <nbd@nbd.name>

mt76: move tx tasklet to struct mt76_dev

Allows it to be scheduled from core code

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


# 047348fb 16-Mar-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt7603: remove mt7603_mcu_init routine

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>


# b5903c47 14-Mar-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: introduce mt76_tx_info data structure

Add mt76_tx_info as auxiliary data structure to pass values
to tx_prepare_skb pointer. This is a preliminary patch to add
support for new chipsets (e.g. mt7615)

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


# e226ba2e 02-Mar-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: remove mt76_queue dependency from tx_complete_skb function pointer

Remove mt76_queue dependency from tx_complete_skb function pointer and
rely on mt76_tx_qid instead. Remove flush from tx_complete_skb
signature. This is a preliminary patch to introduce mt76_sw_queue
support

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


# 300832ad 02-Mar-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: remove mt76_queue dependency from tx_prepare_skb function pointer

Remove mt76_queue dependency from tx_prepare_skb function pointer and
rely on mt76_tx_qid instead. This is a preliminary patch to introduce
mt76_sw_queue support

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


# 9220f695 28-Feb-2019 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mmio: move mt76x02_set_irq_mask in mt76 module

Move mt76x02_set_irq_mask in mt76 module in order to be reused
adding support for mt7603 driver and remove duplicated code

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


# aa3cb24b 26-Mar-2019 Felix Fietkau <nbd@nbd.name>

mt76: mt7603: fix sequence number assignment

If the MT_TXD3_SN_VALID flag is not set in the tx descriptor, the hardware
assigns the sequence number. However, the rest of the code assumes that the
sequence number specified in the 802.11 header gets transmitted.
This was causing issues with the aggregation setup, which worked for the
initial one (where the sequence numbers were still close), but not for
further teardown/re-establishing of sessions.

Additionally, the overwrite of the TID sequence number in WTBL2 was resetting
the hardware assigned sequence numbers, causing them to drift further apart.

Fix this by using the software assigned sequence numbers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# c8846e10 06-Nov-2018 Felix Fietkau <nbd@nbd.name>

mt76: add driver for MT7603E and MT7628/7688

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>