Extending rtwn(4) to RTL8723BE

2020-03-08 Thread Hannu Vuolasaho
Hi!

I am in the begin of extending rtwn(4) to RTL8723BE. How hard it would
be if there is only one letter changed in chip name if AE is already
supported. :)

My progress so far has been detecting the chip, reading the rom table
and loading the firmware. Any use of the interface causes log message
of RF not powered, which is understandable and I will dig into it
after the rom part works.

I have few questions

Does the rtwn firmware package ship already RTL8723BE firmware? I have
rtwn-rtl8723befw_36 directory in /etc/firmware. Just asking to make
sure I load right firmware as there are no easily findable changelogs
for firmware packages.

As there was some preliminary work done to RTL8723BE, has someone
gathered info already? Or is the boot linux compile more debugging to
driver and figure out what is happening the only slow way?

Best regards,
Hannu Vuolasaho



Re: rtwn

2018-12-23 Thread gilmulin

Dear misc,

I preferred workaround using small USB device (urtwn) I had bought for 
this purpose.

Model: TP-LINK WN725N (EU) v3. It works!
Finally I can report that v3 could be added to man as potentially OK. 
Current text mentions only v2.

By the way, OpenBSD Archive contains other positive reports about v3.

Thank you all (Theo, Stefan, Eric, Stuart, Kevin, Mihai) for the 
detailed answers.

topic url: http://openbsd-archive.7691.n7.nabble.com/rtwn-td356885.html
Actual date: Dec 24, 2018.

Closed.

WBR,
Stanislav Gilmulin


On 12-12-2018 19:14, Theo de Raadt wrote:

Eric Furman  wrote:


On Tue, Dec 11, 2018, at 8:56 PM, Stanislav wrote:
> OK. What can I do?
> Could you recommend an action I can make?
> Is it normal if I just wait for new version of rtwn?
> Or does this situation mean that mentioned card probably never will be
> supported?
>
> I have searched similar cases.
> Stefan Sperling's report at EuroBSDcon2017:  "Sometimes just adding a new
> PCI/USB device ID is enough to extend device support of an existing driver".
>
> Or the problem is more complicated and driver is not ready to work with the
> device. Is it? What can I research?

If you really want support for this card the best thing to do is buy
one and contact Theo DeRaadt for information on who to send
it to so they can work on supporting it. If a developer does not
have one of these cards in their possession they can't work on
the driver to make it supported.


Bingo.

Or look at the source, and mail a package to those people.

But the other approach of begging people without the hardware to add
support is rather ridiculous.




Re: rtwn

2018-12-13 Thread Mihai Popescu
About your card, you can extract it from the laptop and ask here for a
wi-fi PCIe model that is fully supported and functional. Then buy that
recommanded card and mail this one to a developer, since you can't
make use of it soon.



Re: rtwn

2018-12-12 Thread Theo de Raadt
Eric Furman  wrote:

> On Tue, Dec 11, 2018, at 8:56 PM, Stanislav wrote:
> > OK. What can I do?
> > Could you recommend an action I can make?
> > Is it normal if I just wait for new version of rtwn?
> > Or does this situation mean that mentioned card probably never will be
> > supported? 
> > 
> > I have searched similar cases. 
> > Stefan Sperling's report at EuroBSDcon2017:  "Sometimes just adding a new
> > PCI/USB device ID is enough to extend device support of an existing driver".
> > 
> > Or the problem is more complicated and driver is not ready to work with the
> > device. Is it? What can I research?
> 
> If you really want support for this card the best thing to do is buy
> one and contact Theo DeRaadt for information on who to send
> it to so they can work on supporting it. If a developer does not
> have one of these cards in their possession they can't work on
> the driver to make it supported.

Bingo.

Or look at the source, and mail a package to those people.

But the other approach of begging people without the hardware to add
support is rather ridiculous.



Re: rtwn

