aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-01-13 12:43:00 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-04 15:48:06 -0500
commit66e01cf99e0a9d0cbff21b0288c049654d5acf3e (patch)
tree260f0faa7f500757b98049ace42b7d34ab002a77 /net/mac80211/ieee80211_i.h
parentb58e81e96a81c80886011ad87cdbe73585dec4f7 (diff)
mac80211: only set CSA beacon when at least one beacon must be transmitted
A beacon should never have a Channel Switch Announcement information element with a count of 0, because a count of 1 means switch just before the next beacon. So, if a count of 0 was valid in a beacon, it would have been transmitted in the next channel already, which is useless. A CSA count equal to zero is only meaningful in action frames or probe_responses. Fix the ieee80211_csa_is_complete() and ieee80211_update_csa() functions accordingly. With a CSA count of 0, we won't transmit any CSA beacons, because the switch will happen before the next TBTT. To avoid extra work and potential confusion in the drivers, complete the CSA immediately, instead of waiting for the driver to call ieee80211_csa_finish(). To keep things simpler, we also switch immediately when the CSA count is 1, while in theory we should delay the switch until just before the next TBTT. Additionally, move the ieee80211_csa_finish() function to cfg.c, where it makes more sense. Tested-by: Simon Wunderlich <sw@simonwunderlich.de> Acked-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 428f5bd874e3..96eb272297e1 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1412,8 +1412,7 @@ void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata);
1412void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, 1412void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
1413 struct sk_buff *skb); 1413 struct sk_buff *skb);
1414int ieee80211_mesh_csa_beacon(struct ieee80211_sub_if_data *sdata, 1414int ieee80211_mesh_csa_beacon(struct ieee80211_sub_if_data *sdata,
1415 struct cfg80211_csa_settings *csa_settings, 1415 struct cfg80211_csa_settings *csa_settings);
1416 bool csa_action);
1417int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata); 1416int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata);
1418 1417
1419/* scan/BSS handling */ 1418/* scan/BSS handling */