- 12 May, 2020 40 commits
-
-
Lorenzo Bianconi authored
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>
-
Lorenzo Bianconi authored
Fix SSID configuration performing hw frequency scanning Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Dejin Zheng authored
it will print an error message by itself when devm_platform_ioremap_resource() goes wrong. so remove the duplicate error message. Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
On top of the EEPROM target power, each rate can also has a power offset. On many devices, this power offset is used to boost the tx power of lower rates. Take this into account when parsing rate power. The assumption here is, that the first rate (OFDM 6M or CCK 1M) has the highest tx power Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
The vendor driver sets this in firmware rate control (which we don't use) Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Get rid of useless check in mt7663_load_n9 since it is used only for mt7663 devices Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
mt7663 firmware v2 is used for embedded devices since it has more completed features in AP mode. Add the capability to specify which firmware load first (v3 or v2) using prefer_offload_fw kernel parameter and fallback to the other one if the selected firmware fails to load Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Enable MCS8 and MCS9 for mt76x0{u,e} devices Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Currently mt7663 devices do not support DBDC so fw events have no info about it. Fix mt7615_mcu_bss_event that wrongly use bss_idx as DBDC band_idx while it is vif index. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce sta pointer to mt7615_mcu_add_bss_info signature in order to avoid sta lookup in mt7615_mcu_bss_basic_tlv routine Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Sean Wang authored
BMC entry for MT7663 unicmd firmware should be a broadcast/multicast entry, not a unicast entry, that is GTK rekey offload would rely on. Fixes: 13886067 ("mt76: mt7615: add more uni mcu commands") Cc: Soul Huang <Soul.Huang@mediatek.com> Suggested-by: YF Luo <Yf.Luo@mediatek.com> Co-developed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> 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>
-
Lorenzo Bianconi authored
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>
-
Lorenzo Bianconi authored
Run mt7615_mcu_add_bss_info routine before mt7615_mcu_sta_add since the firmware requires the bss is created before the relative sta Tested-by: Sean Wang <sean.wang@mediatek.com> Suggested-by: YF Luo <yf.luo@mediatek.com> Suggested-by: Lucy Hsu <lucy.hsu@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>
-
Felix Fietkau authored
A switch from one rate index to the next only happens when tx count from the current slot is greater than MT7615_RATE_RETRY, which is 1 has to be subtracted from count, instead of added to it. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
A switch from one rate index to the next only happens when tx count from the current slot is greater than MT7615_RATE_RETRY, which is 1 has to be subtracted from count, instead of added to it. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Avoids register writes and MAC start/stop when the hardware isn't ready for it Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Slightly improves performance Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Sometimes mt7615_mac_set_timing gets called while the slot time is still configured to 20. Ensure that in this case it always uses the OFDM CFend rate. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Sometimes mt7615_mac_set_timing gets called while the slot time is still configured to 20. Ensure that in this case it always uses the OFDM CFend rate. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
In VHT mode we can receive larger MPDUs. Increasing the buffer size reduces fragmentation here, which should improve performance. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
The hardware requirements for A-MPDU density are entirely on the tx side, not the rx side. Because of that, the IE value should stay at 0 and the minimum value should instead be enforced in WTBL/TXWI MT7615 has no restrictions here Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
If VHT has a larger A-MPDU size limit, pass it to the MCU via the wtbl_ht TLV element. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Initialize tx_status_data pointer in order to enable Air Time Fairness for mt7663u chipset Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Since usb code can't access device registers in interrupt context, move rcu_read_lock/rcu_read_unlock in mt7615_poll_tx routine. Moreover loop over a local msta list in mt7615_mac_sta_poll since mt7663u driver will not be able to complete the inner while loop before sta_poll_list list is refilled by mt7615_mac_add_txs/mt7615_mac_fill_rx Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
If the vif is running in station mode the aid will be passed by mac80211 using bss_conf.aid. Fix aid configuration in mt7615_mcu_wtbl_generic_tlv Fixes: 04b8e659 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce MT_PCIE_DOORBELL_PUSH register to fix mt7615_driver_own routine for mt7663e Fixes: f40ac0f3 ("mt76: mt7615: introduce mt7663e support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Current mt7663 offload firmware can support up to 32 wtbl entries Fixes: f40ac0f3 ("mt76: mt7615: introduce mt7663e support") 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>
-
Lorenzo Bianconi authored
Check the firmware-own configuration has been applied polling MT_CONN_HIF_ON_LPCTL register Fixes: f40ac0f3 ("mt76: mt7615: introduce mt7663e support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Add return code parsing for the following unified commands: - MCU_UNI_CMD_DEV_INFO_UPDATE - MCU_UNI_CMD_BSS_INFO_UPDATE - MCU_UNI_CMD_STA_REC_UPDATE 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>
-
Lorenzo Bianconi authored
Introduce rx-queues debugfs node in order to dump rx queues status. This would be useful for mcu fw debugging Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Sean Wang authored
Make Kconfig entry obvious for MT7663E Signed-off-by: Sean Wang <sean.wang@mediatek.com> Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
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>
-
Lorenzo Bianconi authored
remove IEEE80211_HW_PS_NULLFUNC_STACK capability from mt76_phy_init routine since 802.11 ps is not currently supported by any devices and it will conflict with mt7663 ps fw support Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
For sta mode mac80211 provides aid in vif->bss_conf.aid. In order to properly support 802.11 power-save, configure correct aid to mcu during sta association 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>
-
Lorenzo Bianconi authored
The vendor SDK also disables ASPM by default Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
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>
-
Lorenzo Bianconi authored
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>
-
Lorenzo Bianconi authored
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>
-
Lorenzo Bianconi authored
make mac_work per phy instead of per device and fix a possible deadlock in mt7615_stop since mt7615_mac_work runs holding mt76 mutex Fixes: fdd2e570 ("mt76: mt7615: add dual-phy support for mac80211 ops") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Jules Irenge authored
Sparse report warnings at mt76_tx_status_unlock() and mt76_tx_status_lock() warning: context imbalance in mt76_tx_status_lock() - wrong count at exit warning: context imbalance in mt76_tx_status_unlock() - unexpected unlock The root cause is the additional __acquire(&dev->status_list.lock) and __release(&dev->status_list.unlock) called from inside mt76_tx_status_lock() and mt76_tx_status_unlock(). Remove __acquire(&dev->status_list.lock) annotation Remove __releases(&dev->status_list.unlock) Correct &dev->status_list.unlock to &dev->status_list.lock -unlock not defined in the sk_buff_head struct Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-