All of lore.kernel.org
 help / color / mirror / Atom feed
* [ANN] mt76x0 usb driver
@ 2018-04-09 14:10 ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-04-09 14:10 UTC (permalink / raw)
  To: linux-wireless
  Cc: Felix Fietkau, Jakub Kiciński, Hans Ulli Kroll,
	Lorenzo Bianconi, Michal Schmidt, linux-mediatek

Hi

I would like to announce mt76x0 driver for MT7610U USB dongles:

https://github.com/sgruszka/mt76x0

mt76x0 is based on Jakub's mt7601u mac80211 driver and is intended to be
integrated in the linux kernel.

Currently only Linksys AE6000 (ID 13b1:003e) in on USB id's list
and 5GHz does not work.

I would like to integrate the driver to kernel via mt76 driver, i.e.
add USB hooks and mt76x0 mac/phy code to mt76. This will open
possibility to develop support for mt76x2 USB devices as well as mt76x0
PCIe devices in mt76.

I would also like to establish some better collaboration with Mediatek
in order to having their present and future wireless hardware be
supported in the mainline kernel.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [ANN] mt76x0 usb driver
@ 2018-04-09 14:10 ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-04-09 14:10 UTC (permalink / raw)
  To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: Felix Fietkau, Jakub Kiciński, Hans Ulli Kroll,
	Lorenzo Bianconi, Michal Schmidt,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi

I would like to announce mt76x0 driver for MT7610U USB dongles:

https://github.com/sgruszka/mt76x0

mt76x0 is based on Jakub's mt7601u mac80211 driver and is intended to be
integrated in the linux kernel.

Currently only Linksys AE6000 (ID 13b1:003e) in on USB id's list
and 5GHz does not work.

I would like to integrate the driver to kernel via mt76 driver, i.e.
add USB hooks and mt76x0 mac/phy code to mt76. This will open
possibility to develop support for mt76x2 USB devices as well as mt76x0
PCIe devices in mt76.

I would also like to establish some better collaboration with Mediatek
in order to having their present and future wireless hardware be
supported in the mainline kernel.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 14:26   ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-04-09 14:26 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless, Felix Fietkau, Jakub Kiciński,
	Hans Ulli Kroll, Michal Schmidt, linux-mediatek

> Hi

Hi Stanislaw,

> 
> I would like to announce mt76x0 driver for MT7610U USB dongles:
> 
> https://github.com/sgruszka/mt76x0
> 
> mt76x0 is based on Jakub's mt7601u mac80211 driver and is intended to be
> integrated in the linux kernel.
> 

Thx, very cool work :)

> Currently only Linksys AE6000 (ID 13b1:003e) in on USB id's list
> and 5GHz does not work.
> 
> I would like to integrate the driver to kernel via mt76 driver, i.e.
> add USB hooks and mt76x0 mac/phy code to mt76. This will open
> possibility to develop support for mt76x2 USB devices as well as mt76x0
> PCIe devices in mt76.
> 

I have already started supporting mt76x2 USB devices in mt76 since register map
is pretty similar to PCIe devices:
https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
well

> I would also like to establish some better collaboration with Mediatek
> in order to having their present and future wireless hardware be
> supported in the mainline kernel.
> 
> Thanks
> Stanislaw

Regards,
Lorenzo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 14:26   ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-04-09 14:26 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Felix Fietkau,
	Jakub Kiciński, Hans Ulli Kroll, Michal Schmidt,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

> Hi

Hi Stanislaw,

> 
> I would like to announce mt76x0 driver for MT7610U USB dongles:
> 
> https://github.com/sgruszka/mt76x0
> 
> mt76x0 is based on Jakub's mt7601u mac80211 driver and is intended to be
> integrated in the linux kernel.
> 

Thx, very cool work :)

> Currently only Linksys AE6000 (ID 13b1:003e) in on USB id's list
> and 5GHz does not work.
> 
> I would like to integrate the driver to kernel via mt76 driver, i.e.
> add USB hooks and mt76x0 mac/phy code to mt76. This will open
> possibility to develop support for mt76x2 USB devices as well as mt76x0
> PCIe devices in mt76.
> 

I have already started supporting mt76x2 USB devices in mt76 since register map
is pretty similar to PCIe devices:
https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
well

> I would also like to establish some better collaboration with Mediatek
> in order to having their present and future wireless hardware be
> supported in the mainline kernel.
> 
> Thanks
> Stanislaw

Regards,
Lorenzo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 14:48     ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-04-09 14:48 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: linux-wireless, Felix Fietkau, Jakub Kiciński,
	Hans Ulli Kroll, Michal Schmidt, linux-mediatek

On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > PCIe devices in mt76.
> > 
> 
> I have already started supporting mt76x2 USB devices in mt76 since register map
> is pretty similar to PCIe devices:
> https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> well

Great, I'll start to integrate mt76x0 on top of your tree.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 14:48     ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-04-09 14:48 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Jakub Kiciński, Hans Ulli Kroll, Michal Schmidt,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Felix Fietkau

On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > PCIe devices in mt76.
> > 
> 
> I have already started supporting mt76x2 USB devices in mt76 since register map
> is pretty similar to PCIe devices:
> https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> well

Great, I'll start to integrate mt76x0 on top of your tree.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 14:53       ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-04-09 14:53 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless, Felix Fietkau, Jakub Kiciński,
	Hans Ulli Kroll, Michal Schmidt, linux-mediatek

On Apr 09, Stanislaw Gruszka wrote:
> On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > PCIe devices in mt76.
> > > 
> > 
> > I have already started supporting mt76x2 USB devices in mt76 since register map
> > is pretty similar to PCIe devices:
> > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > well
> 
> Great, I'll start to integrate mt76x0 on top of your tree.

Cool :) actually this branch is in under development but what is really
changing day by day is mt7612u part not usb one so I guess we can use it as
common ground for mt76x2u and mt76x0.
Maybe even the mcu code is in common with mt76x2, isn't it?

Regards,
Lorenzo

> 
> Thanks
> Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 14:53       ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-04-09 14:53 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Felix Fietkau,
	Jakub Kiciński, Hans Ulli Kroll, Michal Schmidt,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Apr 09, Stanislaw Gruszka wrote:
