Skip to content

Commit

Permalink
cfg80211: fix regresion on reg user timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Apr 26, 2011
1 parent d3bb142 commit c989bb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,8 @@ static void reg_process_hint(struct regulatory_request *reg_request)
* We only time out user hints, given that they should be the only
* source of bogus requests.
*/
if (reg_request->initiator == NL80211_REGDOM_SET_BY_USER)
if (r != -EALREADY &&
reg_request->initiator == NL80211_REGDOM_SET_BY_USER)
schedule_delayed_work(&reg_timeout, msecs_to_jiffies(3142));
}

Expand Down

0 comments on commit c989bb1

Please sign in to comment.