Bug 28292 - RTL8187B does not receive IPv6 advertisements
Summary: RTL8187B does not receive IPv6 advertisements
Status: NEEDINFO
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-05 18:11 UTC by Hadmut Danisch
Modified: 2014-02-17 00:32 UTC (History)
8 users (show)

See Also:
Kernel Version: 3.7.1
Tree: Mainline
Regression: No


Attachments
Proposed patch to enable receipt of multicast frames for RTL8187L (544 bytes, patch)
2011-03-27 17:12 UTC, Larry Finger
Details | Diff
Output for rt8187b (tcpdump -i wlan0 -s 65535 -w xxx ip6 or proto ipv6) (212 bytes, application/octet-stream)
2011-08-14 15:06 UTC, Ulrich Eckhardt
Details
Output for rtl8187se.out (tcpdump -i wlan0 -s 65535 -w rtl8187se.out ip6 or proto ipv6) (3.90 KB, application/octet-stream)
2011-08-14 15:07 UTC, Ulrich Eckhardt
Details
Test patch to replace earlier one (1.11 KB, patch)
2011-08-15 02:29 UTC, Larry Finger
Details | Diff
Fix type in previous version (1.11 KB, patch)
2011-08-15 02:35 UTC, Larry Finger
Details | Diff
Fix typo in previous version (1.11 KB, patch)
2011-08-15 15:00 UTC, Larry Finger
Details | Diff
Output of dmesg (14.52 KB, application/octet-stream)
2011-08-17 11:45 UTC, Ulrich Eckhardt
Details

Description Hadmut Danisch 2011-02-05 18:11:35 UTC
Hi, 

my notebook with a RTL8187B wlan interface does not autoconfigure the ipv6 ip address or see the router advertisements with tcpdump. A different notebook with a Intel chipset works properly in the same network and WLAN. Seems to be a problem of the driver or chipset. 

regards
Comment 1 John W. Linville 2011-02-07 15:52:41 UTC
Perhaps the multicast filtering isn't set properly?
Comment 2 Larry Finger 2011-03-26 18:54:58 UTC
Using the command 'sudo tcpdump -s0 -n -i wlan14 icmp6', I am seeing the following:

tcpdump: WARNING: wlan14: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan14, link-type EN10MB (Ethernet), capture size 65535 bytes
13:47:59.983983 IP6 :: > ff02::1:ff3e:c40a: ICMP6, neighbor solicitation, who has fe80::211:6bff:fe3e:c40a, length 24
13:48:00.984296 IP6 fe80::211:6bff:fe3e:c40a > ff02::2: ICMP6, router solicitation, length 16
13:48:04.996211 IP6 fe80::211:6bff:fe3e:c40a > ff02::2: ICMP6, router solicitation, length 16
13:48:09.004165 IP6 fe80::211:6bff:fe3e:c40a > ff02::2: ICMP6, router solicitation, length 16

The results for the RTL8187B and the RTL8187L are the same.

The IPv6 address is also being configured. What additional messages should I be seeing? What is missing?
Comment 3 Larry Finger 2011-03-27 17:12:44 UTC
Created attachment 52192 [details]
Proposed patch to enable receipt of multicast frames for RTL8187L

Upon review of the code, receipt of multicast frames was not being set for the RTL8187L. I do not expect this to change the OP's problem, but this change should be made.
Comment 4 John W. Linville 2011-04-29 17:47:16 UTC
Hadmut, did you try Larry's patch?  It seems relevant to me.
Comment 5 Hadmut Danisch 2011-06-03 12:59:20 UTC
Sorry for the delay, have been on vacation all april and really busy after that. I'll check that.
Comment 6 Hadmut Danisch 2011-06-04 20:10:26 UTC
Nope, the patch does not work. 

But the flags are used at more than just one place in the source file. Maybe the additional flag is needed at other places as well...


