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 | 0d7667d477d6b852dc56857352474537731357a4 (patch) | |
tree | 8491c8cf87bbee286ce9da60474076dd63bbaa69 /openwrt/package | |
parent | e9a0d8517b43b6fae37bb593de36694b68efb713 (diff) | |
download | mtk-20170518-0d7667d477d6b852dc56857352474537731357a4.zip mtk-20170518-0d7667d477d6b852dc56857352474537731357a4.tar.gz mtk-20170518-0d7667d477d6b852dc56857352474537731357a4.tar.bz2 |
modify SIOCSIWAP call to associate with a specific bssid when in managed mode
SVN-Revision: 1051
Diffstat (limited to 'openwrt/package')
-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 01bfb0b..d010e2b 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; |