Re: [PATCH v2 00/12] Add mt76x0 driver

2018-07-23 Thread Stanislaw Gruszka
Hi On Mon, Jul 23, 2018 at 11:16:25AM +0200, Lorenzo Bianconi wrote: > > I'm not sure if it can be got from the market easily. > > > > I would like to say, mt7668 is based on new MTK wifi architecture. as > > for mt7662/mt7612/mt7610, they all belong to legacy Ralink based design. > > of course,

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

[PATCH 11/42] mt76x0: disable usb rx bulk aggregation

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi In order to use zero-copying, disable usb rx bulk aggregation Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 17/42] mt76x0: set max fragments size

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Set maximum number of tx fragments according to usb controller features Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless

[PATCH 14/42] mt76x0: add mt76x0_queue_rx_skb routine

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Introduce mt76x0_queue_rx_skb routine as mt76x0 driver frame rx handler. mt76x0_queue_rx_skb will be run by mt76-usb layer rx datapath Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 3

[PATCH 10/42] mt76x0: use mt76_alloc_device for device allocation

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Use mt76_alloc_device utility routine for mt76x0_dev/mt76_dev allocation Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions

[PATCH 13/42] mt76x0: simplify mt76_mac_process_rx signature

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Remove data pointer from mt76_mac_process_rx routine signature Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/dma.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c | 4 ++-- drivers/net/wireless

[PATCH 19/42] mt76x0: remove unused stat work_queue

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Remove unused tx_status workqueue since now tx feedbacks are processed by mt76-usb layer Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 7 - drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0

[PATCH 15/42] mt76x0: unify tx/rx datapath with mt76x2u driver

2018-09-06 Thread Stanislaw Gruszka
-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 9 ++--- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c | 8 - drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 46 +++- 3 files changed, 25 insertions(+), 38

[PATCH 18/42] mt76x0: remove unused dma.c source file

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Remove unused dma.c source file since dma related routines are no longer used Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/dma.c| 526

[PATCH 06/42] mt76: move mt76x2u_set_txinfo in mt76x02-lib module

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Move mt76x2u_set_txinfo routine in mt76x02-lib module and rename it in mt76x02_set_txinfo in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 21

[PATCH 05/42] mt76: move mt76_qsel definition in dma.h

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Move mt76_qsel definition in dma.h in order to be reused in mt76x0 driver. Moreover remove empty mt76x2_dma.h header file Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/dma.h | 7 ++ drivers/net

[PATCH 02/42] mt76: move mt76x2_tx_complete routine in mt76x02-lib module

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Move mt76x2_tx_complete routine in mt76x02-lib module and rename it in mt76x02_tx_complete in order to be used in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 15

[PATCH 08/42] mt76: move mt76x2u_tx_status_data in mt76x02-lib module

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Move mt76x2u_tx_status_data routine in mt76x02-lib module and rename it in mt76x02_tx_status_data in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 13

[PATCH 04/42] mt76: move mt76x2u_tx_complete_skb in mt76x02-lib moudule

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Move mt76x2u_tx_complete_skb routine in mt76x02-lib module and rename it in mt76x02_tx_complete_skb in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 8

[PATCH 00/42] mt76 patches 2018-09-06

2018-09-06 Thread Stanislaw Gruszka
of mt76x0_eeprom_params mt76x0: use mt76_register_device for device registration Stanislaw Gruszka (7): mt76x0: trim rx skb to proper length mt76x0: inital split between pci and usb mt76: initial separation of mmio part mt76: move some irq code to common mmio module mt76x0: remove unused

[PATCH 09/42] mt76x0: init mt76_driver_ops callbacks

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Init mt76_driver_ops callbacks in mt76x0_alloc_device. mt76_driver_ops callbacks will be used by mt76-usb module Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 9 - 1 file changed, 8

[PATCH 03/42] mt76: move mt76x2u_remove_dma_hdr in mt76x02-lib module

2018-09-06 Thread Stanislaw Gruszka
-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/tx.c| 14 +- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 12 drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2u_core.c | 14

Re: [PATCH 39/42] mt76: move some irq code to common mmio module