2018-12-12 Thread Eric Furman
On Tue, Dec 11, 2018, at 8:56 PM, Stanislav wrote:
> OK. What can I do?
> Could you recommend an action I can make?
> Is it normal if I just wait for new version of rtwn?
> Or does this situation mean that mentioned card probably never will be
> supported? 
> 
> I have searched similar cases. 
> Stefan Sperling's report at EuroBSDcon2017:  "Sometimes just adding a new
> PCI/USB device ID is enough to extend device support of an existing driver".
> 
> Or the problem is more complicated and driver is not ready to work with the
> device. Is it? What can I research?

If you really want support for this card the best thing to do is buy
one and contact Theo DeRaadt for information on who to send
it to so they can work on supporting it. If a developer does not
have one of these cards in their possession they can't work on
the driver to make it supported.



Re: rtwn

2018-12-12 Thread Stefan Sperling
On Tue, Dec 11, 2018 at 06:56:22PM -0700, Stanislav wrote:
> OK. What can I do?
> Could you recommend an action I can make?
> Is it normal if I just wait for new version of rtwn?
> Or does this situation mean that mentioned card probably never will be
> supported? 
> 
> I have searched similar cases. 
> Stefan Sperling's report at EuroBSDcon2017:  "Sometimes just adding a new
> PCI/USB device ID is enough to extend device support of an existing driver".
> 
> Or the problem is more complicated and driver is not ready to work with the
> device. Is it? What can I research?

You have a different chip than those which the driver already
supports. So just adding an ID won't be enough.

About the only possible way to determine what needs to be done is to
read and understand the Linux driver code for your chip and figure out
how exactly it differs from the code for the chips already supported
by both OpenBSD and Linux. Which requires a lot of work to do.

Then someone who has time and skills could implement code which covers
those differences for OpenBSD's rtwn driver. That's even more work.



Re: rtwn

2018-12-12 Thread Stanislav
OK. What can I do?
Could you recommend an action I can make?
Is it normal if I just wait for new version of rtwn?
Or does this situation mean that mentioned card probably never will be
supported? 

I have searched similar cases. 
Stefan Sperling's report at EuroBSDcon2017:  "Sometimes just adding a new
PCI/USB device ID is enough to extend device support of an existing driver".

Or the problem is more complicated and driver is not ready to work with the
device. Is it? What can I research?




--
Sent from: http://openbsd-archive.7691.n7.nabble.com/openbsd-user-misc-f3.html



Re: rtwn

2018-12-11 Thread Stuart Henderson
On 2018-12-11, gilmulin  wrote:
> My network device is Realtek RTL8723BE Wireless LAN 802.11 PCI-E NIC.
>
> By the way, rtwn driver has the firmware for my device:
> # ls /etc/firmware | grep rtwn-rtl8723
> rtwn-rtl8723befw_36
> rtwn-rtl8723fw
> rtwn-rtl8723fw_B

Firmware was added for some newer Realtek wlan devices to make it easier
to work on the driver, but it doesn't mean that the device is supported yet.




Re: rtwn

