diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-01-29 01:56:17 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-04 15:58:09 -0500 |
commit | faf046e7231bf008715bbffe5cca2ed3aa31be1b (patch) | |
tree | d48e8c2c753cef78202dd41656fbc1e7b679d2da /net/mac80211/mesh.c | |
parent | 348baf0eac3391c62d441ec29b4c5da62ed91e74 (diff) |
mac80211: batch CSA bss info notification
Instead of having
ieee80211_bss_info_change_notify() scattered all
over the place just call it once when finalizing
CSA.
As a side effect this patch adds missing error
checking for IBSS CSA beacon update.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
[fix err vs. changed variable usage in ieee80211_csa_finalize()]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 836ec014eb58..bd55115c8922 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -1058,6 +1058,7 @@ int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata) | |||
1058 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 1058 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
1059 | struct mesh_csa_settings *tmp_csa_settings; | 1059 | struct mesh_csa_settings *tmp_csa_settings; |
1060 | int ret = 0; | 1060 | int ret = 0; |
1061 | int changed = 0; | ||
1061 | 1062 | ||
1062 | /* Reset the TTL value and Initiator flag */ | 1063 | /* Reset the TTL value and Initiator flag */ |
1063 | ifmsh->csa_role = IEEE80211_MESH_CSA_ROLE_NONE; | 1064 | ifmsh->csa_role = IEEE80211_MESH_CSA_ROLE_NONE; |
@@ -1072,11 +1073,11 @@ int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata) | |||
1072 | if (ret) | 1073 | if (ret) |
1073 | return -EINVAL; | 1074 | return -EINVAL; |
1074 | 1075 | ||
1075 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | 1076 | changed |= BSS_CHANGED_BEACON; |
1076 | 1077 | ||
1077 | mcsa_dbg(sdata, "complete switching to center freq %d MHz", | 1078 | mcsa_dbg(sdata, "complete switching to center freq %d MHz", |
1078 | sdata->vif.bss_conf.chandef.chan->center_freq); | 1079 | sdata->vif.bss_conf.chandef.chan->center_freq); |
1079 | return 0; | 1080 | return changed; |
1080 | } | 1081 | } |
1081 | 1082 | ||
1082 | int ieee80211_mesh_csa_beacon(struct ieee80211_sub_if_data *sdata, | 1083 | int ieee80211_mesh_csa_beacon(struct ieee80211_sub_if_data *sdata, |