(BTW, it does not affect IPv6 only, but all cases of multicast, including IPv4.)
Comment 7 Larry Finger 2011-06-26 15:57:07 UTC
I added some test prints to rtl8187 and mac80211 and found that both RTL8187B and RTL8187L are detecting multicast packets, at least for IPv4.

Could you please supply the wireshark dumps for multicast packets that are getting lost?
Comment 8 Ulrich Eckhardt 2011-08-14 15:04:38 UTC
I have the same problems also with kernel 2.6.39.4. My netbook with rtl8187se chipset works (except DAD which must be switched off), but an other computer with rtl8187b (NetGear WG111v3) chipset does not work. I tested the patch with no success.

I attach an tcpdump of the rtl8187se and rtl8187b both getting the router advertisments during the same time. I hope this helps a bit to track down the problem.
Comment 9 Ulrich Eckhardt 2011-08-14 15:06:11 UTC
Created attachment 68782 [details]
Output for rt8187b  (tcpdump -i wlan0 -s 65535 -w xxx ip6 or proto ipv6)
Comment 10 Ulrich Eckhardt 2011-08-14 15:07:46 UTC
Created attachment 68792 [details]
Output for rtl8187se.out (tcpdump -i wlan0 -s 65535 -w rtl8187se.out ip6 or proto ipv6)
Comment 11 Larry Finger 2011-08-14 16:22:10 UTC
Thanks for the dumps.

I need some clarification.

The original report is for an RTL8187L and the proposed patch only affects the code for that variant. Your message above says that you have an RTL8187B. Is that correct? Please post the output of

'dmesg | grep hwaddr'

Is the driver for the rtl8187se the one found in staging?
Comment 12 Ulrich Eckhardt 2011-08-14 19:08:31 UTC
Yes I have a RTL8187B. 

The output of 'dmesg | grep hwaddr':
ieee80211 phy0: hwaddr 00:22:3f:e4:01:af, RTL8187BvE V0 + rtl8225z2, rfkill mask 2


I am not sure, where the rtl8187se drivers comes from, since my netbook runs unmodified under an OpenSuse 11.4. An lsmod gives here the following output:
eeprom_93cx6           12653  1 r8187se 

and an dmesg:

[   10.100409] Linux kernel driver for RTL8180 / RTL8185 based WLAN cards
[   10.100414] Copyright (c) 2004-2005, Andrea Merello
[   10.100419] r8180: Initializing module
[   10.100424] r8180: Wireless extensions version 22
[   10.100429] r8180: Initializing proc filesystem
[   10.100512] r8180: Configuring chip resources
[   10.100546] r8180 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[   10.100562] r8180 0000:02:00.0: setting latency timer to 64
[   10.102754] leds_ss4200: no LED devices found
[   10.104063] r8180: Channel plan is 2
[   10.104067] 
[   10.104074] Dot11d_Init()
[   10.104084] r8180: MAC controller is a RTL8187SE b/g
[   10.106349] r8180: usValue is 0x100
Comment 13 Larry Finger 2011-08-14 19:37:47 UTC
For unmodified openSUSE 11.4, the driver comes from staging.

I'm in the process of setting up a radvd server on my network to duplicate your results and find out why rtl8187 fails and rtl8187se works.
Comment 14 Larry Finger 2011-08-15 02:29:09 UTC
Created attachment 68812 [details]
Test patch to replace earlier one

Please try this patch, but do not use the earlier one as that change is also folded into this one.
Comment 15 Larry Finger 2011-08-15 02:35:00 UTC
Created attachment 68822 [details]
Fix type in previous version
Comment 16 Ulrich Eckhardt 2011-08-15 08:23:42 UTC
The new patch does not compile:
 CC [M]  drivers/net/wireless/rtl818x/rtl8187/dev.o
