aboutsummaryrefslogtreecommitdiffstats
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 5690c3d41e7d..3fc1b903bfbc 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -853,9 +853,12 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev,
853 ps = true; 853 ps = true;
854 break; 854 break;
855 default: /* Otherwise we ignore */ 855 default: /* Otherwise we ignore */
856 break; 856 return -EINVAL;
857 } 857 }
858 858
859 if (wrq->flags & ~(IW_POWER_MODE | IW_POWER_TIMEOUT))
860 return -EINVAL;
861
859 if (wrq->flags & IW_POWER_TIMEOUT) 862 if (wrq->flags & IW_POWER_TIMEOUT)
860 timeout = wrq->value / 1000; 863 timeout = wrq->value / 1000;
861 864