summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7615/regs.h
AgeCommit message (Collapse)AuthorFilesLines
2023-07-25wifi: mt76: mt7615: enable BSS_CHANGED_MU_GROUPS supportRyder Lee1-0/+9
The Group ID Management frame is an Action frame of category VHT. It is transmitted by the AP to assign or change the user position of a STA for one or more group IDs. Also, sniffer can use a given group id to monitor STA that belongs to that group. Notify underlying driver of changes via BSS_CHANGED_MU_GROUPS. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-09wifi: mt76: mt7615: enable per-phy led supportLorenzo Bianconi1-0/+1
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>
2022-12-01wifi: mt76: mt7615: enable use_cts_prot supportRyder Lee1-0/+2
This adds selectable RTC/CTS enablement for each interface. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7615: add .offset_tsf callbackRyder Lee1-0/+2
It's much more accurate than .get_tsf + .set_tsf and switch to use mt76_rmw to operate tsf registers. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-21mt76: mt7615: fix hardware error recovery for mt7663Felix Fietkau1-0/+11
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>
2021-04-12mt76: mt7615: fix TSF configurationRyder Lee1-3/+4
The index of TSF counters should follow HWBSSID. Fixes: d8d59f66d136 ("mt76: mt7615: support 16 interfaces") Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-12mt76: mt7615: add support for rx decapsulation offloadRyder Lee1-0/+1
For AP and Client mode, the hardware can pass received packets as 802.3 frames that can be passed to the network stack as-is. Tested-by: Frank Wunderlich <frank-w@public-files.de> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-12mt76: mt7615: enable hw rx-amsdu de-aggregationRyder Lee1-0/+1
Enable hw rx-amsdu de-aggregation support. This is a preliminary patch to enable rx checksum offload. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-04mt76: mt7615: add debugfs knob for setting extended local mac addressesFelix Fietkau1-0/+11
This is primarily for testing and can be used in combination with monitor mode to make the card respond to packets sent to a specific MAC address. For now this is only exposed as a debug/testing feature, later on the approach might be used to support more concurrent station interfaces Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-24mt76: mt7615: fix MT_ANT_SWITCH_CON register definitionFelix Fietkau1-1/+1
This is used for testmode tx antenna selection Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: mt7615: introduce mt7663s supportSean Wang1-0/+12
Introduce support for mt7663s 802.11ac 2x2:2 chipset to mt7615 driver. Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: mt7615: implement testmode supportFelix Fietkau1-0/+17
Supports sending a configurable number of packets with a specific rate and configurable tx power levels / antenna settings, as well as displaying rx statistics. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: mt7615: use full on-chip memory address for WF_PHY registersFelix Fietkau1-2/+1
Now that the bus access functions can use mapping for accessing full register addresses, use it for WF_PHY registers to keep them constant. Needed for follow-up work on testmode support Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-07-21mt76: mt7615: add .set_tsf callbackRyder Lee1-0/+1
It is useful for IBSS Mesh to adjust t_clockdrift. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: introduce PM supportLorenzo Bianconi1-2/+26
Introduce suspend/resume to mt7615e driver Co-developed-by: Wan-Feng Jiang <Wan-Feng.Jiang@mediatek.com> Signed-off-by: Wan-Feng Jiang <Wan-Feng.Jiang@mediatek.com> Co-developed-by: Soul Huang <Soul.Huang@mediatek.com> Signed-off-by: Soul Huang <Soul.Huang@mediatek.com> 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>
2020-05-12mt76: enable TDLS supportLorenzo Bianconi1-0/+8
Enable mac80211 TDLS support by default. Disable TDLS hw filtering for mt7615 devices Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: fix mt7615_driver_own routineLorenzo Bianconi1-0/+1
Introduce MT_PCIE_DOORBELL_PUSH register to fix mt7615_driver_own routine for mt7663e Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: enable scs for mt7663 driverLorenzo Bianconi1-0/+8
Add missing register definitions in order to enable sensitivity tuning for mt7663 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: introduce mt7663u supportLorenzo Bianconi1-0/+26
Introduce support for mt7663u 802.11ac 2x2:2 chipset to mt7615 driver. Main difference respect to pcie code base is the usb code needs to configure wtbl from non-atomic context 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>
2020-05-12mt76: mt7663: fix aggr range entry in debugfsLorenzo Bianconi1-0/+5
Fix register definitions for aggr range counter registers for mt7663 chipset Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7663: enable nf estimationLorenzo Bianconi1-0/+2
Enable Noise floor estimation for mt7663 driver 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>
2020-05-12mt76: mt7663: fix mt7615_mac_cca_stats_reset routineLorenzo Bianconi1-0/+1
Fix PHYMUX_5 register definition for mt7663 in mt7615_mac_cca_stats_reset routine Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: add more useful Tx mib countersRyder Lee1-0/+7
Add ba_miss_cnt and ampdu_per in mib_stats. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: cleanup mib related defines and structsRyder Lee1-13/+10
Simplify mib macros and use proper type for related counters. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-05-12mt76: mt7615: enable aggr_stats for both phyRyder Lee1-1/+2
Use bottom half of aggr_stats for second phy. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-03-17mt76: mt7615: introduce mt7663e supportLorenzo Bianconi1-1/+11
Introduce support for mt7663e 802.11ac 2x2:2 chipset to mt7615 driver. Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@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>
2020-03-17mt76: mt7615: add mt7663e support to mt7615_reg_mapLorenzo Bianconi1-0/+3
Introduce mt7663e support to mt7615_reg_map routine in order to reuse it adding support for mt7663e driver Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@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>
2020-03-17mt76: mt7615: introduce mt7615_register_mapLorenzo Bianconi1-21/+51
In order to reuse mt7615 code adding support for mt7663e driver, introduce mt7615e_reg_map since mt7663e and mt7615 rely on a different base registers definitions. Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@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>
2020-02-14mt76: mt7615: implement hardware reset supportFelix Fietkau1-0/+23
When the firmware detects a problem, it needs the host to stop/reset DMA and resume it again when the hardware state has been reset. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: implement probing and firmware loading on MT7622Felix Fietkau1-0/+9
MT7622 does not have a CR4 microcontroller, so it only uses its own N9 firmware. Co-developed-by: Shayne Chen <shayne.chen@mediatek.com> Co-developed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: add dma and tx queue initialization for MT7622Felix Fietkau1-0/+21
MT7622 queue mapping is different from MT7615 and requires an extra dma scheduler init and a few register tweaks Co-developed-by: Shayne Chen <shayne.chen@mediatek.com> Co-developed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: fix MT_INT_TX_DONE_ALL definition for MT7622Felix Fietkau1-1/+1
MT7622 uses more interrupt bits for queue tx completion events. Enabling those extra bits is harmless on MT7615 Co-developed-by: Shayne Chen <shayne.chen@mediatek.com> Co-developed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: add per-phy mib statisticsRyder Lee1-4/+12
Update per-phy mib counters every 500ms. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: add missing settings for simultaneous dual-band supportRyder Lee1-36/+16
MT7615 supports dual-wiphy which means that it can run on 2.4G and 5GHz channels simultaneously, and driver should configure each band. Add missing register settings, and refine band related definitions to avoid duplicate codes. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: introduce LED supportLorenzo Bianconi1-0/+18
Initialize brightness_set and blink_set callbacks to mt7615_led_set_brightness and mt7615_led_set_blink in order to enable LED support in mt7615 driver Tested-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: measure channel noise and report it via surveyFelix Fietkau1-0/+6
Read measurements every 100 ms and build a simple moving average Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: add set_coverage class supportLorenzo Bianconi1-0/+21
Add the capability to configure acktimeout for mt7615 driver. Moreover configure slottime according to the value provided by mac80211 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: initialize dbdc settings on interface addFelix Fietkau1-0/+9
Use the first two WMM slots for the primary phy and the second two for the secondary phy. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: add multiple wiphy support to the rx pathFelix Fietkau1-0/+2
Program the RMAC CHFREQ registers to properly indicate the band that the frames are received on. Add some sanity checks to the programmed values, because the firmware programs these registers differently Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: add missing register init for dual-wiphy supportFelix Fietkau1-1/+1
Initialize low-power beacon mode setting Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: add multiple wiphy support for smart carrier senseFelix Fietkau1-4/+5
Use per-phy radio stats and tuning registers Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: mt7615: add dual-phy support for mac80211 opsFelix Fietkau1-2/+3
Allows them to be used by a separately registered wiphy later Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: mt7615: read {tx,rx} mask from eepromLorenzo Bianconi1-0/+2
Parse configured {tx,rx} mask from eeprom data instead of just setting it to four tx-rx streams Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: mt7615: track tx/rx airtime for airtime fairnessLorenzo Bianconi1-0/+3
Poll per-station hardware counters available in WTBL after tx/rx status events in order to report tx/rx airtime to mac80211 layer Co-developed-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: mt7615: fix survey channel busy timeFelix Fietkau1-2/+5
Like on mt7603, MIB status register 16 tracks CCA time, but does not include tx time. Switch to status register 9 to includ NAV and tx time as well. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: mt7615: report tx_time, bss_rx and busy time to mac80211Lorenzo Bianconi1-0/+12
Report tx time/rx time and obss time from hw mib counters to fill survey info requested by mac80211 Co-developed-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: mt7615: collect aggregation statsLorenzo Bianconi1-0/+6
Introduce ampdu_stat entry in mt7615 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>
2019-11-20mt76: mt7615: add queue entry in debugfsLorenzo Bianconi1-0/+11
Introduce mt7615_queues_read routine to dump hw queue related info. Add hw ac queues statistics in mt7615 debugfs Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: mt7615: fix control frame rx in monitor modeFelix Fietkau1-0/+16
Adjust filters and ensure frames don't get sent to MCU instead of host Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt7615: enable survey supportLorenzo Bianconi1-0/+3
Introduce channel survey support for mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>