drivers/net/wireless/rtl818x/rtl8187/dev.c: In function ‘rtl8187_start’:
drivers/net/wireless/rtl818x/rtl8187/dev.c:969:8: error: ‘RTL818X_RX_CONF_MULTI’ undeclared (first use in this function)
drivers/net/wireless/rtl818x/rtl8187/dev.c:969:8: note: each undeclared identifier is reported only once for each function it appears in

I have replaced RTL818X_RX_CONF_MULTI with RTL818X_RX_CONF_MULTICAST. With this change the driver compiles, but still no success in receiving router advertisements.
Comment 17 Larry Finger 2011-08-15 15:00:45 UTC
Created attachment 68932 [details]
Fix typo in previous version

I forgot to refresh a quilt patch to actually fix the typo.

At this point, I am at a loss. The wireshark dump for my RTL8187L looked exactly like the one for your RTL8187SE. I don't have an actual IPv6 name server, just radvd that I set up quickly.

Did the patch change the wireshark dump for you?
Comment 18 Ulrich Eckhardt 2011-08-15 16:22:10 UTC
I have nearly the same setup, only radvd running on a FritzBox Fon Wlan 7170.

Just to get sure, I have rebuild and reinstalled the entire kernel without success. The patch seems to make the things worse. Now the command "tcpdump -i wlan0 -vv ip6 or proto ipv6" will not log anything.

I copy the patched kernel-sources to my netbook and compile and install the kernel (replacing the original SuSE-Kernel) to check whats happens with the patch on the RTL8187SE chipset. When it is done, i'll let you know the results.
Comment 19 Larry Finger 2011-08-15 19:47:18 UTC
The patch will not affect the RTL8187SE driver in any way. It only changes rtl8187.

Could you please post the radvd.conf file, or Email it to me? That way my setup can be a like yours as possible.
Comment 20 Anonymous Emailer 2011-08-16 17:37:45 UTC
Reply-To: uli@uli-eckhardt.de

Am 15.08.2011 21:47, schrieb bugzilla-daemon@bugzilla.kernel.org:
> https://bugzilla.kernel.org/show_bug.cgi?id=28292
>
> --- Comment #19 from Larry Finger<Larry.Finger@lwfinger.net>   2011-08-15
> 19:47:18 ---
> The patch will not affect the RTL8187SE driver in any way. It only changes
> rtl8187.
>
> Could you please post the radvd.conf file, or Email it to me? That way my
> setup
> can be a like yours as possible.
>

Hi Larry,

there is nothing special on my radvd.conf:

interface lan
{
         AdvSendAdvert on;
         prefix 2001:4dd0:ff00:8975::/64
         {

         };
};

Best Regards
Uli
Comment 21 Larry Finger 2011-08-16 20:45:33 UTC
Uli,

I'm still confused. It is obvious that my patch is garbage, so I backed it out.

I have looked at a number of interfaces, including RTL8187L and RTL8187B, and all of them see the same IPv6 traffic on the client and on the server.

I know you are running radvd, but to you also have an IPv6 DNS server on your box as well.

I think I need a detailed description of your setup, and a list of the commands that work with RTL8187SE and fail with RTL8187B.

Larry
Comment 22 Ulrich Eckhardt 2011-08-17 11:43:57 UTC
Hi,

an additional Info on the WLAN-Device, it is an Netgear NGR-WG111v3 (b) USB stick. There is no IPv6 DHCP server in the lan.

I have prepared my netbook today, so that I can test with the internal WLAN-Device(RTL8187SE) and the Netgear under the same conditions.

To ensure, that there is no problem with my other computer, I have done the following tests on my netbook, with always the same results that the internal RTL8187SE device works but the RTL8187B fails to get an IPv6 address.

1) establish WLAN-connection with both devices on stock OpenSuSE Kernel 3.0.1 (Thumbleweed-Repository).

2) establish WLAN-connection with both devices on patched Kernel 2.6.39.4

3) Stopped radvd on the Fritzbox and starts radvd on an other Machine with the following configuration:

