2014-06-11 15:45:29

by Larry Finger

[permalink] [raw]
Subject: Driver for Mediatek MT7630E

Hi,

In a recent E-mail interchange
(http://marc.info/?l=linux-wireless&m=140238255916367&w=2), I was made aware
that this device is not currently being handled by any driver in the kernel, but
that there was a GitHub repo at https://github.com/anthonywong/mt7630. That code
modifies rt2800pci to operate the MT7630E, but it is quite outdated.

As a followup, I found such a device at a reasonable price on E-bay, and ordered
it. It should arrive next week. I also was able to find the firmware in an RPM
for SUSE SLE11, and a license allowing redistribution. Before I start modifying
rt2800pci for this new device, I want to be assured that this modification is
not currently being done by anyone in the rt2x00 project. There is too much to
be done to duplicate effort.

For interested readers, I have modified the GitHub code to compile using the
current wireless-testing kernel source. If there is sufficient interest, I could
set up a new GH repo for it as an interim measure with conditional code allowing
it to build on recent kernels (3.5+).

Thanks,

Larry


2014-06-12 07:16:03

by Helmut Schaa

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

Hi Larry,

On Wed, Jun 11, 2014 at 5:45 PM, Larry Finger <[email protected]> wrote:
> In a recent E-mail interchange
> (http://marc.info/?l=linux-wireless&m=140238255916367&w=2), I was made aware
> that this device is not currently being handled by any driver in the kernel,
> but that there was a GitHub repo at https://github.com/anthonywong/mt7630.
> That code modifies rt2800pci to operate the MT7630E, but it is quite
> outdated.
>
> As a followup, I found such a device at a reasonable price on E-bay, and
> ordered it. It should arrive next week. I also was able to find the firmware
> in an RPM for SUSE SLE11, and a license allowing redistribution. Before I
> start modifying rt2800pci for this new device, I want to be assured that
> this modification is not currently being done by anyone in the rt2x00
> project. There is too much to be done to duplicate effort.

I'm not doing anything in this regard at the moment. So I'm really glad if you
are working on that!

CC'ed Stanislaw even though I don't think he's doing anything regarding the
device you've mentioned.

> For interested readers, I have modified the GitHub code to compile using the
> current wireless-testing kernel source. If there is sufficient interest, I
> could set up a new GH repo for it as an interim measure with conditional
> code allowing it to build on recent kernels (3.5+).

Awesome news.

Thanks,
Helmut

2014-06-27 17:29:42

by Larry Finger

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On 06/27/2014 01:53 AM, Gertjan van Wingerde wrote:
> Hi Larry,
>
> Although I stepped down as rt2x00 maintainer I'm still following developments.
> I noticed that Mediatek have published a Linux MT7630E driver on their website as well.
> This one seems to be a bit newer than the one in the github repo (at least it is based on a newer rt2x00 version).
> Maybe you should check that one out.

Gertjan,

Thanks for the notice. The link for that new driver was sent to me earlier and I
have been investigating it. Unfortunately, neither it nor the older one are able
to authenticate on my WPA or WPA2 APs. So much for the "easy" addition of the
new device.

Larry



2014-06-13 13:49:41

by Larry Finger

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On 06/13/2014 08:25 AM, Stanislaw Gruszka wrote:
> On Thu, Jun 12, 2014 at 02:22:34PM -0500, Larry Finger wrote:
>> On 06/12/2014 11:33 AM, Matt Chen wrote:
>>> If I remember correct for SLE11, that was from MediaTek-Ralink, they
>>> did it based on SLE11 kernel. The code is ouch but could work. That
>>> was a nightmare when I tried to port...can't imagine that.... :(
>>
>> I have not tested as my hardware has not been delivered, but I have
>> the driver building with current wireless-testing source. I also
>> have created a proper Makefile.
>>
>> Yes, merging the changes into rt2x00 will be a hassle.
>
> We usually we look at vendor driver and write new code to rt2x00 based
> on that. For example, I did that for RT5592, Gabor for RT3593. In
> oposite to cleaning up vendor driver in staging, it require lot of more
> work, but also guarantee that we will have clean and maintaible code.

That is what I plan on doing. This driver is already mac80211 based, thus I see
no benefit in going to staging. You will have plenty of opportunities to review
the code before it is submitted.

Larry



2014-06-27 00:19:58

by Larry Finger

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On 06/25/2014 04:41 AM, Josip Volf - Wuk wrote:
> Larry Finger wrote:
>> For interested readers, I have modified the GitHub code to compile using
>> the current wireless-testing kernel source. If there is sufficient
>> interest, I could set up a new GH repo for it as an interim measure with
>> conditional code allowing it to build on recent kernels (3.5+).
>
> I have a notebook with MT7630 wireless device:
> 02:00.0 Network controller [0280]: MEDIATEK Corp. Device [14c3:7630]
> Subsystem: Foxconn International, Inc. Device [105b:e074]
>
> Is it possible to create a GH repo, I'm not a developer but I'm willing to
> help any way I can, and I'm also a quick learner :)

I forked the older git repo to http://github.com/lwfinger/mt7630. The code there
will build on any kernel 3.5 or newer (including 3.16).

Although it will build, it still needs a lot of work. The driver is very
"chatty" and spams the logs. Even more disturbing is that it fails to
authenticate to any of my APs. That includes WPA1 and WPA2 variants. As usual,
the necessary commands are as follows:

git clone http://github.com/lwfinger/mt7630
cd mt7630
make
sudo make install

If the make step fails, you have not set up your system to build an
out-of-kernel driver. The driver produced here will replace rt2800pci and some
other related drivers.

Larry



2014-06-25 09:51:30

by Josip Volf - Wuk

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

Larry Finger wrote:
> For interested readers, I have modified the GitHub code to compile using
> the current wireless-testing kernel source. If there is sufficient
> interest, I could set up a new GH repo for it as an interim measure with
> conditional code allowing it to build on recent kernels (3.5+).

I have a notebook with MT7630 wireless device:
02:00.0 Network controller [0280]: MEDIATEK Corp. Device [14c3:7630]
Subsystem: Foxconn International, Inc. Device [105b:e074]

Is it possible to create a GH repo, I'm not a developer but I'm willing to
help any way I can, and I'm also a quick learner :)

Thanks,
Josip


2014-06-12 19:22:37

by Larry Finger

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On 06/12/2014 11:33 AM, Matt Chen wrote:
> If I remember correct for SLE11, that was from MediaTek-Ralink, they
> did it based on SLE11 kernel. The code is ouch but could work. That
> was a nightmare when I tried to port...can't imagine that.... :(

I have not tested as my hardware has not been delivered, but I have the driver
building with current wireless-testing source. I also have created a proper
Makefile.

Yes, merging the changes into rt2x00 will be a hassle.

Larry




2014-06-12 16:33:44

by Matt Chen

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

If I remember correct for SLE11, that was from MediaTek-Ralink, they
did it based on SLE11 kernel. The code is ouch but could work. That
was a nightmare when I tried to port...can't imagine that.... :(

2014-06-12 20:44 GMT+08:00 Stanislaw Gruszka <[email protected]>:
> On Thu, Jun 12, 2014 at 09:16:02AM +0200, Helmut Schaa wrote:
>> On Wed, Jun 11, 2014 at 5:45 PM, Larry Finger <[email protected]> wrote:
>> > In a recent E-mail interchange
>> > (http://marc.info/?l=linux-wireless&m=140238255916367&w=2), I was made aware
>> > that this device is not currently being handled by any driver in the kernel,
>> > but that there was a GitHub repo at https://github.com/anthonywong/mt7630.
>> > That code modifies rt2800pci to operate the MT7630E, but it is quite
>> > outdated.
>> >
>> > As a followup, I found such a device at a reasonable price on E-bay, and
>> > ordered it. It should arrive next week. I also was able to find the firmware
>> > in an RPM for SUSE SLE11, and a license allowing redistribution. Before I
>> > start modifying rt2800pci for this new device, I want to be assured that
>> > this modification is not currently being done by anyone in the rt2x00
>> > project. There is too much to be done to duplicate effort.
>>
>> I'm not doing anything in this regard at the moment. So I'm really glad if you
>> are working on that!
>>
>> CC'ed Stanislaw even though I don't think he's doing anything regarding the
>> device you've mentioned.
>
> Nope, I'm not working on adding support for new chips to rt2x00 at
> present nor plan to work on that in the near future, though I have that
> on my TODO list :-)
>
>> > For interested readers, I have modified the GitHub code to compile using the
>> > current wireless-testing kernel source. If there is sufficient interest, I
>> > could set up a new GH repo for it as an interim measure with conditional
>> > code allowing it to build on recent kernels (3.5+).
>
>> Awesome news.
> +1
>
> Stanislaw
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-06-12 12:45:52

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On Thu, Jun 12, 2014 at 09:16:02AM +0200, Helmut Schaa wrote:
> On Wed, Jun 11, 2014 at 5:45 PM, Larry Finger <[email protected]> wrote:
> > In a recent E-mail interchange
> > (http://marc.info/?l=linux-wireless&m=140238255916367&w=2), I was made aware
> > that this device is not currently being handled by any driver in the kernel,
> > but that there was a GitHub repo at https://github.com/anthonywong/mt7630.
> > That code modifies rt2800pci to operate the MT7630E, but it is quite
> > outdated.
> >
> > As a followup, I found such a device at a reasonable price on E-bay, and
> > ordered it. It should arrive next week. I also was able to find the firmware
> > in an RPM for SUSE SLE11, and a license allowing redistribution. Before I
> > start modifying rt2800pci for this new device, I want to be assured that
> > this modification is not currently being done by anyone in the rt2x00
> > project. There is too much to be done to duplicate effort.
>
> I'm not doing anything in this regard at the moment. So I'm really glad if you
> are working on that!
>
> CC'ed Stanislaw even though I don't think he's doing anything regarding the
> device you've mentioned.

Nope, I'm not working on adding support for new chips to rt2x00 at
present nor plan to work on that in the near future, though I have that
on my TODO list :-)

> > For interested readers, I have modified the GitHub code to compile using the
> > current wireless-testing kernel source. If there is sufficient interest, I
> > could set up a new GH repo for it as an interim measure with conditional
> > code allowing it to build on recent kernels (3.5+).

> Awesome news.
+1

Stanislaw

2014-06-27 06:53:04

by Gertjan van Wingerde

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

Hi Larry,

Although I stepped down as rt2x00 maintainer I'm still following developments.
I noticed that Mediatek have published a Linux MT7630E driver on their website as well.
This one seems to be a bit newer than the one in the github repo (at least it is based on a newer rt2x00 version).
Maybe you should check that one out.

---
Gertjan

Sent from my iPad

> On 27 jun. 2014, at 02:20, Larry Finger <[email protected]> wrote:
>
>> On 06/25/2014 04:41 AM, Josip Volf - Wuk wrote:
>> Larry Finger wrote:
>>> For interested readers, I have modified the GitHub code to compile using
>>> the current wireless-testing kernel source. If there is sufficient
>>> interest, I could set up a new GH repo for it as an interim measure with
>>> conditional code allowing it to build on recent kernels (3.5+).
>>
>> I have a notebook with MT7630 wireless device:
>> 02:00.0 Network controller [0280]: MEDIATEK Corp. Device [14c3:7630]
>> Subsystem: Foxconn International, Inc. Device [105b:e074]
>>
>> Is it possible to create a GH repo, I'm not a developer but I'm willing to
>> help any way I can, and I'm also a quick learner :)
>
> I forked the older git repo to http://github.com/lwfinger/mt7630. The code there will build on any kernel 3.5 or newer (including 3.16).
>
> Although it will build, it still needs a lot of work. The driver is very "chatty" and spams the logs. Even more disturbing is that it fails to authenticate to any of my APs. That includes WPA1 and WPA2 variants. As usual, the necessary commands are as follows:
>
> git clone http://github.com/lwfinger/mt7630
> cd mt7630
> make
> sudo make install
>
> If the make step fails, you have not set up your system to build an out-of-kernel driver. The driver produced here will replace rt2800pci and some other related drivers.
>
> Larry
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-06-13 13:27:28

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On Thu, Jun 12, 2014 at 02:22:34PM -0500, Larry Finger wrote:
> On 06/12/2014 11:33 AM, Matt Chen wrote:
> >If I remember correct for SLE11, that was from MediaTek-Ralink, they
> >did it based on SLE11 kernel. The code is ouch but could work. That
> >was a nightmare when I tried to port...can't imagine that.... :(
>
> I have not tested as my hardware has not been delivered, but I have
> the driver building with current wireless-testing source. I also
> have created a proper Makefile.
>
> Yes, merging the changes into rt2x00 will be a hassle.

We usually we look at vendor driver and write new code to rt2x00 based
on that. For example, I did that for RT5592, Gabor for RT3593. In
oposite to cleaning up vendor driver in staging, it require lot of more
work, but also guarantee that we will have clean and maintaible code.

Stanislaw

2015-07-28 22:23:58

by Linus Walleij

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On 2014-06-11 Larry wrote:

> I found such a device at a reasonable price on E-bay, and ordered
> it. It should arrive next week. I also was able to find the firmware in an RPM
> for SUSE SLE11, and a license allowing redistribution. Before I start modifying
> rt2800pci for this new device, I want to be assured that this modification is
> not currently being done by anyone in the rt2x00 project. There is too much to
> be done to duplicate effort.

Did anything ever happen to this?

My daughter has this device in her laptop it seems, sigh.

I might start fiddling with it unless someone else is already
doing it.

Yours,
Linus Walleij

2015-07-28 23:24:19

by Xose Vazquez Perez

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

Linus Walleij wrote:

> Did anything ever happen to this?
>
> My daughter has this device in her laptop it seems, sigh.
>
> I might start fiddling with it unless someone else is already
> doing it.

Jakub Kicinski was working on it at: https://github.com/kuba-moo/mt7630e

2015-07-29 08:03:11

by Jakub Kicinski

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On Wed, 29 Jul 2015 09:38:04 +0200, Linus Walleij wrote:
> On Wed, Jul 29, 2015 at 1:24 AM, Xose Vazquez Perez
> <[email protected]> wrote:
> > Linus Walleij wrote:
> >
> >> Did anything ever happen to this?
> >>
> >> My daughter has this device in her laptop it seems, sigh.
> >>
> >> I might start fiddling with it unless someone else is already
> >> doing it.
> >
> > Jakub Kicinski was working on it at: https://github.com/kuba-moo/mt7630e
>
> Ah yeah that is what I have running. It's a fork of rt2x00 so it's
> missing all fixes since 3.11 or so, just a question of when this
> becomes unsupportable.

The rt2x00 does not change that much itself so it's not a biggie.
However, we are missing all the mac80211-related changes :/

> This code is a complete mashup of Linux and duct-taped Windows
> NDIS-based driver code, my eyes are bleeding from looking at it.
>
> The defines etc patched in have obvious gaps due to other unsupported
> chips such as MT7601u I suspect. I guess it's necessary to also
> look at this in order to not screw things up for 7601.
> https://github.com/porjo/mt7601

The problem with this hardware is that it's a something between old
Ralink stuff and new AC devices which Felix is supporting in mt76,
just like mt7601u. I started hacking on mt76 to add support but not
sure if Felix is interested in merging support for old chips there.

So the support for mt7630e could be added in three places,
theoretically: (1) rt2x00, (2) mt7601u, (3) mt76. IMO they're all bad
choices.

Also MediaTek has no interest in supporting Open Source driver for this
device.

2015-07-29 07:38:06

by Linus Walleij

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On Wed, Jul 29, 2015 at 1:24 AM, Xose Vazquez Perez
<[email protected]> wrote:
> Linus Walleij wrote:
>
>> Did anything ever happen to this?
>>
>> My daughter has this device in her laptop it seems, sigh.
>>
>> I might start fiddling with it unless someone else is already
>> doing it.
>
> Jakub Kicinski was working on it at: https://github.com/kuba-moo/mt7630e

Ah yeah that is what I have running. It's a fork of rt2x00 so it's
missing all fixes since 3.11 or so, just a question of when this
becomes unsupportable.

This code is a complete mashup of Linux and duct-taped Windows
NDIS-based driver code, my eyes are bleeding from looking at it.

The defines etc patched in have obvious gaps due to other unsupported
chips such as MT7601u I suspect. I guess it's necessary to also
look at this in order to not screw things up for 7601.
https://github.com/porjo/mt7601

Yours,
Linus Walleij

2015-07-29 10:47:40

by Xose Vazquez Perez

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On 07/29/2015 09:38 AM, Linus Walleij wrote:

> The defines etc patched in have obvious gaps due to other unsupported
> chips such as MT7601u I suspect. I guess it's necessary to also
> look at this in order to not screw things up for 7601.
> https://github.com/porjo/mt7601

The driver for MediaTek MT7601U was recently added to upstream at:
drivers/net/wireless/mediatek/mt7601u/

2015-08-10 12:46:23

by Linus Walleij

[permalink] [raw]
Subject: Re: Driver for Mediatek MT7630E

On Wed, Jul 29, 2015 at 12:23 AM, Linus Walleij
<[email protected]> wrote:

> My daughter has this device in her laptop it seems, sigh.
>
> I might start fiddling with it unless someone else is already
> doing it.

I managed to rebase the patch to mainline HEAD and have
it compiling and booting without crashing. It also lists the
APs nicely. However connect fails with some random
encryption complaints so I will work on this whenever I have
time.

If there is general interest to hack on this I can publish my
kernel tree @kernel.org.

Xose Vazquez Perez <[email protected]> wrote:

> The driver for MediaTek MT7601U was recently added to upstream at:
> drivers/net/wireless/mediatek/mt7601u/

Awesome, I can see I have some duplicated defines etc
from this in my patch, so will see if they can integrate
cleanly if I even get this working properly.

Yours,
Linus Walleij