mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-05 11:28:26 +02:00
don't enable wpa if wep is set
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1289 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
5db007757e
commit
6614e4bcf0
@ -155,20 +155,22 @@ void setup_bcom(int skfd, char *ifname)
|
|||||||
|
|
||||||
bcom_ioctl(skfd, ifname, WLC_DOWN, NULL, 0);
|
bcom_ioctl(skfd, ifname, WLC_DOWN, NULL, 0);
|
||||||
|
|
||||||
/* Set up WPA */
|
if (!nvram_enabled(wl_var("wep"))) {
|
||||||
if (nvram_match(wl_var("crypto"), "tkip"))
|
/* Set up WPA */
|
||||||
val = TKIP_ENABLED;
|
if (nvram_match(wl_var("crypto"), "tkip"))
|
||||||
else if (nvram_match(wl_var("crypto"), "aes"))
|
val = TKIP_ENABLED;
|
||||||
val = AES_ENABLED;
|
else if (nvram_match(wl_var("crypto"), "aes"))
|
||||||
else if (nvram_match(wl_var("crypto"), "tkip+aes"))
|
val = AES_ENABLED;
|
||||||
val = TKIP_ENABLED | AES_ENABLED;
|
else if (nvram_match(wl_var("crypto"), "tkip+aes"))
|
||||||
else
|
val = TKIP_ENABLED | AES_ENABLED;
|
||||||
val = 0;
|
else
|
||||||
bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val));
|
val = 0;
|
||||||
|
bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val));
|
||||||
|
|
||||||
if (val && nvram_get(wl_var("wpa_psk"))) {
|
if (val && nvram_get(wl_var("wpa_psk"))) {
|
||||||
val = 1;
|
val = 1;
|
||||||
bcom_ioctl(skfd, ifname, WLC_SET_EAP_RESTRICT, &val, sizeof(val));
|
bcom_ioctl(skfd, ifname, WLC_SET_EAP_RESTRICT, &val, sizeof(val));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up afterburner */
|
/* Set up afterburner */
|
||||||
|
Loading…
Reference in New Issue
Block a user