* [Patch] iw: Implement set 4addr.
@ 2010-10-02 17:40 Jochen Friedrich
2010-10-04 7:15 ` Holger Schurig
0 siblings, 1 reply; 5+ messages in thread
From: Jochen Friedrich @ 2010-10-02 17:40 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Jochen Friedrich
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
interface.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/interface.c b/interface.c
index c092aa2..e6cca4f 100644
--- a/interface.c
+++ b/interface.c
@@ -365,3 +365,16 @@ COMMAND(set, type, "<type>",
NL80211_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_interface_type,
"Set interface type/mode.\n"
IFACE_TYPES);
+
+static int handle_interface_4addr(struct nl80211_state *state,
+ struct nl_cb *cb,
+ struct nl_msg *msg,
+ int argc, char **argv)
+{
+ if (argc != 1)
+ return 1;
+ return parse_4addr_flag(argv[0], msg);
+}
+COMMAND(set, 4addr, "<on|off>",
+ NL80211_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_interface_4addr,
+ "Set interface 4addr (WDS) mode.\n");
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [Patch] iw: Implement set 4addr.
2010-10-02 17:40 [Patch] iw: Implement set 4addr Jochen Friedrich
@ 2010-10-04 7:15 ` Holger Schurig
2010-10-04 9:00 ` Jochen Friedrich
0 siblings, 1 reply; 5+ messages in thread
From: Holger Schurig @ 2010-10-04 7:15 UTC (permalink / raw)
To: Jochen Friedrich, linux-wireless
> + "Set interface 4addr (WDS) mode.\n");
Hi Jochen !
Do you know if this feature can also be used to operate an Ethernet-Bridge on
on a WLAN client?
I'd like to get something like this going, with eth0|wlan0 as a bridge, so
that any protocol/port on the "DEVICE" is reachable from the network:
+--------+ +------------+ +----+ +---------+
| DEVICE +---+ eth0|wlan0 +---+ AP +---+ network |
+--------+ +------------+ +----+ +---------+
Linux 2.6.x
w/ mac80211
--
Homepage: http://www.holgerschurig.de
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Patch] iw: Implement set 4addr.
2010-10-04 7:15 ` Holger Schurig
@ 2010-10-04 9:00 ` Jochen Friedrich
2010-10-04 13:02 ` Holger Schurig
0 siblings, 1 reply; 5+ messages in thread
From: Jochen Friedrich @ 2010-10-04 9:00 UTC (permalink / raw)
To: Holger Schurig; +Cc: linux-wireless
Hi Holger,
Am 04.10.2010 09:15, schrieb Holger Schurig:
>> + "Set interface 4addr (WDS) mode.\n");
> Hi Jochen !
>
> Do you know if this feature can also be used to operate an Ethernet-Bridge on
> on a WLAN client?
>
> I'd like to get something like this going, with eth0|wlan0 as a bridge, so
> that any protocol/port on the "DEVICE" is reachable from the network:
>
> +--------+ +------------+ +----+ +---------+
> | DEVICE +---+ eth0|wlan0 +---+ AP +---+ network |
> +--------+ +------------+ +----+ +---------+
> Linux 2.6.x
> w/ mac80211
>
Yes, that's the idea behind this. I'm using an OpenWRT based WLAN router
and a Debian client with the configuration below.
From my tests, it looks like
- b43legacy runs OK in this mode (tested on MN700).
- ath9k has some issues with the promisc mode (if DEVICE talks to
another AP client, the bridge might add the DEVICE MAC address to wlan0
as soon as AP sends the frame originating from DEVICE to the AP client).
- iwlagn sometimes looses the connection after a hw scan. I'm currently
wondering if this might be a problem of ath5k (my AP is a WGT634U) not
ignoring PM frames in non-4addr frame format. Unfortunately, WGT634U
builds are currently broken in OpenWRT, so I can't test more recent
ath5k versions without major efforts.
Thanks,
Jochen
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet manual
pre-up iw wlan0 set 4addr on
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet dhcp
bridge_ports wlan0 eth0
bridge_fd 0
bridge_stp off
wpa-ssid <my ssid>
wpa-psk <my password>
wpa-bridge br0
wpa-iface wlan0
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Patch] iw: Implement set 4addr.
2010-10-04 9:00 ` Jochen Friedrich
@ 2010-10-04 13:02 ` Holger Schurig
2010-10-04 13:28 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Holger Schurig @ 2010-10-04 13:02 UTC (permalink / raw)
To: Jochen Friedrich; +Cc: linux-wireless
> Yes, that's the idea behind this. I'm using an OpenWRT based WLAN router
> and a Debian client with the configuration below.
Oh, I don't have much success so far.
My setup is like this:
Linux 2.6.35.4
compat-wireless-2010-10-02, using
ath5k from this
iw from git with your patch
------------------------------------------
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet manual
pre-up iw wlan0 set 4addr on
auto eth0
iface eth0 inet manual
iface br0 inet static
address 192.168.233.197
netmask 255.255.255.0
bridge_ports eth0 wlan0
bridge_wait 0
bridge_fd 0
bridge_stp off
post-up iw wlan0 connect TEST key 0:99999
I also tried it with wpa_supplicant, again from git. The last part of the
/etc/network/interface file looked then like this:
wpa_iface wlan0
wpa_bridge br0
wpa-conf /etc/wpa_supplicant.conf
wpa-driver nl80211
... but in both cases, I didn't have much of success. I tried "tcpdump -i
wlan0 -p" (-p prevents promiscuous mode) and only saw ARP, but never an ARP
response.
I'll investigate further :-)
--
Homepage: http://www.holgerschurig.de
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Patch] iw: Implement set 4addr.
2010-10-04 13:02 ` Holger Schurig
@ 2010-10-04 13:28 ` Johannes Berg
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2010-10-04 13:28 UTC (permalink / raw)
To: Holger Schurig; +Cc: Jochen Friedrich, linux-wireless
On Mon, 2010-10-04 at 15:02 +0200, Holger Schurig wrote:
> > Yes, that's the idea behind this. I'm using an OpenWRT based WLAN router
> > and a Debian client with the configuration below.
>
> Oh, I don't have much success so far.
>
> My setup is like this:
>
> Linux 2.6.35.4
> compat-wireless-2010-10-02, using
> ath5k from this
> iw from git with your patch
What's your AP? You need to enable the 4addr mode on the AP as well.
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-04 13:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-02 17:40 [Patch] iw: Implement set 4addr Jochen Friedrich
2010-10-04 7:15 ` Holger Schurig
2010-10-04 9:00 ` Jochen Friedrich
2010-10-04 13:02 ` Holger Schurig
2010-10-04 13:28 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).