2018-12-10 Thread Kevin Lo
On Tue, Dec 11, 2018 at 10:05:24AM +0800, Kevin Lo wrote:
> 
> On Tue, Dec 11, 2018 at 04:20:11AM +0300, gilmulin wrote:
> > 
> > Hello,
> > 
> > I have OpenBSD installed on my laptop (6.4 GENERIC.MP#1 amd64). I love 
> > it.
> > And I hope to fix Wi-Fi problem described below. Because staying on wire 
> > is not comfort way :)
> > 
> > My network device is Realtek RTL8723BE Wireless LAN 802.11 PCI-E NIC.
> > 
> > # dmesg | grep Realtek | grep pci2
> > "Realtek 8191SE" rev 0x00 at pci2 dev 0 function 0 not configured
> > 
> > # pcidump -v 2:0:0
> >   2:0:0: Realtek 8191SE
> >  0x: Vendor ID: 10ec Product ID: b723
> >  0x0004: Command: 0007 Status: 0010
> >  0x0008: Class: 02 Subclass: 80 Interface: 00 Revision: 00
> >  0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line 
> > Size: 10
> >  0x0010: BAR io addr: 0x2000/0x0100
> >  0x0014: BAR empty ()
> >  0x0018: BAR mem 64bit addr: 0x9050/0x4000
> >  0x0020: BAR empty ()
> >  0x0024: BAR empty ()
> >  0x0028: Cardbus CIS: 
> >  0x002c: Subsystem Vendor ID: 17aa Product ID: b736
> >  0x0030: Expansion ROM Base Address: 
> >  0x0038: 
> >  0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00
> >  0x0040: Capability 0x01: Power Management
> >  State: D0
> >  0x0050: Capability 0x05: Message Signalled Interrupts (MSI)
> >  0x0070: Capability 0x10: PCI Express
> >  Link Speed: 2.5 / 2.5 GT/s Link Width: x1 / x1
> >  0x0100: Enhanced Capability 0x01: Advanced Error Reporting
> >  0x0140: Enhanced Capability 0x03: Device Serial Number
> >  0x0150: Enhanced Capability 0x18: Latency Tolerance Reporting
> >  0x0158: Enhanced Capability 0x1e: L1 PM
> > 
> > By the way, rtwn driver has the firmware for my device:
> > # ls /etc/firmware | grep rtwn-rtl8723
> > rtwn-rtl8723befw_36
> > rtwn-rtl8723fw
> > rtwn-rtl8723fw_B
> > 
> > As one can see, the device is detected. Vendor's ID 10ec is Realtek, and 
> > 17aa is Lenovo. It's OK, as I see.
> > But card is not determined properly. However, "Product ID: b723" is 
> > close to reality.
> > What should I do to match correctly all these entities and to fix 
> > problem with this pci device?
> > As I see, there are few options to solve my problem.
> > Could you tell me the best option?
> 
> Yours is RTL8723DE, which is not supported yet.

Oops, typo.  RTL8723BE is currently not supported.

> > 
> > Current state of firmware packages:
> > $ fw_update -i
> > Installed: intel-firmware-20180807p0v0 uvideo-firmware-1.2p2
> > Installed, extra: rtwn-firmware-20180103 rsu-firmware-1.2p1
> > 
> > Thank you.
> > Stas
> 
>   Kevin
> 
> 



Re: rtwn

2018-12-10 Thread Kevin Lo
On Tue, Dec 11, 2018 at 04:20:11AM +0300, gilmulin wrote:
> 
> Hello,
> 
> I have OpenBSD installed on my laptop (6.4 GENERIC.MP#1 amd64). I love 
> it.
> And I hope to fix Wi-Fi problem described below. Because staying on wire 
> is not comfort way :)
> 
> My network device is Realtek RTL8723BE Wireless LAN 802.11 PCI-E NIC.
> 
> # dmesg | grep Realtek | grep pci2
> "Realtek 8191SE" rev 0x00 at pci2 dev 0 function 0 not configured
> 
> # pcidump -v 2:0:0
>   2:0:0: Realtek 8191SE
>  0x: Vendor ID: 10ec Product ID: b723
>  0x0004: Command: 0007 Status: 0010
>  0x0008: Class: 02 Subclass: 80 Interface: 00 Revision: 00
>  0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line 
> Size: 10
>  0x0010: BAR io addr: 0x2000/0x0100
>  0x0014: BAR empty ()
>  0x0018: BAR mem 64bit addr: 0x9050/0x4000
>  0x0020: BAR empty ()
>  0x0024: BAR empty ()
>  0x0028: Cardbus CIS: 
>  0x002c: Subsystem Vendor ID: 17aa Product ID: b736
>  0x0030: Expansion ROM Base Address: 
>  0x0038: 
>  0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00
>  0x0040: Capability 0x01: Power Management
>  State: D0
>  0x0050: Capability 0x05: Message Signalled Interrupts (MSI)
>  0x0070: Capability 0x10: PCI Express
>  Link Speed: 2.5 / 2.5 GT/s Link Width: x1 / x1
>  0x0100: Enhanced Capability 0x01: Advanced Error Reporting
>  0x0140: Enhanced Capability 0x03: Device Serial Number
>  0x0150: Enhanced Capability 0x18: Latency Tolerance Reporting
>  0x0158: Enhanced Capability 0x1e: L1 PM
> 
> By the way, rtwn driver has the firmware for my device:
> # ls /etc/firmware | grep rtwn-rtl8723
> rtwn-rtl8723befw_36
> rtwn-rtl8723fw
> rtwn-rtl8723fw_B
> 
> As one can see, the device is detected. Vendor's ID 10ec is Realtek, and 
> 17aa is Lenovo. It's OK, as I see.
> But card is not determined properly. However, "Product ID: b723" is 
> close to reality.
> What should I do to match correctly all these entities and to fix 
> problem with this pci device?
> As I see, there are few options to solve my problem.
> Could you tell me the best option?

