[RFC 12/12] mt76usb: remove queue variable from rx_tasklet

2019-03-12 Thread Stanislaw Gruszka
Since now only mt76u_get_next_rx_entry use queue argument move it to this function. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net

Re: [PATCH 2/2] rt2x00: enable experimental MFP with HW crypt

2019-03-13 Thread Stanislaw Gruszka
On Tue, Mar 12, 2019 at 08:11:42PM +0100, Tomislav Požega wrote: > MFP can work with enabled HW crypt engine, but in this case > available bandwidth is reduced at least when connecting to > Archer C7 (QCA9558). Enable the feature for known to work chipsets- > MT7620, RT3070 and RT5390. Userspace se

Re: [PATCH v2] mt76: fix schedule while atomic in mt76x02_reset_state

2019-03-13 Thread Stanislaw Gruszka
On Tue, Mar 12, 2019 at 05:48:14PM +0100, Lorenzo Bianconi wrote: > > > > On Mon, Mar 11, 2019 at 02:24:35PM +0100, Lorenzo Bianconi wrote: > > > Fix following schedule while atomic in mt76x02_reset_state > > > since synchronize_rcu is run inside a RCU section > > > > > > [44036.944222] mt76x2e 000

Re: [PATCH v2] mt76: fix schedule while atomic in mt76x02_reset_state

2019-03-13 Thread Stanislaw Gruszka
On Wed, Mar 13, 2019 at 10:31:11AM +0100, Lorenzo Bianconi wrote: > > > > On Tue, Mar 12, 2019 at 05:48:14PM +0100, Lorenzo Bianconi wrote: > > > > > > > > On Mon, Mar 11, 2019 at 02:24:35PM +0100, Lorenzo Bianconi wrote: > > > > > Fix following schedule while atomic in mt76x02_reset_state > > > >

Re: [PATCH v2] mt76: fix schedule while atomic in mt76x02_reset_state

2019-03-13 Thread Stanislaw Gruszka
On Wed, Mar 13, 2019 at 10:36:39AM +0100, Lorenzo Bianconi wrote: > > > > On Wed, Mar 13, 2019 at 10:31:11AM +0100, Lorenzo Bianconi wrote: > > > > > > > > On Tue, Mar 12, 2019 at 05:48:14PM +0100, Lorenzo Bianconi wrote: > > > > > > > > > > > > On Mon, Mar 11, 2019 at 02:24:35PM +0100, Lorenzo Bia

Re: [RFC 05/12] mt76usb: remove mt76u_buf redundant fileds

