iw: Implement set 4addr.
PATCH 1/1 iw: Implement set 4addr.
--- interface.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
interface.c +13 -0
@@ -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" );
Signature · 1 line
1.7.1
interface.c COMMAND(set, type, "<type>", · line 380
Quoted 1 line
interface.c +1
-0+ "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/ mac80211Signature · 1 line
Homepage: http://www.holgerschurig.de
Hi Holger,
Am 04.10.2010 09:15, schrieb Holger Schurig:
Quoted 6 lines
interface.c COMMAND(set, type, "<type>", · line 380
Quoted 1 line
interface.c +1
-0+ "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?
Quoted 9 lines
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
Quoted 2 lines
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 :-)
Signature · 1 line
Homepage: http://www.holgerschurig.de
Quoted 11 lines · Holger Schurig
Quoted 2 lines
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