[PATCH v2] mt76x0: run calibration after scanning

2018-10-31 Thread Stanislaw Gruszka
If we are associated and scanning is performed, sw_scan_complete callback is done after we get back to operating channel, so we do not perform queue cal work. Fix this queue cal work from sw_scan_complete(). We have to restore gain in MT_BBP(AGC, 8) register after scanning, as it was multiple

Re: [PATCH v2] mt76x0: run calibration after scanning

2018-10-31 Thread Felix Fietkau
On 2018-10-31 14:11, Stanislaw Gruszka wrote: > If we are associated and scanning is performed, sw_scan_complete callback > is done after we get back to operating channel, so we do not perform > queue cal work. Fix this queue cal work from sw_scan_complete(). > > We have to restore gain in

Re: [PATCH v2] mt76x0: run calibration after scanning

2018-10-31 Thread Stanislaw Gruszka
On Wed, Oct 31, 2018 at 02:11:26PM +0100, Stanislaw Gruszka wrote: > If we are associated and scanning is performed, sw_scan_complete callback > is done after we get back to operating channel, so we do not perform > queue cal work. Fix this queue cal work from sw_scan_complete(). > > We have to

Fix for memory leak in the wireless extensions layer

2018-10-31 Thread Larry Finger
Greg, Is the fix for a memory leak in the wext compat layer queued for stable? It is in kernel:HEAD as commit 848e616e66d4592fe9afc40743d3504deb7632b4 ("cfg80211: fix wext-compat memory leak") I just receiv3ed a complaint about a leak for a system that is running Ubuntu's kernel 4.19.

[PATCH] mt76x0: do not overwrite other MT_BBP(AGC, 8) fields

2018-10-31 Thread Stanislaw Gruszka
MT_BBP(AGC, 8) register has values depend on band in mt76x0_bbp_switch_tab, so we should not overwrite other fields than MT_BBP_AGC_GAIN when setting gain. This can fix performance issues when connecting to 2.4GHz AP. Fixes: 4636a2544c3b ("mt76x0: phy: align channel gain logic to mt76x2 one")

[RFC v5 01/13] rtw88: main files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang main files for Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/mac80211.c | 480 ++ drivers/net/wireless/realtek/rtw88/main.c | 1187 +

[RFC v5 00/13] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang This is a new mac80211 driver for Realtek 802.11ac wireless network chips. rtw88 supports 8822BE and 8822CE chips, and will be able to support multi-vif combinations in run-time. For now, only PCI bus is supported, but rtw88 was originally designed to optionally support

[RFC v5 06/13] rtw88: fw and efuse files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang fw and efuse files for Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/efuse.c | 150 +++ drivers/net/wireless/realtek/rtw88/efuse.h | 53 +++ drivers/net/wireless/realtek/rtw88/fw.c| 611

[RFC v5 09/13] rtw88: chip files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang chip files Realtek 802.11ac wireless network chips 8822B & 8822C series files Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/rtw8822b.c | 1590 drivers/net/wireless/realtek/rtw88/rtw8822b.h | 155 ++

[RFC v5 11/13] rtw88: 8822C init table

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang 8822C init table for chip files Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- .../net/wireless/realtek/rtw88/rtw8822c_table.c| 4150 1 file changed, 4150 insertions(+) create mode 100644

[RFC v5 08/13] rtw88: debug files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang debug files for Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/debug.c | 652 + drivers/net/wireless/realtek/rtw88/debug.h | 43 ++ 2 files changed, 695 insertions(+) create

[PATCH 02/16] wil6210: fix reset flow for Talyn-mb

2018-10-31 Thread Maya Erez
From: Alexei Avshalom Lazar With current reset flow, Talyn sometimes get stuck causing PCIe enumeration to fail. Fix this by removing some reset flow operations that are not relevant for Talyn. Setting bit 15 in RGF_HP_CTRL is WBE specific and is not in use for all wil6210 devices. For Sparrow,

[PATCH 15/16] wil6210: fix freeing of rx buffers in EDMA mode

2018-10-31 Thread Maya Erez
From: Ahmad Masri After being associated with some EDMA rx traffic, upon "down" driver doesn't free all skbs in the rx ring. Modify wil_move_all_rx_buff_to_free_list to loop on active list of rx buffers, unmap the physical memory and free the skb. Signed-off-by: Ahmad Masri Signed-off-by: Maya

[PATCH 05/16] wil6210: add recovery for FW error while in AP mode

2018-10-31 Thread Maya Erez
From: Dedy Lansky AP configuration is stored by the driver. Upon FW error, disconnect notification is sent to user space for any associated stations. AP is then internally restarted with the stored configuration. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez ---

[PATCH 16/16] wil6210: fix locking in wmi_call

2018-10-31 Thread Maya Erez
From: Lior David Switch from spin_lock to spin_lock_irqsave, because wmi_ev_lock is used inside interrupt handler. Signed-off-by: Lior David Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/wmi.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] mt76x0: do not overwrite other MT_BBP(AGC, 8) fields

2018-10-31 Thread Lorenzo Bianconi
> MT_BBP(AGC, 8) register has values depend on band in > mt76x0_bbp_switch_tab, so we should not overwrite other fields > than MT_BBP_AGC_GAIN when setting gain. > > This can fix performance issues when connecting to 2.4GHz AP. > > Fixes: 4636a2544c3b ("mt76x0: phy: align channel gain logic to

[RFC v5 03/13] rtw88: hci files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang hci files for Realtek 802.11ac wireless network chips For now there is only PCI bus supported by rtwlan, in the future it will also have USB/SDIO Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/hci.h | 211 ++

[RFC v5 02/13] rtw88: core files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang core files for Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/ps.c | 165 + drivers/net/wireless/realtek/rtw88/ps.h | 20 ++ drivers/net/wireless/realtek/rtw88/regd.c | 391

[RFC v5 05/13] rtw88: mac files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang mac files for Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/mac.c | 1010 ++ drivers/net/wireless/realtek/rtw88/mac.h | 35 ++ 2 files changed, 1045 insertions(+) create mode

[RFC v5 07/13] rtw88: phy files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang phy files for Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/phy.c | 1670 ++ drivers/net/wireless/realtek/rtw88/phy.h | 125 +++ 2 files changed, 1795 insertions(+) create

[RFC v5 12/13] rtw88: Kconfig & Makefile

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang Kconfig & Makefile for Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/Kconfig| 1 + drivers/net/wireless/realtek/Makefile | 1 + drivers/net/wireless/realtek/rtw88/Kconfig | 55

[RFC v5 04/13] rtw88: trx files

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang trx files for Realtek 802.11ac wireless network chips Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/rx.c | 151 ++ drivers/net/wireless/realtek/rtw88/rx.h | 41 + drivers/net/wireless/realtek/rtw88/tx.c | 273

[RFC v5 13/13] rtw88: add support for Realtek 802.11ac wireless chips

2018-10-31 Thread yhchuang
From: Yan-Hsuan Chuang Signed-off-by: Yan-Hsuan Chuang --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9ad052a..138515b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12546,6 +12546,14 @@ T: git

[PATCH 00/16] wil6210 patches

2018-10-31 Thread Maya Erez
The following set of patches include various wil6210 fixes. Ahmad Masri (5): wil6210: refactor disconnect flow wil6210: notify cqm packet loss on disable_ap_sme wil6210: fix debugfs memory access alignment wil6210: remove unnecessary alignment code from rx flow wil6210: fix freeing of

[PATCH 10/16] wil6210: fix debugfs memory access alignment

2018-10-31 Thread Maya Erez
From: Ahmad Masri All wil6210 device memory access should be 4 bytes aligned. In io blob wil6210 did not force alignment for read function, this caused alignment fault on some platforms. Fixing that by accessing all 4 lower bytes and return to host the requested data. Signed-off-by: Ahmad Masri

[PATCH 03/16] wil6210: increase RX rings and RX buff array size

2018-10-31 Thread Maya Erez
In Talyn-MB, the 11ad throughput is higher and performance drops may occur in the current RX configuration due to unavailability of Rx buffers. Increase the RX descriptor ring, RX status ring and number of RX buffers to stabilize the performance in high throughput. Signed-off-by: Maya Erez ---

[PATCH 04/16] wil6210: make sure Rx ring sizes are correlated

2018-10-31 Thread Maya Erez
From: Dedy Lansky When enlarging rx_ring_order module param, wil6210 fails to load because there are not enough Rx buffers. Fix this by enlarging number of Rx buffers at startup, if needed based on rx_ring_order. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez ---

[PATCH 14/16] wil6210: remove unnecessary alignment code from rx flow

2018-10-31 Thread Maya Erez
From: Ahmad Masri Rx buffers in EDMA mode are initialized to 4 bytes aligned size. Remove the unnecessary alignment code applied on rx buffer size. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/txrx_edma.c | 10 -- 1 file changed, 4

[PATCH 12/16] wil6210: fix RGF_CAF_ICR address for Talyn-MB

2018-10-31 Thread Maya Erez
RGF_CAF_ICR register location has changed in Talyn-MB. Add RGF_CAF_ICR_TALYN_MB to support the new address. Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/main.c| 11 +-- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 2 files changed, 10 insertions(+), 2

[PATCH 08/16] wil6210: notify cqm packet loss on disable_ap_sme

2018-10-31 Thread Maya Erez
From: Ahmad Masri wil6210 used to notify cfg80211_del_sta on every fw disconnect event. In disable_ap_sme mode the userspace manages the protocol SME and FW sends disconnect event only due to link loss. In disable_ap_sme mode, indicate CQM packet loss to let the host control the connection and

[PATCH 13/16] wil6210: ignore HALP ICR if already handled

2018-10-31 Thread Maya Erez
HALP ICR is set as long as the FW should stay awake. To prevent its multiple handling the driver masks this IRQ bit. However, if there is a different MISC ICR before the driver clears this bit, there is a risk of race condition between HALP mask and unmask. This race leads to HALP timeout, in case

[PATCH 11/16] wil6210: fix L2 RX status handling

2018-10-31 Thread Maya Erez
L2 RX status errors should not be treated as a bitmap and the actual error values should be checked. Print L2 errors as wil_err_ratelimited for easier debugging when such errors occurs. Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/txrx_edma.c | 23 --- 1

[PATCH 07/16] wil6210: refactor disconnect flow

2018-10-31 Thread Maya Erez
From: Ahmad Masri Separate sending command to the fw from the event handling function to simplify the disconnect flow and track the from_event flag correctly. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/cfg80211.c | 2 +-

[PATCH 06/16] wil6210: fix memory leak in wil_find_tx_bcast_2

2018-10-31 Thread Maya Erez
From: Lior David A successful call to wil_tx_ring takes skb reference so it will only be freed in wil_tx_complete. Consume the skb in wil_find_tx_bcast_2 to prevent memory leak. Signed-off-by: Lior David Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/txrx.c | 2 ++ 1 file

[PATCH 09/16] wil6210: add general initialization/size checks

2018-10-31 Thread Maya Erez
From: Alexei Avshalom Lazar Initialize unset variable, and verify that mid is valid. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/debugfs.c | 2 ++ drivers/net/wireless/ath/wil6210/wmi.c | 2 +- 2 files changed, 3 insertions(+), 1

[PATCH 01/16] wil6210: remove fake support for RXHASH

2018-10-31 Thread Maya Erez
From: Hamad Kadmany Setting the same fake hash to all skbs prevents distributing different flows to different CPU cores. Signed-off-by: Hamad Kadmany Signed-off-by: Lior David Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/netdev.c | 3 +--