aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index b488e1859b18..60d737f144e3 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -17,7 +17,7 @@
17#define PLINK_GET_PLID(p) (p + 4) 17#define PLINK_GET_PLID(p) (p + 4)
18 18
19#define mod_plink_timer(s, t) (mod_timer(&s->plink_timer, \ 19#define mod_plink_timer(s, t) (mod_timer(&s->plink_timer, \
20 jiffies + HZ * t / 1000)) 20 jiffies + msecs_to_jiffies(t)))
21 21
22enum plink_event { 22enum plink_event {
23 PLINK_UNDEFINED, 23 PLINK_UNDEFINED,
@@ -382,6 +382,7 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata,
382 enum ieee80211_band band = ieee80211_get_sdata_band(sdata); 382 enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
383 struct ieee80211_supported_band *sband; 383 struct ieee80211_supported_band *sband;
384 u32 rates, basic_rates = 0, changed = 0; 384 u32 rates, basic_rates = 0, changed = 0;
385 enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth;
385 386
386 sband = local->hw.wiphy->bands[band]; 387 sband = local->hw.wiphy->bands[band];
387 rates = ieee80211_sta_get_rates(sdata, elems, band, &basic_rates); 388 rates = ieee80211_sta_get_rates(sdata, elems, band, &basic_rates);
@@ -401,6 +402,9 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata,
401 elems->ht_cap_elem, sta)) 402 elems->ht_cap_elem, sta))
402 changed |= IEEE80211_RC_BW_CHANGED; 403 changed |= IEEE80211_RC_BW_CHANGED;
403 404
405 if (bw != sta->sta.bandwidth)
406 changed |= IEEE80211_RC_BW_CHANGED;
407
404 /* HT peer is operating 20MHz-only */ 408 /* HT peer is operating 20MHz-only */
405 if (elems->ht_operation && 409 if (elems->ht_operation &&
406 !(elems->ht_operation->ht_param & 410 !(elems->ht_operation->ht_param &
@@ -621,9 +625,9 @@ static void mesh_plink_timer(unsigned long data)
621 sta->llid, sta->plid, reason); 625 sta->llid, sta->plid, reason);
622} 626}
623 627
624static inline void mesh_plink_timer_set(struct sta_info *sta, int timeout) 628static inline void mesh_plink_timer_set(struct sta_info *sta, u32 timeout)
625{ 629{
626 sta->plink_timer.expires = jiffies + (HZ * timeout / 1000); 630 sta->plink_timer.expires = jiffies + msecs_to_jiffies(timeout);
627 sta->plink_timer.data = (unsigned long) sta; 631 sta->plink_timer.data = (unsigned long) sta;
628 sta->plink_timer.function = mesh_plink_timer; 632 sta->plink_timer.function = mesh_plink_timer;
629 sta->plink_timeout = timeout; 633 sta->plink_timeout = timeout;