History log of /linux-master/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
Revision Date Author Comments
# 1258c156 17-May-2023 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: accumulate mu-mimo ofdma muru stats

The stats are clear-on-read, which makes it very difficult for tools
to adequately deal with wrapped stats and with keeping good totals.

So, accumulate these values when they are read from the firmware/radio
and present totals to user-space.

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


# 7f03a563 12-May-2023 Lorenzo Bianconi <lorenzo@kernel.org>

wifi: mt76: mt7915: move mib_stats structure in mt76.h

mib_stats structure is shared by mostly all chipsets. Move it to shared
code.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 26807989 30-Mar-2023 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: drop redundant prefix of mt7915_txpower_puts()

Just a cosmetic patch to drop redundant prefix for txpower ouput text.

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


# edb0406b 07-Dec-2022 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: fix unintended sign extension of mt7915_hw_queue_read()

In the expression "map[i].qid << 24" starts as u8, but is promoted to
"signed int", then sign-extended to type "unsigned long", which is not
intended. Cast to u32 to avoid the sign extension.

Fixes: 776ec4e77aa6 ("mt76: mt7915: rework debugfs queue info")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 8b25301a 02-Dec-2022 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: fix mt7915_rate_txpower_get() resource leaks

Coverity message: variable "buf" going out of scope leaks the storage.

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527799 ("Resource leaks")
Fixes: e3296759f347 ("wifi: mt76: mt7915: enable per bandwidth power limit support")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 3eb50cc9 30-Nov-2022 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: rely on band_idx of mt76_phy

The commit dc44c45c8cd0 added band_idx into mt76_phy, so switching to
rely on that.

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


# e3296759 23-Nov-2022 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: enable per bandwidth power limit support

This power should override the per bandwidth max power that the
device emits.

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


# 6f917bba 22-Nov-2022 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: fix band_idx usage

The commit 006b9d4ad5bf introduced phy->band_idx to accommodate the
band definition change for mt7986 so that the band_idx of main_phy
can be 0 or 1. Accordingly, the source of band_idx 1 has switched to
"phy != &dev->phy" or "dev->phy.band_idx = 1".

We still use ext_phy to represent band 1 somewhere in driver, so fix it.
Also, band_idx sounds more reasonable than dbdc_idx, so change it.

Fixes: 006b9d4ad5bf ("mt76: mt7915: introduce band_idx in mt7915_phy")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# bd2404d4 22-Nov-2022 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: add basedband Txpower info into debugfs

This helps user to debug Txpower propagation path easily.

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


# b662b71a 09-Nov-2022 Ryder Lee <ryder.lee@mediatek.com>

wifi: mt76: mt7915: add full system reset into debugfs

Trigger firmware crash and enable full system recovery through debugfs.
This also renames knob "fw_ser" to a clear-cut name "sys_recovery".

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


# d107501a 02-Nov-2022 Lorenzo Bianconi <lorenzo@kernel.org>

wifi: mt76: move aggr_stats array in mt76_phy

Move aggregation stats array per-phy instead of share it between multiple
interfaces. This is a preliminary patch to add mt7996 driver support.

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


# 7624ffcd 30-Sep-2022 Evelyn Tsai <evelyn.tsai@mediatek.com>

wifi: mt76: mt7915: reserve 8 bits for the index of rf registers

The value of regidx of rf registers is combined with WF selection and
offset. Extend the WF selection field from 4 to 8 bits since the
adie index should also be specified.

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


# d2b5bb6d 17-Aug-2022 Howard Hsu <howard-yh.hsu@mediatek.com>

wifi: mt76: mt7915: do not check state before configuring implicit beamform

Do not need to check running state before configuring implicit Tx
beamform. It is okay to configure implicit Tx beamform in run time.
Noted that the existing connected stations will be applied for new
configuration only if they reconnected to the interface.

Fixes: 6d6dc980e07d ("mt76: mt7915: add implicit Tx beamforming support")
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# f572dc96 19-May-2022 Dan Carpenter <dan.carpenter@oracle.com>

mt76: mt7915: fix endian bug in mt7915_rf_regval_set()

This code is supposed to set a u32 value, but casting will not work on
big endian systems.

Fixes: 0a17329ae9c1 ("mt76: mt7915: add debugfs knob for RF registers read/write")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 63907290 17-May-2022 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: fix endianness in mt7915_rf_regval_get

