diff options
Diffstat (limited to 'net/mac80211/rc80211_pid_algo.c')
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index a914ba73ccf5..21e1942ea975 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -148,9 +148,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo, | |||
148 | struct ieee80211_local *local, | 148 | struct ieee80211_local *local, |
149 | struct sta_info *sta) | 149 | struct sta_info *sta) |
150 | { | 150 | { |
151 | #ifdef CONFIG_MAC80211_MESH | ||
152 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 151 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
153 | #endif | ||
154 | struct rc_pid_sta_info *spinfo = sta->rate_ctrl_priv; | 152 | struct rc_pid_sta_info *spinfo = sta->rate_ctrl_priv; |
155 | struct rc_pid_rateinfo *rinfo = pinfo->rinfo; | 153 | struct rc_pid_rateinfo *rinfo = pinfo->rinfo; |
156 | struct ieee80211_supported_band *sband; | 154 | struct ieee80211_supported_band *sband; |
@@ -181,11 +179,8 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo, | |||
181 | pf = spinfo->last_pf; | 179 | pf = spinfo->last_pf; |
182 | else { | 180 | else { |
183 | pf = spinfo->tx_num_failed * 100 / spinfo->tx_num_xmit; | 181 | pf = spinfo->tx_num_failed * 100 / spinfo->tx_num_xmit; |
184 | #ifdef CONFIG_MAC80211_MESH | 182 | if (ieee80211_vif_is_mesh(&sdata->vif) && pf == 100) |
185 | if (pf == 100 && | ||
186 | sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) | ||
187 | mesh_plink_broken(sta); | 183 | mesh_plink_broken(sta); |
188 | #endif | ||
189 | pf <<= RC_PID_ARITH_SHIFT; | 184 | pf <<= RC_PID_ARITH_SHIFT; |
190 | sta->fail_avg = ((pf + (spinfo->last_pf << 3)) / 9) | 185 | sta->fail_avg = ((pf + (spinfo->last_pf << 3)) / 9) |
191 | >> RC_PID_ARITH_SHIFT; | 186 | >> RC_PID_ARITH_SHIFT; |