summaryrefslogtreecommitdiff
path: root/package/kernel/broadcom-wl/src
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-08-17 13:38:30 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-08-17 13:38:30 +0000
commite12b5ec8df924138e6546c2abe3b42bf5b0a96c3 (patch)
treedfa220bd1639623aeb8779a66292c2c064ba383e /package/kernel/broadcom-wl/src
parent449d7ef460f0cf90f12febbc562ed2e223ed8b9c (diff)
downloadmtk-20170518-e12b5ec8df924138e6546c2abe3b42bf5b0a96c3.zip
mtk-20170518-e12b5ec8df924138e6546c2abe3b42bf5b0a96c3.tar.gz
mtk-20170518-e12b5ec8df924138e6546c2abe3b42bf5b0a96c3.tar.bz2
broadcom-wl: Add 'N' mode support to broadcom-wl
This is partly based on patches sent by Ɓukasz Kwestarz (See https://lists.openwrt.org/pipermail/openwrt-devel/2012-March/014356.html). Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37802
Diffstat (limited to 'package/kernel/broadcom-wl/src')
-rw-r--r--package/kernel/broadcom-wl/src/wlc.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/package/kernel/broadcom-wl/src/wlc.c b/package/kernel/broadcom-wl/src/wlc.c
index 253809c..7e638e5 100644
--- a/package/kernel/broadcom-wl/src/wlc.c
+++ b/package/kernel/broadcom-wl/src/wlc.c
@@ -499,8 +499,8 @@ static int wlc_pmk(wlc_param param, void *data, void *value)
/* driver doesn't support GET */
if ((param & PARAM_MODE) == SET) {
- strncpy(pmk.key, value, WSEC_MAX_PSK_LEN);
- pmk.key_len = strlen(value);
+ strncpy(pmk.key, str, WSEC_MAX_PSK_LEN);
+ pmk.key_len = strlen(str);
if (pmk.key_len > WSEC_MAX_PSK_LEN)
pmk.key_len = WSEC_MAX_PSK_LEN;
@@ -912,6 +912,41 @@ static const struct wlc_call wlc_calls[] = {
.handler = wlc_ioctl,
.desc = "G Mode"
},
+ {
+ .name = "phytype",
+ .param = INT,
+ .data.num = (WLC_GET_PHYTYPE << 16),
+ .handler = wlc_ioctl,
+ .desc = "PHY Type"
+ },
+ {
+ .name = "nmode",
+ .param = INT,
+ .handler = wlc_iovar,
+ .data.str = "nmode",
+ .desc = "N Mode"
+ },
+ {
+ .name = "nreqd",
+ .param = INT,
+ .handler = wlc_iovar,
+ .data.str = "nreqd",
+ .desc = "N Mode required"
+ },
+ {
+ .name = "chanspec",
+ .param = INT,
+ .handler = wlc_iovar,
+ .data.str = "chanspec",
+ .desc = "Channel Spec (See bcmwifi.h)"
+ },
+ {
+ .name = "band",
+ .param = INT,
+ .data.num = ((WLC_GET_BAND << 16) | WLC_SET_BAND),
+ .handler = wlc_ioctl,
+ .desc = "Band"
+ },
};
#define wlc_calls_size (sizeof(wlc_calls) / sizeof(struct wlc_call))
@@ -971,7 +1006,7 @@ static int do_command(const struct wlc_call *cmd, char *arg)
set = 1;
switch(cmd->param & PARAM_TYPE) {
case INT:
- intval = strtoul(arg, &end, 10);
+ intval = strtoul(arg, &end, 0);
if (end && !(*end)) {
memcpy(buf, &intval, sizeof(intval));
} else {