aboutsummaryrefslogtreecommitdiffstats
path: root/package/broadcom-wl
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-11-10 19:01:00 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-11-10 19:01:00 +0000
commit658fcd6cf3737ce7a2bb9bfd382b57bae11d5826 (patch)
treefe213b39d01e042bffe9f04a32678198bd132788 /package/broadcom-wl
parent2ab260e917ee2ffa4d215aac2c7be093d48f76d2 (diff)
downloadupstream-658fcd6cf3737ce7a2bb9bfd382b57bae11d5826.tar.gz
upstream-658fcd6cf3737ce7a2bb9bfd382b57bae11d5826.tar.bz2
upstream-658fcd6cf3737ce7a2bb9bfd382b57bae11d5826.zip
wlcompat: show wet mode as Managed mode as well to avoid confusion
SVN-Revision: 9529
Diffstat (limited to 'package/broadcom-wl')
-rw-r--r--package/broadcom-wl/src/wlcompat/wlcompat.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/package/broadcom-wl/src/wlcompat/wlcompat.c b/package/broadcom-wl/src/wlcompat/wlcompat.c
index 3e869ea795..2694a851c0 100644
--- a/package/broadcom-wl/src/wlcompat/wlcompat.c
+++ b/package/broadcom-wl/src/wlcompat/wlcompat.c
@@ -778,7 +778,8 @@ static int wlcompat_ioctl(struct net_device *dev,
case SIOCSIWMODE:
{
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,27 +795,27 @@ 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));
- wl_ioctl(dev, WLC_SET_WET, &wet, sizeof(wet));
- if (ap >= 0)
+ 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));
if (infra >= 0)
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;
@@ -837,11 +836,7 @@ static int wlcompat_ioctl(struct net_device *dev,
if (ap) {
wrqu->mode = IW_MODE_MASTER;
} else {
- if (wet) {
- wrqu->mode = IW_MODE_REPEAT;
- } else {
- wrqu->mode = IW_MODE_INFRA;
- }
+ wrqu->mode = IW_MODE_INFRA;
}
}
break;