- 19 Dec, 2021 34 commits
-
-
Felix Fietkau authored
This can be used to free received events without allocating an extra skb Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
4addr is not supported by the offload firmware yet Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Should fix issues with error recovery Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
Get rid of unsafe access since mt76_insert_ccmp_hdr moves the header. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Move wiphy SAR capability configuration in mt76 module and remove duplicated code. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
last_ch configuration must not be dependent on the current configured band but it is defined by hw capabilities since the fw always expects the following order: - 2GHz - 5GHz - 6GHz Fixes: 9b2ea8ee ("mt76: connac: set 6G phymode in single-sku support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Sean Wang authored
Return the proper error code when out-of-range the Rx aggregation count are reported from the hardware that would create the unreasonable extreme large Rx buffer. [ 100.873810] show_stack+0x20/0x2c [ 100.873823] dump_stack+0xc4/0x140 [ 100.873839] bad_page+0x110/0x114 [ 100.873854] check_new_pages+0xf8/0xfc [ 100.873869] rmqueue+0x5a0/0x640 [ 100.873884] get_page_from_freelist+0x124/0x20c [ 100.873898] __alloc_pages_nodemask+0x114/0x2a4 [ 100.873918] mt76s_rx_run_queue+0xd4/0x2e4 [mt76_sdio 8280a88a0c8c9cf203f16e194f99ac293bdbb2f5] [ 100.873938] mt76s_rx_handler+0xd4/0x2a0 [mt76_sdio 8280a88a0c8c9cf203f16e194f99ac293bdbb2f5] [ 100.873957] mt76s_txrx_worker+0xac/0x17c [mt76_sdio 8280a88a0c8c9cf203f16e194f99ac293bdbb2f5] [ 100.873977] mt7921s_txrx_worker+0x5c/0xd8 [mt7921s d0bdbc018082dbc8dc1407614be3c2e7bd64423b] [ 100.874003] __mt76_worker_fn+0xe8/0x170 [mt76 b80af3483a8f9d48e916c12d8dbfaa0d3cd15337] [ 100.874018] kthread+0x148/0x3ac [ 100.874032] ret_from_fork+0x10/0x30 [ 100.874067] Kernel Offset: 0x1fe2000000 from 0xffffffc010000000 [ 100.874079] PHYS_OFFSET: 0xffffffe800000000 [ 100.874090] CPU features: 0x0240002,2188200c Fixes: 48fab5bb ("mt76: mt7921: introduce mt7921s support") Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Deren Wu authored
Accroding to chip hw flow, mt7921s need to re-acquire privilege again before normal running. Otherwise, the bus may be stuck in an abnormal status. Tested-by: Leon Yen <Leon.Yen@mediatek.com> Co-developed-by: Eric-SY Chang <Eric-SY.Chang@mediatek.com> Signed-off-by: Eric-SY Chang <Eric-SY.Chang@mediatek.com> Co-developed-by: YN Chen <YN.Chen@mediatek.com> Signed-off-by: YN Chen <YN.Chen@mediatek.com> Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Set 6GHz cap to iftype data which is matched to the type of current interface. Fixes: 50ac15a5 ("mt76: mt7921: add 6GHz support") Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Changcheng Deng authored
./drivers/net/wireless/mediatek/mt76/mt7921/sdio_mac.c: 223: 8-9: WARNING: return of 0/1 in function 'mt7921s_tx_status_data' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Daniel Golle authored
mtd_read() returns -EUCLEAN in case of corrected bit-flips. As data was read, don't error out in this case. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Leave more time to abort transmissions (which could happen at low CCK rates) Only warn if the last filter command is stuck Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
If the driver has configured the hardware to drop packets for a sta that was in powersave mode, then clearing the flag too early opens up a small race window during which packets could be dropped on wakeup Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Add SAR spec support to mt7915 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>
-
Lorenzo Bianconi authored
Add SAR spec support to mt7603 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>
-
Felix Fietkau authored
Typically all AP interfaces on a PHY will share the same WMM settings, while sta/mesh interfaces will usually inherit the settings from a remote device. In order minimize the likelihood of conflicting WMM settings, make all AP interfaces share one slot, and all non-AP interfaces another one. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Typically all AP interfaces on a PHY will share the same WMM settings, while sta/mesh interfaces will usually inherit the settings from a remote device. In order minimize the likelihood of conflicting WMM settings, make all AP interfaces share one slot, and all non-AP interfaces another one. This also fixes running multiple AP interfaces on MT7613, which only has 3 WMM slots. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
The mask variable is assigned but not used after testmode disabled: if (!en) mask = phy->mt76->chainmask; Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Sean Wang authored
According to the MT7921S firmware, the cmd MCU_UNI_CMD_HIF_CTRL have to be last MCU command to execute in suspend handler and all data traffic have to be stopped before the cmd MCU_UNI_CMD_HIF_CTRL starts as well in order that mt7921 can successfully fall into the deep sleep mode. Where we reuse the flag MT76_STATE_SUSPEND and avoid creating another global flag to stop all of the traffic onto the SDIO bus. Fixes: 48fab5bb ("mt76: mt7921: introduce mt7921s support") Reported-by: Leon Yen <leon.yen@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Sean Wang authored
This is a preliminary patch for the following patch ("mt76: mt7921s: fix the device cannot sleep deeply in suspend). mt76_connac_mcu_set_hif_suspend eventually would be handled in each bus-level suspend/resume handler in either mt7921/sdio.c or mt7921/pci.c depending on what type of the bus the device is running on. We can move mt76_connac_mcu_set_hif_suspend to bus-related files to simplify the logic. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
With 4-address mode VLAN frames, an internal header translation step fails, leaving behind an extra 2-byte length field that must be reomved by the driver. Add a check for this condition to fix receiving such packets Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
With 4-address mode VLAN frames, an internal header translation step fails, leaving behind an extra 2-byte length field that must be reomved by the driver. Add a check for this condition to fix receiving such packets Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
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>
-
Lorenzo Bianconi authored
Move mt76_get_sar_power and mt76_init_sar_power in the common code. This is a preliminary patch to add sar support to mt76x02 drivers. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Check return code from mt76_connac_mcu_set_rate_txpower() in mt7921_config routine. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Bo Jiao authored
the wiphy's available antennas may be incorrect When ext phy's antenna_mask is different from main phy Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Xing Song authored
MAC80211 doesn't care any decryption error in 802.3 path, so received frame will be dropped if HW tell us that the cipher configuration is not matched as well as the header has been translated to 802.3. This case only appears when IEEE80211_FCTL_PROTECTED is 0 and cipher suit is not none in the corresponding HW entry. The received frame is only reported to monitor interface if HW decryption block tell us there is ICV error or CCMP/BIP/WPI MIC error. Note in this case the reported frame is decrypted 802.11 frame and the payload may be malformed due to mismatched key. Signed-off-by: Xing Song <xing.song@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Get rid of PHY_MODE_AX_6G configuration in mt76_connac_get_phy_mode routine since mode is an u8 and PHY_MODE_AX_6G is set in phymode_ext field in mt76_connac_bss_basic_tlv. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Remove always false if condition in get_omac_idx for sta type Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Even if it is not a real bug since mt76_connac_get_phy_mode runs just for mt7921 where only STA is supported, fix a theoretical NULL pointer dereference if new added modes do not support HE Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Fix a possible NULL pointer deference issue in mt7921_mac_write_txwi routine if vif is NULL. Fixes: 33920b2b ("mt76: add support for setting mcast rate") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Cap max offset value to ARRAY_SIZE(mt76_rates) - 1 in mt76_calculate_default_rate routine in order to avoid possible Out Of Bound accesses. Fixes: 33920b2b ("mt76: add support for setting mcast rate") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Deren Wu authored
Introduce the basic configuration for BW160 capability in 7922 Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Fix number of rx-queued frames reported by mt76_usb driver. Reported-by: kernel test robot <lkp@intel.com> Fixes: 2d8be76c ("mt76: debugfs: improve queue node readability") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
- 18 Dec, 2021 6 commits
-
-
Deren Wu authored
New mt7921 serials chip support Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Add support to set SA/DA/BSSID in testmode. During mass production stage, some test scripts or test equipments need to set fixed addresses to detect or parse if a test is passed. Also, MAC setting is necessary for some tx/rx tests with rx filter, to make sure rx site only receives expected packets. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Load the default eeprom data when the content of flash/efuse is invalid. This could help to eliminate some issues due to incorrect or insufficient rf values. Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
Only set RX_FLAG_RADIOTAP_HE and RX_FLAG_RADIOTAP_HE_MU from with their own decoder functions to prevent header calculation error. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Xing Song authored
The HW can apply header translation to first fragmented frame, and ramaining fragmented frame can only keep 802.11 format. Check and reverse the first fragmented frame to 802.11 format to make sure them can be defragmented by mac80211. Signed-off-by: Xing Song <xing.song@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
TGn fails sending SM power save mode action frame to the AP to switch from dynamic SMPS mode to static mode. Reported-by: Fang Zhao <fang.zhao@mediatek.com> Signed-off-by: Fang Zhao <fang.zhao@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-