> On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > PCIe devices in mt76.
> > > 
> > 
> > I have already started supporting mt76x2 USB devices in mt76 since register map
> > is pretty similar to PCIe devices:
> > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > well
> 
> Great, I'll start to integrate mt76x0 on top of your tree.

Cool :) actually this branch is in under development but what is really
changing day by day is mt7612u part not usb one so I guess we can use it as
common ground for mt76x2u and mt76x0.
Maybe even the mcu code is in common with mt76x2, isn't it?

Regards,
Lorenzo

> 
> Thanks
> Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 18:45   ` Hans Ulli Kroll
  0 siblings, 0 replies; 30+ messages in thread
From: Hans Ulli Kroll @ 2018-04-09 18:45 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless, Felix Fietkau, Jakub Kiciński,
	Hans Ulli Kroll, Lorenzo Bianconi, Michal Schmidt,
	linux-mediatek

Hi

On Mon, 9 Apr 2018, Stanislaw Gruszka wrote:

> Hi
> 
> I would like to announce mt76x0 driver for MT7610U USB dongles:
> 
> https://github.com/sgruszka/mt76x0
> 
> mt76x0 is based on Jakub's mt7601u mac80211 driver and is intended to be
> integrated in the linux kernel.
> 
> Currently only Linksys AE6000 (ID 13b1:003e) in on USB id's list
> and 5GHz does not work.
> 

here are my changes for working 5Ghz band and more USB ID's form my side

diff --git a/phy.c b/phy.c
index e1af2b0..460bd4e 100644
--- a/phy.c
+++ b/phy.c
@@ -350,7 +350,7 @@ mt76x0_phy_set_band(struct mt76x0_dev *dev, enum nl80211_band band)
 static void
 mt76x0_phy_set_chan_rf_params(struct mt76x0_dev *dev, u8 channel, u16 rf_bw_band)
 {
-	u16 rf_band = rf_bw_band & 0xff00;
+	u16 rf_band;
 	u16 rf_bw = rf_bw_band & 0x00ff;
 	u32 mac_reg;
 	u8 rf_val;
@@ -367,6 +367,7 @@ mt76x0_phy_set_chan_rf_params(struct mt76x0_dev *dev, u8 channel, u16 rf_bw_band
 
 	for (i = 0; i < ARRAY_SIZE(mt76x0_frequency_plan); i++) {
 		if (channel == mt76x0_frequency_plan[i].channel) {
+			rf_band = mt76x0_frequency_plan[i].band;
 
 			if (bSDM)
 				freq_item = &(mt76x0_sdm_frequency_plan[i]);
diff --git a/usb.c b/usb.c
index efae0a0..6b9a505 100644
--- a/usb.c
+++ b/usb.c
@@ -20,7 +20,29 @@
 #include "trace.h"
 
 static struct usb_device_id mt76x0_device_table[] = {
-	{ USB_DEVICE(0x13b1,0x003e) },
+	{ USB_DEVICE(0x148F, 0x7610) },	/* MT7610U */
+	{ USB_DEVICE(0x13B1, 0x003E) },	/* Linksys AE6000 */
+	{ USB_DEVICE(0x0E8D, 0x7610) },	/* Sabrent NTWLAC */
+	{ USB_DEVICE(0x7392, 0xa711) },	/* Edimax 7711mac */
+	{ USB_DEVICE(0x7392, 0xb711) },	/* Edimax / Elecom  */
+	{ USB_DEVICE(0x148f, 0x761a) },	/* TP-Link TL-WDN5200 */
+	{ USB_DEVICE(0x148f, 0x760a) },	/* TP-Link unknown */
+	{ USB_DEVICE(0x0b05, 0x17d1) },	/* Asus USB-AC51 */
+	{ USB_DEVICE(0x0b05, 0x17db) },	/* Asus USB-AC50 */
+	{ USB_DEVICE(0x0df6, 0x0075) },	/* Sitecom WLA-3100 */
+	{ USB_DEVICE(0x2019, 0xab31) },	/* Planex GW-450D */
+	{ USB_DEVICE(0x2001, 0x3d02) },	/* D-LINK DWA-171 rev B1 */
+	{ USB_DEVICE(0x0586, 0x3425) },	/* Zyxel NWD6505 */
+	{ USB_DEVICE(0x07b8, 0x7610) },	/* AboCom AU7212 */
+	{ USB_DEVICE(0x04bb, 0x0951) },	/* I-O DATA WN-AC433UK */
+	{ USB_DEVICE(0x057c, 0x8502) },	/* AVM FRITZ!WLAN USB Stick AC 430 */
+	{ USB_DEVICE(0x293c, 0x5702) },	/* Comcast Xfinity KXW02AAA  */
+	{ USB_DEVICE(0x20f4, 0x806b) },	/* TRENDnet TEW-806UBH  */
+	{ USB_DEVICE(0x7392, 0xc711) }, /* Devolo Wifi ac Stick */
+	{ USB_DEVICE(0x0df6, 0x0079) }, /* Sitecom Europe B.V. ac  Stick */
+	{ USB_DEVICE(0x2357, 0x0105) }, /* TP-LINK Archer T1U */
+	{ USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7630, 0xff, 0x2, 0xff)}, /* MT7630U */
+	{ USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7650, 0xff, 0x2, 0xff)}, /* MT7650U */
 	{ 0, }
 };
 
Greetings
Hans

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 18:45   ` Hans Ulli Kroll
  0 siblings, 0 replies; 30+ messages in thread
From: Hans Ulli Kroll @ 2018-04-09 18:45 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Felix Fietkau,
	Jakub Kiciński, Hans Ulli Kroll, Lorenzo Bianconi,
	Michal Schmidt, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi

On Mon, 9 Apr 2018, Stanislaw Gruszka wrote:

> Hi
> 
> I would like to announce mt76x0 driver for MT7610U USB dongles:
> 
> https://github.com/sgruszka/mt76x0
> 
> mt76x0 is based on Jakub's mt7601u mac80211 driver and is intended to be
> integrated in the linux kernel.
> 
> Currently only Linksys AE6000 (ID 13b1:003e) in on USB id's list
> and 5GHz does not work.
> 

