rtwn driver

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

rtwn driver

freebsd-wireless mailing list
Good morning,

A few weeks ago, I installed FreeBSD 12.0-RELEASE on a box that had an [Asus PCE-N15](https://www.asus.com/us/Networking/PCEN15/) wireless network card based on the Realtek RTL8192CE chipset. According to the man page for the [rtwn](https://www.freebsd.org/cgi/man.cgi?query=rtwn&sektion=4&manpath=freebsd-release-ports) driver, this card was supported, however the driver refused to attach. Running pciconf -lv would show the device as none0, but had the correct vendor information.

Later on, after [inquiring on the forums](https://forums.freebsd.org/threads/issue-getting-realtek-wireless-network-card-rtwn-driver-working-on-new-freebsd-installation.71677/), I decided to investigate the potential of patching the driver to work with my card. When I finally sat down tonight to start on it, I found the fix surprisingly simple. Looking at the driver source code under /sys/dev/rtwn/pci/rtwn_pci_attach.h, I see an array containing the vendor id's and device id's for PCI devices:

    static const struct rtwn_pci_ident rtwn_pci_ident_table[] = {
        { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE },
        { 0, 0, NULL, RTWN_CHIP_MAX_PCI }
    };

I noticed the device id 0x8176 was different from my card, which was reported as 0x8178. So I added to that array:

    { 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE },

And after building and installing a custom kernel with all the lines noted in the above man page to the config, I rebooted, noticed the driver is now attaching to the PCI device and have since been able to connect to my home wifi without issue.

Honestly, I'm a bit suspicious at the ease of fixing this issue, and am not sure if this is something that should / could be contributed to the kernel code. I'm also sure, there are other device id's that would need added to have full support, but after asking some other people, I was suggested to send an email to this address.

Thanks,
James Parsons
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: rtwn driver

Adrian Chadd-4
hi!

Thanks for doing this! if it's the same chipset but a different ID then
yes, it's literally that easy most times. :)

Nice work! If you file a PR then we'll try to get someone to commit it to
freebsd-head.


-a


On Sun, 11 Aug 2019 at 00:34, james.m.parsons via freebsd-wireless <
[hidden email]> wrote:

> Good morning,
>
> A few weeks ago, I installed FreeBSD 12.0-RELEASE on a box that had an
> [Asus PCE-N15](https://www.asus.com/us/Networking/PCEN15/) wireless
> network card based on the Realtek RTL8192CE chipset. According to the man
> page for the [rtwn](
> https://www.freebsd.org/cgi/man.cgi?query=rtwn&sektion=4&manpath=freebsd-release-ports)
> driver, this card was supported, however the driver refused to attach.
> Running pciconf -lv would show the device as none0, but had the correct
> vendor information.
>
> Later on, after [inquiring on the forums](
> https://forums.freebsd.org/threads/issue-getting-realtek-wireless-network-card-rtwn-driver-working-on-new-freebsd-installation.71677/),
> I decided to investigate the potential of patching the driver to work with
> my card. When I finally sat down tonight to start on it, I found the fix
> surprisingly simple. Looking at the driver source code under
> /sys/dev/rtwn/pci/rtwn_pci_attach.h, I see an array containing the vendor
> id's and device id's for PCI devices:
>
>     static const struct rtwn_pci_ident rtwn_pci_ident_table[] = {
>         { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE },
>         { 0, 0, NULL, RTWN_CHIP_MAX_PCI }
>     };
>
> I noticed the device id 0x8176 was different from my card, which was
> reported as 0x8178. So I added to that array:
>
>     { 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE },
>
> And after building and installing a custom kernel with all the lines noted
> in the above man page to the config, I rebooted, noticed the driver is now
> attaching to the PCI device and have since been able to connect to my home
> wifi without issue.
>
> Honestly, I'm a bit suspicious at the ease of fixing this issue, and am
> not sure if this is something that should / could be contributed to the
> kernel code. I'm also sure, there are other device id's that would need
> added to have full support, but after asking some other people, I was
> suggested to send an email to this address.
>
> Thanks,
> James Parsons
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "[hidden email]
> "
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: rtwn driver

waddlesplash
On Wed, Aug 14, 2019 at 12:10 AM Adrian Chadd <[hidden email]> wrote:
> Thanks for doing this! if it's the same chipset but a different ID then
> yes, it's literally that easy most times. :)
>
> Nice work! If you file a PR then we'll try to get someone to commit it to
> freebsd-head.

You're a little late to the party:
https://github.com/freebsd/freebsd/commit/57f16e900dfc21dc7ed636d71e4e19b0a43da1d0

:)

-waddlesplash
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: rtwn driver

freebsd-wireless mailing list
In reply to this post by Adrian Chadd-4
Thanks! I dd end up creating a a couple days ago and it looks like it got commited.

Sent from ProtonMail mobile

-------- Original Message --------
On Aug 14, 2019, 12:09 AM, Adrian Chadd wrote:

> hi!
>
> Thanks for doing this! if it's the same chipset but a different ID then yes, it's literally that easy most times. :)
>
> Nice work! If you file a PR then we'll try to get someone to commit it to freebsd-head.
>
> -a
>
> On Sun, 11 Aug 2019 at 00:34, james.m.parsons via freebsd-wireless <[hidden email]> wrote:
>
>> Good morning,
>>
>> A few weeks ago, I installed FreeBSD 12.0-RELEASE on a box that had an [Asus PCE-N15](https://www.asus.com/us/Networking/PCEN15/) wireless network card based on the Realtek RTL8192CE chipset. According to the man page for the [rtwn](https://www.freebsd.org/cgi/man.cgi?query=rtwn&sektion=4&manpath=freebsd-release-ports) driver, this card was supported, however the driver refused to attach. Running pciconf -lv would show the device as none0, but had the correct vendor information.
>>
>> Later on, after [inquiring on the forums](https://forums.freebsd.org/threads/issue-getting-realtek-wireless-network-card-rtwn-driver-working-on-new-freebsd-installation.71677/), I decided to investigate the potential of patching the driver to work with my card. When I finally sat down tonight to start on it, I found the fix surprisingly simple. Looking at the driver source code under /sys/dev/rtwn/pci/rtwn_pci_attach.h, I see an array containing the vendor id's and device id's for PCI devices:
>>
>>     static const struct rtwn_pci_ident rtwn_pci_ident_table[] = {
>>         { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE },
>>         { 0, 0, NULL, RTWN_CHIP_MAX_PCI }
>>     };
>>
>> I noticed the device id 0x8176 was different from my card, which was reported as 0x8178. So I added to that array:
>>
>>     { 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE },
>>
>> And after building and installing a custom kernel with all the lines noted in the above man page to the config, I rebooted, noticed the driver is now attaching to the PCI device and have since been able to connect to my home wifi without issue.
>>
>> Honestly, I'm a bit suspicious at the ease of fixing this issue, and am not sure if this is something that should / could be contributed to the kernel code. I'm also sure, there are other device id's that would need added to have full support, but after asking some other people, I was suggested to send an email to this address.
>>
>> Thanks,
>> James Parsons
>> _______________________________________________
>> [hidden email] mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
>> To unsubscribe, send any mail to "[hidden email]"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: rtwn driver

Adrian Chadd-4
yay!


-a


On Tue, 13 Aug 2019 at 21:13, james.m.parsons <
[hidden email]> wrote:

> Thanks! I dd end up creating a a couple days ago and it looks like it got
> commited.
>
>
> Sent from ProtonMail mobile
>
>
>
> -------- Original Message --------
> On Aug 14, 2019, 12:09 AM, Adrian Chadd < [hidden email]> wrote:
>
>
> hi!
>
> Thanks for doing this! if it's the same chipset but a different ID then
> yes, it's literally that easy most times. :)
>
> Nice work! If you file a PR then we'll try to get someone to commit it to
> freebsd-head.
>
>
> -a
>
>
> On Sun, 11 Aug 2019 at 00:34, james.m.parsons via freebsd-wireless <
> [hidden email]> wrote:
>
>> Good morning,
>>
>> A few weeks ago, I installed FreeBSD 12.0-RELEASE on a box that had an
>> [Asus PCE-N15](https://www.asus.com/us/Networking/PCEN15/) wireless
>> network card based on the Realtek RTL8192CE chipset. According to the man
>> page for the [rtwn](
>> https://www.freebsd.org/cgi/man.cgi?query=rtwn&sektion=4&manpath=freebsd-release-ports)
>> driver, this card was supported, however the driver refused to attach.
>> Running pciconf -lv would show the device as none0, but had the correct
>> vendor information.
>>
>> Later on, after [inquiring on the forums](
>> https://forums.freebsd.org/threads/issue-getting-realtek-wireless-network-card-rtwn-driver-working-on-new-freebsd-installation.71677/),
>> I decided to investigate the potential of patching the driver to work with
>> my card. When I finally sat down tonight to start on it, I found the fix
>> surprisingly simple. Looking at the driver source code under
>> /sys/dev/rtwn/pci/rtwn_pci_attach.h, I see an array containing the vendor
>> id's and device id's for PCI devices:
>>
>>     static const struct rtwn_pci_ident rtwn_pci_ident_table[] = {
>>         { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE },
>>         { 0, 0, NULL, RTWN_CHIP_MAX_PCI }
>>     };
>>
>> I noticed the device id 0x8176 was different from my card, which was
>> reported as 0x8178. So I added to that array:
>>
>>     { 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE },
>>
>> And after building and installing a custom kernel with all the lines
>> noted in the above man page to the config, I rebooted, noticed the driver
>> is now attaching to the PCI device and have since been able to connect to
>> my home wifi without issue.
>>
>> Honestly, I'm a bit suspicious at the ease of fixing this issue, and am
>> not sure if this is something that should / could be contributed to the
>> kernel code. I'm also sure, there are other device id's that would need
>> added to have full support, but after asking some other people, I was
>> suggested to send an email to this address.
>>
>> Thanks,
>> James Parsons
>> _______________________________________________
>> [hidden email] mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
>> To unsubscribe, send any mail to "
>> [hidden email]"
>>
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "[hidden email]"