diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-15 16:56:09 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-15 16:56:09 +0000 |
commit | 82d1c7f615b64508df592271b68a3d4f60df0762 (patch) | |
tree | d48bc8f5f2c1933725246763319c5e18808e7823 /package/broadcom-wl | |
parent | 0123c3eef8924406ed293fb04f6790cdbe9a7b36 (diff) | |
download | upstream-82d1c7f615b64508df592271b68a3d4f60df0762.tar.gz upstream-82d1c7f615b64508df592271b68a3d4f60df0762.tar.bz2 upstream-82d1c7f615b64508df592271b68a3d4f60df0762.zip |
implement wlc call to read wds endpoint mac
SVN-Revision: 5121
Diffstat (limited to 'package/broadcom-wl')
-rw-r--r-- | package/broadcom-wl/src/wlc/wlc.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/package/broadcom-wl/src/wlc/wlc.c b/package/broadcom-wl/src/wlc/wlc.c index 09cbb84538..2d6b846a09 100644 --- a/package/broadcom-wl/src/wlc/wlc.c +++ b/package/broadcom-wl/src/wlc/wlc.c @@ -644,6 +644,36 @@ static int wlc_wme_ac(wlc_param param, void *data, void *value) return ret; } +static int wlc_ifname(wlc_param param, void *data, void *value) +{ + char *val = (char *) value; + int ret = 0; + + if (param & SET) { + if (strlen(val) < 16) + strcpy(interface, val); + else ret = -1; + } + if (param & GET) { + strcpy(val, interface); + } + + return ret; +} + +static int wlc_wdsmac(wlc_param param, void *data, void *value) +{ + static struct ether_addr mac; + int ret = 0; + + ret = wl_ioctl(interface, WLC_WDS_GET_REMOTE_HWADDR, &mac, 6); + if (ret == 0) { + strcpy((char *) value, ether_ntoa(&mac)); + } + + return ret; +} + static const struct wlc_call wlc_calls[] = { { .name = "version", @@ -667,6 +697,12 @@ static const struct wlc_call wlc_calls[] = { .desc = "Accept input from stdin" }, { + .name = "ifname", + .param = STRING, + .handler = wlc_ifname, + .desc = "interface to send commands to" + }, + { .name = "up", .param = NOARG, .handler = wlc_ioctl, @@ -957,6 +993,12 @@ static const struct wlc_call wlc_calls[] = { .desc = "WDS link detection timeout" }, { + .name = "wdsmac", + .param = STRING|NOARG, + .handler = wlc_wdsmac, + .desc = "MAC of the remote WDS endpoint (only with wds0.* interfaces)" + }, + { .name = "afterburner", .param = INT, .handler = wlc_afterburner, |