2019-03-13 Thread Stanislaw Gruszka
On Tue, Mar 12, 2019 at 05:25:50PM +0100, Lorenzo Bianconi wrote: > > buf = &q->entry[idx].ubuf; > > - buf->buf = skb->data; > > - buf->len = skb->len; > > + if (!dev->usb.sg_en) { > > + buf->urb->transfer_buffer = skb->data; > > I think you can move this in mt76u_tx_build_sg o

Re: [RFC 07/12] mt76usb: remove mt76u_buf and use urb directly

2019-03-13 Thread Stanislaw Gruszka
On Tue, Mar 12, 2019 at 05:27:43PM +0100, Lorenzo Bianconi wrote: > I guess here you can do: > e->urb = usb_alloc_urb(0, GFP_KERNEL); > if (!e->urb) > return -ENOMEM; Done in later patch. Stanislaw

Re: [RFC 11/12] mt76usb: allocate urb and sg as linear data

2019-03-13 Thread Stanislaw Gruszka
On Tue, Mar 12, 2019 at 05:34:32PM +0100, Lorenzo Bianconi wrote: > > Alloc sg table at the end of urb structure. This will increase > > cache usage. > > > > I am curious, have you observed any performance improvement doing so? It's hard to measure that. Stressing net transfer with about 175 Mbi

Re: [PATCH 2/2] rt2x00: enable experimental MFP with HW crypt

2019-03-13 Thread Stanislaw Gruszka
On Wed, Mar 13, 2019 at 02:02:32PM +0100, Tom Psyborg wrote: > On 13/03/2019, Stanislaw Gruszka wrote: > > On Tue, Mar 12, 2019 at 08:11:42PM +0100, Tomislav Požega wrote: > >> MFP can work with enabled HW crypt engine, but in this case > >> available bandwidth is reduc

[RFC] mt76: add 3dBm for reporting txpower also for 1x1

2019-03-13 Thread Stanislaw Gruszka
reported. Perhaps also some better comment should be added. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mac80211.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/media

Re: [PATCH 2/2] rt2x00: enable experimental MFP with HW crypt

2019-03-13 Thread Stanislaw Gruszka
On Wed, Mar 13, 2019 at 02:48:01PM +0100, Tom Psyborg wrote: > On 13/03/2019, Stanislaw Gruszka wrote: > > On Wed, Mar 13, 2019 at 02:02:32PM +0100, Tom Psyborg wrote: > >> On 13/03/2019, Stanislaw Gruszka wrote: > >> > On Tue, Mar 12, 2019 at 08:11:42PM +0100, Tomi

Re: [PATCH 2/2] rt2x00: enable experimental MFP with HW crypt

2019-03-13 Thread Stanislaw Gruszka
On Wed, Mar 13, 2019 at 03:41:50PM +0100, Tom Psyborg wrote: > >> > It's just matter of sending already encrypted frames. All chipsets > >> > handle that. > >> > > >> > Stanislaw > >> > > >> > >> The question is how well all chipsets handle that. I've seen some lags > >> too with MFP enabled connec

Re: [RFC] mt76: add 3dBm for reporting txpower also for 1x1

2019-03-14 Thread Stanislaw Gruszka
On Wed, Mar 13, 2019 at 02:38:01PM +0100, Felix Fietkau wrote: > On 2019-03-13 14:34, Stanislaw Gruszka wrote: > > It's not clear for my why we should add 3dBm for 2x2 devices > > and not for 1x1. 3dBm looks rater like minimal txpower and > > hardware transmit at 3

Re: [PATCH 2/2] rt2x00: enable experimental MFP with HW crypt

2019-03-14 Thread Stanislaw Gruszka
On Thu, Mar 14, 2019 at 03:02:14PM +0100, Tom Psyborg wrote: > On 13/03/2019, Stanislaw Gruszka wrote: > > > > > There should be no difference between enabling MFP with nohwcrypt and > > without nohwcrypt, > > well there is. Perhaps then you could provide expla

Re: [PATCH 08/11] mt76x02u: implement pre TBTT work for USB

2019-03-18 Thread Stanislaw Gruszka
On Sat, Mar 16, 2019 at 08:44:21PM +0100, Felix Fietkau wrote: > On 2019-03-04 10:48, Stanislaw Gruszka wrote: > > Program beacons data and PS buffered frames on TBTT work for USB. > > We do not have MT_TXQ_PSD queue available via USB endpoints. The way > > we can send P

Re: [PATCH 08/11] mt76x02u: implement pre TBTT work for USB

2019-03-18 Thread Stanislaw Gruszka
On Mon, Mar 18, 2019 at 10:57:47AM +0100, Felix Fietkau wrote: > On 2019-03-18 10:50, Stanislaw Gruszka wrote: > > On Sat, Mar 16, 2019 at 08:44:21PM +0100, Felix Fietkau wrote: > >> On 2019-03-04 10:48, Stanislaw Gruszka wrote: > >> > Program beacons data and PS bu

Re: [PATCH 4/6] mt76: store software PN/IV in wcid

2019-03-18 Thread Stanislaw Gruszka
On Sat, Mar 16, 2019 at 09:42:40PM +0100, Felix Fietkau wrote: > Avoids expensive 64-bit atomic access in the data path > diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c > b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c > index d6e260ca1423..fb1961ac9dc6 100644 > --- a/drivers/net/

[PATCH v2 02/12] mt76x02: add hrtimer for pre TBTT for USB

2019-03-19 Thread Stanislaw Gruszka
Add timer and work for pre TBTT for USB devices. For now code doesn't do anyting useful, just add hrtimer which synchronize with hardware MT_TBTT_TIMER. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 3 + drivers/net/wireless/mediatek

[PATCH v2 00/12] mt76x02: AP support for USB with PS

2019-03-19 Thread Stanislaw Gruszka
/false bug in patch 3 - change beacon slot size for USB Stanislaw Gruszka (12): mt76x02: introduce mt76x02_beacon.c mt76x02: add hrtimer for pre TBTT for USB mt76x02: introduce beacon_ops mt76x02u: implement beacon_ops mt76x02: generalize some mmio beaconing functions mt76x02u: add

[PATCH v2 04/12] mt76x02u: implement beacon_ops

2019-03-19 Thread Stanislaw Gruszka
Add implementation of beacon_ops for USB and exit function to stop the timer if running when device is removed. Still no actual work on pre tbtt event. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c| 5 +--- drivers/net/wireless/mediatek/mt76

[PATCH v2 01/12] mt76x02: introduce mt76x02_beacon.c

2019-03-19 Thread Stanislaw Gruszka
Move most of beaconing code into separate file and separate beacon initialization for USB and MMIO as pre TBTT implementation for USB will be different. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/Makefile| 2 +- drivers/net/wireless/mediatek/mt76/mt76x0

[PATCH v2 05/12] mt76x02: generalize some mmio beaconing functions

2019-03-19 Thread Stanislaw Gruszka
Move some TBTT mmio functions to mt76x02_beacon.c and create new ones in order to be reused by USB pre-TBTT. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 11 +++ .../net/wireless/mediatek/mt76/mt76x02_beacon.c| 102 + drivers

[PATCH v2 08/12] mt76x02u: implement pre TBTT work for USB

2019-03-19 Thread Stanislaw Gruszka
TXWI is properly configured. mt76x02_mac_set_beacon() already handle this and free no longer used frames. Signed-off-by: Stanislaw Gruszka --- .../net/wireless/mediatek/mt76/mt76x02_beacon.c| 2 ++ .../net/wireless/mediatek/mt76/mt76x02_usb_core.c | 36 -- 2 files changed

[PATCH v2 10/12] mt76x02u: add mt76_release_buffered_frames

2019-03-19 Thread Stanislaw Gruszka
Create software MT_TXQ_PSD queue for USB and map it to MT_TXQ_VO since we do not have USB endpoint for PSD. This should make mt76_release_buffered_frames() work by sending released frames via MT_TXQ_VO. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c

[PATCH v2 07/12] mt76x02: disable HW encryption for group frames

2019-03-19 Thread Stanislaw Gruszka
This is required to sent multicast/broadcast frames in USB AP mode just after beacon. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b

[PATCH v2 11/12] mt76: unify set_tim

2019-03-19 Thread Stanislaw Gruszka
All mt76 drivers (now also USB drivers) require empty .set_tim callback. Add it to common mt76 module and use on all drivers. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mac80211.c| 7 +++ drivers/net/wireless/mediatek/mt76/mt76.h| 2

[PATCH v2 06/12] mt76x02u: add sta_ps

2019-03-19 Thread Stanislaw Gruszka
Add sta_ps callback but dont set WCID drop sicne registers for USB can not be accessed from tasklet context. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 1 + drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 3 ++- drivers/net/wireless/mediatek

[PATCH v2 03/12] mt76x02: introduce beacon_ops

2019-03-19 Thread Stanislaw Gruszka
Enabling/disableing TBTT and beacon will be diffrent for USB. Introduce beacon_ops to encapsulate that and implement it for MMIO. USB implementation is noop for now. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 8 drivers/net/wireless

[PATCH v2 09/12] mt76x02: make beacon slots bigger for USB

2019-03-19 Thread Stanislaw Gruszka
Since we sent PS buffered frames via beacon memory we need to make beacon slots bigger. That imply we will also need to decrease number of slots as beacon SRAM memory is limited to 8kB. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 3 +- .../net

[PATCH v2 12/12] mt76x02: enable AP mode for USB

2019-03-19 Thread Stanislaw Gruszka
Enable AP mode. For now without multi-vif support, this will require more testing and investigation. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76

Re: [RFC] mt76: usb: reduce locking in mt76u_tx_tasklet

2019-03-19 Thread Stanislaw Gruszka
On Mon, Mar 18, 2019 at 12:09:32PM +0100, Lorenzo Bianconi wrote: > Similar to pci counterpart, reduce locking in mt76u_tx_tasklet since > q->head is managed just in mt76u_tx_tasklet and q->queued is updated > holding q->lock > > Signed-off-by: Lorenzo Bianconi > --- > drivers/net/wireless/media

Re: [RFC] mt76: usb: reduce locking in mt76u_tx_tasklet

2019-03-19 Thread Stanislaw Gruszka
On Tue, Mar 19, 2019 at 01:58:13PM +0100, Lorenzo Bianconi wrote: > > On Mon, Mar 18, 2019 at 12:09:32PM +0100, Lorenzo Bianconi wrote: > > > Similar to pci counterpart, reduce locking in mt76u_tx_tasklet since > > > q->head is managed just in mt76u_tx_tasklet and q->queued is updated > > > holding

Re: [RFC] mt76: usb: reduce locking in mt76u_tx_tasklet

2019-03-20 Thread Stanislaw Gruszka
On Tue, Mar 19, 2019 at 05:23:25PM +0100, Lorenzo Bianconi wrote: > > On Tue, Mar 19, 2019 at 01:58:13PM +0100, Lorenzo Bianconi wrote: > > > > On Mon, Mar 18, 2019 at 12:09:32PM +0100, Lorenzo Bianconi wrote: > > > > > Similar to pci counterpart, reduce locking in mt76u_tx_tasklet since > > > > >

[PATCH 00/12] mt76usb: some cleanups and optimizations

2019-03-21 Thread Stanislaw Gruszka
ing https://lore.kernel.org/linux-wireless/20190316204242.73560-1-...@nbd.name/ It easer to rebase '[PATCH 5/6] mt76: move tx tasklet to struct mt76_dev' from that set of top of my 2 pending sets. Stanislaw Gruszka (12): mt76usb: change mt76u_submit_buf mt76: remove rx_page_loc

[PATCH 08/12] mt76usb: remove MT_RXQ_MAIN queue from mt76u_urb_alloc

2019-03-21 Thread Stanislaw Gruszka
Get the RX queue inside mt76u_refill_rx. This will allow to reuse mt76u_urb_alloc for TX allocations. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/usb.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless

[PATCH 07/12] mt76usb: remove mt76u_buf and use urb directly

2019-03-21 Thread Stanislaw Gruszka
Put urb pointer in mt76_queue_entry directly instead of mt76u_buf structure. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 6 +- drivers/net/wireless/mediatek/mt76/usb.c | 130 +++--- 2 files changed, 64 insertions(+), 72 deletions(-) diff

[PATCH 03/12] mt76usb: change mt76u_fill_rx_sg arguments

2019-03-21 Thread Stanislaw Gruszka
We do not need to pass len and sglen to the function. Additionally pass gfp to control allocation context. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/usb.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek

[PATCH 02/12] mt76: remove rx_page_lock

2019-03-21 Thread Stanislaw Gruszka
We can not run mt76u_alloc_buf() concurently, rx_tasklet is stooped when mt76u_submit_rx_buffers(). We can remove rx_page_lock. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 1 - drivers/net/wireless/mediatek/mt76/usb.c | 8 +--- 2 files changed, 1

[PATCH 06/12] mt76usb: move mt76u_buf->done to queue entry

2019-03-21 Thread Stanislaw Gruszka
mt76_queue_entry has alreay one bool variable, adding new one will not increase it's size. Removing ->done filed from mt76u_buf will allow to use urb directly in mt76usb code. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- drivers/net/wireless/

[PATCH 01/12] mt76usb: change mt76u_submit_buf

2019-03-21 Thread Stanislaw Gruszka
Remove unnecessery arguments and change the function name since is now used only for RX. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/usb.c | 30 ++-- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/mediatek

[PATCH 04/12] mt76usb: use usb_dev private data

2019-03-21 Thread Stanislaw Gruszka
Setup usb device private data. This allows to remove mt76u_buf->dev and simplify some routines as no longer we need to get usb device through usb interface. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 4 +--- drivers/net/wireless/mediatek/mt76/mt7

[PATCH 09/12] mt76usb: resue mt76u_urb_alloc for tx

2019-03-21 Thread Stanislaw Gruszka
Add new rx_urb_alloc routine and reuse common urb_alloc for tx allocations. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/usb.c | 35 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b

[PATCH 11/12] mt76usb: allocate urb and sg as linear data

2019-03-21 Thread Stanislaw Gruszka
Alloc sg table at the end of urb structure. This will increase cache usage. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/usb.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b

[PATCH 05/12] mt76usb: remove mt76u_buf redundant fileds

2019-03-21 Thread Stanislaw Gruszka
Remove mt76u_buf->{len, buf} fields and operate on corresponding urb fields directly. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 2 - drivers/net/wireless/mediatek/mt76/usb.c | 56 +-- 2 files changed, 31 insertions(+), 27 deleti

[PATCH 12/12] mt76usb: remove queue variable from rx_tasklet

2019-03-21 Thread Stanislaw Gruszka
Since now only mt76u_get_next_rx_entry use queue argument move it to this function. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net

[PATCH 10/12] mt76usb: remove unneded sg_init_table

2019-03-21 Thread Stanislaw Gruszka
We already allocate with GFP_ZERO and sg marker is set later for both RX and TX. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/usb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76

Re: [PATCH 03/12] mt76usb: change mt76u_fill_rx_sg arguments

2019-03-22 Thread Stanislaw Gruszka
On Fri, Mar 22, 2019 at 11:10:40AM +0100, Lorenzo Bianconi wrote: > > We do not need to pass len and sglen to the function. > > Additionally pass gfp to control allocation context. > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/n

Re: [PATCH] mt76: usb: reduce locking in mt76u_tx_tasklet

2019-03-25 Thread Stanislaw Gruszka
On Sun, Mar 24, 2019 at 03:51:43PM +0100, Lorenzo Bianconi wrote: > + int idx; > + > sq = &dev->q_tx[i]; > q = sq->q; > > - spin_lock_bh(&q->lock); > - while (true) { > - if (!q->entry[q->head].done || !q->queued)

Re: [PATCH] mt76: usb: reduce locking in mt76u_tx_tasklet

2019-03-25 Thread Stanislaw Gruszka
On Mon, Mar 25, 2019 at 02:00:36PM +0100, Lorenzo Bianconi wrote: > > On Sun, Mar 24, 2019 at 03:51:43PM +0100, Lorenzo Bianconi wrote: > > > + int idx; > > > + > > > sq = &dev->q_tx[i]; > > > q = sq->q; > > > > > > - spin_lock_bh(&q->lock); > > > - whi

Re: [PATCH 2/2] rt2x00: enable experimental MFP with HW crypt

2019-03-25 Thread Stanislaw Gruszka
On Thu, Mar 14, 2019 at 03:02:14PM +0100, Tom Psyborg wrote: > On 13/03/2019, Stanislaw Gruszka wrote: > > > > > There should be no difference between enabling MFP with nohwcrypt and > > without nohwcrypt, > > well there is. do you still want me to resend this with

Re: [PATCH] mt76: usb: reduce locking in mt76u_tx_tasklet

2019-03-25 Thread Stanislaw Gruszka
On Mon, Mar 25, 2019 at 02:47:35PM +0100, Lorenzo Bianconi wrote: > > On Mon, Mar 25, 2019 at 02:00:36PM +0100, Lorenzo Bianconi wrote: > > > > On Sun, Mar 24, 2019 at 03:51:43PM +0100, Lorenzo Bianconi wrote: > > > > > + int idx; > > > > > + > > > > > sq = &dev->q_tx[i];

Re: [PATCH 2/2] rt2x00: enable experimental MFP with HW crypt

2019-03-25 Thread Stanislaw Gruszka
On Tue, Mar 26, 2019 at 02:54:25AM +0100, Tom Psyborg wrote: > On 25/03/2019, Stanislaw Gruszka wrote: > > On Thu, Mar 14, 2019 at 03:02:14PM +0100, Tom Psyborg wrote: > >> On 13/03/2019, Stanislaw Gruszka wrote: > >> > >> > > >> > Ther

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

2019-03-26 Thread Stanislaw Gruszka
ian Norris I also tested on RTL8822CE we generously got from Tony. I replaced wifi card on my laptop by the 8822CE device. I have warning on resume from suspend (see below, it could be mac80211 issue though). But network connection was established after the warning and in general device works st

Re: [PATCH 2/2] rt2x00: enable experimental MFP with HW crypt

2019-03-26 Thread Stanislaw Gruszka
On Tue, Mar 26, 2019 at 11:41:37AM +0100, Felix Fietkau wrote: > On 2019-03-13 15:41, Tom Psyborg wrote: > > On 13/03/2019, Stanislaw Gruszka wrote: > >> On Wed, Mar 13, 2019 at 02:48:01PM +0100, Tom Psyborg wrote: > >>> On 13/03/2019, Stanislaw Gruszka wrote: >

[PATCH 1/8] rt2800: partially restore old mmio txstatus behaviour

2019-03-27 Thread Stanislaw Gruszka
xdone/txstatus routines from lib"). Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 30 +++-- drivers/net/wireless/ral

[PATCH 0/8] rt2x00: performance fixes for mmio

2019-03-27 Thread Stanislaw Gruszka
in changlogs Stanislaw Gruszka (8): rt2800: partially restore old mmio txstatus behaviour rt2800: new flush implementation for SoC devices rt2800: move txstatus pending routine rt2800mmio: fetch tx status changes rt2800mmio: use timer and work for handling tx statuses timeouts r

[PATCH 3/8] rt2800: move txstatus pending routine

2019-03-27 Thread Stanislaw Gruszka
Move rt2800usb_txstatus_pending routine to rt2800lib. It will be reused by rt2800mmio code. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 17 + drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 1 + drivers/net/wireless/ralink/rt2x00

[PATCH 2/8] rt2800: new flush implementation for SoC devices

2019-03-27 Thread Stanislaw Gruszka
Use new flush_queue() callback for SoC devices, what was already done for PCIe devices. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c b

[PATCH 7/8] rt2x00: remove not used entry field

2019-03-27 Thread Stanislaw Gruszka
Remove not used any longer queue_entry field and flag. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.h

[PATCH 6/8] rt2x00: remove last_nostatus_check

2019-03-27 Thread Stanislaw Gruszka
We do not any longer check txstatus timeout from tasklet, so do not need this optimization. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 - drivers/net/wireless/ralink/rt2x00/rt2x00.h | 2 -- drivers/net/wireless/ralink/rt2x00

[PATCH 4/8] rt2800mmio: fetch tx status changes

2019-03-27 Thread Stanislaw Gruszka
Prepare to use rt2800mmio_fetch_txstatus() in concurrent manner and drop return value since is not longer needed. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH 8/8] rt2x00mmio: remove legacy comment

2019-03-27 Thread Stanislaw Gruszka
Remove comment about fields that were removed. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2x00mmio.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00mmio.h b/drivers/net/wireless/ralink/rt2x00/rt2x00mmio.h index

[PATCH 5/8] rt2800mmio: use timer and work for handling tx statuses timeouts

2019-03-27 Thread Stanislaw Gruszka
. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 81 +++-- drivers/net/wireless/ralink/rt2x00/rt2800mmio.h | 1 + drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 2 +- drivers

[PATCH 5.1] rt2x00: do not increment sequence number while re-transmitting

2019-03-27 Thread Stanislaw Gruszka
88:6a:e3:e8:f9:a2 8c:f5:a3:88:76:87 Authentication, SN=1450, FN=0, Flags=R...C Cc: sta...@vger.kernel.org Signed-off-by: Vijayakumar Durai [sgruszka: simplify code, change comments and changelog] Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1

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

2019-03-27 Thread Stanislaw Gruszka
issue though). But network > > > connection was established after the warning and in general device > > > works stable for 2 days now. > > > > > > Tested-by: Stanislaw Gruszka > > > > > > [16158.826873] rtw_pci :02:00.0:

[PATCH 4.20, 5.0] mt76x02u: use usb_bulk_msg to upload firmware

2019-03-28 Thread Stanislaw Gruszka
igned-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 13 ++ .../net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | 52 +++--- drivers/net/wireless/mediatek/mt76/usb.c | 1 - 3 files changed, 29 insertions(+), 37 deletions(-) diff --

Re: [PATCH v2 01/12] mt76x02: introduce mt76x02_beacon.c

2019-04-03 Thread Stanislaw Gruszka
On Wed, Apr 03, 2019 at 11:08:53AM +0200, Felix Fietkau wrote: > On 2019-03-19 11:37, Stanislaw Gruszka wrote: > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c > > b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c > > index ec94d612f53c..75dcd059 100

[PATCH 5.1] mt76x02: avoid status_list.lock and sta->rate_ctrl_lock dependency

2019-04-05 Thread Stanislaw Gruszka
? wq_calc_node_cpumask+0x70/0x70 [ 440.225360] kthread+0x11d/0x140 [ 440.225362] ? kthread_create_on_node+0x40/0x40 [ 440.225363] ret_from_fork+0x3a/0x50 Cc: sta...@vger.kernel.org Fixes: 88046b2c9f6d ("mt76: add support for reporting tx status with skb") Signed-off-by: Stanislaw Gru

Re: [PATCH v2 00/17] mt76 patches 2018-08-24 v2

2018-08-29 Thread Stanislaw Gruszka
Hi Sid On Wed, Aug 29, 2018 at 02:26:44AM +, Sid Hayn wrote: > Thanks for working on this, I have a small stack of different devices > covered by this driver which I'm excited to test with. > > I'm running wireless-testing which may or may not be fully up to date > on the patches you have sen

[PATCH v3 01/16] mt76: unify wait_for_mac

2018-08-29 Thread Stanislaw Gruszka
Create new mt76x02_mac.h for common mac functions of mt76x0 and mt76x2 and unity wait_for_mac for both drivers. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 11 +++--- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 3 +- drivers/net/wireless

[PATCH v3 02/16] mt76: rename mt76x2_regs.h

2018-08-29 Thread Stanislaw Gruszka
MAC registers are the same for mt76x0 and mt76x2. Rename mt76x2_regs.h file to reflect that. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_regs.h | 619 ++ drivers/net/wireless/mediatek/mt76/mt76x2.h | 2 +- drivers/net/wireless

[PATCH v3 00/16] mt76 patches 2018-08-24 v3

2018-08-29 Thread Stanislaw Gruszka
eflect that common code is for mt76x0 and mt76x2 only, not for new chips. - fixup 'stucture typo' in one patch Stanislaw Gruszka (17): mt76: unify wait_for_mac mt76: rename mt76x2_regs.h mt76: merge mt76x0/regs.h into mt76x02_regs.h mt76: create new mt76x02-lib module for common

[PATCH v3 03/16] mt76: merge mt76x0/regs.h into mt76x02_regs.h

2018-08-29 Thread Stanislaw Gruszka
Add missed definitions for mt76x0 into mt76x02_regs.h. Remove mt76x0/regs.h and fixup mt76x0 code to adjust to some diffrent registers/fields names. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 16 +- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c

[PATCH v3 04/16] mt76: create new mt76x02-lib module for common mt76x{0,2} code

2018-08-29 Thread Stanislaw Gruszka
Move rxfilter and mutex to common structure. Create mt76x02-lib.ko for mt76x0 and mt76x2 common functions and create new unified mt76x02_configure_filter() function there. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/Kconfig | 6 ++ drivers/net/wireless

[PATCH v3 09/16] mt76: unify mac_wcid_setup

2018-08-29 Thread Stanislaw Gruszka
Merge mt76x{0,2}_mac_wcid_setup into common code. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 17 drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 2 -- drivers

[PATCH v3 11/16] mt76x0: use mt76_wcid_free in mt76x0

2018-08-29 Thread Stanislaw Gruszka
Use helper from util instead of custom code. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0

[PATCH v3 12/16] mt76: unify mt76x02_vif struct

2018-08-29 Thread Stanislaw Gruszka
Private vif structures definitions are the same for mt76x2 and mt76x0. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c| 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/main.c| 8 drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h

[PATCH v3 06/16] mt76: add helpers for register access with mt76_dev struct

2018-08-29 Thread Stanislaw Gruszka
Add helpers for register access from common code. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 79017dbd364d

[PATCH v3 07/16] mt76: unify mac_shared_key_setup

2018-08-29 Thread Stanislaw Gruszka
Merge mt76x{0,2} mac_shared_key_setup into common code. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 24 -- drivers/net/wireless/mediatek/mt76/mt76x0/mac.h| 2 -- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 2

[PATCH v3 14/16] mt76: unify sta structure part 2

2018-08-29 Thread Stanislaw Gruszka
Second part of unifying mt76x02_sta structure between mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 7 +++ drivers/net/wireless/mediatek/mt76/mt76x2.h | 20 +++- drivers/net/wireless/mediatek/mt76

[PATCH v3 13/16] mt76: unify sta structure part 1

2018-08-29 Thread Stanislaw Gruszka
First part of unifying mt76x02_sta structure between mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 25 + drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 21 + drivers/net/wireless/mediatek

[PATCH v3 10/16] mt76: use mac_wcid_set_drop in mt76x0

2018-08-29 Thread Stanislaw Gruszka
Move mt76x02_mac_wcid_set_drop to common code and use it in mt76x0. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 11 +++ drivers/net/wireless/mediatek/mt76/mt76x02_mac.h