interface eth0
{
        AdvSendAdvert on;
        MinRtrAdvInterval 3;
        MaxRtrAdvInterval 10;
        AdvDefaultPreference low;
        AdvHomeAgentFlag off;


        prefix 2001:4dd0:ff00:8975::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr off;
        };
}

Some infos in the setup of the netbook:

netbook:~ # iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

netbook:~ # ip6tables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

netbook:~ # lsusb 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0846:4260 NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B]
Bus 001 Device 003: ID 0bda:0158 Realtek Semiconductor Corp. USB 2.0 multicard reader

netbook:~ # lsusb -v -d 0846:4260

Bus 001 Device 002: ID 0846:4260 NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B]
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0846 NetGear, Inc.
  idProduct          0x4260 WG111v3 54 Mbps Wireless [realtek RTL8187B]
  bcdDevice            2.00
  iManufacturer           1 Manufacturer_NETGEAR
  iProduct                2 NETGEAR WG111v3
  iSerial                 3 00223FE401AF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           81
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 Wireless Network Card
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           9
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 NETGEAR WG111v3
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x89  EP 9 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0a  EP 10 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0b  EP 11 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0c  EP 12 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


netbook:~ # lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02)
00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 02)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8187SE Wireless LAN Controller (rev 22)


netbook:~ # lspci -s 02:00.0 -v
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8187SE Wireless LAN Controller (rev 22)
        Subsystem: Micro-Star International Co., Ltd. Device 6894
        Flags: bus master, fast devsel, latency 0, IRQ 17
        I/O ports at b000 [size=256]
        Memory at dfc00000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 00-00-57-ba-ca-92-1d-00
        Kernel driver in use: r8180


Output of dmesg is appended as attachment.
Comment 23 Ulrich Eckhardt 2011-08-17 11:45:38 UTC
Created attachment 69052 [details]
Output of dmesg
Comment 24 Larry Finger 2011-08-17 14:54:42 UTC
I think I finally understand your problem, but I want to have you confirm my diagnosis.

The ifconfig output for my rtl8187 devices is as follows:

wlan12    Link encap:Ethernet  HWaddr 00:C0:CA:4E:68:BF  
          inet addr:192.168.1.110  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: 2001:db8:0:1:2c0:caff:fe4e:68bf/64 Scope:Global
          inet6 addr: fe80::2c0:caff:fe4e:68bf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:117 errors:0 dropped:0 overruns:0 frame:0
          TX packets:176 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:21888 (21.3 Kb)  TX bytes:28706 (28.0 Kb)

wlan20    Link encap:Ethernet  HWaddr 00:11:6B:3E:C4:0A  
          inet addr:192.168.1.121  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::211:6bff:fe3e:c40a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:91 errors:0 dropped:0 overruns:0 frame:0
          TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9336 (9.1 Kb)  TX bytes:20313 (19.8 Kb)

In the above, wlan12 is an RTL8187L and wlan20 is an RTL8187B. The difference is that the L gets a global IPv6 address, but the B does not. Is that the difference you see? If so, that helps me find the offending section of the code.
Comment 25 Ulrich Eckhardt 2011-08-17 15:07:05 UTC
Correct, that is the problem.
Comment 26 Ulrich Eckhardt 2012-10-21 14:48:53 UTC
Are there any news about this issue? I have tested it today against a kernel 3.4.14 and still get no global ipv6 address.
Comment 27 Petr Pisar 2013-01-06 14:43:10 UTC
I have RTL8187B with 3.7.1 MIPS64 kernel and I have the same problem. The driver does not report any multicast packets to network stack. You can check it out easily with "ping6 -I wlan0 -n ff02::1" from any other host on the network. "ip -s -s link dev wlan0" on host with rtl8187B does show any incoming frames. (You don't need radvd or anything like that).

Note You need to log in before you can comment on or make changes to this bug.