here are my changes for working 5Ghz band and more USB ID's form my side

diff --git a/phy.c b/phy.c
index e1af2b0..460bd4e 100644
--- a/phy.c
+++ b/phy.c
@@ -350,7 +350,7 @@ mt76x0_phy_set_band(struct mt76x0_dev *dev, enum nl80211_band band)
 static void
 mt76x0_phy_set_chan_rf_params(struct mt76x0_dev *dev, u8 channel, u16 rf_bw_band)
 {
-	u16 rf_band = rf_bw_band & 0xff00;
+	u16 rf_band;
 	u16 rf_bw = rf_bw_band & 0x00ff;
 	u32 mac_reg;
 	u8 rf_val;
@@ -367,6 +367,7 @@ mt76x0_phy_set_chan_rf_params(struct mt76x0_dev *dev, u8 channel, u16 rf_bw_band
 
 	for (i = 0; i < ARRAY_SIZE(mt76x0_frequency_plan); i++) {
 		if (channel == mt76x0_frequency_plan[i].channel) {
+			rf_band = mt76x0_frequency_plan[i].band;
 
 			if (bSDM)
 				freq_item = &(mt76x0_sdm_frequency_plan[i]);
diff --git a/usb.c b/usb.c
index efae0a0..6b9a505 100644
--- a/usb.c
+++ b/usb.c
@@ -20,7 +20,29 @@
 #include "trace.h"
 
 static struct usb_device_id mt76x0_device_table[] = {
-	{ USB_DEVICE(0x13b1,0x003e) },
+	{ USB_DEVICE(0x148F, 0x7610) },	/* MT7610U */
+	{ USB_DEVICE(0x13B1, 0x003E) },	/* Linksys AE6000 */
+	{ USB_DEVICE(0x0E8D, 0x7610) },	/* Sabrent NTWLAC */
+	{ USB_DEVICE(0x7392, 0xa711) },	/* Edimax 7711mac */
+	{ USB_DEVICE(0x7392, 0xb711) },	/* Edimax / Elecom  */
+	{ USB_DEVICE(0x148f, 0x761a) },	/* TP-Link TL-WDN5200 */
+	{ USB_DEVICE(0x148f, 0x760a) },	/* TP-Link unknown */
+	{ USB_DEVICE(0x0b05, 0x17d1) },	/* Asus USB-AC51 */
+	{ USB_DEVICE(0x0b05, 0x17db) },	/* Asus USB-AC50 */
+	{ USB_DEVICE(0x0df6, 0x0075) },	/* Sitecom WLA-3100 */
+	{ USB_DEVICE(0x2019, 0xab31) },	/* Planex GW-450D */
+	{ USB_DEVICE(0x2001, 0x3d02) },	/* D-LINK DWA-171 rev B1 */
+	{ USB_DEVICE(0x0586, 0x3425) },	/* Zyxel NWD6505 */
+	{ USB_DEVICE(0x07b8, 0x7610) },	/* AboCom AU7212 */
+	{ USB_DEVICE(0x04bb, 0x0951) },	/* I-O DATA WN-AC433UK */
+	{ USB_DEVICE(0x057c, 0x8502) },	/* AVM FRITZ!WLAN USB Stick AC 430 */
+	{ USB_DEVICE(0x293c, 0x5702) },	/* Comcast Xfinity KXW02AAA  */
+	{ USB_DEVICE(0x20f4, 0x806b) },	/* TRENDnet TEW-806UBH  */
+	{ USB_DEVICE(0x7392, 0xc711) }, /* Devolo Wifi ac Stick */
+	{ USB_DEVICE(0x0df6, 0x0079) }, /* Sitecom Europe B.V. ac  Stick */
+	{ USB_DEVICE(0x2357, 0x0105) }, /* TP-LINK Archer T1U */
+	{ USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7630, 0xff, 0x2, 0xff)}, /* MT7630U */
+	{ USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7650, 0xff, 0x2, 0xff)}, /* MT7650U */
 	{ 0, }
 };
 
Greetings
Hans

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 18:52         ` Hans Ulli Kroll
  0 siblings, 0 replies; 30+ messages in thread
From: Hans Ulli Kroll @ 2018-04-09 18:52 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Stanislaw Gruszka, linux-wireless, Felix Fietkau,
	Jakub Kiciński, Hans Ulli Kroll, Michal Schmidt,
	linux-mediatek

Hi

On Mon, 9 Apr 2018, Lorenzo Bianconi wrote:

> On Apr 09, Stanislaw Gruszka wrote:
> > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > PCIe devices in mt76.
> > > > 
> > > 
> > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > is pretty similar to PCIe devices:
> > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > well
> > 
> > Great, I'll start to integrate mt76x0 on top of your tree.
> 
> Cool :) actually this branch is in under development but what is really
> changing day by day is mt7612u part not usb one so I guess we can use it as
> common ground for mt76x2u and mt76x0.
> Maybe even the mcu code is in common with mt76x2, isn't it?
> 

from my POV for "general" commands the MCU on mt76x0 and mt76x2 (doesn't 
matter if USB or PCIe) are almost the same i.e. CMD_FUN_SET_OP

The only difference is CMD_CALIBRATION_OP, they are for mt76x0 and mt76x2 
different calibrate id's.

How about the LED on mt76x2 ?

Greetings
Hans

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-09 18:52         ` Hans Ulli Kroll
  0 siblings, 0 replies; 30+ messages in thread
From: Hans Ulli Kroll @ 2018-04-09 18:52 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Stanislaw Gruszka, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	Felix Fietkau, Jakub Kiciński, Hans Ulli Kroll,
	Michal Schmidt, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi

On Mon, 9 Apr 2018, Lorenzo Bianconi wrote:

> On Apr 09, Stanislaw Gruszka wrote:
> > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > PCIe devices in mt76.
> > > > 
> > > 
> > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > is pretty similar to PCIe devices:
> > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > well
> > 
> > Great, I'll start to integrate mt76x0 on top of your tree.
> 
> Cool :) actually this branch is in under development but what is really
> changing day by day is mt7612u part not usb one so I guess we can use it as
> common ground for mt76x2u and mt76x0.
> Maybe even the mcu code is in common with mt76x2, isn't it?
> 

from my POV for "general" commands the MCU on mt76x0 and mt76x2 (doesn't 
matter if USB or PCIe) are almost the same i.e. CMD_FUN_SET_OP

The only difference is CMD_CALIBRATION_OP, they are for mt76x0 and mt76x2 
different calibrate id's.

How about the LED on mt76x2 ?

Greetings
Hans

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-10 10:12         ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-04-10 10:12 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: linux-wireless, Felix Fietkau, Jakub Kiciński,
	Hans Ulli Kroll, Michal Schmidt, linux-mediatek

On Mon, Apr 09, 2018 at 04:53:44PM +0200, Lorenzo Bianconi wrote:
> On Apr 09, Stanislaw Gruszka wrote:
> > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > PCIe devices in mt76.
> > > > 
> > > 
> > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > is pretty similar to PCIe devices:
> > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > well
> > 
> > Great, I'll start to integrate mt76x0 on top of your tree.
> 
> Cool :) actually this branch is in under development but what is really
> changing day by day is mt7612u part not usb one so I guess we can use it as
> common ground for mt76x2u and mt76x0.
> Maybe even the mcu code is in common with mt76x2, isn't it?

