[PATCH v2 7/7] mt76x02: enable support for IBSS, AP and MESH

2019-01-28 Thread Stanislaw Gruszka
Since we implement beconing on USB now, similar interfaces should be supported for USB as are for MMIO. Tested only for AP and IBSS modes. Signed-off-by: Stanislaw Gruszka --- v2: set VHT_IBSS, vht reates are supported in ibss. .../net/wireless/mediatek/mt76/mt76x02_util.c | 23

[PATCH v2 6/7] mt76: beaconing fixes for USB

2019-01-28 Thread Stanislaw Gruszka
Configure beaconing on USB devices without PS buffering support. Signed-off-by: Stanislaw Gruszka --- v2: move some code drivers/net/wireless/mediatek/mt76/mac80211.c | 3 +- .../net/wireless/mediatek/mt76/mt76x02_mac.c | 29 +-- .../net/wireless/mediatek/mt76/mt76x02_mac.h

[PATCH v2 2/7] mt76x02: use commmon add interface for mt76x2u

2019-01-28 Thread Stanislaw Gruszka
Since we now support mt76x2u feature to allow set mac address when creating interface in common code we can use it for mt76x2u. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 3 +-- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +++--- .../net

[PATCH v2 1/7] mt76x02: use mask for vifs

2019-01-28 Thread Stanislaw Gruszka
Use vif_mask to count interfaces to allow to set mac address in HW if there is only one interface and report error if we create interface with wrong BSSID resulting in already used index. Signed-off-by: Stanislaw Gruszka --- v2: - do not change vif index calculation - return error for already

[PATCH v2 4/7] mt76x02: minor beaconing init changes

2019-01-28 Thread Stanislaw Gruszka
Disable BEACON timer during init and remove interrupt registers initialization form generic code since they are PCIe specific. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 7 +++ drivers/net/wireless/mediatek/mt76/mt76x02_util.c| 11

[PATCH v2 5/7] mt76x02: init beacon config for mt76x2u

2019-01-28 Thread Stanislaw Gruszka
Initialize beaconing also on mt76x2u. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c b/drivers/net/wireless/mediatek/mt76

[PATCH v2 0/7] mt76x02: Beacon support for USB

2019-01-28 Thread Stanislaw Gruszka
We can configure beaconing, but without TBTT interrupt we can not support PS buffering. This can be added later using kernel hrtimer, if we can keep it in sycn with device timer. I tested AP and IBSS modes. Stanislaw Gruszka (7): mt76x02: use mask for vifs mt76x02: use commmon add interface

[PATCH v2 3/7] mt76x02: initialize mutli bss mode when set up address

2019-01-28 Thread Stanislaw Gruszka
BSSID is not strtirct related with beaconing (for example we can have 2 STA vifs) and more related with MAC address, so initaize BSSID when setting MAC address. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 15 ++- drivers/net/wireless

Re: [PATCH 1/7] mt76x02: use mask for vifs

2019-01-28 Thread Stanislaw Gruszka
On Mon, Jan 28, 2019 at 10:02:01AM +0100, Stanislaw Gruszka wrote: > On Mon, Jan 28, 2019 at 09:41:45AM +0100, Felix Fietkau wrote: > > >> Moreover I am a little worried about tpt regressions with this patch. > > >> Are you sure that if you use complete d

Re: [PATCH v3 00/13] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips

2019-01-28 Thread Stanislaw Gruszka
On Mon, Jan 28, 2019 at 09:25:32AM +, Tony Chuang wrote: > > > - change tree location to wireless-next > > > > What does this mean? wireless-next has not been used for years, do you > > mean wireless-drivers-next instead? > > > > -- > > Kalle Valo > > Sorry for the typo here. Yes, I mean "

Re: [PATCH 1/7] mt76x02: use mask for vifs

2019-01-28 Thread Stanislaw Gruszka
On Mon, Jan 28, 2019 at 09:41:45AM +0100, Felix Fietkau wrote: > >> Moreover I am a little worried about tpt regressions with this patch. > >> Are you sure that if you use complete different mac addresses on a > >> multivif scenario > >> you can get the same tpt on all the interfaces? Could you pl

Re: [PATCH 6/7] mt76: beaconing fixes for USB

