mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-10 19:02:28 +02:00
fix wds in wificonf
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1288 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
bb543c8fc7
commit
8f8ea3a76e
@ -146,6 +146,8 @@ int bcom_set_int(int skfd, char *ifname, char *var, int val)
|
|||||||
void setup_bcom(int skfd, char *ifname)
|
void setup_bcom(int skfd, char *ifname)
|
||||||
{
|
{
|
||||||
int val = 0;
|
int val = 0;
|
||||||
|
char buf[8192];
|
||||||
|
char wbuf[80];
|
||||||
char *v;
|
char *v;
|
||||||
|
|
||||||
if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0)
|
if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0)
|
||||||
@ -225,8 +227,6 @@ void setup_bcom(int skfd, char *ifname)
|
|||||||
val = WLC_MACMODE_DISABLED;
|
val = WLC_MACMODE_DISABLED;
|
||||||
|
|
||||||
if ((val != WLC_MACMODE_DISABLED) && (v = nvram_get(wl_var("maclist")))) {
|
if ((val != WLC_MACMODE_DISABLED) && (v = nvram_get(wl_var("maclist")))) {
|
||||||
char buf[8192];
|
|
||||||
char wbuf[80];
|
|
||||||
struct maclist *mac_list;
|
struct maclist *mac_list;
|
||||||
struct ether_addr *addr;
|
struct ether_addr *addr;
|
||||||
char *next;
|
char *next;
|
||||||
@ -235,7 +235,7 @@ void setup_bcom(int skfd, char *ifname)
|
|||||||
mac_list = (struct maclist *) buf;
|
mac_list = (struct maclist *) buf;
|
||||||
addr = mac_list->ea;
|
addr = mac_list->ea;
|
||||||
|
|
||||||
foreach(wbuf, nvram_safe_get(wl_var("maclist")), next) {
|
foreach(wbuf, v, next) {
|
||||||
if (ether_atoe(wbuf, addr->ether_addr_octet)) {
|
if (ether_atoe(wbuf, addr->ether_addr_octet)) {
|
||||||
mac_list->count++;
|
mac_list->count++;
|
||||||
addr++;
|
addr++;
|
||||||
@ -246,6 +246,21 @@ void setup_bcom(int skfd, char *ifname)
|
|||||||
val = WLC_MACMODE_DISABLED;
|
val = WLC_MACMODE_DISABLED;
|
||||||
}
|
}
|
||||||
bcom_ioctl(skfd, ifname, WLC_SET_MACMODE, &val, sizeof(val));
|
bcom_ioctl(skfd, ifname, WLC_SET_MACMODE, &val, sizeof(val));
|
||||||
|
|
||||||
|
if (v = nvram_get(wl_var("wds"))) {
|
||||||
|
struct maclist *wdslist = (struct maclist *) buf;
|
||||||
|
struct ether_addr *addr = wdslist->ea;
|
||||||
|
char *next;
|
||||||
|
|
||||||
|
memset(buf, 0, 8192);
|
||||||
|
foreach(wbuf, v, next) {
|
||||||
|
if (ether_atoe(wbuf, addr->ether_addr_octet)) {
|
||||||
|
wdslist->count++;
|
||||||
|
addr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bcom_ioctl(skfd, ifname, WLC_SET_WDSLIST, buf, sizeof(buf));
|
||||||
|
}
|
||||||
|
|
||||||
/* Set up G mode */
|
/* Set up G mode */
|
||||||
bcom_ioctl(skfd, ifname, WLC_GET_PHYTYPE, &val, sizeof(val));
|
bcom_ioctl(skfd, ifname, WLC_GET_PHYTYPE, &val, sizeof(val));
|
||||||
|
Loading…
Reference in New Issue
Block a user