mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 01:43:08 +02:00
wlcompat: show wet mode as Managed mode as well to avoid confusion
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9529 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
ed261aac7d
commit
8c23d0644a
@ -779,6 +779,7 @@ static int wlcompat_ioctl(struct net_device *dev,
|
||||
{
|
||||
int ap = -1, infra = -1, passive = 0, wet = 0;
|
||||
|
||||
wl_ioctl(dev, WLC_GET_WET, &wet, sizeof(wet));
|
||||
switch (wrqu->mode) {
|
||||
case IW_MODE_MONITOR:
|
||||
passive = 1;
|
||||
@ -794,19 +795,20 @@ static int wlcompat_ioctl(struct net_device *dev,
|
||||
case IW_MODE_INFRA:
|
||||
infra = 1;
|
||||
ap = 0;
|
||||
wet = 0;
|
||||
break;
|
||||
case IW_MODE_REPEAT:
|
||||
infra = 1;
|
||||
ap = 0;
|
||||
wet = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
wl_ioctl(dev, WLC_SET_PASSIVE, &passive, sizeof(passive));
|
||||
wl_ioctl(dev, WLC_SET_MONITOR, &passive, sizeof(passive));
|
||||
if ((ap == 0) && (infra == 1))
|
||||
wl_ioctl(dev, WLC_SET_WET, &wet, sizeof(wet));
|
||||
if (ap >= 0)
|
||||
wl_ioctl(dev, WLC_SET_AP, &ap, sizeof(ap));
|
||||
@ -814,7 +816,6 @@ static int wlcompat_ioctl(struct net_device *dev,
|
||||
wl_ioctl(dev, WLC_SET_INFRA, &infra, sizeof(infra));
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
case SIOCGIWMODE:
|
||||
{
|
||||
@ -826,8 +827,6 @@ static int wlcompat_ioctl(struct net_device *dev,
|
||||
return -EINVAL;
|
||||
if (wl_ioctl(dev, WLC_GET_PASSIVE, &passive, sizeof(passive)) < 0)
|
||||
return -EINVAL;
|
||||
if (wl_ioctl(dev, WLC_GET_WET, &wet, sizeof(wet)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (passive) {
|
||||
wrqu->mode = IW_MODE_MONITOR;
|
||||
@ -836,14 +835,10 @@ static int wlcompat_ioctl(struct net_device *dev,
|
||||
} else {
|
||||
if (ap) {
|
||||
wrqu->mode = IW_MODE_MASTER;
|
||||
} else {
|
||||
if (wet) {
|
||||
wrqu->mode = IW_MODE_REPEAT;
|
||||
} else {
|
||||
wrqu->mode = IW_MODE_INFRA;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user