aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-11-26 06:42:02 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-26 14:56:42 -0500
commit98f0334263f177dd22ca7c685cde04b47cc57b05 (patch)
treeb91346fbd400ceb756d02aacb4f050398c9c7a38 /include
parent5b97f49d653d366d8cb03cab40f8c45eb59dc70c (diff)
cfg80211: clean up beacon loss CQM event
Having it as a sub-event for RSSI thresholds is very ugly, but luckily no userspace actually uses the events yet. Move the event to its own function call internally and to its own event attribute in nl80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg80211.h9
-rw-r--r--include/net/mac80211.h8
-rw-r--r--include/uapi/linux/nl80211.h7
3 files changed, 21 insertions, 3 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1d15f1dfdaa7..4ebb816241fa 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4670,6 +4670,15 @@ void cfg80211_cqm_txe_notify(struct net_device *dev, const u8 *peer,
4670 u32 num_packets, u32 rate, u32 intvl, gfp_t gfp); 4670 u32 num_packets, u32 rate, u32 intvl, gfp_t gfp);
4671 4671
4672/** 4672/**
4673 * cfg80211_cqm_beacon_loss_notify - beacon loss event
4674 * @dev: network device
4675 * @gfp: context flags
4676 *
4677 * Notify userspace about beacon loss from the connected AP.
4678 */
4679void cfg80211_cqm_beacon_loss_notify(struct net_device *dev, gfp_t gfp);
4680
4681/**
4673 * cfg80211_radar_event - radar detection event 4682 * cfg80211_radar_event - radar detection event
4674 * @wiphy: the wiphy 4683 * @wiphy: the wiphy
4675 * @chandef: chandef for the current channel 4684 * @chandef: chandef for the current channel
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cff3a26a9dae..66cbfe46428d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -4672,6 +4672,14 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
4672 gfp_t gfp); 4672 gfp_t gfp);
4673 4673
4674/** 4674/**
4675 * ieee80211_cqm_beacon_loss_notify - inform CQM of beacon loss
4676 *
4677 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
4678 * @gfp: context flags
4679 */
4680void ieee80211_cqm_beacon_loss_notify(struct ieee80211_vif *vif, gfp_t gfp);
4681
4682/**
4675 * ieee80211_radar_detected - inform that a radar was detected 4683 * ieee80211_radar_detected - inform that a radar was detected
4676 * 4684 *
4677 * @hw: pointer as obtained from ieee80211_alloc_hw() 4685 * @hw: pointer as obtained from ieee80211_alloc_hw()
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index d77524510435..b37bd5a1cb82 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -3451,6 +3451,8 @@ enum nl80211_ps_state {
3451 * interval in which %NL80211_ATTR_CQM_TXE_PKTS and 3451 * interval in which %NL80211_ATTR_CQM_TXE_PKTS and
3452 * %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an 3452 * %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an
3453 * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting. 3453 * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting.
3454 * @NL80211_ATTR_CQM_BEACON_LOSS_EVENT: flag attribute that's set in a beacon
3455 * loss event
3454 * @__NL80211_ATTR_CQM_AFTER_LAST: internal 3456 * @__NL80211_ATTR_CQM_AFTER_LAST: internal
3455 * @NL80211_ATTR_CQM_MAX: highest key attribute 3457 * @NL80211_ATTR_CQM_MAX: highest key attribute
3456 */ 3458 */
@@ -3463,6 +3465,7 @@ enum nl80211_attr_cqm {
3463 NL80211_ATTR_CQM_TXE_RATE, 3465 NL80211_ATTR_CQM_TXE_RATE,
3464 NL80211_ATTR_CQM_TXE_PKTS, 3466 NL80211_ATTR_CQM_TXE_PKTS,
3465 NL80211_ATTR_CQM_TXE_INTVL, 3467 NL80211_ATTR_CQM_TXE_INTVL,
3468 NL80211_ATTR_CQM_BEACON_LOSS_EVENT,
3466 3469
3467 /* keep last */ 3470 /* keep last */
3468 __NL80211_ATTR_CQM_AFTER_LAST, 3471 __NL80211_ATTR_CQM_AFTER_LAST,
@@ -3475,9 +3478,7 @@ enum nl80211_attr_cqm {
3475 * configured threshold 3478 * configured threshold
3476 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the 3479 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the
3477 * configured threshold 3480 * configured threshold
3478 * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: The device experienced beacon loss. 3481 * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: (reserved, never sent)
3479 * (Note that deauth/disassoc will still follow if the AP is not
3480 * available. This event might get used as roaming event, etc.)
3481 */ 3482 */
3482enum nl80211_cqm_rssi_threshold_event { 3483enum nl80211_cqm_rssi_threshold_event {
3483 NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, 3484 NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,