- 20 11月, 2019 40 次提交
-
-
由 Lorenzo Bianconi 提交于
Move mt76_get_antenna in mac80211.c in order to be reused by all drivers. Initialize .get_antenna function pointer for mt76x0, mt7603, mt7615 and mt76x2u drivers Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Fix possible out-of-bound access of status rates array in mt7615_fill_txs/mt7603_fill_txs routines Fixes: c5211e99 ("mt76: mt7603: rework and fix tx status reporting") Fixes: 4af81f02 ("mt76: mt7615: sync with mt7603 rate control changes") Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
This reverts commit 34b0e9b7. Since commit 7bd0650b ("mt76: dma: fix buffer unmap with non-linear skbs") is no longer necessary to disable HW encryption for MT7630E. Disabling HW encryption helped previously because somehow fragmented skb's are not created if mac80211 encrypt frames, so buffer unmap bug of non-linear skbs was not triggered. Now since this bug is properly fixed by commit 7bd0650b ("mt76: dma: fix buffer unmap with non-linear skbs") , we can enable HW encryption back. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Acked-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Set switch_reason to CH_SWITCH_SCAN_BYPASS_DPD during frequency scanning in order to disable radar pattern detector Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Move interface modes declaration in common code since now mt76 chipsets support all modes (NL80211_IFTYPE_STATION, NL80211_IFTYPE_AP, NL80211_IFTYPE_MESH_POINT and NL80211_IFTYPE_ADHOC) Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Enable IFTYPE_ADHOC support on 7615 devices. The feature has been tested using a mt76x2 device as wireless peer. Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Move SUPPORTS_REORDERING_BUFFER hw property configuration from chip specific code to mt76_register_device since it is supported by all mt76 drivers Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Convert mt76_is_mmio and mt76_is_usb to rely on mt76_dev instead of mt76x02_dev since this is a property not strictly related to hw chipset and it will be more reusable Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 zhengbin 提交于
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/dma.c: In function mt76_dma_rx_fill: drivers/net/wireless/mediatek/mt76/dma.c:377:6: warning: variable idx set but not used [-Wunused-but-set-variable] It is not used since commit 17f1de56 ("mt76: add common code shared between multiple chipsets") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: Nzhengbin <zhengbin13@huawei.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
rate controller and throughput are very sensitive to tx status timing. In order to improve performances when the system is heavily loaded, substitute stat_work delayed_work with a regular work_struct and create a mt76u dedicated workqueue for tx status reporting Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
usb drivers are supposed to communicate using usb_interface instead mt76x{0,2}u is now registering through usb_device. Fix it by passing usb_intf device to mt76_alloc_device routine. Fixes: 112f980a ("mt76usb: use usb_dev private data") Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Tested-By: NZero_Chaos <sidhayn@gmail.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 YueHaibing 提交于
remove unneeded semicolon. This is detected by coccinelle. Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Since mt76x0 does not save the phy calibration data it is not necessary to wait 350ms in mt76x0_phy_calibrate Tested-by: NSid Hayn <sidhayn@gmail.com> Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Update ewma packet length in mt76x02u_tx_prepare_skb as it is done for pci counterpart in order to properly estimate tx time on current channel Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
It hasn't been used in a while Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Avoid dereferencing invalid ids Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Read busy counters not holding cc_lock spinlock since usb read can't be performed in interrupt context. Move cc_active and cc_rx counters out of cc_lock since they are not modified in interrupt context. Grab cc_lock updating cur_cc_bss_rx in mt76_airtime_report and do not hold rx_lock in mt76_update_survey. Moreover grab mt76 mutex in mt76_get_survey before running mt76_update_survey. This patch fixes the following 'schedule while atomic' [ 291.790866] BUG: scheduling while atomic: iw/2161/0x00000202 [ 291.791002] Preemption disabled at: [ 291.791007] [<0000000000000000>] 0x0 [ 291.791015] CPU: 0 PID: 2161 Comm: iw Tainted: G W 5.4.= 0-rc2-3-ARCH-00104-g9e208aa0 #1 [ 291.791017] Hardware name: LENOVO 2349QM6/2349QM6, BIOS G1ETC2WW (2.82=) 08/07/2019 [ 291.791019] Call Trace: [ 291.791042] dump_stack+0x5c/0x80 [ 291.791049] __schedule_bug.cold+0x8e/0x9b [ 291.791055] __schedule+0x5f8/0x770 [ 291.791062] schedule+0x43/0xd0 [ 291.791068] schedule_preempt_disabled+0x14/0x20 [ 291.791074] __mutex_lock.isra.0+0x18a/0x530 [ 291.791099] mt76u_rr+0x1f/0x40 [mt76_usb] [ 291.791113] mt76x02_update_channel+0x22/0x40 [mt76x02_lib] [ 291.791122] mt76_update_survey+0x42/0xe0 [mt76] [ 291.791129] mt76_get_survey+0x2f/0x1b0 [mt76] [ 291.791170] ieee80211_dump_survey+0x5e/0x140 [mac80211] [ 291.791217] nl80211_dump_survey+0x13c/0x2f0 [cfg80211] [ 291.791222] ? __kmalloc_reserve.isra.0+0x2d/0x70 [ 291.791225] ? __alloc_skb+0x96/0x1d0 [ 291.791229] netlink_dump+0x17b/0x370 [ 291.791247] __netlink_dump_start+0x16f/0x1e0 [ 291.791253] genl_family_rcv_msg+0x396/0x410 [ 291.791290] ? nl80211_prepare_wdev_dump+0x1b0/0x1b0 [cfg80211] [ 291.791297] ? _raw_spin_unlock_irqrestore+0x20/0x40 [ 291.791312] ? __wake_up_common_lock+0x8a/0xc0 [ 291.791316] genl_rcv_msg+0x47/0x90 [ 291.791320] ? genl_family_rcv_msg+0x410/0x410 [ 291.791323] netlink_rcv_skb+0x49/0x110 [ 291.791329] genl_rcv+0x24/0x40 [ 291.791333] netlink_unicast+0x171/0x200 [ 291.791340] netlink_sendmsg+0x208/0x3d0 [ 291.791358] sock_sendmsg+0x5e/0x60 [ 291.791361] ___sys_sendmsg+0x2ae/0x330 [ 291.791368] ? filemap_map_pages+0x272/0x390 [ 291.791374] ? _raw_spin_unlock+0x16/0x30 [ 291.791379] ? __handle_mm_fault+0x112f/0x1390 [ 291.791388] __sys_sendmsg+0x59/0xa0 [ 291.791396] do_syscall_64+0x5b/0x1a0 [ 291.791400] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 291.791404] RIP: 0033:0x7f5d0c7f37b7 [ 291.791418] Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 0= 0 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05= <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 [ 291.791421] RSP: 002b:00007ffe8b5d0538 EFLAGS: 00000246 ORIG_RAX: 0000= 00000000002e [ 291.791426] RAX: ffffffffffffffda RBX: 000055a038e6c390 RCX: 00007f5d0= c7f37b7 [ 291.791430] RDX: 0000000000000000 RSI: 00007ffe8b5d0570 RDI: 000000000= 0000003 [ 291.791434] RBP: 000055a038e718c0 R08: 000055a038e6c02a R09: 000000000= 0000002 [ 291.791438] R10: 000055a03808cb00 R11: 0000000000000246 R12: 000055a03= 8e71780 [ 291.791440] R13: 00007ffe8b5d0570 R14: 000055a038e717d0 R15: 000055a03= 8e718c0 [ 291.791480] NOHZ: local_softirq_pending 202 Fixes: 168aea24 ("mt76: mt76x02u: enable survey support") Tested-by: NMarkus Theil <markus.theil@tu-ilmenau.de> Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Pawel Dembicki 提交于
mt76x0e driver only supports MAC addresses from calibration data eeprom. Many routers however do not have a valid stock address set in this field. This patch makes it possible to take a MAC address from OF (e.g. from mtd). Signed-off-by: NPawel Dembicki <paweldembicki@gmail.com> [adjusted for kernel submission] Signed-off-by: NAdrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
if napi_complete() returns false, it means that polling is still pending. Interrupts should not fire until the polling is no longer scheduled Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Cancel the workqueue after the tid has been cleaned up, in order to avoid a possible rescheduling from within the work function. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
A rcu read locked section is not allowed to sleep, and the rcu lock here isn't actually necessary, because we're holding dev->mutex. Fixes an issue when the tid work item is still running while freeing a station or stopping the aggregation session Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
This is needed primarily to avoid races in dealing with rx aggregation related data structures Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
With the devm API, the unregister happens after the device cleanup is done, after which the struct mt76_dev which contains the led_cdev has already been freed. This leads to a use-after-free bug that can crash the system. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
It is supported by all hardware drivers now Signed-off-by: NFelix Fietkau <nbd@nbd.name> Acked-by: NToke Høiland-Jørgensen <toke@redhat.com>
-
由 Lorenzo Bianconi 提交于
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: NFelix Fietkau <nbd@nbd.name> Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce mt7615_mac_wtbl_update utility routine in order to update WTBL update register Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
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: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Report tx time/rx time and obss time from hw mib counters to fill survey info requested by mac80211 Co-developed-by: NFelix Fietkau <nbd@nbd.name> Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Estimate by calculating duration for EWMA packet size + estimated A-MPDU length on tx status events Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Reduces code duplication and adds missing bits for USB variants Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Host time is used to calculate the channel active time on mt7603 and mt7615. Use the same on mt76x02 and move the lock to core code to get rid of some duplicated code. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
MT_MIB_STAT_PSCCA only counts rx CCA busy time, which does not include tx time. MT_MIB_STAT_CCA counts full busy time, including Rx, Tx and NAV Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Poll per-station hardware counters after tx status events Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Report total rx airtime for valid stations as BSS rx time in survey mt7615 is left out for now, it will be supported later by reading hardware counters instead of calculating airtime in software Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Move mt76_channel_state() from mt76.h to mac80211.c Preparation for updating channel state from more places in the drivers/core Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
This reduces the struct size and is useful for adding more flags later Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
This can be used in monitor mode to figure out which subframes were sent as part of which A-MPDU Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
It is no longer used Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce ampdu_stat entry in mt7603 debugfs in order to dump 802.11 aggr cumulative statistics Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce ampdu_stat entry in mt7615 debugfs in order to dump 802.11 aggr cumulative statistics Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-