some wificonf and wlcompat cleanups/fixes
[openwrt/svn-archive/archive.git] / openwrt / target / linux / package / wlcompat / wlcompat.c
index aaccc7bceb1e4f23dc99d8733d05c7a3415df1de..b5f9bff60e106680f2693d1219712784f7c32f22 100644 (file)
@@ -360,10 +360,12 @@ static int wlcompat_ioctl(struct net_device *dev,
 
                                reg.size = 4;
                                reg.byteoff = 0x184;
-                               wl_ioctl(dev, WLC_R_REG, &reg, sizeof(reg));
+                               reg.val = bss_force << 16 | bss_force;
+                               wl_ioctl(dev, WLC_W_REG, &reg, sizeof(reg));
                                
-                               reg.val &= 0x0000ffff;
-                               reg.val |= bss_force << 16;
+                               reg.byteoff = 0x180;
+                               wl_ioctl(dev, WLC_R_REG, &reg, sizeof(reg));
+                               reg.val = bss_force << 16;
                                wl_ioctl(dev, WLC_W_REG, &reg, sizeof(reg));
                        }