Skip to content

Commit

Permalink
mac80211: Always check rates and capabilities in mesh mode
Browse files Browse the repository at this point in the history
In mesh mode there is a race between establishing links and processing
rates and capabilities in beacons. This is very noticeable with slow
beacons (e.g. beacon intervals of 1s) and manifested for us as stations
using minstrel when minstrel_ht should be used. Fixed by changing
mesh_sta_info_init so that it always checks rates and such if it has not
already done so.

Signed-off-by: Alexis Green <agreen@cococorp.com>
CC: Jesse Jones <jjones@cococorp.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Alexis Green authored and Johannes Berg committed Jun 9, 2015
1 parent 8df734e commit e060e7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,9 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata,
sta->last_rx = jiffies;

/* rates and capabilities don't change during peering */
if (sta->plink_state == NL80211_PLINK_ESTAB)
if (sta->plink_state == NL80211_PLINK_ESTAB && sta->processed_beacon)
goto out;
sta->processed_beacon = true;

if (sta->sta.supp_rates[band] != rates)
changed |= IEEE80211_RC_SUPP_RATES_CHANGED;
Expand Down
3 changes: 3 additions & 0 deletions net/mac80211/sta_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ struct ieee80211_fast_tx {
* @rx_msdu: MSDUs received from this station, using IEEE80211_NUM_TID
* entry for non-QoS frames
* @fast_tx: TX fastpath information
* @processed_beacon: set to true after peer rates and capabilities are
* processed
*/
struct sta_info {
/* General information, mostly static */
Expand Down Expand Up @@ -473,6 +475,7 @@ struct sta_info {
enum nl80211_mesh_power_mode local_pm;
enum nl80211_mesh_power_mode peer_pm;
enum nl80211_mesh_power_mode nonpeer_pm;
bool processed_beacon;
#endif

#ifdef CONFIG_MAC80211_DEBUGFS
Expand Down

0 comments on commit e060e7a

Please sign in to comment.