cfg80211: fix DFS channel recovery timeout
authorMichal Kazior <michal.kazior@tieto.com>
Thu, 17 Oct 2013 18:21:11 +0000 (11:21 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 21 Oct 2013 12:50:27 +0000 (14:50 +0200)
The timeout was not properly converted from msecs
to jiffies. As a result channel transition to
NL80211_DFS_USABLE was delayed depending on
CONFIG_HZ configuration, e.g. HZ=100 would delay
the NOP from 30 minutes to 300 minutes.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/mlme.c

index 8d49c1ce3deacbbb7ec9fe534e081ef7953607f5..edfe6de00e7bbc461a9e31b753531876c4f858cc 100644 (file)
@@ -707,8 +707,8 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
                        if (c->dfs_state != NL80211_DFS_UNAVAILABLE)
                                continue;
 
-                       timeout = c->dfs_state_entered +
-                                 IEEE80211_DFS_MIN_NOP_TIME_MS;
+                       timeout = c->dfs_state_entered + msecs_to_jiffies(
+                                       IEEE80211_DFS_MIN_NOP_TIME_MS);
 
                        if (time_after_eq(jiffies, timeout)) {
                                c->dfs_state = NL80211_DFS_USABLE;