From b5bf651933101e356b499cfb9b9824fa7df23958 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 25 Jul 2005 07:51:14 +0000 Subject: [PATCH] fix some small bugs in wificonf SVN-Revision: 1551 --- openwrt/package/wificonf/wificonf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openwrt/package/wificonf/wificonf.c b/openwrt/package/wificonf/wificonf.c index 404240e49c..b8eae257c1 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); @@ -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"); -- 2.30.2