diff options
-rw-r--r-- | net/mac80211/wext.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 5690c3d41e7..3fc1b903bfb 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; |