summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/wext.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 5690c3d..3fc1b90 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -853,9 +853,12 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev,
ps = true;
break;
default: /* Otherwise we ignore */
- break;
+ return -EINVAL;
}
+ if (wrq->flags & ~(IW_POWER_MODE | IW_POWER_TIMEOUT))
+ return -EINVAL;
+
if (wrq->flags & IW_POWER_TIMEOUT)
timeout = wrq->value / 1000;