2018-09-06 Thread Stanislaw Gruszka
On Thu, Sep 06, 2018 at 11:33:55AM +0200, Felix Fietkau wrote: > On 2018-09-06 11:18, Stanislaw Gruszka wrote: > > Move some irq handling code to generic mmio module. > > > > Signed-off-by: Stanislaw Gruszka > Please drop this patch. This won't work on MT7603 and

[PATCH] mt76: fix return value of mt76x02_wait_for_mac

2018-09-06 Thread Stanislaw Gruszka
We need to return bool value in mt76x02_wait_for_mac. Reported-by: Dan Carpenter Fixes: 2735a6dd7df3 ("mt76: unify wait_for_mac") Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: mt76x0 bug report

2018-09-06 Thread Stanislaw Gruszka
On Wed, Sep 05, 2018 at 08:52:18PM +, Sid Hayn wrote: > On Tue, Sep 4, 2018 at 5:11 PM Lorenzo Bianconi > wrote: > > > > > > > > I have one mt76x2u (Alfa AWUS036ACM) and a few mt76x0. > > > > > > I've noticed two additional issues in my testing. > > > > > > First issue, is that it appears the

[PATCH 18/22] mt76: use mt76_rx_status in mt76x0

2018-09-04 Thread Stanislaw Gruszka
Make rx status processing similar to mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mac80211.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt76x0/dma.c | 2 ++ drivers/net/wireless/mediatek/mt76/mt76x0

[PATCH 21/22] mt76: unify {insert/remove}_hdr_pad

2018-09-04 Thread Stanislaw Gruszka
Merge insert/remove _hdr_pad from mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 4 --- drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 5 +-- drivers/net/wireless

[PATCH 19/22] mt76: unify mac_process_rate

2018-09-04 Thread Stanislaw Gruszka
Merge mac_process_rate from mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 69 +- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 68 + drivers/net/wireless/mediatek/mt76/mt76x02_mac.h