There are some new bits in mcu/mcu_and.c in Mediatek MT7612U driver,
compared to MT7610U driver, but most of the code there looks pretty
much the same :-)

Regards
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-10 10:12         ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-04-10 10:12 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Felix Fietkau,
	Jakub Kiciński, Hans Ulli Kroll, Michal Schmidt,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Apr 09, 2018 at 04:53:44PM +0200, Lorenzo Bianconi wrote:
> On Apr 09, Stanislaw Gruszka wrote:
> > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > PCIe devices in mt76.
> > > > 
> > > 
> > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > is pretty similar to PCIe devices:
> > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > well
> > 
> > Great, I'll start to integrate mt76x0 on top of your tree.
> 
> Cool :) actually this branch is in under development but what is really
> changing day by day is mt7612u part not usb one so I guess we can use it as
> common ground for mt76x2u and mt76x0.
> Maybe even the mcu code is in common with mt76x2, isn't it?

There are some new bits in mcu/mcu_and.c in Mediatek MT7612U driver,
compared to MT7610U driver, but most of the code there looks pretty
much the same :-)

Regards
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
  2018-04-09 18:45   ` Hans Ulli Kroll
@ 2018-04-10 10:14     ` Stanislaw Gruszka
  -1 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-04-10 10:14 UTC (permalink / raw)
  To: Hans Ulli Kroll
  Cc: linux-wireless, Felix Fietkau, Jakub Kiciński,
	Lorenzo Bianconi, Michal Schmidt, linux-mediatek

Hi

On Mon, Apr 09, 2018 at 08:45:20PM +0200, Hans Ulli Kroll wrote:
> here are my changes for working 5Ghz band and more USB ID's form my side

I applied the changes and pushed to github repo.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-10 10:14     ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-04-10 10:14 UTC (permalink / raw)
  To: Hans Ulli Kroll
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Felix Fietkau,
	Jakub Kiciński, Lorenzo Bianconi, Michal Schmidt,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi

On Mon, Apr 09, 2018 at 08:45:20PM +0200, Hans Ulli Kroll wrote:
> here are my changes for working 5Ghz band and more USB ID's form my side

I applied the changes and pushed to github repo.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-16 22:30       ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-04-16 22:30 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: Hans Ulli Kroll, linux-wireless, Felix Fietkau,
	Jakub Kiciński, Michal Schmidt, linux-mediatek

On Tue, Apr 10, 2018 at 12:14 PM, Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> Hi
>
> On Mon, Apr 09, 2018 at 08:45:20PM +0200, Hans Ulli Kroll wrote:
>> here are my changes for working 5Ghz band and more USB ID's form my side
>
> I applied the changes and pushed to github repo.
>
> Thanks
> Stanislaw

Hi all,

brief update on mt76x2u support in mt76 driver: I added the support
for tx/rx data channels and I am able to successfully connect to an
unencrypted AP.
I extended the usb utility layer that can be used to support mt76x0 in
mt76 driver. Moreover I reused as mach as I can mt76x2 routines since
the register map is pretty similar with the one used by mt7612u and
similar chipsets (for the moment I just exported requested symbols).
Next steps are add encryption support and improve driver stability.

Regards,
Lorenzo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-04-16 22:30       ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-04-16 22:30 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: Hans Ulli Kroll, linux-wireless, Felix Fietkau,
	Jakub Kiciński, Michal Schmidt,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tue, Apr 10, 2018 at 12:14 PM, Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> Hi
>
> On Mon, Apr 09, 2018 at 08:45:20PM +0200, Hans Ulli Kroll wrote:
>> here are my changes for working 5Ghz band and more USB ID's form my side
>
> I applied the changes and pushed to github repo.
>
> Thanks
> Stanislaw

Hi all,

brief update on mt76x2u support in mt76 driver: I added the support
for tx/rx data channels and I am able to successfully connect to an
unencrypted AP.
I extended the usb utility layer that can be used to support mt76x0 in
mt76 driver. Moreover I reused as mach as I can mt76x2 routines since
the register map is pretty similar with the one used by mt7612u and
similar chipsets (for the moment I just exported requested symbols).
Next steps are add encryption support and improve driver stability.

Regards,
Lorenzo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-06-25 12:08       ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-06-25 12:08 UTC (permalink / raw)
  To: Lorenzo Bianconi, Felix Fietkau, Jakub Kiciński
  Cc: linux-wireless, Hans Ulli Kroll, Michal Schmidt, linux-mediatek

Hi all,

On Mon, Apr 09, 2018 at 04:48:19PM +0200, Stanislaw Gruszka wrote:
> On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > PCIe devices in mt76.
> > > 
> > 
> > I have already started supporting mt76x2 USB devices in mt76 since register map
> > is pretty similar to PCIe devices:
> > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > well
> 
> Great, I'll start to integrate mt76x0 on top of your tree.

