summaryrefslogtreecommitdiffstats
path: root/openwrt/package/wificonf
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-07-25 07:52:04 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-07-25 07:52:04 +0000
commitf1feb0b0a6201b25604807fa91b33900ab81af58 (patch)
tree1b86ab847f5b4de6b386a23f047924def2fa20aa /openwrt/package/wificonf
parent0672b5981e313e1db94f7c1ff11604303e968173 (diff)
copy wificonf from whiterussian to head
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1552 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/wificonf')
-rw-r--r--openwrt/package/wificonf/Makefile2
-rw-r--r--openwrt/package/wificonf/wificonf.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/openwrt/package/wificonf/Makefile b/openwrt/package/wificonf/Makefile
index ed41e416c..69cb2ec30 100644
--- a/openwrt/package/wificonf/Makefile
+++ b/openwrt/package/wificonf/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wificonf
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_BUILD_DIR:=$(BUILD_DIR)/wificonf
diff --git a/openwrt/package/wificonf/wificonf.c b/openwrt/package/wificonf/wificonf.c
index 24a9c2fe1..b8eae257c 100644
--- a/openwrt/package/wificonf/wificonf.c
+++ b/openwrt/package/wificonf/wificonf.c
@@ -126,7 +126,7 @@ int bcom_set_val(int skfd, char *ifname, char *var, void *val, int len)
strcpy(buf, var);
- if ((ret = bcom_ioctl(skfd, ifname, WLC_GET_VAR, buf, sizeof(buf))))
+ if ((ret = bcom_ioctl(skfd, ifname, WLC_SET_VAR, buf, sizeof(buf))))
return ret;
memcpy(val, buf, len);
@@ -180,7 +180,7 @@ void setup_bcom(int skfd, char *ifname)
/* Set Country */
strncpy(buf, nvram_safe_get(wl_var("country_code")), 4);
buf[3] = 0;
- bcom_ioctl(skfd, ifname, 273, buf, 4);
+ bcom_ioctl(skfd, ifname, WLC_SET_COUNTRY, buf, 4);
/* Set up afterburner */
val = ABO_AUTO;
@@ -416,9 +416,9 @@ void set_wext_mode(skfd, ifname)
int ap = 0, infra = 0, wet = 0;
/* Set operation mode */
- ap = !nvram_match(wl_var("mode"), "sta");
+ ap = !nvram_match(wl_var("mode"), "sta") && !nvram_match(wl_var("mode"), "wet");
infra = !nvram_disabled(wl_var("infra"));
- wet = nvram_enabled(wl_var("wet"));
+ wet = nvram_enabled(wl_var("wet")) || !nvram_match(wl_var("mode"), "wet");
wrq.u.mode = (!infra ? IW_MODE_ADHOC : (ap ? IW_MODE_MASTER : (wet ? IW_MODE_REPEAT : IW_MODE_INFRA)));
IW_SET_EXT_ERR(skfd, ifname, SIOCSIWMODE, &wrq, "Set Mode");