Skip to content

Commit

Permalink
mac80211: move mesh related station fields to own struct
Browse files Browse the repository at this point in the history
There are now a fairly large number of mesh fields that really
aren't needed in any other modes; move those into their own
structure and allocate them separately.

Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
jmberg-intel committed Jul 17, 2015
1 parent e414eea commit 433f5bc
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 176 deletions.
8 changes: 4 additions & 4 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,10 +1150,10 @@ static int sta_apply_parameters(struct ieee80211_local *local,
if (params->sta_modify_mask & STATION_PARAM_APPLY_PLINK_STATE) {
switch (params->plink_state) {
case NL80211_PLINK_ESTAB:
if (sta->plink_state != NL80211_PLINK_ESTAB)
if (sta->mesh->plink_state != NL80211_PLINK_ESTAB)
changed = mesh_plink_inc_estab_count(
sdata);
sta->plink_state = params->plink_state;
sta->mesh->plink_state = params->plink_state;

ieee80211_mps_sta_status_update(sta);
changed |= ieee80211_mps_set_sta_local_pm(sta,
Expand All @@ -1165,10 +1165,10 @@ static int sta_apply_parameters(struct ieee80211_local *local,
case NL80211_PLINK_OPN_RCVD:
case NL80211_PLINK_CNF_RCVD:
case NL80211_PLINK_HOLDING:
if (sta->plink_state == NL80211_PLINK_ESTAB)
if (sta->mesh->plink_state == NL80211_PLINK_ESTAB)
changed = mesh_plink_dec_estab_count(
sdata);
sta->plink_state = params->plink_state;
sta->mesh->plink_state = params->plink_state;

ieee80211_mps_sta_status_update(sta);
changed |= ieee80211_mps_set_sta_local_pm(sta,
Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void mesh_sta_cleanup(struct sta_info *sta)
changed = mesh_accept_plinks_update(sdata);
if (!sdata->u.mesh.user_mpm) {
changed |= mesh_plink_deactivate(sta);
del_timer_sync(&sta->plink_timer);
del_timer_sync(&sta->mesh->plink_timer);
}

if (changed)
Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/mesh_hwmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,

rcu_read_lock();
sta = sta_info_get(sdata, mgmt->sa);
if (!sta || sta->plink_state != NL80211_PLINK_ESTAB) {
if (!sta || sta->mesh->plink_state != NL80211_PLINK_ESTAB) {
rcu_read_unlock();
return;
}
Expand Down
Loading

0 comments on commit 433f5bc

Please sign in to comment.