So I started to do integration here:
https://github.com/sgruszka/wireless-drivers-next/commits/mt76x0-draft

However since driver is self containging, I think better would be just
submit the driver into mt76/mt76x0/ dir upstream and do code merging work as
follow-up patches posted on the mailing list. Patches then could be reviewed
on regular basic. This will provide support for new mt76x0 devices in kernel
quicker. Conflicts with mt76x2u and not yet upstreamed mt7603 could be resolved
on the fly.

Another issue is firmware submission, how it was done for mt7601u and mt76x2 ?

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-06-25 12:08       ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-06-25 12:08 UTC (permalink / raw)
  To: Lorenzo Bianconi, Felix Fietkau, Jakub Kiciński
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Hans Ulli Kroll,
	Michal Schmidt, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi all,

On Mon, Apr 09, 2018 at 04:48:19PM +0200, Stanislaw Gruszka wrote:
> On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > PCIe devices in mt76.
> > > 
> > 
> > I have already started supporting mt76x2 USB devices in mt76 since register map
> > is pretty similar to PCIe devices:
> > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > well
> 
> Great, I'll start to integrate mt76x0 on top of your tree.

So I started to do integration here:
https://github.com/sgruszka/wireless-drivers-next/commits/mt76x0-draft

However since driver is self containging, I think better would be just
submit the driver into mt76/mt76x0/ dir upstream and do code merging work as
follow-up patches posted on the mailing list. Patches then could be reviewed
on regular basic. This will provide support for new mt76x0 devices in kernel
quicker. Conflicts with mt76x2u and not yet upstreamed mt7603 could be resolved
on the fly.

Another issue is firmware submission, how it was done for mt7601u and mt76x2 ?

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-06-25 12:55         ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-06-25 12:55 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: Lorenzo Bianconi, Felix Fietkau, moorray3, linux-wireless,
	Hans Ulli Kroll, mschmidt, linux-mediatek

>
> Hi all,

Hi Stanislaw,

>
> On Mon, Apr 09, 2018 at 04:48:19PM +0200, Stanislaw Gruszka wrote:
> > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > PCIe devices in mt76.
> > > >
> > >
> > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > is pretty similar to PCIe devices:
> > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > well
> >
> > Great, I'll start to integrate mt76x0 on top of your tree.
>
> So I started to do integration here:
> https://github.com/sgruszka/wireless-drivers-next/commits/mt76x0-draft
>
> However since driver is self containging, I think better would be just
> submit the driver into mt76/mt76x0/ dir upstream and do code merging work as
> follow-up patches posted on the mailing list. Patches then could be reviewed
> on regular basic. This will provide support for new mt76x0 devices in kernel
> quicker. Conflicts with mt76x2u and not yet upstreamed mt7603 could be resolved
> on the fly.

I did a quick review of the code and it seems (please correct me if I
am wrong) there is
a lot of duplicated code with mt76/mt76x2u and mt7601u drivers (i.e:
mcu/eeprom/mac code
is quite the same of the ones used in mt76x2u). Moreover mt76/mt76x2u has been
refactored in order to expose usb and mt76x2_common modules where you
can use better
802.11 aggregation (using mac80211 per-sta queuing) and A-MSDU support (using
tx/rx usb scatter-gather). Moreover mt76x2u has been tested/used by
various users till now.
So since mt76x0 will be deeply modified I guess it would be better to
start integrating the driver with
mt76/mt76x2u before been merged upstream otherwise will end-up with a
lot of integration commits.
What do you think?

>
> Another issue is firmware submission, how it was done for mt7601u and mt76x2 ?
>

I guess the fw submission has to be approved by mtk before been pushed
to linux-firmware

> Thanks
> Stanislaw

Regards,
Lorenzo

-- 
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch;
unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp;
umount; make clean; sleep

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-06-25 12:55         ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-06-25 12:55 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: Lorenzo Bianconi, Felix Fietkau, moorray3-5tc4TXWwyLM,
	linux-wireless, Hans Ulli Kroll, mschmidt-H+wXaHxf7aLQT0dZR+AlfA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

>
> Hi all,

Hi Stanislaw,

>
> On Mon, Apr 09, 2018 at 04:48:19PM +0200, Stanislaw Gruszka wrote:
> > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > PCIe devices in mt76.
> > > >
> > >
> > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > is pretty similar to PCIe devices:
> > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > well
> >
> > Great, I'll start to integrate mt76x0 on top of your tree.
>
> So I started to do integration here:
> https://github.com/sgruszka/wireless-drivers-next/commits/mt76x0-draft
>
> However since driver is self containging, I think better would be just
> submit the driver into mt76/mt76x0/ dir upstream and do code merging work as
> follow-up patches posted on the mailing list. Patches then could be reviewed
> on regular basic. This will provide support for new mt76x0 devices in kernel
> quicker. Conflicts with mt76x2u and not yet upstreamed mt7603 could be resolved
> on the fly.

I did a quick review of the code and it seems (please correct me if I
am wrong) there is
a lot of duplicated code with mt76/mt76x2u and mt7601u drivers (i.e:
mcu/eeprom/mac code
is quite the same of the ones used in mt76x2u). Moreover mt76/mt76x2u has been
refactored in order to expose usb and mt76x2_common modules where you
can use better
802.11 aggregation (using mac80211 per-sta queuing) and A-MSDU support (using
tx/rx usb scatter-gather). Moreover mt76x2u has been tested/used by
various users till now.
So since mt76x0 will be deeply modified I guess it would be better to
start integrating the driver with
mt76/mt76x2u before been merged upstream otherwise will end-up with a
lot of integration commits.
What do you think?

>
> Another issue is firmware submission, how it was done for mt7601u and mt76x2 ?
>

I guess the fw submission has to be approved by mtk before been pushed
to linux-firmware

> Thanks
> Stanislaw

Regards,
Lorenzo

-- 
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch;
unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp;
umount; make clean; sleep

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-06-25 13:54           ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-06-25 13:54 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Lorenzo Bianconi, Felix Fietkau, moorray3, linux-wireless,
	Hans Ulli Kroll, mschmidt, linux-mediatek