2019-01-28 Thread Stanislaw Gruszka
On Thu, Jan 24, 2019 at 11:50:49PM +0100, Lorenzo Bianconi wrote: > > if (changed & BSS_CHANGED_BEACON_ENABLED) { > > - tasklet_disable(&dev->pre_tbtt_tasklet); > > + skb = NULL; > > + if (info->enable_beacon && mt76_is_usb(dev)) > > + skb = ieee8

Re: [PATCH 1/7] mt76x02: use mask for vifs

2019-01-25 Thread Stanislaw Gruszka
On Fri, Jan 25, 2019 at 11:25:46AM +0100, Lorenzo Bianconi wrote: > > On Fri, Jan 25, 2019 at 10:02:38AM +0100, Lorenzo Bianconi wrote: > > > > On Thu, Jan 24, 2019 at 11:20:42PM +0100, Lorenzo Bianconi wrote: > > > > > > > > > > > > > > > > I guess this does not work if you add 2 vifs and then yo

Re: [PATCH 1/7] mt76x02: use mask for vifs

2019-01-25 Thread Stanislaw Gruszka
On Fri, Jan 25, 2019 at 10:02:38AM +0100, Lorenzo Bianconi wrote: > > On Thu, Jan 24, 2019 at 11:20:42PM +0100, Lorenzo Bianconi wrote: > > > > > > > > > > > > I guess this does not work if you add 2 vifs and then you remove > > > > > > the first one > > > > > > (you will end up with a wrong conf

Re: [PATCH 1/7] mt76x02: use mask for vifs

2019-01-25 Thread Stanislaw Gruszka
On Fri, Jan 25, 2019 at 10:02:38AM +0100, Lorenzo Bianconi wrote: > > On Thu, Jan 24, 2019 at 11:20:42PM +0100, Lorenzo Bianconi wrote: > > > > > > > > > > > > I guess this does not work if you add 2 vifs and then you remove > > > > > > the first one > > > > > > (you will end up with a wrong conf

Re: [PATCH 1/7] mt76x02: use mask for vifs

2019-01-25 Thread Stanislaw Gruszka
On Thu, Jan 24, 2019 at 11:20:42PM +0100, Lorenzo Bianconi wrote: > > > > > > > > I guess this does not work if you add 2 vifs and then you remove the > > > > first one > > > > (you will end up with a wrong configuration in MT_MAC_ADDR_DW{0,1}). I > > > > guess > > > > the hw will not work well

Re: [PATCH 1/7] mt76x02: use mask for vifs

2019-01-24 Thread Stanislaw Gruszka
On Thu, Jan 24, 2019 at 05:12:37PM +0100, Lorenzo Bianconi wrote: > > Use vif_mask to count interfaces to allow to set mac address > > if there is only one interface and support more STA vifs in > > the future. > > > > Signed-off-by: Stanislaw Gruszka > > --

[PATCH 7/7] mt76x02: enable support for IBSS, AP and MESH

2019-01-24 Thread Stanislaw Gruszka
Since we implement beconing on USB now, similar interfaces should be supported for USB as are for MMIO. Tested only for AP and IBSS modes. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[PATCH 6/7] mt76: beaconing fixes for USB

2019-01-24 Thread Stanislaw Gruszka
Configure beaconing on USB devices without PS buffering support. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mac80211.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 24 --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.h

[PATCH 5/7] mt76x02: init beacon config for mt76x2u

2019-01-24 Thread Stanislaw Gruszka
Initialize beaconing also on mt76x2u. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c b/drivers/net/wireless/mediatek/mt76

[PATCH 4/7] mt76x02: minor beaconing init changes

2019-01-24 Thread Stanislaw Gruszka
Disable BEACON timer during init and remove interrupt registers initialization form generic code since they are PCIe specific. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 7 +++ drivers/net/wireless/mediatek/mt76/mt76x02_util.c| 11

[PATCH 2/7] mt76x02: use commmon add interface for mt76x2u

2019-01-24 Thread Stanislaw Gruszka
Since we now support mt76x2u feature to allow set mac address when creating interface in common code we can use it for mt76x2u. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 3 +-- drivers/net/wireless/mediatek/mt76/mt76x02_util.c| 6

[PATCH 3/7] mt76x02: initialize mutli bss mode when set up address

2019-01-24 Thread Stanislaw Gruszka
BSSID is not strtirct related with beaconing (for example we can have 2 STA vifs) and more related with MAC address, so initaize BSSID when setting MAC address. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 15 ++- drivers/net/wireless

[PATCH 1/7] mt76x02: use mask for vifs

2019-01-24 Thread Stanislaw Gruszka
Use vif_mask to count interfaces to allow to set mac address if there is only one interface and support more STA vifs in the future. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 18

[PATCH 0/7] mt76x02: Beacon support for USB

2019-01-24 Thread Stanislaw Gruszka
We can configure beaconing, but without TBTT interrupt we can not support PS buffering. This can be added later using kernel hrtimer, if we can keep with device timer with sync. I tested AP and IBSS modes. Stanislaw Gruszka (7): mt76x02: use mask for vifs mt76x02: use commmon add interface

Re: [PATCH 1/2] mt76: fix per-chain signal strength reporting

2019-01-23 Thread Stanislaw Gruszka
On Tue, Jan 22, 2019 at 04:38:22PM +0100, Felix Fietkau wrote: > Fix an off-by-one error that resulted in not reporting the signal strength > for the first chain > > Signed-off-by: Felix Fietkau Not sure how serious this bug is, but I think patch should be marked: Fixes: d9f8934ed147 ("mt76: mo

Re: [PATCH] rt2x00: no need to check return value of debugfs_create functions

2019-01-23 Thread Stanislaw Gruszka
On Tue, Jan 22, 2019 at 04:21:34PM +0100, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Stanislaw Gruszk

Re: [PATCH] iwlegacy: no need to check return value of debugfs_create functions

2019-01-23 Thread Stanislaw Gruszka
On Tue, Jan 22, 2019 at 04:21:18PM +0100, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Stanislaw Grusz

[PATCH] mt7601u: bump supported EEPROM version

2019-01-22 Thread Stanislaw Gruszka
: tx_power ch1:09 ch2:09 tx_power ch3:0a ch4:0a tx_power ch5:0a ch6:0a tx_power ch7:0b ch8:0b tx_power ch9:0b ch10:0b tx_power ch11:0b ch12:0b tx_power ch13:0b ch14:0b Reported-and-tested-by: Michael Signed-off-by: Stanislaw Gruszka

[PATCH 4.20.x 5/7] mt76x0: do not perform MCU calibration for MT7630

2019-01-22 Thread Stanislaw Gruszka
commit a83150eaad42769e4d08b6e07956a489e40214ae upstream. Driver works better for MT7630 without MCU calibration, which looks like it can hangs the firmware. Vendor driver do not perform it for MT7630 as well. Signed-off-by: Felix Fietkau Signed-off-by: Stanislaw Gruszka --- drivers/net

[PATCH 4.20.x 4/7] mt76x02: assure we update gain after scan

2019-01-22 Thread Stanislaw Gruszka
in mt76x02_phy_adjust_vga_gain(). Signed-off-by: Felix Fietkau Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 5 - drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/m

[PATCH 4.20.x 6/7] mt76x0: antenna select corrections

2019-01-22 Thread Stanislaw Gruszka
which vendor driver dedicated to this chip do. This make MT7630E workable with mt76x0e driver and do not cause any problems on MT7610U for me. Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c| 52

[PATCH 4.20.x 7/7] mt76x0: phy: unify calibration between mt76x0u and mt76x0e

2019-01-22 Thread Stanislaw Gruszka
From: Lorenzo Bianconi commit 1163bdb636a118b9d7c3c03b9e67e7e799425a9c upstream. Align phy calibration logic between mt76x0u and mt76x0e drivers This patch improves connection stability with low SNR Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Stanislaw Gruszka

[PATCH 4.20.x 1/7] mt76x0: do not overwrite other MT_BBP(AGC, 8) fields

2019-01-22 Thread Stanislaw Gruszka
("mt76x0: phy: align channel gain logic to mt76x2 one") Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/ne

[PATCH 4.20.x 0/7] mt76x0 fixes for 4.20 stable

2019-01-22 Thread Stanislaw Gruszka
calibration between mt76x0u and mt76x0e Stanislaw Gruszka (6): mt76x0: do not overwrite other MT_BBP(AGC, 8) fields mt76x0: use band parameter for LC calibration mt76x02: run calibration after scanning mt76x02: assure we update gain after scan mt76x0: do not perform MCU calibration for MT7630

[PATCH 4.20.x 3/7] mt76x02: run calibration after scanning

2019-01-22 Thread Stanislaw Gruszka
initialization was already done. Fixes: bbd10586f0df ("mt76x0: phy: do not run calibration during channel switch") Signed-off-by: Felix Fietkau Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt

[PATCH 4.20.x 2/7] mt76x0: use band parameter for LC calibration

2019-01-22 Thread Stanislaw Gruszka
Fixes: 9aec146d0f6b ("mt76x0: pci: introduce mt76x0_phy_calirate routine") Signed-off-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/med

Re: [RFC 0/4] do not use sg if not properly supported by usb controller

2019-01-16 Thread Stanislaw Gruszka
On Wed, Jan 16, 2019 at 02:40:46PM +0100, Lorenzo Bianconi wrote: > On Jan 16, Stanislaw Gruszka wrote: > > On Wed, Jan 16, 2019 at 12:44:33PM +0100, Lorenzo Bianconi wrote: > > > > On Tue, Jan 15, 2019 at 04:47:47PM +0100, Lorenzo Bianconi wrote: > > > > &g

Re: [RFC 0/4] do not use sg if not properly supported by usb controller

2019-01-16 Thread Stanislaw Gruszka
On Wed, Jan 16, 2019 at 12:44:33PM +0100, Lorenzo Bianconi wrote: > > On Tue, Jan 15, 2019 at 04:47:47PM +0100, Lorenzo Bianconi wrote: > > > Hi Stanislaw, > > > > Hi :-) > > > > > > Not sure what is the problem , but this patch set look like a workaround > > > > not fix. If this an issue with IO

Re: [PATCH] rt61pci: Work around a firmware bug with shared keys

2019-01-16 Thread Stanislaw Gruszka
ware is > trying to be smarter than the driver, which is bound > to fail. > > As workaround the function rt61pci_config_shared_key > requests software decryption of the shared keys, > by returning EOPNOTSUPP. However, pairwise keys are > still handled by hardware which works just fine. > > Signed-off-by: Bernd Edlinger Acked-by: Stanislaw Gruszka

Re: [RFC 0/4] do not use sg if not properly supported by usb controller

2019-01-16 Thread Stanislaw Gruszka
On Tue, Jan 15, 2019 at 04:47:47PM +0100, Lorenzo Bianconi wrote: > Hi Stanislaw, Hi :-) > > Not sure what is the problem , but this patch set look like a workaround > > not fix. If this an issue with IOMMU and sg, seems there is something wrong > > in sg page mappings eigher on mt76 dirver or IO

Re: [PATCH v2 2/3] rt2x00: check number of EPROTO errors

2019-01-16 Thread Stanislaw Gruszka
On Thu, Jan 10, 2019 at 03:29:44PM +0100, Jeroen Roovers wrote: > Aaand the results are in. > > On Thu, 10 Jan 2019 at 08:49, Jeroen Roovers wrote: > > > > Hi Stanislaw, > > > > On Wed, 9 Jan 2019 at 12:33, Stanislaw Gruszka wrote: > > > >

Re: [RFC 0/4] do not use sg if not properly supported by usb controller

2019-01-15 Thread Stanislaw Gruszka
On Tue, Jan 15, 2019 at 01:33:41PM +0100, Lorenzo Bianconi wrote: > Use linear fragment and not a single usb scatter-gather buffer in mt76u > {tx,rx} datapath if the usb controller has sg data length constraints. > Moreover add disable_usb_sg module parameter in order to explicitly > disable scatte

Re: [PATCH v2 2/3] rt2x00: check number of EPROTO errors

2019-01-09 Thread Stanislaw Gruszka
On Wed, Jan 09, 2019 at 07:17:59AM +0100, Jeroen Roovers wrote: > Hi Tom, > > On Tue, 8 Jan 2019 at 12:04, Tom Psyborg wrote: > > > rt2x00usb_vendor_request: Error - Vendor Request X failed for offset X > > > with error -110 > > > [many of these, system is slowly locking up] > > > > > > So t

Re: [PATCH v2 2/3] rt2x00: check number of EPROTO errors

2019-01-07 Thread Stanislaw Gruszka
On Mon, Jan 07, 2019 at 01:47:19PM +0100, Jeroen Roovers wrote: > On Thu, 20 Dec 2018 at 16:16, Stanislaw Gruszka wrote: > > > > Some USB host devices/drivers on some conditions can always return > > EPROTO error on submitted URBs. That can cause infinity loop in

Re: [PATCH 2/2] rt2x00: define RF5592 in init_eeprom routine

2019-01-02 Thread Stanislaw Gruszka
On Thu, Dec 27, 2018 at 03:05:26PM +0100, Tomislav Požega wrote: > This patch fixes following crash on Linksys EA2750 during 5GHz wifi > init: > > [7.955153] rt2800pci :01:00.0: card - bus=0x1, slot = 0x0 irq=4 > [7.962259] rt2800pci :01:00.0: loaded eeprom from mtd device "Factory

Re: [PATCH v2 3/3] rt2x00: do not print error when queue is full

2019-01-02 Thread Stanislaw Gruszka
On Fri, Dec 28, 2018 at 01:45:27AM +0100, Tom Psyborg wrote: > > > > I move prints to debug level for for "arrived at non-free entry" from > > "Dropping frame due to full tx queue" . For some users those 5 patches > > improve things, they fix problem of router connection hung completely. > > Printk

Re: [PATCH 2/2] mt76: introduce mt76x02_check_tx_hang watchdog

2018-12-27 Thread Stanislaw Gruszka
On Mon, Dec 24, 2018 at 05:24:42PM +0100, Lorenzo Bianconi wrote: > Port mt76x02_check_tx_hang watchdog from vendor driver in order to > perform a device reset when tx mac/dma logic hangs. Tx mac/dma stuck > has been observed when the device is heavily loaded or in a noisy > environment. On what h

Re: [PATCH 1/2] mt76: run mac work every 100ms

2018-12-27 Thread Stanislaw Gruszka
On Mon, Dec 24, 2018 at 05:24:41PM +0100, Lorenzo Bianconi wrote: > Introduce MT_WATCHDOG_TIME macro in order to run mac work every 100ms. > This is a preliminary patch to implement a proper tx hang watchdog > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c > b/drivers/net/wirel

Re: [PATCH v2 3/3] rt2x00: do not print error when queue is full

2018-12-27 Thread Stanislaw Gruszka
On Tue, Dec 25, 2018 at 11:43:09PM +0100, Tom Psyborg wrote: > Even with your patches that are currently being tested i had interface > frozen yesterday. 2 android pads, 2 android phones and laptop with > intel card on win10. Wlan frozen about half an hour after bootup, had > to restart interface t

Re: [PATCH v2 3/3] rt2x00: do not print error when queue is full

2018-12-27 Thread Stanislaw Gruszka
On Sat, Dec 22, 2018 at 02:12:13PM +0100, Tom Psyborg wrote: > On 21/12/2018, Stanislaw Gruszka wrote: > > On Thu, Dec 20, 2018 at 06:52:03PM +0100, Tom Psyborg wrote: > >> Shouldn't you now also revert the commits from > >> https://git.openwrt.org/?p=openwrt/st

Re: [PATCH v2 1/3] rt2x00: use ratelimited variants dev_warn/dev_err

2018-12-21 Thread Stanislaw Gruszka
On Fri, Dec 21, 2018 at 04:48:17AM -0800, Joe Perches wrote: > On Fri, 2018-12-21 at 12:57 +0100, Stanislaw Gruszka wrote: > > On Fri, Dec 21, 2018 at 03:19:31AM -0800, Joe Perches wrote: > > > On Thu, 2018-12-20 at 16:16 +0100, Stanislaw Gruszka wrote: > > > &g

Re: [PATCH v2 1/3] rt2x00: use ratelimited variants dev_warn/dev_err

2018-12-21 Thread Stanislaw Gruszka
On Fri, Dec 21, 2018 at 03:19:31AM -0800, Joe Perches wrote: > On Thu, 2018-12-20 at 16:16 +0100, Stanislaw Gruszka wrote: > > As reported by Randy we can overwhelm logs on some USB error conditions. > > To avoid that use dev_warn_ratelimited() and dev_err_ratelimitd(). > &

Re: [PATCH v2 3/3] rt2x00: do not print error when queue is full

2018-12-21 Thread Stanislaw Gruszka
On Thu, Dec 20, 2018 at 06:52:03PM +0100, Tom Psyborg wrote: > Shouldn't you now also revert the commits from > https://git.openwrt.org/?p=openwrt/staging/dangole.git;a=commitdiff;h=de1c58a64bd66319e770d2587da07d8c9c90174a > since they caused throughput regression? For the record: this is not abou

[PATCH v2 1/3] rt2x00: use ratelimited variants dev_warn/dev_err

2018-12-20 Thread Stanislaw Gruszka
As reported by Randy we can overwhelm logs on some USB error conditions. To avoid that use dev_warn_ratelimited() and dev_err_ratelimitd(). Reported-and-tested-by: Randy Oostdyk Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 9 +++-- 1 file changed, 7

[PATCH v2 2/3] rt2x00: check number of EPROTO errors

2018-12-20 Thread Stanislaw Gruszka
and mark device as removed if get lot of it. I choose number 10 as threshold. Reported-and-tested-by: Randy Oostdyk Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2x00.h| 1 + drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 22 +++--- 2 files

[PATCH v2 3/3] rt2x00: do not print error when queue is full

2018-12-20 Thread Stanislaw Gruszka
make MT7620 OpenWRT routers more stable, what was reported by various users. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net

Re: [PATCH 4.19] mt76x0: mark 802.11w as supported

2018-12-20 Thread Stanislaw Gruszka
On Thu, Dec 20, 2018 at 01:30:55PM +0100, Greg KH wrote: > On Thu, Dec 20, 2018 at 12:47:07PM +0100, Stanislaw Gruszka wrote: > > commit 0ae976a11b4fb5704b597e103b5189237641c1a1 upstream. > > > > This is one line hw feature backport from 0ae976a11b4f ("mt76x0: init &g

[PATCH 4.19] mt76x0: mark 802.11w as supported

2018-12-20 Thread Stanislaw Gruszka
the change] Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c index 7cdb3e740522..0a3e046d78db 100644 --- a/d

Re: mt76x[02]u 802.11w support

2018-12-18 Thread Stanislaw Gruszka
On Tue, Dec 18, 2018 at 01:38:54PM -0500, Sid Hayn wrote: > > > Regarding this case, there is no single commit that add 802.11w support > > > we could request to add to -stable. It was added together with other > > > features in: > > > > > > commit 0ae976a11b4fb5704b597e103b5189237641c1a1 > > > Aut

Re: mt76x[02]u 802.11w support

2018-12-18 Thread Stanislaw Gruszka
On Mon, Dec 17, 2018 at 04:46:28PM +0100, Stanislaw Gruszka wrote: > On Mon, Dec 17, 2018 at 10:07:43AM -0500, Sid Hayn wrote: > > Interestingly when I asked for the monitor mode patch to be ported it > > was initially refused and then just kind of happened a few weeks > > l

Re: mt76x[02]u 802.11w support

2018-12-17 Thread Stanislaw Gruszka
On Mon, Dec 17, 2018 at 10:07:43AM -0500, Sid Hayn wrote: > Interestingly when I asked for the monitor mode patch to be ported it > was initially refused and then just kind of happened a few weeks > later. It was not quite like that. It was refused to apply on 4.19-rcX due to -next merge -rc confl

Re: [PATCH v2 00/13] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips

2018-12-12 Thread Stanislaw Gruszka
On Fri, Nov 16, 2018 at 07:31:06PM +0800, yhchu...@realtek.com wrote: > 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, o

[PATCH v2 4/4] mt76x0: configure MT_VHT_HT_FBK_CFG1

2018-12-10 Thread Stanislaw Gruszka
Configure MT_VHT_HT_FBK_CFG1 values similar like vendor driver. Signed-off-by: Stanislaw Gruszka --- v2: do not configure other fallback registers as they have proper values by default. drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH v2 3/4] mt76x02: set protection according to ht operation element

2018-12-10 Thread Stanislaw Gruszka
Configure protection based on information that are provided to us either by remote AP or by hostapd via HT operation IE. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 83 +++ drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2

[PATCH v2 1/4] mt76x02: do not set protection on set_rts_threshold callback

2018-12-10 Thread Stanislaw Gruszka
Use set_rts_threshold calback to enable/disable threshold only for legacy traffic. Protection for HT and VHT traffic is defined by HT operation element and it's provided by remote AP or by hostapd. Signed-off-by: Stanislaw Gruszka --- v2: rebase on top of: https://lore.kernel.org/linux-wir

[PATCH v2 2/4] mt76x02: fixup MT_PROT_RATE_* defines

2018-12-10 Thread Stanislaw Gruszka
On new mt76 chips, phy mode is configured by last 3 bits of rate value. Hence OFDM bit is marked by 0x2000 instead of 0x4000. Acked-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_regs.h | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 5/5] mt76x2: initialize fall-back rate registers