Yours is RTL8723DE, which is not supported yet.
> 
> Current state of firmware packages:
> $ fw_update -i
> Installed: intel-firmware-20180807p0v0 uvideo-firmware-1.2p2
> Installed, extra: rtwn-firmware-20180103 rsu-firmware-1.2p1
> 
> Thank you.
> Stas

Kevin



rtwn

2018-12-10 Thread gilmulin

Hello,

I have OpenBSD installed on my laptop (6.4 GENERIC.MP#1 amd64). I love 
it.
And I hope to fix Wi-Fi problem described below. Because staying on wire 
is not comfort way :)


My network device is Realtek RTL8723BE Wireless LAN 802.11 PCI-E NIC.

# dmesg | grep Realtek | grep pci2
"Realtek 8191SE" rev 0x00 at pci2 dev 0 function 0 not configured

# pcidump -v 2:0:0
 2:0:0: Realtek 8191SE
0x: Vendor ID: 10ec Product ID: b723
0x0004: Command: 0007 Status: 0010
0x0008: Class: 02 Subclass: 80 Interface: 00 Revision: 00
0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line 
Size: 10

0x0010: BAR io addr: 0x2000/0x0100
0x0014: BAR empty ()
0x0018: BAR mem 64bit addr: 0x9050/0x4000
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 17aa Product ID: b736
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00
0x0040: Capability 0x01: Power Management
State: D0
0x0050: Capability 0x05: Message Signalled Interrupts (MSI)
0x0070: Capability 0x10: PCI Express
Link Speed: 2.5 / 2.5 GT/s Link Width: x1 / x1
0x0100: Enhanced Capability 0x01: Advanced Error Reporting
0x0140: Enhanced Capability 0x03: Device Serial Number
0x0150: Enhanced Capability 0x18: Latency Tolerance Reporting
0x0158: Enhanced Capability 0x1e: L1 PM

By the way, rtwn driver has the firmware for my device:
# ls /etc/firmware | grep rtwn-rtl8723
rtwn-rtl8723befw_36
rtwn-rtl8723fw
rtwn-rtl8723fw_B

As one can see, the device is detected. Vendor's ID 10ec is Realtek, and 
17aa is Lenovo. It's OK, as I see.
But card is not determined properly. However, "Product ID: b723" is 
close to reality.
What should I do to match correctly all these entities and to fix 
problem with this pci device?

As I see, there are few options to solve my problem.
Could you tell me the best option?

Current state of firmware packages:
$ fw_update -i
Installed: intel-firmware-20180807p0v0 uvideo-firmware-1.2p2
Installed, extra: rtwn-firmware-20180103 rsu-firmware-1.2p1

Thank you.
Stas



Re: Looking for assistance with rtwn(4) on 5.8

