summaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorGregory Greenman2018-04-20 12:49:24 +0200
committerJohannes Berg2018-05-07 20:50:15 +0200
commit03737001e463d458c13510fcb64179b3368aaeee (patch)
treed3806e1452b144726562b5b77ddb09ad4f2e3575 /include/net/mac80211.h
parentmac80211: remove pointless flags=0 assignment (diff)
downloadkernel-qcow2-linux-03737001e463d458c13510fcb64179b3368aaeee.tar.gz
kernel-qcow2-linux-03737001e463d458c13510fcb64179b3368aaeee.tar.xz
kernel-qcow2-linux-03737001e463d458c13510fcb64179b3368aaeee.zip
mac80211: add api to set CSA counter in mac80211
Sometimes the most updated CSA counter values are known only to the device. Add an API to pass this data to mac80211. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d2279b2d61aa..52f36c43f35f 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -4450,6 +4450,19 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
u8 ieee80211_csa_update_counter(struct ieee80211_vif *vif);
/**
+ * ieee80211_csa_set_counter - request mac80211 to set csa counter
+ * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @counter: the new value for the counter
+ *
+ * The csa counter can be changed by the device, this API should be
+ * used by the device driver to update csa counter in mac80211.
+ *
+ * It should never be used together with ieee80211_csa_update_counter(),
+ * as it will cause a race condition around the counter value.
+ */
+void ieee80211_csa_set_counter(struct ieee80211_vif *vif, u8 counter);
+
+/**
* ieee80211_csa_finish - notify mac80211 about channel switch
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
*