From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-iy0-f171.google.com (mail-iy0-f171.google.com [209.85.210.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 166FB20065E for ; Fri, 3 Jun 2011 07:14:12 -0700 (PDT) Received: by iyi20 with SMTP id 20so2268211iyi.16 for ; Fri, 03 Jun 2011 07:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=gYJ5bnx6EiYB6z0hKdFtCF59LI9hR93qU7J4GXssKLY=; b=Rcb+N0iROn7yxUE4t0U7EmSuiN0wukU6YsmL2WE5a9CpPsg+e/n8pjg9Urc7mvVFw8 8h3Pc6JZbP6ibA9DtXF6nE31eYv7gf6Tdqv55fRH4zaXb0U7AhcB10reurrLCW9xkcRp OC27Xzoyzg/wAb62cCjC1QNwEUg57HFZ2NDHY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DlZKIaNBYFZEbDYEuUn95+TyvF32yTMTS/4yL0ItNju++OGVOulhygxo+W07qFs/8W pAJCPBPrRqEkRofMaNwXVrvJvPiYOVsh3d4jWlR6AuQN60PUPptoZR+7365KSVnKawfR CU6KF7AlxuH1axxQ5F9y7pa8IeDJ4iz2A69aQ= MIME-Version: 1.0 Received: by 10.231.187.165 with SMTP id cw37mr2655518ibb.88.1307111539656; Fri, 03 Jun 2011 07:32:19 -0700 (PDT) Received: by 10.231.13.76 with HTTP; Fri, 3 Jun 2011 07:32:19 -0700 (PDT) In-Reply-To: <7i39jr3x3a.fsf@lanthane.pps.jussieu.fr> References: <7i39jr3x3a.fsf@lanthane.pps.jussieu.fr> Date: Fri, 3 Jun 2011 08:32:19 -0600 Message-ID: Subject: Re: Hacking on the rtl8366S From: Dave Taht To: Juliusz Chroboczek Content-Type: multipart/alternative; boundary=001636b2ad6a00c80204a4cf9f5a Cc: Gabor Juhos , bloat-devel@lists.bufferbloat.net X-BeenThere: bloat-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Developers working on AQM, device drivers, and networking stacks" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 14:14:12 -0000 --001636b2ad6a00c80204a4cf9f5a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Jun 3, 2011 at 6:42 AM, Juliusz Chroboczek wrot= e: > > (the switch is bridged to the wireless interfaces, normally) > > Are you sure about that? Pretty sure. The mac addr obtained for the bridge appears to be derived fro= m the wireless chip. When I tried to break apart the wired and wireless devices completely in my testing last week, I was unable to get the wired interface to work at all without disabling the wireless, due to the lack of a distinct mac for it (or so I thought) > The usual configuration is to use a hardware > switch between the wired ports, but bridge the wired and wireless ports > in software. Can you post the output of brctl show? > > > This is from last nights cerowrt build... root@cero1:~# brctl show bridge name bridge id STP enabled interfaces br-lan 8000.c43dc7a37679 no eth0.1 wlan0 wlan3 And the mac addr for eth0 is the same as wlan0 root@cero1:~# ifconfig eth0 eth0 Link encap:Ethernet HWaddr C4:3D:C7:A3:76:79 inet6 addr: fe80::c63d:c7ff:fea3:7679/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:3420 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:16 RX bytes:0 (0.0 B) TX bytes:460327 (449.5 KiB) Interrupt:4 root@cero1:~# ifconfig eth1 eth1 Link encap:Ethernet HWaddr C4:3D:C7:A3:76:7A inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::c63d:c7ff:fea3:767a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:118658 errors:0 dropped:0 overruns:0 frame:0 TX packets:62344 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:5 RX bytes:153610689 (146.4 MiB) TX bytes:5861647 (5.5 MiB) Interrupt:5 root@cero1:~# ifconfig wlan0 wlan0 Link encap:Ethernet HWaddr C4:3D:C7:A3:76:79 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:3413 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:4 RX bytes:0 (0.0 B) TX bytes:506686 (494.8 KiB) > At any rate, you should be able to program the switch to put each port > on a different vlan -- that's how the separation between LAN and WAN > ports is usually implemented. > Although an interesting idea, I wasn't planning to route, at this point, each individual wired port - just break apart the wired and wireless interfaces enough to look at and optimize their behavior better. The external interface (to the internet) runs through the switch (on a dedicated port) and has it's own phy, so far as I can tell. The internal (to-the-switch) interface is just borrowing the wireless mac, so far as I can tell, at present. That's basically all the wifi setup scrip= t does. There's a wiring diagram that more or less explains these oddities on pages 16 and 17 of: rtl8366_8369_datasheet_1-1.pdf which appears to be the most comprehensive document on this chipset series. There is a mildly better diagram on the 1.4 data sheet specific to the 8366S. -- Juliusz > > > --=20 Dave T=E4ht SKYPE: davetaht US Tel: 1-239-829-5608 http://the-edge.blogspot.com --001636b2ad6a00c80204a4cf9f5a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, Jun 3, 2011 at 6:42 AM, Juliusz = Chroboczek <jch@= pps.jussieu.fr> wrote:
> (the switch is bridged to the wireless interfaces, n= ormally)

Are you sure about that? =A0

Pretty sure. The ma= c addr obtained for the bridge appears to be derived from the wireless chip= . When I tried to break apart the wired and wireless devices completely in = my testing last week, I was unable to get the wired interface to work at al= l without disabling the wireless, due to the lack of a distinct mac for it = (or so I thought)

=A0
The = usual configuration is to use a hardware
switch between the wired ports, but bridge the wired and wireless ports
in software. =A0Can you post the output of brctl show?


=A0
This is from last nights cerowrt build...<= br>
root@cero1:~# brctl show
bridge name=A0=A0=A0 bridge i= d=A0=A0=A0 =A0=A0=A0 STP enabled=A0=A0=A0 interfaces
br-lan=A0=A0=A0 =A0= =A0=A0 8000.c43dc7a37679=A0=A0=A0 no=A0=A0=A0 =A0=A0=A0 eth0.1
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 wlan0=
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 w= lan3

And the mac addr for eth0 is the same as wlan0

root@cero= 1:~# ifconfig eth0
eth0=A0=A0=A0=A0=A0 Link encap:Ethernet=A0 HWaddr C4:= 3D:C7:A3:76:79=A0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 inet6 addr: fe80::c63d:c7ff:fea3:7679/64 Scope:= Link
=A0=A0=A0=A0=A0=A0=A0=A0=A0 UP BROADCAST RUNNING MULTICAST=A0 MTU:1= 500=A0 Metric:1
=A0=A0=A0=A0=A0=A0=A0=A0=A0 RX packets:0 errors:0 droppe= d:0 overruns:0 frame:0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 TX packets:3420 error= s:0 dropped:0 overruns:0 carrier:0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 collisions:0 txqueuelen:16
=A0=A0=A0=A0=A0= =A0=A0=A0=A0 RX bytes:0 (0.0 B)=A0 TX bytes:460327 (449.5 KiB)
=A0=A0=A0= =A0=A0=A0=A0=A0=A0 Interrupt:4

root@cero1:~# ifconfig eth1
eth1= =A0=A0=A0=A0=A0 Link encap:Ethernet=A0 HWaddr C4:3D:C7:A3:76:7A=A0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 inet addr:192.168.1.110=A0 Bcast:192.168.1.255= =A0 Mask:255.255.255.0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 inet6 addr: fe80::c63= d:c7ff:fea3:767a/64 Scope:Link
=A0=A0=A0=A0=A0=A0=A0=A0=A0 UP BROADCAST = RUNNING MULTICAST=A0 MTU:1500=A0 Metric:1
=A0=A0=A0=A0=A0=A0=A0=A0=A0 RX= packets:118658 errors:0 dropped:0 overruns:0 frame:0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 TX packets:62344 errors:0 dropped:0 overruns:0 = carrier:0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 collisions:0 txqueuelen:5
=A0= =A0=A0=A0=A0=A0=A0=A0=A0 RX bytes:153610689 (146.4 MiB)=A0 TX bytes:5861647= (5.5 MiB)
=A0=A0=A0=A0=A0=A0=A0=A0=A0 Interrupt:5

root@cero1:~#= ifconfig wlan0
wlan0=A0=A0=A0=A0 Link encap:Ethernet=A0 HWaddr C4:3D:C7:A3:76:79=A0
= =A0=A0=A0=A0=A0=A0=A0=A0=A0 UP BROADCAST RUNNING MULTICAST=A0 MTU:1500=A0 M= etric:1
=A0=A0=A0=A0=A0=A0=A0=A0=A0 RX packets:0 errors:0 dropped:0 over= runs:0 frame:0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 TX packets:3413 errors:0 drop= ped:0 overruns:0 carrier:0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 collisions:0 txqueuelen:4
=A0=A0=A0=A0=A0= =A0=A0=A0=A0 RX bytes:0 (0.0 B)=A0 TX bytes:506686 (494.8 KiB)

=A0
At any rate, you should be able to program the switch to put each port
on a different vlan -- that's how the separation between LAN and WAN ports is usually implemented.

Although an interest= ing idea, I wasn't planning to route, at this point, each individual wi= red port - just break apart the wired and wireless interfaces enough to loo= k at and optimize their behavior better.

The external interface (to the internet) runs through the sw= itch (on a dedicated port) and has it's own phy, so far as I can tell. =

The internal (to-the-switch) interface is just borrowing the wirele= ss mac, so far as I can tell, at present. That's basically all the wifi= setup script does.

There's a wiring diagram that more or less explains these oddities = on pages 16 and 17 of:

rtl8366_8369_datasheet_1-1.pdf

which a= ppears to be the most comprehensive document on this chipset series. There = is a mildly better diagram on the 1.4 data sheet specific to the 8366S.
-- Juliusz





--
Dave T=E4ht
S= KYPE: davetaht
US Tel: 1-239-829-5608
http://the-edge.blogspot.com
--001636b2ad6a00c80204a4cf9f5a--