2015-09-10 Thread Stefan Sperling
On Wed, Sep 09, 2015 at 07:57:11PM -0400, Nickolas P. O'Malley wrote:
> Hello,
> I'm new to the OpenBSD community and mailing list, so please forgive me if 
> this is the wrong list to ask.
> I decided to install a snapshot of 5.8 on my workstation today, because I 
> found out that it features a new driver that supports my wireless NIC. 
> However I'm hitting roadblock after roadblock trying to find support.
> I found one thread in the archives mentioning rtwn(4), and a Stefan was 
> asking if there's anyone who has an RTL8192CE and wants to test it with the 
> driver. I have this card and I'm having trouble getting it to work. I've run 
> fw_update locally on the rtwn-firmware-1.0.tgz file. I'm just not sure if 
> this is a problem with the driver, or just plain user error.
> I looked around the FAQ and read a few manpages, but I'm still at a loss 
> here. Has anyone had any luck with this card and driver? Doea OpenBSD expect 
> me to do anything more than install the firmware and reboot?
> If it helps at all, this is the dmesg entry for my card:
> "Realtek RTL8192CE" rev 0x01 at pci5 dev 0 function 0 not configured
> Thanks a lot!

Hi Nickolas,

The GENERIC kernel won't attach this device to rtwn(4) yet. rtwn(4) will only
attach to 8188ce cards. That's why the 8192ce shows up as "not configured".

You'll need a self-compiled kernel to try this driver with your device.
To learn about doing this I recommend you start reading here:
  http://www.openbsd.org/faq/faq5.html#Bld
all the way up to (and including) this section:
  http://www.openbsd.org/faq/faq5.html#BldKernel

Your goal is to have a self-built -current GENERIC kernel which includes
the patch below.

Once you've got the -current sources (see the FAQ for how to get them)
run the commands below before building the kernel. Please save this email
as a text file (say, in /tmp/patch.txt) and use it as input for the patch
program:

  cd /usr/src/sys/dev/pci
  patch < /tmp/patch.txt
 
Now proceed with the kernel build steps and reboot into your new kernel.
The device might now work. Or it might not. In either case, please report back.
Thanks!

The patch follows below. It adds one line to the file if_rtwn.c which
associates the 8192ce device with the rtwn(4) driver.

Index: if_rtwn.c
===
RCS file: /cvs/src/sys/dev/pci/if_rtwn.c,v
retrieving revision 1.1
diff -u -p -r1.1 if_rtwn.c
--- if_rtwn.c   4 Jun 2015 21:08:40 -   1.1
+++ if_rtwn.c   4 Jun 2015 22:57:25 -
@@ -80,7 +80,8 @@ int rtwn_debug = 0;
R92C_IMR_RXFOVW)
 
 static const struct pci_matchid rtwn_pci_devices[] = {
-   { PCI_VENDOR_REALTEK,   PCI_PRODUCT_REALTEK_RT8188 }
+   { PCI_VENDOR_REALTEK,   PCI_PRODUCT_REALTEK_RT8188 },
+   { PCI_VENDOR_REALTEK,   PCI_PRODUCT_REALTEK_RTL8192CE }
 };
 
 intrtwn_match(struct device *, void *, void *);



Looking for assistance with rtwn(4) on 5.8

2015-09-09 Thread Nickolas P. O'Malley
Hello,
I'm new to the OpenBSD community and mailing list, so please forgive me if this 
is the wrong list to ask.
I decided to install a snapshot of 5.8 on my workstation today, because I found 
out that it features a new driver that supports my wireless NIC. However I'm 
hitting roadblock after roadblock trying to find support.
I found one thread in the archives mentioning rtwn(4), and a Stefan was asking 
if there's anyone who has an RTL8192CE and wants to test it with the driver. I 
have this card and I'm having trouble getting it to work. I've run fw_update 
locally on the rtwn-firmware-1.0.tgz file. I'm just not sure if this is a 
problem with the driver, or just plain user error.
I looked around the FAQ and read a few manpages, but I'm still at a loss here. 
Has anyone had any luck with this card and driver? Doea OpenBSD expect me to do 
anything more than install the firmware and reboot?
If it helps at all, this is the dmesg entry for my card:
"Realtek RTL8192CE" rev 0x01 at pci5 dev 0 function 0 not configured
Thanks a lot!