diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-01-29 07:56:17 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-04 21:58:09 +0100 |
commit | faf046e7231bf008715bbffe5cca2ed3aa31be1b (patch) | |
tree | d48e8c2c753cef78202dd41656fbc1e7b679d2da /net/mac80211/ibss.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/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index ed7eec3f6ee0..82d3d14b03c5 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -530,7 +530,7 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata) { struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; struct cfg80211_bss *cbss; - int err; + int err, changed = 0; u16 capability; sdata_assert_lock(sdata); @@ -562,10 +562,9 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata) if (err < 0) return err; - if (err) - ieee80211_bss_info_change_notify(sdata, err); + changed |= err; - return 0; + return changed; } void ieee80211_ibss_stop(struct ieee80211_sub_if_data *sdata) |