diff options
author | Felix Fietkau <nbd@openwrt.org> | 2005-05-24 15:23:45 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2005-05-24 15:23:45 +0000 |
commit | f4582ec1b38418f4892a259d172b87dce885e902 (patch) | |
tree | a277f2f99d7305bc3a00a10c925085de5da4d9f3 | |
parent | 9c63e3bbfe514e09862b3540d35d1d15faeabd90 (diff) | |
download | master-187ad058-f4582ec1b38418f4892a259d172b87dce885e902.tar.gz master-187ad058-f4582ec1b38418f4892a259d172b87dce885e902.tar.bz2 master-187ad058-f4582ec1b38418f4892a259d172b87dce885e902.zip |
modify SIOCSIWAP call to associate with a specific bssid when in managed mode
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1051 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/openwrt/wlcompat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/package/openwrt/wlcompat.c b/package/openwrt/wlcompat.c index 01bfb0b437..d010e2bc87 100644 --- a/package/openwrt/wlcompat.c +++ b/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; |