2010-08-01 19:24:43

by Jochen Friedrich

[permalink] [raw]
Subject: [iw] Implement set 4addr.

Signed-off-by: Jochen Friedrich <[email protected]>
---
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