1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

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
This commit is contained in:
mbm
2007-07-04 16:49:08 +00:00
parent 963882cd16
commit 3af73594f6
2 changed files with 38 additions and 1 deletions

View File

@@ -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",
@@ -864,6 +887,12 @@ static const struct wlc_call wlc_calls[] = {
.data.str = "sup_wpa",
.desc = "Built-in WPA supplicant"
},
{
.name = "passphrase",
.param = STRING,
.handler = wlc_pmk,
.desc = "Passphrase for built-in WPA supplicant",
},
{
.name = "maxassoc",
.param = INT,