[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

[PATCH 12/22] mt76: unify remove_interface

2018-09-04 Thread Stanislaw Gruszka
Use common remove_interface callback in mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 10 +- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 9 + drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 2

[PATCH 14/22] mt76: unify sta_rate_tbl_update and related helpers

2018-09-04 Thread Stanislaw Gruszka
Use common sta_rate_tbl_update on mt76x0 and mt76x2. mt76x0 do not have support TPC (transmision power control) implmented, msta->wcid.max_txpwr_adj is only set for mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 2 + drivers/net/wirel

[PATCH 10/22] mt76: unify conf_tx

2018-09-04 Thread Stanislaw Gruszka
Use one conf_tx implementation in mt76x0 and mt76x2. Note this change conf_tx for mt76x0, but it should work with mt76x2 version. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 2 - drivers

[PATCH 09/22] mt76: remove q->hw_idx

2018-09-04 Thread Stanislaw Gruszka
We use q->hw_idx in very few places, remove it and provide hwq index by diffrent way. This will allow ot unify conf_tx mac80211 callback. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 1 - drivers/net/wireless/mediatek/mt76/mt76x2_common.c

[PATCH 13/22] mt76: unify add_interface

2018-09-04 Thread Stanislaw Gruszka
Make common add_interface for mt76x0 and mt76x2e. This change behavior for mt76x0, but it should work with the new implementation. mt76x2u has different implementation. Maybe it can use common one, but for now leave it as is. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek

[PATCH 17/22] mt76: unify send_tx_status and related helpers

2018-09-04 Thread Stanislaw Gruszka
Merge send_tx_status and helper functions from mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 147 drivers/net/wireless/mediatek/mt76/mt76x0/mac.h| 4 - drivers/net/wireless/mediatek/mt76/mt76x0/tx.c

[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 15/22] mt76: unify txwi and rxwi structures

2018-09-04 Thread Stanislaw Gruszka
txwi and rxwi are the same for mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/dma.c| 12 ++-- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 4 +- drivers/net/wireless/mediatek/mt76/mt76x0/mac.h| 67

[PATCH 11/22] mt76x0: remove vif_mask

2018-09-04 Thread Stanislaw Gruszka
Make remove_interface more similar to mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 11 +-- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 2 -- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/wireless

[PATCH 16/22] mt76: unify load_tx_status

2018-09-04 Thread Stanislaw Gruszka
Unify load/fetch tx status from mt76x0 and mt76x2 Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c| 21 -- drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 3 +-- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 25

[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 20/22] mt76x0: reserve enough space in mac80211

2018-09-04 Thread Stanislaw Gruszka
Allocate skg with enough headroom by mac80211 , this eliminate need to add extra skb headroom by the mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 17 + 2 files

[PATCH 22/22] mt76: partially unify filling txwi fields

2018-09-04 Thread Stanislaw Gruszka
Merge code filing txwi fields the same way on mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 44 ++ drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 42 + drivers/net/wireless/mediatek/mt76

[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/main.c | 61

[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 24/42] mt76x0: enable per-sta tx queueing

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Initialize wake_tx_queue function pointer in ieee80211_ops in order to enable per-sta tx queueing. Moreover set driver private txq size Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 3

[PATCH 33/42] mt76x0: move mt76x0_init_hardware in mt76x0_register_device

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Move mt76x0_init_hardware routine in mt76x0_register_device during hw probe. This is a preliminary patch to avoid {tx/rx} buffer allocation during resume/suspend Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76

[PATCH 37/42] mt76x0: inital split between pci and usb

2018-09-06 Thread Stanislaw Gruszka
For now pci driver can read ASIC version from the device :-) Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/Kconfig | 23 -- drivers/net/wireless/mediatek/mt76/Makefile| 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 11 ++- drivers/net

[PATCH 40/42] mt76x0: remove unused mt76x0_wcid

2018-09-06 Thread Stanislaw Gruszka
We do not use mt76x0_wcid any longer. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h

[PATCH 39/42] mt76: move some irq code to common mmio module

2018-09-06 Thread Stanislaw Gruszka
Move some irq handling code to generic mmio module. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mmio.c| 15 +++ drivers/net/wireless/mediatek/mt76/mmio.h| 34 drivers/net/wireless/mediatek/mt76/mt76.h| 3

[PATCH 38/42] mt76: initial separation of mmio part

2018-09-06 Thread Stanislaw Gruszka
Create mt76_mmio module to contain generic mt76 PCEe/SOC code. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/Kconfig | 8 ++- drivers/net/wireless/mediatek/mt76/Makefile | 8 +-- drivers/net/wireless/mediatek/mt76/dma.c| 68

[PATCH 36/42] mt76x0: use mt76_register_device for device registration

2018-09-06 Thread Stanislaw Gruszka
. Moreover remove following unused routines: - mt76_init_sband - mt76_init_sband_2g - mt76_init_sband_5g Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 13 +- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 187

[PATCH 41/42] mt76x0: remove some usb specific code from mt76x0_register_device

2018-09-06 Thread Stanislaw Gruszka
Initial effort to make mt76x0_register_device bus neutral. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 8 drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 12 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git

[PATCH 42/42] mt76x0: make device allocation bus neutral

2018-09-06 Thread Stanislaw Gruszka
Remove some USB specific code form mt76x0_alloc_device. 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/mediatek/mt76/mt76x0/pci.c| 2 +- drivers/net

[PATCH 32/42] mt76x0: move stop related routines in mt76x0_mac_stop

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Move tear-down routines in mt76x0_mac_stop function. mt76x0_mac_stop routines will be reused in mt76x0_suspend Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 3 +++ drivers/net/wireless/mediatek

[PATCH 27/42] mt76: remove unused MT76_MORE_STATS state

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Remove no longer used hw state Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek

[PATCH 26/42] mt76x0: trim rx skb to proper length

2018-09-06 Thread Stanislaw Gruszka
We need to truncate skb to proper length. This fix below message: wlan0: associating with AP with corrupt beacon and probe response Fixes: 9d87d9fad47e ("mt76x0: unify tx/rx datapath with mt76x2u driver") Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0

[PATCH 07/42] mt76x0: introduce mt76x0_tx_prepare_skb routine

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Add mt76x0_tx_prepare_skb routine as tx txwi handler. mt76x0_tx_prepare_skb will be used by mt76-usb layer Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 5 - drivers/net/wireless/mediatek

[PATCH 29/42] mt76: move mt76 rate definitions in mt76x02-lib module

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Move mt76x2_rate definition in mt76x02-lib module and rename it in mt76x02_rates in order to be reused in mt76x0 driver. Moreover remove unused mt76_rate definition Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76

[PATCH 30/42] mt76x0: alloc mcu buffers first in mt76x0_mcu_cmd_init

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi swap mt76u_mcu_init_rx and mt76x0_mcu_function_select in mt76x0_mcu_cmd_init routine in order to allocate mcu buffers first and then send mcu commands Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c

[PATCH 35/42] mt76x0: remove has_{2,5}ghz fields of mt76x0_eeprom_params

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Remove has_2ghz/has_5ghz fields of mt76x0_eeprom_params data structure and use mt76_dev ones. This is a preliminary patch to use shared routines for device allocation Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek

[PATCH 34/42] mt76x0: do not free/alloc buffers during suspend/resume

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Do not free/alloc {tx,rx} buffers during suspend/resume phases but use the ones previously allocated during hw probe. Move {tx,rx}/mcu buffers allocation from mt76x0_init_hardware routine to mt76x0_register_device Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw

[PATCH 01/42] mt76x2: change mt76x2_tx_complete routine signature

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Use mt76_dev instead of mt76x2_dev in mt76x2_tx_complete signature in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x2.h | 2 +- drivers/net/wireless/mediatek

[PATCH 25/42] mt76x0: init hw capabilities

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Enable hw capabilities supported by mt76-usb layer - fast_xmit - tx/rx amsdu - MFP - non-linear tx skbs Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 7 +++ 1 file changed, 7 insertions

[PATCH 23/42] mt76x0: remove unused stat_work

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Remove unused definition of stat_work delayed_work definition and related flush/cancel routines Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 2 -- drivers/net/wireless/mediatek/mt76/mt76x0

[PATCH 12/42] mt76x0: mark device as running in mt76x0_start

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Set MT76_STATE_RUNNING flag in mt76x0_start routine and clear it in mt76x0_stop one Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers

[PATCH 21/42] mt76x0: remove unused mt76x0_tx_status routine

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Remove no longer used mt76x0_tx_status routine since mt76x0 driver uses mt76-usb utility routines to report tx-feedbacks Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 1 - drivers/net/wireless

[PATCH 16/42] mt76x0: stop stat workqueue at hw stop

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Cancel tx status workqueue during vif teardown Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b

[PATCH 20/42] mt76x0: remove unused {tx/rx}_queue definitions

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Remove unused tx_queue and rx_queue definitions since now mt76x0 driver uses mt76-usb {tx/rx}_queues Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 2 - drivers/net/wireless/mediatek/mt76

[PATCH 22/42] mt76x0: remove unused endpoint definitions

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi remove unused usb endpoint definitions since mt76x0 uses mt76-usb ones. Moreover remove unused usb_ctrl mutex Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 1 - drivers/net/wireless/mediatek

[PATCH 31/42] mt76x0: fix memory leak during hw probe

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Fix memory leak during hw probe if mt76x0_register_device fails since MT76_STATE_INITIALIZED has not set yet and mt76x0_cleanup does not free tx/rx queues and mcu buffers Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek

[PATCH 28/42] mt76x0: remove mt76x0_stop_hardware routine

2018-09-06 Thread Stanislaw Gruszka
From: Lorenzo Bianconi Since it is actually used in a single place and it just runs mt76x0_chip_onoff routine, remove mt76x0_stop_hardware and use mt76x0_chip_onoff directly Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c

Re: [PATCH 39/42] mt76: move some irq code to common mmio module

2018-09-06 Thread Stanislaw Gruszka
On Thu, Sep 06, 2018 at 11:47:53AM +0200, Lorenzo Bianconi wrote: > > > > On 2018-09-06 11:37, Lorenzo Bianconi wrote: > > >> > > >> On 2018-09-06 11:18, Stanislaw Gruszka wrote: > > >> > Move some irq handling code to generic mmio module.

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

2018-08-31 Thread Stanislaw Gruszka
; 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-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

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 >

[PATCH 03/11] mt76x0: mac files

2018-07-05 Thread Stanislaw Gruszka
Add mac files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c | 661 drivers/net/wireless/mediatek/mt76/mt76x0/mac.h | 154 ++ 2 files changed, 815 insertions(+) create mode 100644 drivers/net/wireless/mediatek

[PATCH 02/11] mt76x0: core files

2018-07-05 Thread Stanislaw Gruszka
Core files of mt76x0 driver. mt76x0 driver adds support for Mediatek MT7610U based USB Wi-Fi dongles. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/core.c | 34 ++ drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 376 drivers/net/wireless

[PATCH 01/11] mt76: add more states

2018-07-05 Thread Stanislaw Gruszka
Add states needed for mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 96e9798bb8a0..7b50d4b7f40e

[PATCH 04/11] mt76x0: usb files

2018-07-05 Thread Stanislaw Gruszka
Add usb files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 377 drivers/net/wireless/mediatek/mt76/mt76x0/usb.h | 61 2 files changed, 438 insertions(+) create mode 100644 drivers/net/wireless/mediatek

[PATCH 00/11] Add mt76x0 driver

2018-07-05 Thread Stanislaw Gruszka
with the permission of Mediatek, the blob will be pushed into linux-firmware git tree. Stanislaw Gruszka (11): mt76: add more states mt76x0: core files mt76x0: mac files mt76x0: usb files mt76x0: mcu files mt76x0: phy files mt76x0: init files mt76x0: eeprom files mt76x0: trace and debugfs files

[PATCH 07/11] mt76x0: init files

2018-07-05 Thread Stanislaw Gruszka
Add init files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 720 + .../net/wireless/mediatek/mt76/mt76x0/initvals.h | 282 2 files changed, 1002 insertions(+) create mode 100644 drivers/net/wireless

[PATCH 06/11] mt76x0: phy files

2018-07-05 Thread Stanislaw Gruszka
Add phy files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- .../wireless/mediatek/mt76/mt76x0/initvals_phy.h | 772 +++ drivers/net/wireless/mediatek/mt76/mt76x0/phy.c| 1007 drivers/net/wireless/mediatek/mt76/mt76x0/phy.h| 81 ++ 3 files

[PATCH 08/11] mt76x0: eeprom files

2018-07-05 Thread Stanislaw Gruszka
Add eeprom files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 445 + drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h | 149 +++ 2 files changed, 594 insertions(+) create mode 100644 drivers/net/wireless

[PATCH 05/11] mt76x0: mcu files

2018-07-05 Thread Stanislaw Gruszka
Add mcu files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c | 650 drivers/net/wireless/mediatek/mt76/mt76x0/mcu.h | 101 2 files changed, 751 insertions(+) create mode 100644 drivers/net/wireless/mediatek

[PATCH 10/11] mt76x0: dma and tx files

2018-07-05 Thread Stanislaw Gruszka
Add dma and tx files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/dma.c | 522 drivers/net/wireless/mediatek/mt76/mt76x0/dma.h | 126 ++ drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 270 3 files

[PATCH 11/11] mt76: Kconfig and Makefile for mt76x0 driver

2018-07-05 Thread Stanislaw Gruszka
Add Kconfig and Makefiles for mt76x0 driver. Now the driver can be build. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/Kconfig | 7 +++ drivers/net/wireless/mediatek/mt76/Makefile| 1 + drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 7

[PATCH 09/11] mt76x0: trace and debugfs files

2018-07-05 Thread Stanislaw Gruszka
Add trace and debugfs files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- .../net/wireless/mediatek/mt76/mt76x0/debugfs.c| 166 ++ drivers/net/wireless/mediatek/mt76/mt76x0/trace.c | 21 ++ drivers/net/wireless/mediatek/mt76/mt76x0/trace.h | 366 + 3

[PATCH v2 11/12] mt76x0: main file

2018-07-06 Thread Stanislaw Gruszka
Add main file of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 403 +++ 1 file changed, 403 insertions(+) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/main.c diff --git a/drivers/net/wireless/mediatek

[PATCH v2 09/12] mt76x0: trace and debugfs files

2018-07-06 Thread Stanislaw Gruszka
Add trace and debugfs files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- .../net/wireless/mediatek/mt76/mt76x0/debugfs.c| 166 ++ drivers/net/wireless/mediatek/mt76/mt76x0/trace.c | 21 ++ drivers/net/wireless/mediatek/mt76/mt76x0/trace.h | 366 + 3

[PATCH v2 10/12] mt76x0: dma and tx files

2018-07-06 Thread Stanislaw Gruszka
Add dma and tx files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/dma.c | 522 drivers/net/wireless/mediatek/mt76/mt76x0/dma.h | 126 ++ drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 270 3 files

[PATCH v2 01/12] mt76: add more states

2018-07-06 Thread Stanislaw Gruszka
Add states needed for mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 96e9798bb8a0..7b50d4b7f40e

[PATCH v2 07/12] mt76x0: init files

2018-07-06 Thread Stanislaw Gruszka
Add init files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 720 + .../net/wireless/mediatek/mt76/mt76x0/initvals.h | 282 2 files changed, 1002 insertions(+) create mode 100644 drivers/net/wireless

[PATCH v2 03/12] mt76x0: mac files

2018-07-06 Thread Stanislaw Gruszka
Add mac files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c | 660 drivers/net/wireless/mediatek/mt76/mt76x0/mac.h | 154 ++ 2 files changed, 814 insertions(+) create mode 100644 drivers/net/wireless/mediatek

[PATCH v2 02/12] mt76x0: core files

2018-07-06 Thread Stanislaw Gruszka
Core files of mt76x0 driver. mt76x0 driver adds support for Mediatek MT7610U based USB Wi-Fi dongles. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/core.c | 34 ++ drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 376 drivers/net/wireless

[PATCH v2 00/12] Add mt76x0 driver

2018-07-06 Thread Stanislaw Gruszka
with the permission of Mediatek, the blob will be pushed into linux-firmware git tree. v1 -> v2: - add missed mac.c file! - fix uninitialized variables reported by kbuild test - fix rate estimation - check for skb allocation Stanislaw Gruszka (12): mt76: add more states mt76x0: core files mt76x0:

[PATCH v2 05/12] mt76x0: mcu files

2018-07-06 Thread Stanislaw Gruszka
Add mcu files of mt76x0 driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c | 655 drivers/net/wireless/mediatek/mt76/mt76x0/mcu.h | 101 2 files changed, 756 insertions(+) create mode 100644 drivers/net/wireless/mediatek

[PATCH v2 12/12] mt76: Kconfig and Makefile for mt76x0 driver

2018-07-06 Thread Stanislaw Gruszka
Add Kconfig and Makefiles for mt76x0 driver. Now the driver can be build. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/Kconfig | 7 +++ drivers/net/wireless/mediatek/mt76/Makefile| 1 + drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 7

Re: mt76x2e MCU message 31 timed out

2018-07-11 Thread Stanislaw Gruszka
(correct Felix email address) On Fri, Jun 22, 2018 at 05:51:53PM +0200, Janusz Dziedzic wrote: > 2018-06-22 16:48 GMT+02:00 Stanislaw Gruszka : > > Hi > > > > On Fri, Jun 22, 2018 at 10:37:35AM +0200, Janusz Dziedzic wrote: > >> Have this card in my laptop: &

Re: [PATCH v2 00/12] Add mt76x0 driver

2018-07-12 Thread Stanislaw Gruszka
Hi all, On Wed, Jul 11, 2018 at 10:07:25AM +0200, Lorenzo Bianconi wrote: > > On Tue, 2018-07-10 at 11:52 +0200, Stanislaw Gruszka wrote: > > > On Tue, Jul 10, 2018 at 02:50:30PM +0800, Sean Wang wrote: > > > > > For full support mt7610.bin fi

Re: [ANN] mt76x0 usb driver

2018-07-04 Thread Stanislaw Gruszka
Hi On Tue, Jul 03, 2018 at 05:31:04PM +0200, Hans Ulli Kroll wrote: > > On Mon, Jun 25, 2018 at 02:55:51PM +0200, Lorenzo Bianconi wrote: > > > > Not sure why many integration commits in upstream is a problem. I think > > > having patches posted on mailing list is better than doing them in my >

<    1   2   3   4   5   6   7   8   >