2018-12-07 Thread Stanislaw Gruszka
Initialize MT_LG_FBK_CFG{0,1} and MT_VHT_HT_FBK_CFG{0,1} registers. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h b/drivers/net/wireless

[PATCH 4/5] mt76x2: initialize fall-back rate registers

2018-12-07 Thread Stanislaw Gruszka
Initialize MT_LG_FBK_CFG{0,1} and MT_VHT_HT_FBK_CFG0 registers. MT_VHT_HT_FBK_CFG1 was already configured. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x2/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2

[PATCH 3/5] mt76x02: set protection according to ht operation element

2018-12-07 Thread Stanislaw Gruszka
Configure protection based on information that are provided to us either by remote AP or by hostapd via HT operation IE. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 83 +++ drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2

[PATCH 1/5] mt76x02: do not set protection on set_rts_threshold callback

2018-12-07 Thread Stanislaw Gruszka
Use set_rts_threshold calback to enable/disable threshold only for legacy traffic. Protection for HT and VHT traffic is defined by HT operation element and it's provided by remote AP or by hostapd. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c

[PATCH 2/5] mt76x02: fixup MT_PROT_RATE_* defines

2018-12-07 Thread Stanislaw Gruszka
On new mt76 chips, phy mode is configured by last 3 bits of rate value. Hence OFDM bit is marked by 0x2000 instead of 0x4000. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_regs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

