diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-24 15:23:45 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-24 15:23:45 +0000 |
commit | 68578ac8e043f0546164c465c7d9b5c5876ee3a1 (patch) | |
tree | 8491c8cf87bbee286ce9da60474076dd63bbaa69 /openwrt | |
parent | e937d4917751eee51eed5e4145fe145f41b7c0da (diff) |
modify SIOCSIWAP call to associate with a specific bssid when in managed mode
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1051 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt')
-rw-r--r-- | openwrt/package/openwrt/wlcompat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openwrt/package/openwrt/wlcompat.c b/openwrt/package/openwrt/wlcompat.c index 01bfb0b43..d010e2bc8 100644 --- a/openwrt/package/openwrt/wlcompat.c +++ b/openwrt/package/openwrt/wlcompat.c @@ -314,10 +314,15 @@ static int wlcompat_ioctl(struct net_device *dev, } case SIOCSIWAP: { + int ap = 0; + if (wrqu->ap_addr.sa_family != ARPHRD_ETHER) return -EINVAL; - if (wl_ioctl(dev,WLC_SET_BSSID,wrqu->ap_addr.sa_data,6) < 0) + if (wl_ioctl(dev, WLC_GET_AP, &ap, sizeof(ap)) < 0) + return -EINVAL; + + if (wl_ioctl(dev, (ap ? WLC_SET_BSSID : WLC_REASSOC), wrqu->ap_addr.sa_data, 6) < 0) return -EINVAL; break; |