All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit e9aeabae authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: validate SIOCSIWPOWER arguments better

Don't accept any arguments we don't handle, and return error codes
instead of using an uninitialised stack value.
Signed-off-by: default avatarJohannes Berg <>
Reviewed-by: default avatarKalle Valo <>
Signed-off-by: default avatarJohn W. Linville <>
parent 4797938c
......@@ -853,9 +853,12 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev,
ps = true;
default: /* Otherwise we ignore */
return -EINVAL;
if (wrq->flags & ~(IW_POWER_MODE | IW_POWER_TIMEOUT))
return -EINVAL;
if (wrq->flags & IW_POWER_TIMEOUT)
timeout = wrq->value / 1000;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment