X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/56d6d3bbec7385c602b6d034b718bd1139bd2c95..371ef4e9f9c8ee190fcaee7ed29f87ca965b723e:/package/wificonf/wificonf.c diff --git a/package/wificonf/wificonf.c b/package/wificonf/wificonf.c index abf5230e0..61e0910f6 100644 --- a/package/wificonf/wificonf.c +++ b/package/wificonf/wificonf.c @@ -176,6 +176,8 @@ void setup_bcom(int skfd, char *ifname) if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) return; + nvram_set(wl_var("ifname"), ifname); + stop_bcom(skfd, ifname); /* Set Country */ @@ -474,10 +476,15 @@ static int setup_interfaces(int skfd, char *ifname, char *args[], int count) if(iw_get_ext(skfd, ifname, SIOCGIWNAME, &wrq) < 0) return 0; - stop_bcom(skfd, ifname); - set_wext_mode(skfd, ifname); - setup_bcom(skfd, ifname); - setup_wext(skfd, ifname); + if (strncmp(ifname, "ath", 3) == 0) { + set_wext_mode(skfd, ifname); + setup_wext(skfd, ifname); + } else { + stop_bcom(skfd, ifname); + set_wext_mode(skfd, ifname); + setup_bcom(skfd, ifname); + setup_wext(skfd, ifname); + } prefix[2]++; }