[PATCH v3 15/16] mt76x0: initalize custom tx queues

2018-08-29 Thread Stanislaw Gruszka
Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c index 1cf06bffaa71..fd92a67dc379 100644 --- a

[PATCH v3 08/16] mt76: unify mac_wcid_set_key

2018-08-29 Thread Stanislaw Gruszka
Merge mt76x{0,2}_mac_wcid_set_key into common code. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 3 ++ drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 41 -- drivers/net/wireless/mediatek/mt76/mt76x0/mac.h| 2

[PATCH v3 05/16] mt76: unify mac_get_key_info

2018-08-29 Thread Stanislaw Gruszka
Merge mt76x{0,2} mac_get_key_info into new mt76x02_mac.c file. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/Makefile| 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 30 +- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 46

[PATCH v3 16/16] mt76x0: use mt76x02_sta and mt76x02_tx_status

2018-08-29 Thread Stanislaw Gruszka
Use common mt76x02_sta and mt76x02_tx_status structures in mt76x0 sub-driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 14 +++--- drivers/net/wireless/mediatek/mt76/mt76x0/mac.h

Re: [PATCH v2 00/17] mt76 patches 2018-08-24 v2

2018-08-30 Thread Stanislaw Gruszka
On Wed, Aug 29, 2018 at 06:10:01PM +, Sid Hayn wrote: > I rebuilt wireless-testing (which updated today) with > CONFIG_DEBUG_KMEMLEAK=y. I am still able to replicate the issue, and > presently have 4 devices in the "No space left on device" state. > > This is from /sys/kernel/debug/kmemleak:

