diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2011-04-25 21:35:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-26 16:14:55 -0400 |
commit | c989bb15e95a93e20fc86783264f6298116e8651 (patch) | |
tree | 668efc5ef9f3929cbdce6fa02a3720da672dbeb1 | |
parent | d3bb1429a2c1470d1f84646c00e34dc6784ee06e (diff) |
cfg80211: fix regresion on reg user timeout
The patch "cfg80211: add a timer for invalid user reg hints"
introduced a regression for the case where a secondary identical
regulatory hint from a user is sent. What would happen is the
second hint would schedule delayed work in to catch a timeout
but since we are never processing it given that the hint was already
applied we'd always hit the timeout and and restore regulatory
settings back to world regulatory domain. This is fixed by simply
avoiding sheduling work if the hint was already applied.
Tested-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/wireless/reg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 2714379ce2d6..8982053f9961 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1455,7 +1455,8 @@ static void reg_process_hint(struct regulatory_request *reg_request) | |||
1455 | * We only time out user hints, given that they should be the only | 1455 | * We only time out user hints, given that they should be the only |
1456 | * source of bogus requests. | 1456 | * source of bogus requests. |
1457 | */ | 1457 | */ |
1458 | if (reg_request->initiator == NL80211_REGDOM_SET_BY_USER) | 1458 | if (r != -EALREADY && |
1459 | reg_request->initiator == NL80211_REGDOM_SET_BY_USER) | ||
1459 | schedule_delayed_work(®_timeout, msecs_to_jiffies(3142)); | 1460 | schedule_delayed_work(®_timeout, msecs_to_jiffies(3142)); |
1460 | } | 1461 | } |
1461 | 1462 | ||