Re: [RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode

2018-12-07 Thread Stanislaw Gruszka
On Thu, Nov 08, 2018 at 05:02:14PM +0100, Felix Fietkau wrote: > >> > + if (changed & BSS_CHANGED_BASIC_RATES && > >> > + vif->type == NL80211_IFTYPE_STATION) { > >> > + mt76_wr(dev, MT_LEGACY_BASIC_RATE, info->basic_rates); It's a bit hard to interpret how vendor dri

Re: [PATCH 2/2] mt76: dma: add rx buffer recycle support

2018-12-06 Thread Stanislaw Gruszka
On Wed, Dec 05, 2018 at 04:17:31PM +0100, Lorenzo Bianconi wrote: > > On Wed, Dec 05, 2018 at 11:37:33AM +0100, Lorenzo Bianconi wrote: > > > > > > > > Add support for recycling rx buffers if they are not forwarded > > > > to network stack instead of reallocate them from scratch > > > > > > > > Sig

Re: [PATCH 2/2] mt76: dma: add rx buffer recycle support

2018-12-05 Thread Stanislaw Gruszka
On Wed, Dec 05, 2018 at 11:37:33AM +0100, Lorenzo Bianconi wrote: > > > > Add support for recycling rx buffers if they are not forwarded > > to network stack instead of reallocate them from scratch > > > > Signed-off-by: Lorenzo Bianconi > > --- > > Felix, > > could you please drop this patch si

Re: [RFC/RFT 3/4] mt76x02: do not set protection on set_rts_threshold callback

2018-12-04 Thread Stanislaw Gruszka
On Tue, Dec 04, 2018 at 11:45:09AM +0100, Stanislaw Gruszka wrote: > Only OFDM_PROT_CFG is configured there based on legacy proto > value. I'm not sure how handle CCK_PROT_CFG. > > > > - mt76_rmw(dev, MT_MM20_PROT_CFG, > > > - MT_PROT_CFG_CTR

Re: [RFC/RFT 3/4] mt76x02: do not set protection on set_rts_threshold callback

2018-12-04 Thread Stanislaw Gruszka
should be determined by HT capabilities and applied to any HT > > frames. > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 16 +--- > > drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2 +-

Re: rt2800 tx frame dropping issue.

2018-12-04 Thread Stanislaw Gruszka
Hi Daniel On Mon, Dec 03, 2018 at 03:44:46PM -0600, Daniel Santos wrote: > I almost managed to get that patch in a build to send to somebody who > can reproduce the error in abundance, but they have 15 different people > hammer the router to do it and we ended up sending them a few other > experim

Re: [PATCH v2 00/13] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips

2018-11-30 Thread Stanislaw Gruszka
roles on a single device. > > Based on the reasons mentioned before, we implemented rtw88. It had many > authors, they are listed here alphabetically: > > Ping-Ke Shih > Tzu-En Huang > Yan-Hsuan Chuang For the series: Reviewed-by: Stanislaw Gruszka

Re: [PATCH] mt76: handle protocol error to proper deinit rx_tasklet

2018-11-26 Thread Stanislaw Gruszka
On Sat, Nov 24, 2018 at 10:25:52AM +0100, Lorenzo Bianconi wrote: > > During removal of usb dongle, noticed many unhandled rx urb > > below. This this patch, make it possible and early completion > > of the rx tasklet. > > > > mt76x2u 1-3.4.3.1.2:1.0: rx urb failed: -71 > > mt76x2u 1-3.4.3.1.2:1.0:

Re: rt2800 tx frame dropping issue.

2018-11-26 Thread Stanislaw Gruszka
On Fri, Nov 23, 2018 at 08:45:54PM +0100, Johannes Berg wrote: > On Tue, 2018-11-20 at 15:20 -0600, Daniel Santos wrote: > > > I believe I have the answer as to why we're getting frames after we stop > > the queue. I had a little chat about this in #kernelnewbies and some > > other devs believe i

Re: [PATCH 2/5] mt76x02: initalize mutli bss mode by default

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 02:31:31PM +0100, Lorenzo Bianconi wrote: > > > > Anyway I think, to support MAC address change, we should not filter > > based on MAC address, but maybe only on BSSID ? > > > > Thanks > > Stanislaw > > You can create the interface with a given mac address > > # iw phy

Re: [PATCH 1/5] mt76x02: correct set bssid for STA

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 01:50:51PM +0100, Lorenzo Bianconi wrote: > > On 2018-11-09 12:09, Lorenzo Bianconi wrote: > > >> Use MT_MAC_APC_BSSID0_H_EN bit to indicatate we are > > >> setting BSSID for STA. > > >> > > >> Signed-off-by: Stan

Re: [PATCH 4/5] mt76x02: minor beaconing init changes

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 12:33:32PM +0100, Lorenzo Bianconi wrote: > > Disable BEACON timer during init and remove interrupt registers > > initalization form generic conde since they are PCIe specific. > > > > Since the timer is actually disabled (MT_INT_TIMER_EN set to 0) and > we just set the ti

Re: [PATCH 2/5] mt76x02: initalize mutli bss mode by default

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 12:26:51PM +0100, Lorenzo Bianconi wrote: > > @@ -52,9 +52,6 @@ static int mt76x2u_add_interface(struct ieee80211_hw *hw, > > struct mt76x02_dev *dev = hw->priv; > > unsigned int idx = 8; > > > > - if (!ether_addr_equal(dev->mt76.macaddr, vif->addr)) > > -

Re: [PATCH 1/5] mt76x02: correct set bssid for STA

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 12:09:50PM +0100, Lorenzo Bianconi wrote: > > Use MT_MAC_APC_BSSID0_H_EN bit to indicatate we are > > setting BSSID for STA. > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 12

[PATCH v2] mt76: remove wait argument from mt76x02_mcu_calibrate

2018-11-09 Thread Stanislaw Gruszka
We always wait for CMD_CALIBRATION_OP mcu message, but wait argument is used for do additional MT_MCU_COM_REG0 register operations, which are needed for mt76x2e devices and we can use appropriate check instead of wait argument. Signed-off-by: Stanislaw Gruszka --- v2: use MT_MCU_COM_REG0

[PATCH 5/5] mt76x02: remove no longer actual comment

2018-11-09 Thread Stanislaw Gruszka
Remove comment about one configurable BSSID registers since we utilize AP-Client feature now. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76

[PATCH 0/5] mt76x02: bssid setup corrections for STA

2018-11-09 Thread Stanislaw Gruszka
Minor MBSS and beaconing fixups. On top of: "mt76x2u: init: remove mt76x2u_init_beacon_offsets routine" Stanislaw Gruszka (5): mt76x02: correct set bssid for STA mt76x02: initalize mutli bss mode by default mt76x2u: use common mt76x02_add_interface mt76x02: minor beaconing in

[PATCH 4/5] mt76x02: minor beaconing init changes

2018-11-09 Thread Stanislaw Gruszka
Disable BEACON timer during init and remove interrupt registers initalization form generic conde since they are PCIe specific. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 7 +++ drivers/net/wireless/mediatek/mt76/mt76x02_util.c| 11

[PATCH 3/5] mt76x2u: use common mt76x02_add_interface

2018-11-09 Thread Stanislaw Gruszka
There is no need anymore to use custom add interface function for mt76x02u. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 -- drivers/net/wireless/mediatek/mt76/mt76x02_util.c| 6 +++--- drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c

[PATCH 1/5] mt76x02: correct set bssid for STA

2018-11-09 Thread Stanislaw Gruszka
Use MT_MAC_APC_BSSID0_H_EN bit to indicatate we are setting BSSID for STA. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c b

[PATCH 2/5] mt76x02: initalize mutli bss mode by default

2018-11-09 Thread Stanislaw Gruszka
Configure multi bss mode by default on all devices. That mean we use MAC address for MT_MAC_BSSID_DW and use MT_MAC_APC_BSSID for configuree bssid for each vif. This is separe from beaconing as we can have for example 2 STA vifs, so do not mix bssid init and beacon init. Signed-off-by: Stanislaw

Re: [RFC/RFT 2/4] mt76x02: reserve wcid 0 for global traffic

2018-11-08 Thread Stanislaw Gruszka
s not clear if this > > is needed, but this is how vendor driver assign wcid's in STA mode. > > This should be harmless for mt76x2. > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +- > >

Re: [RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode

2018-11-08 Thread Stanislaw Gruszka
register use values from vendor driver, which > > are different for mt76x0 and mt76x2 . > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 12 > > 1 file changed, 12 insertions(+) > >

[RFC/RFT 2/4] mt76x02: reserve wcid 0 for global traffic

2018-11-08 Thread Stanislaw Gruszka
s should be harmless for mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.

[RFC/RFT 4/4] mt76x02: set protection according to ht capabilities

2018-11-08 Thread Stanislaw Gruszka
Use information about protection that mac80211 provide to us. Used protection should be part of ht capabilites that either remote AP provde to us in STA mode or is set in hostapd.conf in ht_capab option. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 58

[RFC/RFT 3/4] mt76x02: do not set protection on set_rts_threshold callback

2018-11-08 Thread Stanislaw Gruszka
Use set_rts_threshold calback to enable/disable threshold only for legacy traffic. RTS/CTS threshold for HT TXOP make make no sense to me since used protection (RTS/CTS , CTS-to-self or none) should be determined by HT capabilities and applied to any HT frames. Signed-off-by: Stanislaw Gruszka

[RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode

2018-11-08 Thread Stanislaw Gruszka
: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c index 87ce6a51fb05..2be4b527477f 100644 --- a/drivers/net

[RFC/RFT 0/4] restore some old mt76x0u behaviour

2018-11-08 Thread Stanislaw Gruszka
and do not cause any harm on different setup (AP mode , mt76x2u, mt76x0e), but I did not test them in those setups. Stanislaw Gruszka (4): mt76x02: configure basic rates and fallback on STA mode mt76x02: reserve wcid 0 for global mt76x02: do not set protection on set_rts_threshold callback

<    1   2   3   4   5   6   7   8   9   10   >