aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-06-27 09:21:48 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-06-27 09:21:48 +0000
commit1d19b2b457608cd3a98a804b88e6cce53b4c609a (patch)
tree11f5e20881cde190d41478e156ad79f4c9c4ae20 /package
parenta94afabd39a9b9e22ee47b9578975d99de6590a8 (diff)
downloadupstream-1d19b2b457608cd3a98a804b88e6cce53b4c609a.tar.gz
upstream-1d19b2b457608cd3a98a804b88e6cce53b4c609a.tar.bz2
upstream-1d19b2b457608cd3a98a804b88e6cce53b4c609a.zip
don't enable wpa if wep is set
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1289 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/wificonf/wificonf.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/package/wificonf/wificonf.c b/package/wificonf/wificonf.c
index 8df932f1e2..4a5f2fc6cf 100644
--- a/package/wificonf/wificonf.c
+++ b/package/wificonf/wificonf.c
@@ -155,20 +155,22 @@ void setup_bcom(int skfd, char *ifname)
bcom_ioctl(skfd, ifname, WLC_DOWN, NULL, 0);
- /* Set up WPA */
- if (nvram_match(wl_var("crypto"), "tkip"))
- val = TKIP_ENABLED;
- else if (nvram_match(wl_var("crypto"), "aes"))
- val = AES_ENABLED;
- else if (nvram_match(wl_var("crypto"), "tkip+aes"))
- val = TKIP_ENABLED | AES_ENABLED;
- else
- val = 0;
- bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val));
-
- if (val && nvram_get(wl_var("wpa_psk"))) {
- val = 1;
- bcom_ioctl(skfd, ifname, WLC_SET_EAP_RESTRICT, &val, sizeof(val));
+ if (!nvram_enabled(wl_var("wep"))) {
+ /* Set up WPA */
+ if (nvram_match(wl_var("crypto"), "tkip"))
+ val = TKIP_ENABLED;
+ else if (nvram_match(wl_var("crypto"), "aes"))
+ val = AES_ENABLED;
+ else if (nvram_match(wl_var("crypto"), "tkip+aes"))
+ val = TKIP_ENABLED | AES_ENABLED;
+ else
+ val = 0;
+ bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val));
+
+ if (val && nvram_get(wl_var("wpa_psk"))) {
+ val = 1;
+ bcom_ioctl(skfd, ifname, WLC_SET_EAP_RESTRICT, &val, sizeof(val));
+ }
}
/* Set up afterburner */