Fix the following sparse warning in mt7915_rf_regval_get routine:
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:979:16: warning: cast to restricted __le32

Fixes: 0a17329ae9c1f ("mt76: mt7915: add debugfs knob for RF registers read/write")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 64d60725 07-May-2022 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: add more statistics from fw_util debugfs knobs

Print out exception state and program counters of WA/WM MCUs.

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


# 0d28ec72 07-May-2022 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: improve error handling for fw_debug knobs

In case fw.debug_wm/wa might be unavailable.

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


# bdd2ca78 05-May-2022 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: rework SER debugfs knob

1. get status of system recovery from firmware.
2. add more recovery points.
3. make knob per phy.

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


# 0a17329a 18-Apr-2022 Shayne Chen <shayne.chen@mediatek.com>

mt76: mt7915: add debugfs knob for RF registers read/write

Add RF registers read/write support for debugging RF issues, which
should be processed by mcu commands.
The index of rf registers use the generic regidx, and are combined
with two parts: WF selection [31:28] and offset [27:0].

Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# badb6ffa 04-Apr-2022 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: do not pass data pointer to mt7915_mcu_muru_debug_set

Fix typo in mt7915_muru_debug_set routine and pass muru_debug value to
mt7915_mcu_muru_debug_set() instead of data pointer.

Fixes: 1966a5078f2d ("mt76: mt7915: add mu-mimo and ofdma debugfs knobs")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 046d2e7c 04-Apr-2022 Sriram R <quic_srirrama@quicinc.com>

mac80211: prepare sta handling for MLO support

Currently in mac80211 each STA object is represented
using sta_info datastructure with the associated
STA specific information and drivers access ieee80211_sta
part of it.

With MLO (Multi Link Operation) support being added
in 802.11be standard, though the association is logically
with a single Multi Link capable STA, at the physical level
communication can happen via different advertised
links (uniquely identified by Channel, operating class,
BSSID) and hence the need to handle multiple link
STA parameters within a composite sta_info object
called the MLD STA. The different link STA part of
MLD STA are identified using the link address which can
be same or different as the MLD STA address and unique
link id based on the link vif.

To support extension of such a model, the sta_info
datastructure is modified to hold multiple link STA
objects with link specific params currently within
sta_info moved to this new structure. Similarly this is
done for ieee80211_sta as well which will be accessed
within mac80211 as well as by drivers, hence trivial
driver changes are expected to support this.

For current non MLO supported drivers, only one link STA
is present and link information is accessed via 'deflink'
member.

For MLO drivers, we still need to define the APIs etc. to
get the correct link ID and access the correct part of
the station info.

Currently in mac80211, all link STA info are accessed directly
via deflink. These will be updated to access via link pointers
indexed by link id with MLO support patches, with link id
being 0 for non MLO supported cases.

Except for couple of macro related changes, below spatch takes
care of updating mac80211 and driver code to access to the
link STA info via deflink.

@ieee80211_sta@
struct ieee80211_sta *s;
struct sta_info *si;
identifier var = {supp_rates, ht_cap, vht_cap, he_cap, he_6ghz_capa, eht_cap, rx_nss, bandwidth, txpwr};
@@

(
s->
- var
+ deflink.var
|
si->sta.
- var
+ deflink.var
)

@sta_info@
struct sta_info *si;
identifier var = {gtk, pcpu_rx_stats, rx_stats, rx_stats_avg, status_stats, tx_stats, cur_max_bandwidth};
@@