On Mon, Jun 25, 2018 at 02:55:51PM +0200, Lorenzo Bianconi wrote:
> >
> > Hi all,
> 
> Hi Stanislaw,
> 
> >
> > On Mon, Apr 09, 2018 at 04:48:19PM +0200, Stanislaw Gruszka wrote:
> > > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > > PCIe devices in mt76.
> > > > >
> > > >
> > > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > > is pretty similar to PCIe devices:
> > > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > > well
> > >
> > > Great, I'll start to integrate mt76x0 on top of your tree.
> >
> > So I started to do integration here:
> > https://github.com/sgruszka/wireless-drivers-next/commits/mt76x0-draft
> >
> > However since driver is self containging, I think better would be just
> > submit the driver into mt76/mt76x0/ dir upstream and do code merging work as
> > follow-up patches posted on the mailing list. Patches then could be reviewed
> > on regular basic. This will provide support for new mt76x0 devices in kernel
> > quicker. Conflicts with mt76x2u and not yet upstreamed mt7603 could be resolved
> > on the fly.
> 
> I did a quick review of the code and it seems (please correct me if I
> am wrong) there is
> a lot of duplicated code with mt76/mt76x2u and mt7601u drivers (i.e:
> mcu/eeprom/mac code

Yes, however there are some subtle differences too.

> is quite the same of the ones used in mt76x2u). Moreover mt76/mt76x2u has been
> refactored in order to expose usb and mt76x2_common modules where you
> can use better
> 802.11 aggregation (using mac80211 per-sta queuing) and A-MSDU support (using
> tx/rx usb scatter-gather). Moreover mt76x2u has been tested/used by
> various users till now.
> So since mt76x0 will be deeply modified I guess it would be better to
> start integrating the driver with
> mt76/mt76x2u before been merged upstream otherwise will end-up with a
> lot of integration commits.

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
"private" tree without any review.

> What do you think?

I was thinking about posting mt76x0 driver in a subdir (there is sill 
some cleanup work need to be done there), wait for upstream mt76x2u
integration, then post patches that remove duplication between mt76x2
and mt76x0 and add support for mt76x0e on the way.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-06-25 13:54           ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-06-25 13:54 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Lorenzo Bianconi, Felix Fietkau, moorray3-5tc4TXWwyLM,
	linux-wireless, Hans Ulli Kroll, mschmidt-H+wXaHxf7aLQT0dZR+AlfA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Jun 25, 2018 at 02:55:51PM +0200, Lorenzo Bianconi wrote:
> >
> > Hi all,
> 
> Hi Stanislaw,
> 
> >
> > On Mon, Apr 09, 2018 at 04:48:19PM +0200, Stanislaw Gruszka wrote:
> > > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > > PCIe devices in mt76.
> > > > >
> > > >
> > > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > > is pretty similar to PCIe devices:
> > > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > > well
> > >
> > > Great, I'll start to integrate mt76x0 on top of your tree.
> >
> > So I started to do integration here:
> > https://github.com/sgruszka/wireless-drivers-next/commits/mt76x0-draft
> >
> > However since driver is self containging, I think better would be just
> > submit the driver into mt76/mt76x0/ dir upstream and do code merging work as
> > follow-up patches posted on the mailing list. Patches then could be reviewed
> > on regular basic. This will provide support for new mt76x0 devices in kernel
> > quicker. Conflicts with mt76x2u and not yet upstreamed mt7603 could be resolved
> > on the fly.
> 
> I did a quick review of the code and it seems (please correct me if I
> am wrong) there is
> a lot of duplicated code with mt76/mt76x2u and mt7601u drivers (i.e:
> mcu/eeprom/mac code

Yes, however there are some subtle differences too.

> is quite the same of the ones used in mt76x2u). Moreover mt76/mt76x2u has been
> refactored in order to expose usb and mt76x2_common modules where you
> can use better
> 802.11 aggregation (using mac80211 per-sta queuing) and A-MSDU support (using
> tx/rx usb scatter-gather). Moreover mt76x2u has been tested/used by
> various users till now.
> So since mt76x0 will be deeply modified I guess it would be better to
> start integrating the driver with
> mt76/mt76x2u before been merged upstream otherwise will end-up with a
> lot of integration commits.

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
"private" tree without any review.

> What do you think?

I was thinking about posting mt76x0 driver in a subdir (there is sill 
some cleanup work need to be done there), wait for upstream mt76x2u
integration, then post patches that remove duplication between mt76x2
and mt76x0 and add support for mt76x0e on the way.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-06-28 17:26             ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-06-28 17:26 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: lorenzo.bianconi83, Felix Fietkau, Jakub Kiciński,
	linux-wireless, Hans Ulli Kroll, Michal Schmidt, linux-mediatek

>
> On Mon, Jun 25, 2018 at 02:55:51PM +0200, Lorenzo Bianconi wrote:
> > >
> > > Hi all,
> >
> > Hi Stanislaw,
> >
> > >
> > > On Mon, Apr 09, 2018 at 04:48:19PM +0200, Stanislaw Gruszka wrote:
> > > > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > > > PCIe devices in mt76.
> > > > > >
> > > > >
> > > > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > > > is pretty similar to PCIe devices:
> > > > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > > > well
> > > >
> > > > Great, I'll start to integrate mt76x0 on top of your tree.
> > >
> > > So I started to do integration here:
> > > https://github.com/sgruszka/wireless-drivers-next/commits/mt76x0-draft
> > >
> > > However since driver is self containging, I think better would be just
> > > submit the driver into mt76/mt76x0/ dir upstream and do code merging work as
> > > follow-up patches posted on the mailing list. Patches then could be reviewed
> > > on regular basic. This will provide support for new mt76x0 devices in kernel
> > > quicker. Conflicts with mt76x2u and not yet upstreamed mt7603 could be resolved
> > > on the fly.
> >
> > I did a quick review of the code and it seems (please correct me if I
> > am wrong) there is
> > a lot of duplicated code with mt76/mt76x2u and mt7601u drivers (i.e:
> > mcu/eeprom/mac code
>
> Yes, however there are some subtle differences too.
>
> > is quite the same of the ones used in mt76x2u). Moreover mt76/mt76x2u has been
> > refactored in order to expose usb and mt76x2_common modules where you
> > can use better
> > 802.11 aggregation (using mac80211 per-sta queuing) and A-MSDU support (using
> > tx/rx usb scatter-gather). Moreover mt76x2u has been tested/used by
> > various users till now.
> > So since mt76x0 will be deeply modified I guess it would be better to
> > start integrating the driver with
> > mt76/mt76x2u before been merged upstream otherwise will end-up with a
> > lot of integration commits.
>
> 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
> "private" tree without any review.
>
> > What do you think?
>
> I was thinking about posting mt76x0 driver in a subdir (there is sill
> some cleanup work need to be done there), wait for upstream mt76x2u
> integration, then post patches that remove duplication between mt76x2
> and mt76x0 and add support for mt76x0e on the way.
>