Re: [PATCH 00/16] unify usb mcu layer between mt76x2u and mt76x0u drivers

2018-08-31 Thread Stanislaw Gruszka
mt76x0_mcu structure > mt76x0: use mt76u_mcu_fw_send_data for fw uploading > mt76x0: remove unused routines for usb_buff alloc/free For the series: Reviewed-by: Stanislaw Gruszka

Re: [PATCH v2 00/17] mt76 patches 2018-08-24 v2

2018-09-01 Thread Stanislaw Gruszka
On Wed, Aug 29, 2018 at 02:26:44AM +, Sid Hayn wrote: > dhcpcd_prestartinterface: t2uh: No space left on device > t2uh: waiting for carrier > > the same happens with just ifconfig up: > > SIOCSIFFLAGS: No space left on device I think I found bug that could result in this. Please test below p

[PATCH 4.19] mt76x0: fix remove_interface

2018-09-03 Thread Stanislaw Gruszka
We wrongly use wcid_mask instead of vif_mask Fixes: 95e444098a7b ("mt76x0: main file") Reported-and-tested-by: Sid Hayn Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/d

Re: [PATCH 4.19] mt76x0: fix remove_interface

2018-09-04 Thread Stanislaw Gruszka
On Mon, Sep 03, 2018 at 09:36:37AM -0400, Sid Hayn wrote: > Best I can say is that it seemed to happen after a failed connection. It > would connect and disconnect a few times and work fine, but if it failed to > connect for any reason (mostly mismatched settings between AP and > wpa_supplicant.co

[PATCH 03/22] mt76: pratially unify add_interface

2018-09-04 Thread Stanislaw Gruszka
Create common mt76x02_vif_init function and use int on drivers add_interface callback. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 7 +-- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 9 - drivers/net/wireless/mediatek/mt76

[PATCH 02/22] mt76: unify sta_add / sta_remove

2018-09-04 Thread Stanislaw Gruszka
Merge mt76x0 and mt76x0 sta add/remove callback. We drop mt76x0_mac_set_ampdu_factor() for now. Need to consider to add it to common code, but mt76x2 don't do it so perhaps mt76x0 don't need it as well. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mai

[PATCH 01/22] mt76: move wcid fields to common mt76_dev struct

2018-09-04 Thread Stanislaw Gruszka
All current MT devices including new MT7603 type chips support 128 WCIDs, we can unify wcid data in common mt76_dev structure. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 7 +++ drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 22

[PATCH 00/22] mt76 patches 2018-09-04

2018-09-04 Thread Stanislaw Gruszka
: "mt76x0: fix wrong usage of wcid_mask in remove_interface" patch with I posted as fix for 4.19 . I assume this will be auto (or manually?) merged when -next will go to 4.20. Stanislaw Gruszka (22): mt76: move wcid fields to common mt76_dev struct mt76: unify sta_add / sta_rem

[PATCH 04/22] mt76x0: fix wrong usage of wcid_mask in remove_interface

2018-09-04 Thread Stanislaw Gruszka
We wrongly use wcid_mask instead of vif_mask Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0

[PATCH 05/22] mt76: unify ampdu_action

2018-09-04 Thread Stanislaw Gruszka
Use mt76x2_ampdu_action as common function, mt76x0 ampdu_action was diffrent, but mt76x2 version should work for this driver as well. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 3 ++ drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 45

[PATCH 07/22] mt76x0: remove empty sta_notify

2018-09-04 Thread Stanislaw Gruszka
Remove empty implementation of sta_notify. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c index

[PATCH 06/22] mt76: unify set_key

2018-09-04 Thread Stanislaw Gruszka
Merge mt76x0 and mt76x2 set_key mac80211 callback. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 37 +--- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 67 ++ drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 4

[PATCH 08/22] mt76: unify AC to hw queue mapping

2018-09-04 Thread Stanislaw Gruszka
Use the same AC to hardware queue mappings for all subdrivers. Note: this change BK and BE mappings for USB drivers. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 8 +--- drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 4 ++-- drivers/net

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