(
si->
- var
+ deflink.var
)

Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Link: https://lore.kernel.org/r/1649086883-13246-1-git-send-email-quic_srirrama@quicinc.com
[remove MLO-drivers notes from commit message, not clear yet; run spatch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# a0709773 11-Feb-2022 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: fix endianness warnings in mt7915_debugfs_rx_fw_monitor

Fix the following sparse warnings:
warning: incorrect type in initializer (different base types)
expected restricted __le16 [usertype] msg_type
got int
warning: incorrect type in assignment (different base types)
expected restricted __le32 [usertype] timestamp
got unsigned int

Fixes: 988845c9361a0 ("mt76: mt7915: add support for passing chip/firmware debug data to user space")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 006b9d4a 08-Feb-2022 Bo Jiao <Bo.Jiao@mediatek.com>

mt76: mt7915: introduce band_idx in mt7915_phy

The wfsys of MT7986 has only single adie chip for non-dbdc devices,
and it binds to band1 by default. Hence this patch adds band_idx to
explicitly configure phy accordingly.

Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Co-developed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# e4a079c5 12-Jan-2022 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: introduce rdd_monitor debugfs node

Introduce rdd_monitor debugfs node in order to dump rdd2 configuration.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# b63f63c2 12-Jan-2022 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: enable radar trigger on rdd2

Enable radar trigger for rdd2 in mt7915_radar_trigger.

Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 988845c9 26-Dec-2021 Felix Fietkau <nbd@nbd.name>

mt76: mt7915: add support for passing chip/firmware debug data to user space

This can be used to assist in debugging driver or firmware tx/rx issues.
The data is streamed to user space using a relay file in debugfs

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


# 97cef84d 24-Dec-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: connac: move mt76_connac_mcu_rdd_cmd in mt76-connac module

Move mt76_connac_mcu_rdd_cmd routine in mt76-connac module and remove
duplicated code.

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


# cd4c314a 19-Dec-2021 Bo Jiao <Bo.Jiao@mediatek.com>

mt76: mt7915: refine register definition

Add mt7915_reg_desc to differentiate chip generations.
This is an intermediate patch to introduce mt7916 support.

Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Co-developed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 1966a507 15-Dec-2021 MeiChia Chiu <meichia.chiu@mediatek.com>

mt76: mt7915: add mu-mimo and ofdma debugfs knobs

Add mu-mimo and ofdma packet counters statistics.
The statistics are clear on read.

Reviewed-by: Money Wang <Money.Wang@mediatek.com>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 6cf4392f 14-Dec-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: introduce mt76_vif in mt7915_vif

Align mt7915_vif layout to mt7921_vif and mt7615_vif

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


# 90f5daea 21-Oct-2021 Shayne Chen <shayne.chen@mediatek.com>

mt76: mt7915: add debugfs knobs for MCU utilization

Add debugfs knobs to read MCU utilization, which helps user know
firmware status more easily to narrow down CPU bottleneck issues.

Co-developed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 9b121acd 21-Oct-2021 Shayne Chen <shayne.chen@mediatek.com>

mt76: mt7915: add WA firmware log support

Support to turn on/off WA firmware log from debugfs.

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


# 9a93364d 20-Oct-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: rework debugfs fixed-rate knob

Switch to use new mt7915_mcu_set_fixed_rate_ctrl().

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


# 37dd5755 18-Oct-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: move tx amsdu stats in mib_stats

Move tx_amsdu histogram stats in mib_stats structure since registers are
clear-on-read

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


# 81811173 18-Oct-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: run mt7915_get_et_stats holding mt76 mutex

Since it can run in parallel with mac_work, hold mutex lock in
mt7915_get_et_stats. Moreover update mib counters running
mt7915_get_et_stats.

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


# e0710ca9 18-Oct-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: remove dead code in debugfs code

Remove some more not used code in mt7915 debugfs.
Squash mt7915_puts_rate_txpower and mt7915_rate_txpower_show.

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


# 53d12b55 10-Oct-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: improve code readability for xmit-queue handler

Improve xmit-queue debugfs node readability for mt7915

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


# 115a2d73 10-Oct-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: introduce mt76 debugfs sub-dir for ext-phy

Introduce a dedicated mt76 debugfs sub-dir for ext-phy in dbdc mode.

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


# 34f374f8 23-Sep-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: add twt_stats knob in debugfs

Introduce twt_stats knob in debugfs in order to dump established
agreements

Tested-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 016f2040 04-Aug-2021 Ben Greear <greearb@candelatech.com>

mt76: mt7915: add tx mu/su counters to mib

These counters are clear-on-read, so we need to accumulate
them in the update_stats poll logic, and read the accumulated
values instead of directly doing register reads when reporting
to debugfs and ethtool stats.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 6e5ceaff 16-Aug-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: rename debugfs tx-queues

Rename "queues" to "tx-queues" to reflect its meaning.

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


# 776ec4e7 16-Aug-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: rework debugfs queue info

Complete PSE/PLE queue statistics, including per-sta AC queue
information.

Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 4d242332 06-Aug-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: add HE-LTF into fixed rate command

Add HE-LTF control.

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


# 9908d98a 14-Jul-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: report tx rate directly from tx status

Report tx rate from tx status packets instead of receving periodic mcu
event. This improves flexibility, accuracy and AQL performance, and
simplifies code flow for better readability.

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


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

mt76: mt7915: improve MU stability

- Adjust starec flow since VHT MU group is only updated by starec_vht
follows starec_bf settings.
- Drop unnecessary MU BF checks.

TX MPDU PER (Status = Success):
TOT_MPDU_CNT FAIL_MPDU_CNT TX_PER
WCID Rate
1 VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF 114 0 0.00%
VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF_MU 64 0 0.00%
VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF 128 0 0.00%
VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF_MU 745 0 0.00%
VHT_BW80_2SS_MCS8_LGI_LDPC_MUBF_MU 856 0 0.00%
VHT_BW80_2SS_MCS8_SGI_LDPC_MUBF_MU 1430 4 0.28%
VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF_MU 5220 31 0.59%
VHT_BW80_2SS_MCS9_LGI_LDPC_iBF 59 0 0.00%
VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF 64 2 3.12%
VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF_MU 22132 76 0.34%
VHT_BW80_2SS_MCS9_SGI_LDPC_iBF 2866 1 0.03%
2 VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF_MU 3781 5 0.13%
VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF_MU 735 0 0.00%
VHT_BW80_2SS_MCS8_LGI_LDPC_MUBF_MU 1270 365 28.74%
VHT_BW80_2SS_MCS8_SGI_LDPC_MUBF_MU 3420 57 1.67%
VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF 128 0 0.00%
VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF_MU 64 0 0.00%
VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF 191 0 0.00%
VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF_MU 18833 320 1.70%
VHT_BW80_2SS_MCS9_SGI_LDPC_iBF 6040 0 0.00%
287 OFDM 6M

Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


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

mt76: mt7915: introduce mt7915_mcu_set_txbf()

Use mt7915_mcu_set_txbf() to reduce global functions. This can be
easily extended to support other TxBF commands in further patches.

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


# ae130bb8 25-May-2021 Shayne Chen <shayne.chen@mediatek.com>

mt76: mt7915: use mt7915_mcu_get_txpower_sku() to get per-rate txpower

Get per-rate txpower with mcu command. This is the preparation of
co-driver for the next chipset, which has different tmac power registers
but can share this same command.

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


# 33fe9c63 23-Apr-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: add thermal sensor device support

This provides userspace with a unified interface, hwmon sysfs, to monitor
temperature in the hardware and can be adapted to system monitoring tools.

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>


# 5352efae 16-Apr-2021 Shayne Chen <shayne.chen@mediatek.com>

mt76: mt7915: directly read per-rate tx power from registers

Since driver no longer handler per-rate tx power setting, we need to
read the power values directly from registers.

Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# ecb187a7 16-Apr-2021 Shayne Chen <shayne.chen@mediatek.com>

mt76: mt7915: rework the flow of txpower setting

Clean up the flow of per-rate txpower limit setting to get rid of
duplicate work since it has already been handled by firmware, and set
proper max_power based on different channels and regdomains.

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


# 9fb9d755 21-Feb-2021 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: fix aggr len debugfs node

Similar to mt7921, fix 802.11 aggr len debugfs reporting for mt7915 driver.

Fixes: e57b7901469fc ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 8d93a4f9 27-Mar-2021 Junlin Yang <yangjunlin@yulong.com>

mt76: Convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 6d6dc980 13-Jan-2021 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: add implicit Tx beamforming support

Add ht/vht implicit Tx beamforming support and enable it via debugfs.

Tested-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# af901eb4 13-Nov-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: get rid of dbdc debugfs knob

mt7915 automatically detects dbdc feature so drop debugfs knob.
Move if_comb, mt7915_rates, if_limits structs and mt7915_regd_notifier(),
mt7915_init_wiphy() routines at the begging of init.c in order to make
mt7915_register_ext_phy routine static

Co-developed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
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>


# 4c430774 13-Nov-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: mt7915: introduce dbdc support

Introduce mt7915 dbdc support. If dbdc is available, mt7915 primary phy
will work on 2.4GHz band, while secondary one on 5GHz band.

Co-developed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
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>


# 91990519 11-Nov-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move tx hw data queues in mt76_phy

Move hw data queues in mt76_phy from mt76_dev since mt7915 supports per
phy hw queues in dbdc mode

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


# e637763b 11-Nov-2020 Lorenzo Bianconi <lorenzo@kernel.org>

mt76: move mcu queues to mt76_dev q_mcu array

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>


# f9df085c 08-Oct-2020 Taehee Yoo <ap420073@gmail.com>

mt76: set fops_tx_stats.owner to THIS_MODULE

If THIS_MODULE is not set, the module would be removed while debugfs is
being used.
It eventually makes kernel panic.

Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 5efbe3b1 08-Oct-2020 Taehee Yoo <ap420073@gmail.com>

mt76: mt7915: set fops_sta_stats.owner to THIS_MODULE

If THIS_MODULE is not set, the module would be removed while debugfs is
being used.
It eventually makes kernel panic.

Fixes: ec9742a8f38e ("mt76: mt7915: add .sta_add_debugfs support")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# aab662cc 31-Aug-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

mt76: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


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

mt76: remove struct mt76_sw_queue

All members except for the struct mt76_queue pointer have been removed

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


# 1daf2522 26-Jul-2020 Felix Fietkau <nbd@nbd.name>

mt76: mt7915: clean up station stats polling and rate control update

Queueing a per-sta work item from the tx free path can become very expensive
under load. This work is only supposed to pull rate control stats every
second and deal with rate control changes.

Additionally, the rate control update code was wrong, because it was
confusing bit masks and bit numbers in test_bit.

Fix this by introducing a dedicated device work item for rate control
updates, and by polling station stats from the phy mac work.
Stations requiring polling or rate control updates are added to lists
protected by dev->sta_poll_lock.

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


# a6e29d8e 14-Jun-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: add missing CONFIG_MAC80211_DEBUGFS

Add CONFIG_MAC80211_DEBUGFS to fix a reported warning.

Fixes: ec9742a8f38e ("mt76: mt7915: add .sta_add_debugfs support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# f68e6a1f 14-Jun-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: add MU-MIMO support

Enable MU-MIMO DL/UL and add relative counters in debugfs.

Currently MU modules read WTBL first to notify BA changes to
other cross modules, so adjust mt7915_mcu_sta_ba() accordingly.

Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 6f4bd852 19-May-2020 Colin Ian King <colin.king@canonical.com>

mt76: mt7915: fix a handful of spelling mistakes

There are some spelling mistakes in some literal strings. Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# babdad50 11-May-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: add debugfs to track TxBF status

Add debug counters to track status of beamformer and beamformee.

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


# 5517f78b 24-Apr-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: enable firmware module debug support

This allows host driver to get useful information of some important modules.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Chih-Min Chen <chih-min.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# 9fac3c81 24-Apr-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: set peer Tx fixed rate through debugfs

Driver can manually set fixed rate for each peer through debugfs.

May use .set_bitrate_mask callback and iterate stations under the
current vif to achieve the aim once it supports HE rate.

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


# ec9742a8 24-Apr-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: add .sta_add_debugfs support

This generation supports much more per-peer statistics than legacy ones,
so add .sta_add_debugfs accordingly.

This is convenient to set/get more settings/counters in the long run.

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


# f1d96236 24-Apr-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: mt7915: implement HE per-rate tx power support

Use firmware support for applying per-rate limit and power offsets.
This can support all HE RU types.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Chih-Min Chen <chih-min.chen@mediatek.com>
Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Acked-by: Yiwei Chung <yiwei.chung@mediatek.com>
Acked-by: YF Luo <yf.luo@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>


# e57b7901 24-Apr-2020 Ryder Lee <ryder.lee@mediatek.com>

mt76: add mac80211 driver for MT7915 PCIe-based chipsets

Add support for the MediaTek latest generation IEEE 802.11ax 4x4
device MT7915E, which supports concurrent dual-band operation at
both 5GHz and 2.4GHz.

Note that this patch just add basic part and will add more HE
capabilities support in the further patches.

The driver supports AP, Station, Mesh and monitor mode.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Chih-Min Chen <chih-min.chen@mediatek.com>
Suggested-by: Shihwei Lin <shihwei.lin@mediatek.com>
Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Acked-by: Yiwei Chung <yiwei.chung@mediatek.com>
Acked-by: YF Luo <yf.luo@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>