Ack, fine. I modified a little bit mt76x2u/usb architecture moving
some parts in common with mt76x0u
in mt76-usb module (e.g. mt76_queue management in tx_status data path,
tx_stats workqueue,
some mcu utility routines). In this way the integration will be easier I guess

Regards,
Lorenzo

> Thanks
> Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-06-28 17:26             ` Lorenzo Bianconi
  0 siblings, 0 replies; 30+ messages in thread
From: Lorenzo Bianconi @ 2018-06-28 17:26 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w, Felix Fietkau,
	Jakub Kiciński, linux-wireless, Hans Ulli Kroll,
	Michal Schmidt, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

>
> On Mon, Jun 25, 2018 at 02:55:51PM +0200, Lorenzo Bianconi wrote:
> > >
> > > Hi all,
> >
> > Hi Stanislaw,
> >
> > >
> > > On Mon, Apr 09, 2018 at 04:48:19PM +0200, Stanislaw Gruszka wrote:
> > > > On Mon, Apr 09, 2018 at 04:26:42PM +0200, Lorenzo Bianconi wrote:
> > > > > > I would like to integrate the driver to kernel via mt76 driver, i.e.
> > > > > > add USB hooks and mt76x0 mac/phy code to mt76. This will open
> > > > > > possibility to develop support for mt76x2 USB devices as well as mt76x0
> > > > > > PCIe devices in mt76.
> > > > > >
> > > > >
> > > > > I have already started supporting mt76x2 USB devices in mt76 since register map
> > > > > is pretty similar to PCIe devices:
> > > > > https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x2u
> > > > > I added some usb utility routines so I think we can integrate mt76x0 in mt76 as
> > > > > well
> > > >
> > > > Great, I'll start to integrate mt76x0 on top of your tree.
> > >
> > > So I started to do integration here:
> > > https://github.com/sgruszka/wireless-drivers-next/commits/mt76x0-draft
> > >
> > > However since driver is self containging, I think better would be just
> > > submit the driver into mt76/mt76x0/ dir upstream and do code merging work as
> > > follow-up patches posted on the mailing list. Patches then could be reviewed
> > > on regular basic. This will provide support for new mt76x0 devices in kernel
> > > quicker. Conflicts with mt76x2u and not yet upstreamed mt7603 could be resolved
> > > on the fly.
> >
> > I did a quick review of the code and it seems (please correct me if I
> > am wrong) there is
> > a lot of duplicated code with mt76/mt76x2u and mt7601u drivers (i.e:
> > mcu/eeprom/mac code
>
> Yes, however there are some subtle differences too.
>
> > is quite the same of the ones used in mt76x2u). Moreover mt76/mt76x2u has been
> > refactored in order to expose usb and mt76x2_common modules where you
> > can use better
> > 802.11 aggregation (using mac80211 per-sta queuing) and A-MSDU support (using
> > tx/rx usb scatter-gather). Moreover mt76x2u has been tested/used by
> > various users till now.
> > So since mt76x0 will be deeply modified I guess it would be better to
> > start integrating the driver with
> > mt76/mt76x2u before been merged upstream otherwise will end-up with a
> > lot of integration commits.
>
> 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
> "private" tree without any review.
>
> > What do you think?
>
> I was thinking about posting mt76x0 driver in a subdir (there is sill
> some cleanup work need to be done there), wait for upstream mt76x2u
> integration, then post patches that remove duplication between mt76x2
> and mt76x0 and add support for mt76x0e on the way.
>

Ack, fine. I modified a little bit mt76x2u/usb architecture moving
some parts in common with mt76x0u
in mt76-usb module (e.g. mt76_queue management in tx_status data path,
tx_stats workqueue,
some mcu utility routines). In this way the integration will be easier I guess

Regards,
Lorenzo

> Thanks
> Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
  2018-06-28 17:26             ` Lorenzo Bianconi
@ 2018-07-03 15:31               ` Hans Ulli Kroll
  -1 siblings, 0 replies; 30+ messages in thread
From: Hans Ulli Kroll @ 2018-07-03 15:31 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Stanislaw Gruszka, lorenzo.bianconi83, Felix Fietkau,
	Jakub Kiciński, linux-wireless, Hans Ulli Kroll,
	Michal Schmidt, linux-mediatek

Hi

>
> 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
> > "private" tree without any review.
> >
> > > What do you think?
> >
> > I was thinking about posting mt76x0 driver in a subdir (there is sill
> > some cleanup work need to be done there), wait for upstream mt76x2u
> > integration, then post patches that remove duplication between mt76x2
> > and mt76x0 and add support for mt76x0e on the way.
> >
> 
> Ack, fine. I modified a little bit mt76x2u/usb architecture moving
> some parts in common with mt76x0u
> in mt76-usb module (e.g. mt76_queue management in tx_status data path,
> tx_stats workqueue,
> some mcu utility routines). In this way the integration will be easier I guess
> 
> Regards,
> Lorenzo
> 
> > Thanks
> > Stanislaw
> 

I'm currrently working mt76x0u on top of Lorenzo's mt76x2u driver.

Ulli

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-07-03 15:31               ` Hans Ulli Kroll
  0 siblings, 0 replies; 30+ messages in thread
