aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2021-06-21net: hns3: fix a double shift bugDan Carpenter1-3/+3
These flags are used to set and test bits like this: if (!test_bit(HCLGE_PTP_FLAG_TX_EN, &ptp->flags) || The issue is that test_bit() takes a bit number like 1, but we are passing BIT(1) instead and it's testing BIT(BIT(1)). This does not cause a problem because it is always done consistently and the bit values are very small. Fixes: 0bf5eb788512 ("net: hns3: add support for PTP") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-06-21net: hns3: fix different snprintf() limitDan Carpenter1-3/+1
This patch doesn't affect runtime at all, it's just a correctness issue. The ptp->info.name[] buffer has 16 characters but the snprintf() limit was capped at 32 characters. Fortunately, HCLGE_DRIVER_NAME is "hclge" which isn't close to 16 characters so we're fine. Fixes: 0bf5eb788512 ("net: hns3: add support for PTP") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-06-21hv_netvsc: Set needed_headroom according to VFHaiyang Zhang1-0/+5
Set needed_headroom according to VF if VF needs a bigger headroom. Signed-off-by: Haiyang Zhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-06-21vrf: do not push non-ND strict packets with a source LLA through packet taps ↵Antoine Tenart1-7/+7
again Non-ND strict packets with a source LLA go through the packet taps again, while non-ND strict packets with other source addresses do not, and we can see a clone of those packets on the vrf interface (we should not). This is due to a series of changes: Commit 6f12fa775530[1] made non-ND strict packets not being pushed again in the packet taps. This changed with commit 205704c618af[2] for those packets having a source LLA, as they need a lookup with the orig_iif. The issue now is those packets do not skip the 'vrf_ip6_rcv' function to the end (as the ones without a source LLA) and go through the check to call packet taps again. This check was changed by commit 6f12fa775530[1] and do not exclude non-strict packets anymore. Packets matching 'need_strict && !is_ndisc && is_ll_src' are now being sent through the packet taps again. This can be seen by dumping packets on the vrf interface. Fix this by having the same code path for all non-ND strict packets and selectively lookup with the orig_iif for those with a source LLA. This has the effect to revert to the pre-205704c618af[2] condition, which should also be easier to maintain. [1] 6f12fa775530 ("vrf: mark skb for multicast or link-local as enslaved to VRF") [2] 205704c618af ("vrf: packets with lladdr src needs dst at input with orig_iif when needs strict") Fixes: 205704c618af ("vrf: packets with lladdr src needs dst at input with orig_iif when needs strict") Cc: Stephen Suryaputra <[email protected]> Reported-by: Paolo Abeni <[email protected]> Signed-off-by: Antoine Tenart <[email protected]> Reviewed-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-06-19net: can: ems_usb: fix use-after-free in ems_usb_disconnect()Pavel Skripkin1-1/+2
In ems_usb_disconnect() dev pointer, which is netdev private data, is used after free_candev() call: | if (dev) { | unregister_netdev(dev->netdev); | free_candev(dev->netdev); | | unlink_all_urbs(dev); | | usb_free_urb(dev->intr_urb); | | kfree(dev->intr_in_buffer); | kfree(dev->tx_msg_buffer); | } Fix it by simply moving free_candev() at the end of the block. Fail log: | BUG: KASAN: use-after-free in ems_usb_disconnect | Read of size 8 at addr ffff88804e041008 by task kworker/1:2/2895 | | CPU: 1 PID: 2895 Comm: kworker/1:2 Not tainted 5.13.0-rc5+ #164 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a-rebuilt.opensuse.4 | Workqueue: usb_hub_wq hub_event | Call Trace: | dump_stack (lib/dump_stack.c:122) | print_address_description.constprop.0.cold (mm/kasan/report.c:234) | kasan_report.cold (mm/kasan/report.c:420 mm/kasan/report.c:436) | ems_usb_disconnect (drivers/net/can/usb/ems_usb.c:683 drivers/net/can/usb/ems_usb.c:1058) Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface") Link: https://lore.kernel.org/r/[email protected] Cc: linux-stable <[email protected]> Signed-off-by: Pavel Skripkin <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2021-06-19net: ethernet: ezchip: fix error handlingPavel Skripkin1-1/+1
As documented at drivers/base/platform.c for platform_get_irq: * Gets an IRQ for a platform device and prints an error message if finding the * IRQ fails. Device drivers should check the return value for errors so as to * not pass a negative integer value to the request_irq() APIs. So, the driver should check that platform_get_irq() return value is _negative_, not that it's equal to zero, because -ENXIO (return value from request_irq() if irq was not found) will pass this check and it leads to passing negative irq to request_irq() Fixes: 0dd077093636 ("NET: Add ezchip ethernet driver") Signed-off-by: Pavel Skripkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-06-19net: ethernet: ezchip: remove redundant checkPavel Skripkin1-2/+1
err varibale will be set everytime, when code gets into this path. This check will just slowdown the execution and that's all. Fixes: 0dd077093636 ("NET: Add ezchip ethernet driver") Signed-off-by: Pavel Skripkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-06-19net: ethernet: ezchip: fix UAF in nps_enet_removePavel Skripkin1-1/+1
priv is netdev private data, but it is used after free_netdev(). It can cause use-after-free when accessing priv pointer. So, fix it by moving free_netdev() after netif_napi_del() call. Fixes: 0dd077093636 ("NET: Add ezchip ethernet driver") Signed-off-by: Pavel Skripkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-06-19net: ethernet: aeroflex: fix UAF in greth_of_removePavel Skripkin1-1/+2
static int greth_of_remove(struct platform_device *of_dev) { ... struct greth_private *greth = netdev_priv(ndev); ... unregister_netdev(ndev); free_netdev(ndev); of_iounmap(&of_dev->resource[0], greth->regs, resource_size(&of_dev->resource[0])); ... } greth is netdev private data, but it is used after free_netdev(). It can cause use-after-free when accessing greth pointer. So, fix it by moving free_netdev() after of_iounmap() call. Fixes: d4c41139df6e ("net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver") Signed-off-by: Pavel Skripkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-06-19ath11k: Enable QCN9074 deviceAnilkumar Kolli1-1/+1
The issues mentioned in commit 4e80946197a8 ("ath11k: add qcn9074 pci device support") are fixed in firmware. This patch enables QCN9074 device. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli <[email protected]> Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-19ath10k: demote chan info without scan request warningCaleb Connolly1-1/+1
Some devices/firmwares cause this to be printed every 5-15 seconds, though it has no impact on functionality. Demote this to a debug message. I see this on SDM845 and MSM8998 platforms, specifically the OnePlus 6 devices, PocoPhone F1 and OnePlus 5. On the OnePlus 6 (SDM845) we are stuck with the following signed vendor fw: [ 9.339873] ath10k_snoc 18800000.wifi: qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40030001 [ 9.339897] ath10k_snoc 18800000.wifi: qmi fw_version 0x20060029 fw_build_timestamp 2019-07-12 02:14 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c8-00041-QCAHLSWMTPLZ-1 The OnePlus 5 (MSM8998) is using firmware: [ 6096.956799] ath10k_snoc 18800000.wifi: qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40010002 [ 6096.956824] ath10k_snoc 18800000.wifi: qmi fw_version 0x1007007e fw_build_timestamp 2020-04-14 22:45 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0.c6-00126-QCAHLSWMTPLZ-1.211883.1.278648. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.2.0.c8-00041-QCAHLSWMTPLZ-1 Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.1.0.c6-00126-QCAHLSWMTPLZ-1.211883.1.278648 Signed-off-by: Caleb Connolly <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-19rtl8xxxu: avoid parsing short RX packetÍñigo Huguet1-2/+9
One USB data buffer can contain multiple received network packets. If that's the case, they're processed this way: 1. Original buffer is cloned 2. Original buffer is trimmed to contain only the first network packet 3. This first network packet is passed to network stack 4. Cloned buffer is trimmed to eliminate the first network packet 5. Repeat with the cloned buffer until there are no more network packets inside However, if the space remaining in original buffer after the first network packet is not enough to contain at least another network packet descriptor, it is not cloned. The loop parsing this packets ended if remaining space == 0. But if the remaining space was > 0 but < packet descriptor size, another iteration of the loop was done, processing again the previous packet because cloning didn't happen. Moreover, the ownership of this packet had been passed to network stack in the previous iteration. This patch ensures that no extra iteration is done if the remaining size is not enough for one packet, and also avoid the first iteration for the same reason. Probably this doesn't happen in practice, but can happen theoretically. Signed-off-by: Íñigo Huguet <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-19rtl8xxxu: Fix device info for RTL8192EU devicesPascal Terjan2-14/+56
Based on 2001:3319 and 2357:0109 which I used to test the fix and 0bda:818b and 2357:0108 for which I found efuse dumps online. == 2357:0109 == === Before === Vendor: Realtek Product: \x03802.11n NI Serial: === After === Vendor: Realtek Product: 802.11n NIC Serial not available. == 2001:3319 == === Before === Vendor: Realtek Product: Wireless N Serial: no USB Adap === After === Vendor: Realtek Product: Wireless N Nano USB Adapter Serial not available. Signed-off-by: Pascal Terjan <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-19mt76: mt7921: allow chip reset during device restartLorenzo Bianconi3-5/+14
Disable chip full reset just during device probing but allow it during hw restart. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7615: set macwork timeout according to runtime-pmLorenzo Bianconi4-15/+32
Set macwork timeout value according to runtime-pm in order to reduce power consumption Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7663s: enable runtime-pmLorenzo Bianconi3-6/+13
Allow the user to enable runtime-pm for mt7663s driver Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7663s: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx pathLorenzo Bianconi2-8/+22
Similar to mt7663e, rely on mt76_connac_pm_ref/mt76_connac_pm_unref to check PM state and increment/decrement wake counter Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7663s: rely on pm reference countingLorenzo Bianconi1-14/+22
As already done for mt7921 and mt7663e, rely on pm reference counting in drv/fw_own Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: sdio: do not run mt76_txq_schedule directlyLorenzo Bianconi1-5/+11
In order to support runtime-pm for sdio, do not run mt76_txq_schedule directly, but schedule tx_worker instead Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: enable HE BFee capabilityDeren Wu1-1/+12
Enables HE MU/SU beamformee functionality Signed-off-by: Eric-SY Chang <[email protected]> Signed-off-by: Deren Wu <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: disable TWT capabilities for the momentLorenzo Bianconi2-6/+0
Disable TWT REQ/RES mac capabilities since TWT is not supported yet in mt7915/mt7921. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: fix iv and CCMP header insertionRyder Lee13-169/+208
The iv from RXD is only for TKIP_RSC/CCMP_PN/GCMP_PN, and it needs a check for CCMP header insertion. Move mt76_cipher_type to mt76.h to reduce duplicated code. Signed-off-by: Xing Song <[email protected]> Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: fix the coredump is being truncatedSean Wang2-4/+7
Fix the maximum size of the coredump generated with current mt7921 firmware. Otherwise, a truncated coredump would be reported to userland via dev_coredumpv. Also, there is an additional error handling enhanced in the patch to avoid the possible invalid buffer access when the system failed to create the buffer to hold the coredump. Fixes: 0da3c795d07b ("mt76: mt7921: add coredump support") Co-developed-by: YN Chen <[email protected]> Signed-off-by: YN Chen <[email protected]> Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: fix kernel warning when reset on vif is not staSean Wang1-1/+2
ieee80211_disconnect is only called for the staton mode. [ 714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787 ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.116704] Hardware name: MediaTek Asurada rev1 board (DT) [ 714.122303] Workqueue: mt76 mt7921_mac_reset_work [mt7921e] [ 714.127877] pstate: 20c00009 (nzCv daif +PAN +UAO) [ 714.132761] pc : ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.138430] lr : mt7921_vif_connect_iter+0x28/0x54 [mt7921e] [ 714.144083] sp : ffffffc0107cbbd0 [ 714.147394] x29: ffffffc0107cbbd0 x28: ffffffb26c9cb928 [ 714.152706] x27: ffffffb26c9cbd98 x26: 0000000000000000 [ 714.158017] x25: 0000000000000003 x24: ffffffb26c9c9c38 [ 714.163328] x23: ffffffb26c9c9c38 x22: ffffffb26c9c8860 [ 714.168639] x21: ffffffb23b940000 x20: ffffffb26c9c8860 [ 714.173950] x19: 0000000000000001 x18: 000000000000b67e [ 714.179261] x17: 00000000064dd409 x16: ffffffd739cb28f0 [ 714.184571] x15: 0000000000000000 x14: 0000000000000227 [ 714.189881] x13: 0000000000000400 x12: ffffffd73a4eb060 [ 714.195191] x11: 0000000000000000 x10: 0000000000000000 [ 714.200502] x9 : ffffffd703a0a000 x8 : 0000000000000006 [ 714.205812] x7 : 2828282828282828 x6 : ffffffb200440396 [ 714.211122] x5 : 0000000000000000 x4 : 0000000000000004 [ 714.216432] x3 : 0000000000000000 x2 : ffffffb23b940c90 [ 714.221743] x1 : 0000000000000001 x0 : ffffffb23b940c90 [ 714.227054] Call trace: [ 714.229594] ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.234913] mt7921_vif_connect_iter+0x28/0x54 [mt7921e] [ 714.240313] __iterate_interfaces+0xc4/0xdc [mac80211] [ 714.245541] ieee80211_iterate_interfaces+0x4c/0x68 [mac80211] [ 714.251381] mt7921_mac_reset_work+0x410/0x468 [mt7921e] [ 714.256696] process_one_work+0x208/0x3c8 [ 714.260706] worker_thread+0x23c/0x3e8 [ 714.264456] kthread+0x140/0x17c [ 714.267685] ret_from_fork+0x10/0x18 Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support") Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: introduce dedicated control for deep_sleepLorenzo Bianconi5-10/+32
Introduce ds_enable switch to fully control fw deep_sleep capability Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: limit txpower according to userlevel powerLorenzo Bianconi2-8/+23
Limit tx power for single-sku according to userlevel power. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: improve code readability for mt7921_update_txsLorenzo Bianconi1-29/+18
Introduce mt7921_update_txs routine in order to improve code readability for tx timestamp parsing/configuration. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: add deep sleep control to runtime-pm knobSean Wang1-0/+18
Add addtional the deep sleep control to runtime-pm knob to allow us to control driver switching between the full power mode and the deep sleep mode the firmware is able to support. Reviewed-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: enable deep sleep at runtimeSean Wang8-44/+110
Enable the deep sleep mode with that firmware is able to trap into the doze state at runtime to reduce the power consumption further. The deep sleep mode is not allowed in the STA state transition with the firmware to have the fast connection experience as we've done in the full power mode Reviewed-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7915: fix IEEE80211_HE_PHY_CAP7_MAX_NC for station modeRyder Lee1-3/+3
The value of station mode is always 0. Fixed: 00b2e16e0063 ("mt76: mt7915: add TxBF capabilities") Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: use SPDX header file comment styleTom Rix2-2/+2
header files should use '/* SPDX ... */ Change from c file comment syle to header style Signed-off-by: Tom Rix <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: add a space between comment char and SPDX tagTom Rix3-3/+3
checkpatch expects a space between '#' and 'SPDX...' Add a space. Signed-off-by: Tom Rix <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7915: improve MU stabilityRyder Lee3-51/+64
- 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 <[email protected]> Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7915: introduce mt7915_mcu_set_txbf()Ryder Lee5-53/+50
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 <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: make mt76_update_survey() per phyRyder Lee12-57/+47
Reduce duplicated survey for DBDC. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7915: drop the use of repeater entries for station interfacesFelix Fietkau2-7/+1
There are firmware or hardware issues, which are currently causing tx hangs when attempting to use these interfaces Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: connac: check band caps in mt76_connac_mcu_set_rate_txpowerLorenzo Bianconi1-4/+13
Check device band capabilities before configuring single-sku Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: move mt76_get_next_pkt_id in mt76.hLorenzo Bianconi3-18/+15
In order to remove duplicated code, move mt76_get_next_pkt_id routine in mt76.h Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: reduce rx buffer size to 2048Lorenzo Bianconi3-19/+10
Reduce rx buffer size to 2048 for mt7921/mt7915/mt7615 since we now support rx amsdu offload Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: connac: fix the maximum interval schedule scan can supportSean Wang4-4/+5
Maximum interval (in seconds) for schedule scan plan supported by the offload firmware can be U16_MAX. Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7915: fix rx fcs error count in testmodeShayne Chen1-2/+19
FCS error packets are filtered by default and won't be reported to driver, so that RX fcs error and PER in testmode always show zero. Fix this issue by reading fcs error count from hw counter. We did't fix this issue by disabling fcs error rx filter since it may let HW suffer some SER errors. Fixes: 5d8a83f09941 ("mt76: mt7915: implement testmode rx support") Signed-off-by: Shayne Chen <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: testmode: move chip-specific stats dump before common statsShayne Chen1-3/+8
Move chip-specific stats dumping part before common stats dumping to provide flexibility for per-chip driver to modify the value of common stats. Signed-off-by: Shayne Chen <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: connac: add mt76_connac_mcu_get_nic_capability utility routineLorenzo Bianconi4-1/+80
Introduce mt76_connac_mcu_get_nic_capability utility routine to poll device capabilities returned by mcu fw for CE devices (mt7663/mt7921). This is a preliminary patch to introduce 6GHz support. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: make mt7921_set_channel staticLorenzo Bianconi2-2/+1
Make mt7921_set_channel routine static since it is only used in main.c Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: wake the device before dumping power tableLorenzo Bianconi1-0/+3
Always wake the device up before dumping the single_sku power table otherwise the device can hang. Fixes: ea29acc97c555 ("mt76: mt7921: add dumping Tx power table") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: connac: add mt76_connac_power_save_sched in mt76_connac_pm_unrefLorenzo Bianconi6-12/+16
Schedule power_save work running mt76_connac_pm_unref in order to reduce power consumption Tested-by: Sean Wang <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: connac: fix UC entry is being overwrittenLorenzo Bianconi4-7/+13
Fix UC entry is being overwritten by BC entry Tested-by: Deren Wu <[email protected]> Co-developed-by: Deren Wu <[email protected]> Signed-off-by: Deren Wu <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7921: enable VHT BFee capabilityFelix Fietkau1-1/+5
Enables VHT beamformee functionality Signed-off-by: Leon Yen <[email protected]> Signed-off-by: Deren Wu <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7915: fix MT_EE_CAL_GROUP_SIZERyder Lee1-1/+1
Fix wrong offset for pre-calibration data. Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data") Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2021-06-19mt76: mt7615: update radar parametersRyder Lee2-7/+14
Patch radar parameters to match the SDK to avoid possible false alarms. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>