diff options
author | Mike Baker <mbm@openwrt.org> | 2007-07-04 16:49:08 +0000 |
---|---|---|
committer | Mike Baker <mbm@openwrt.org> | 2007-07-04 16:49:08 +0000 |
commit | dee4f1e4f30afaed1a14ddb3e68a7d89dbc2da3a (patch) | |
tree | 6ad37e72f04ff3f5e187126ee116122282f0cf08 /package/broadcom-wl/src | |
parent | 347ffad4cd3d35c449565df6b64724d0e40c40e7 (diff) | |
download | upstream-dee4f1e4f30afaed1a14ddb3e68a7d89dbc2da3a.tar.gz upstream-dee4f1e4f30afaed1a14ddb3e68a7d89dbc2da3a.tar.bz2 upstream-dee4f1e4f30afaed1a14ddb3e68a7d89dbc2da3a.zip |
patch wlc and scripts to control wl's builtin wpa supplicant
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7875 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/broadcom-wl/src')
-rw-r--r-- | package/broadcom-wl/src/wlc/wlc.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/package/broadcom-wl/src/wlc/wlc.c b/package/broadcom-wl/src/wlc/wlc.c index 382e83a7b7..f5db9a7638 100644 --- a/package/broadcom-wl/src/wlc/wlc.c +++ b/package/broadcom-wl/src/wlc/wlc.c @@ -679,6 +679,29 @@ static int wlc_wdsmac(wlc_param param, void *data, void *value) return ret; } +static int wlc_pmk(wlc_param param, void *data, void *value) +{ + int ret = -1; + char *str = (char *) value; + wsec_pmk_t pmk; + + /* driver doesn't support GET */ + + if ((param & PARAM_MODE) == SET) { + strncpy(pmk.key, value, WSEC_MAX_PSK_LEN); + pmk.key_len = strlen(value); + + if (pmk.key_len > WSEC_MAX_PSK_LEN) + pmk.key_len = WSEC_MAX_PSK_LEN; + + pmk.flags = WSEC_PASSPHRASE; + + ret = wl_ioctl(interface, WLC_SET_WSEC_PMK, &pmk, sizeof(pmk)); + } + + return ret; +} + static const struct wlc_call wlc_calls[] = { { .name = "version", @@ -865,6 +888,12 @@ static const struct wlc_call wlc_calls[] = { .desc = "Built-in WPA supplicant" }, { + .name = "passphrase", + .param = STRING, + .handler = wlc_pmk, + .desc = "Passphrase for built-in WPA supplicant", + }, + { .name = "maxassoc", .param = INT, .handler = wlc_iovar, |