From: Hans Ulli Kroll @ 2018-07-03 15:31 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Stanislaw Gruszka, lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w,
	Felix Fietkau, Jakub Kiciński, linux-wireless,
	Hans Ulli Kroll, Michal Schmidt,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi

>
> 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
> > "private" tree without any review.
> >
> > > What do you think?
> >
> > I was thinking about posting mt76x0 driver in a subdir (there is sill
> > some cleanup work need to be done there), wait for upstream mt76x2u
> > integration, then post patches that remove duplication between mt76x2
> > and mt76x0 and add support for mt76x0e on the way.
> >
> 
> Ack, fine. I modified a little bit mt76x2u/usb architecture moving
> some parts in common with mt76x0u
> in mt76-usb module (e.g. mt76_queue management in tx_status data path,
> tx_stats workqueue,
> some mcu utility routines). In this way the integration will be easier I guess
> 
> Regards,
> Lorenzo
> 
> > Thanks
> > Stanislaw
> 

I'm currrently working mt76x0u on top of Lorenzo's mt76x2u driver.

Ulli

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
  2018-07-03 15:31               ` Hans Ulli Kroll
@ 2018-07-04 14:00                 ` Stanislaw Gruszka
  -1 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-07-04 14:00 UTC (permalink / raw)
  To: Hans Ulli Kroll
  Cc: Lorenzo Bianconi, lorenzo.bianconi83, Felix Fietkau,
	Jakub Kiciński, linux-wireless, Michal Schmidt,
	linux-mediatek

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
> > > "private" tree without any review.
> > >
> > > > What do you think?
> > >
> > > I was thinking about posting mt76x0 driver in a subdir (there is sill
> > > some cleanup work need to be done there), wait for upstream mt76x2u
> > > integration, then post patches that remove duplication between mt76x2
> > > and mt76x0 and add support for mt76x0e on the way.
> > >
> > 
> > Ack, fine. I modified a little bit mt76x2u/usb architecture moving
> > some parts in common with mt76x0u
> > in mt76-usb module (e.g. mt76_queue management in tx_status data path,
> > tx_stats workqueue,
> > some mcu utility routines). In this way the integration will be easier I guess
> > 
> > Regards,
> > Lorenzo
> > 
> > > Thanks
> > > Stanislaw
> > 
> 
> I'm currrently working mt76x0u on top of Lorenzo's mt76x2u driver.

Hmm, I think efforts should be somehow synchronized here.

I have almost ready for post patches adding mt76x0 driver to the kernel.
Some cleanup work is probably needed, but I think they can be reviewed
and merged. They do not conflict with patches currently posted Lorenzo
except small changes in mt76.h and Makefile files, what can be easy
to resolve.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [ANN] mt76x0 usb driver
@ 2018-07-04 14:00                 ` Stanislaw Gruszka
  0 siblings, 0 replies; 30+ messages in thread
From: Stanislaw Gruszka @ 2018-07-04 14:00 UTC (permalink / raw)
  To: Hans Ulli Kroll
  Cc: Lorenzo Bianconi, lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w,
	Felix Fietkau, Jakub Kiciński, linux-wireless,
	Michal Schmidt, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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
> > > "private" tree without any review.
> > >
> > > > What do you think?
> > >
> > > I was thinking about posting mt76x0 driver in a subdir (there is sill
> > > some cleanup work need to be done there), wait for upstream mt76x2u
> > > integration, then post patches that remove duplication between mt76x2
> > > and mt76x0 and add support for mt76x0e on the way.
> > >
> > 
> > Ack, fine. I modified a little bit mt76x2u/usb architecture moving
> > some parts in common with mt76x0u
> > in mt76-usb module (e.g. mt76_queue management in tx_status data path,
> > tx_stats workqueue,
> > some mcu utility routines). In this way the integration will be easier I guess
> > 
> > Regards,
> > Lorenzo
> > 
> > > Thanks
> > > Stanislaw
> > 
> 
> I'm currrently working mt76x0u on top of Lorenzo's mt76x2u driver.

Hmm, I think efforts should be somehow synchronized here.

I have almost ready for post patches adding mt76x0 driver to the kernel.
Some cleanup work is probably needed, but I think they can be reviewed
and merged. They do not conflict with patches currently posted Lorenzo
except small changes in mt76.h and Makefile files, what can be easy
to resolve.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2018-07-04 14:00 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 14:10 [ANN] mt76x0 usb driver Stanislaw Gruszka
2018-04-09 14:10 ` Stanislaw Gruszka
2018-04-09 14:26 ` Lorenzo Bianconi
2018-04-09 14:26   ` Lorenzo Bianconi
2018-04-09 14:48   ` Stanislaw Gruszka
2018-04-09 14:48     ` Stanislaw Gruszka
2018-04-09 14:53     ` Lorenzo Bianconi
2018-04-09 14:53       ` Lorenzo Bianconi
2018-04-09 18:52       ` Hans Ulli Kroll
2018-04-09 18:52         ` Hans Ulli Kroll
2018-04-10 10:12       ` Stanislaw Gruszka
2018-04-10 10:12         ` Stanislaw Gruszka
2018-06-25 12:08     ` Stanislaw Gruszka
2018-06-25 12:08       ` Stanislaw Gruszka
2018-06-25 12:55       ` Lorenzo Bianconi
2018-06-25 12:55         ` Lorenzo Bianconi
2018-06-25 13:54         ` Stanislaw Gruszka
2018-06-25 13:54           ` Stanislaw Gruszka
2018-06-28 17:26           ` Lorenzo Bianconi
2018-06-28 17:26             ` Lorenzo Bianconi
2018-07-03 15:31             ` Hans Ulli Kroll
2018-07-03 15:31               ` Hans Ulli Kroll
2018-07-04 14:00               ` Stanislaw Gruszka
2018-07-04 14:00                 ` Stanislaw Gruszka
2018-04-09 18:45 ` Hans Ulli Kroll
2018-04-09 18:45   ` Hans Ulli Kroll
2018-04-10 10:14   ` Stanislaw Gruszka
2018-04-10 10:14     ` Stanislaw Gruszka
2018-04-16 22:30     ` Lorenzo Bianconi
2018-04-16 22:30       ` Lorenzo Bianconi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.