[Replicant] i9305: Add support for rt2500usb wifi devices

Joonas Kylmälä joonas.kylmala at iki.fi
Sun Aug 13 19:02:00 UTC 2017


Hi,

Wolfgang Wiedmeyer:
> As I understand, this chipset doesn't require firmware to be loaded 
> as it's already preinstalled.
That's correct.

> I searched for dongles that have RT2500USB/RT2571 and I had a hard 
> time finding any that I could buy in my country (Germany). Maybe 
> there is a way to get one second-hand. It's also important not to 
> confuse them with RT2571W (notice the "W" at the end) which use a 
> different driver and require non-free firmware to be loaded. For 
> these reasons, I wasn't yet able to test the patches. I basically can
> only test if they don't introduce any issues.
Debian wiki has quite comprehensive list of supported devices:
<https://wiki.debian.org/rt2500usb>. I can also mail you the wifi card I
got (If I remember right, the model was Buffalo WLI-U2-KG54-AI).

> Did it work fine with RepWifi?

It worked well with RepWifi. No network errors appeared and I got speeds
of something like 1.5-3Mbit/s at least with F-droid. It might work in a
faster speed with some other service.

> How was the performance with low battery charge?
I think there were problems with the performance when I didn't include
that patch #2 that disabled power management. After applying that patch
I think it worked as well with the low battery as with the full charge.
However, I'm not 100% sure about this so you will have to wait till next
weekend when I can test this.

> Ok, regarding the big backport patch: did you just copy the driver 
> code or did you do any additional modifications to make it work with
> the older kernel?
I just copied it but after that I did one small modification to multiple
files: I kept the module (de-)initaliazing code from the old version of
the kernel, e.g:

"static int __init rt2500usb_init(void)
{
	return usb_register(&rt2500usb_driver);
}

static void __exit rt2500usb_exit(void)
{
	usb_deregister(&rt2500usb_driver);
}

module_init(rt2500usb_init);
module_exit(rt2500usb_exit);"

instead of the kernel 3.4.113 way:

"module_usb_driver(rt2500usb_driver);"

The usage of module_usb_driver() is not supported in the old kernel we
use but I think it could be supported if we would use the kernel compat
module (so that's another thing to think about).

Also, in my opinion it would be better to have this change I did in a
separate commit but the reason I didn't put it in separate commit was
that I think the kernel people have the mentality that no commit can
break the build (which would have happened because the old kernel
version doesn't have module_usb_driver()). What's your opinion on this?

Joonas


More information about the Replicant mailing list