aboutsummaryrefslogtreecommitdiffstats
path: root/package/wificonf
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-06-24 00:50:45 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-06-24 00:50:45 +0000
commitbced1a93d1b4ca4b9526299bba206a222a1d7cb1 (patch)
tree14e78a65b4f80340a15a1767a8a42ddd82cb9e8d /package/wificonf
parent1798b545f7b085e4dd4985e3f49aa6806778eb33 (diff)
downloadupstream-bced1a93d1b4ca4b9526299bba206a222a1d7cb1.tar.gz
upstream-bced1a93d1b4ca4b9526299bba206a222a1d7cb1.tar.bz2
upstream-bced1a93d1b4ca4b9526299bba206a222a1d7cb1.zip
some minor bugfixes in wificonf
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1280 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/wificonf')
-rw-r--r--package/wificonf/wificonf.c44
1 files changed, 29 insertions, 15 deletions
diff --git a/package/wificonf/wificonf.c b/package/wificonf/wificonf.c
index ecf08c0b62..21a96c46ff 100644
--- a/package/wificonf/wificonf.c
+++ b/package/wificonf/wificonf.c
@@ -178,20 +178,34 @@ void setup_bcom(int skfd, char *ifname)
bcom_set_val(skfd, ifname, "afterburner_override", &val, sizeof(val));
/* Set other options */
- val = atoi(nvram_safe_get(wl_var("lazywds")));
- bcom_ioctl(skfd, ifname, WLC_SET_LAZYWDS, &val, sizeof(val));
- val = atoi(nvram_safe_get(wl_var("frag")));
- bcom_ioctl(skfd, ifname, WLC_SET_FRAG, &val, sizeof(val));
- val = atoi(nvram_safe_get(wl_var("dtim")));
- bcom_ioctl(skfd, ifname, WLC_SET_DTIMPRD, &val, sizeof(val));
- val = atoi(nvram_safe_get(wl_var("bcn")));
- bcom_ioctl(skfd, ifname, WLC_SET_BCNPRD, &val, sizeof(val));
- val = atoi(nvram_safe_get(wl_var("rts")));
- bcom_ioctl(skfd, ifname, WLC_SET_RTS, &val, sizeof(val));
- val = atoi(nvram_safe_get(wl_var("antdiv")));
- bcom_ioctl(skfd, ifname, WLC_SET_ANTDIV, &val, sizeof(val));
- val = atoi(nvram_safe_get(wl_var("txant")));
- bcom_ioctl(skfd, ifname, WLC_SET_TXANT, &val, sizeof(val));
+ if (v = nvram_get(wl_var("lazywds"))) {
+ val = atoi(v);
+ bcom_ioctl(skfd, ifname, WLC_SET_LAZYWDS, &val, sizeof(val));
+ }
+ if (v = nvram_get(wl_var("frag"))) {
+ val = atoi(v);
+ bcom_ioctl(skfd, ifname, WLC_SET_FRAG, &val, sizeof(val));
+ }
+ if (v = nvram_get(wl_var("dtim"))) {
+ val = atoi(v);
+ bcom_ioctl(skfd, ifname, WLC_SET_DTIMPRD, &val, sizeof(val));
+ }
+ if (v = nvram_get(wl_var("bcn"))) {
+ val = atoi(v);
+ bcom_ioctl(skfd, ifname, WLC_SET_BCNPRD, &val, sizeof(val));
+ }
+ if (v = nvram_get(wl_var("rts"))) {
+ val = atoi(v);
+ bcom_ioctl(skfd, ifname, WLC_SET_RTS, &val, sizeof(val));
+ }
+ if (v = nvram_get(wl_var("antdiv"))) {
+ val = atoi(v);
+ bcom_ioctl(skfd, ifname, WLC_SET_ANTDIV, &val, sizeof(val));
+ }
+ if (v = nvram_get(wl_var("txant"))) {
+ val = atoi(v);
+ bcom_ioctl(skfd, ifname, WLC_SET_TXANT, &val, sizeof(val));
+ }
val = nvram_enabled(wl_var("closed"));
bcom_ioctl(skfd, ifname, WLC_SET_CLOSED, &val, sizeof(val));
@@ -339,8 +353,8 @@ void setup_wext(int skfd, char *ifname)
if (channel > 0) {
wrq.u.freq.flags = IW_FREQ_FIXED;
wrq.u.freq.m = channel;
+ IW_SET_EXT_ERR(skfd, ifname, SIOCSIWFREQ, &wrq, "Set Frequency");
}
- IW_SET_EXT_ERR(skfd, ifname, SIOCSIWFREQ, &wrq, "Set Frequency");
/* Set operation mode */
int ap = 0, infra = 0, wet = 0;