aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Pedersen <c_tpeder@qca.qualcomm.com>2012-07-12 19:17:33 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-17 05:57:23 -0400
commit84f10708f73254878246772cead70a2eb6a123f2 (patch)
tree39a4ca2f6cc3ab5b33320e3a62d2a8f7c4901b7a /include
parent00f5335079689cd65a9430b5df8974dc35c7914b (diff)
cfg80211: support TX error rate CQM
Let the user configure serveral TX error conection quality monitoring parameters: % error rate, survey interval, and # of attempted packets. On exceeding the TX failure rate over the given interval, the driver will send a CQM notify event with the actual TX failure rate and packets attempted. Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h16
-rw-r--r--include/net/cfg80211.h21
2 files changed, 37 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index e791487ead37..d6cfacc3ce4d 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1550,6 +1550,8 @@ enum nl80211_attrs {
1550/* default RSSI threshold for scan results if none specified. */ 1550/* default RSSI threshold for scan results if none specified. */
1551#define NL80211_SCAN_RSSI_THOLD_OFF -300 1551#define NL80211_SCAN_RSSI_THOLD_OFF -300
1552 1552
1553#define NL80211_CQM_TXE_MAX_INTVL 1800
1554
1553/** 1555/**
1554 * enum nl80211_iftype - (virtual) interface types 1556 * enum nl80211_iftype - (virtual) interface types
1555 * 1557 *
@@ -2589,6 +2591,17 @@ enum nl80211_ps_state {
2589 * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event 2591 * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
2590 * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many 2592 * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many
2591 * consecutive packets were not acknowledged by the peer 2593 * consecutive packets were not acknowledged by the peer
2594 * @NL80211_ATTR_CQM_TXE_RATE: TX error rate in %. Minimum % of TX failures
2595 * during the given %NL80211_ATTR_CQM_TXE_INTVL before an
2596 * %NL80211_CMD_NOTIFY_CQM with reported %NL80211_ATTR_CQM_TXE_RATE and
2597 * %NL80211_ATTR_CQM_TXE_PKTS is generated.
2598 * @NL80211_ATTR_CQM_TXE_PKTS: number of attempted packets in a given
2599 * %NL80211_ATTR_CQM_TXE_INTVL before %NL80211_ATTR_CQM_TXE_RATE is
2600 * checked.
2601 * @NL80211_ATTR_CQM_TXE_INTVL: interval in seconds. Specifies the periodic
2602 * interval in which %NL80211_ATTR_CQM_TXE_PKTS and
2603 * %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an
2604 * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting.
2592 * @__NL80211_ATTR_CQM_AFTER_LAST: internal 2605 * @__NL80211_ATTR_CQM_AFTER_LAST: internal
2593 * @NL80211_ATTR_CQM_MAX: highest key attribute 2606 * @NL80211_ATTR_CQM_MAX: highest key attribute
2594 */ 2607 */
@@ -2598,6 +2611,9 @@ enum nl80211_attr_cqm {
2598 NL80211_ATTR_CQM_RSSI_HYST, 2611 NL80211_ATTR_CQM_RSSI_HYST,
2599 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, 2612 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT,
2600 NL80211_ATTR_CQM_PKT_LOSS_EVENT, 2613 NL80211_ATTR_CQM_PKT_LOSS_EVENT,
2614 NL80211_ATTR_CQM_TXE_RATE,
2615 NL80211_ATTR_CQM_TXE_PKTS,
2616 NL80211_ATTR_CQM_TXE_INTVL,
2601 2617
2602 /* keep last */ 2618 /* keep last */
2603 __NL80211_ATTR_CQM_AFTER_LAST, 2619 __NL80211_ATTR_CQM_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 0245208c2978..493fa0c79005 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1573,6 +1573,8 @@ struct cfg80211_gtk_rekey_data {
1573 * @set_power_mgmt: Configure WLAN power management. A timeout value of -1 1573 * @set_power_mgmt: Configure WLAN power management. A timeout value of -1
1574 * allows the driver to adjust the dynamic ps timeout value. 1574 * allows the driver to adjust the dynamic ps timeout value.
1575 * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold. 1575 * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold.
1576 * @set_cqm_txe_config: Configure connection quality monitor TX error
1577 * thresholds.
1576 * @sched_scan_start: Tell the driver to start a scheduled scan. 1578 * @sched_scan_start: Tell the driver to start a scheduled scan.
1577 * @sched_scan_stop: Tell the driver to stop an ongoing scheduled 1579 * @sched_scan_stop: Tell the driver to stop an ongoing scheduled
1578 * scan. The driver_initiated flag specifies whether the driver 1580 * scan. The driver_initiated flag specifies whether the driver
@@ -1783,6 +1785,10 @@ struct cfg80211_ops {
1783 struct net_device *dev, 1785 struct net_device *dev,
1784 s32 rssi_thold, u32 rssi_hyst); 1786 s32 rssi_thold, u32 rssi_hyst);
1785 1787
1788 int (*set_cqm_txe_config)(struct wiphy *wiphy,
1789 struct net_device *dev,
1790 u32 rate, u32 pkts, u32 intvl);
1791
1786 void (*mgmt_frame_register)(struct wiphy *wiphy, 1792 void (*mgmt_frame_register)(struct wiphy *wiphy,
1787 struct wireless_dev *wdev, 1793 struct wireless_dev *wdev,
1788 u16 frame_type, bool reg); 1794 u16 frame_type, bool reg);
@@ -3396,6 +3402,21 @@ void cfg80211_cqm_pktloss_notify(struct net_device *dev,
3396 const u8 *peer, u32 num_packets, gfp_t gfp); 3402 const u8 *peer, u32 num_packets, gfp_t gfp);
3397 3403
3398/** 3404/**
3405 * cfg80211_cqm_txe_notify - TX error rate event
3406 * @dev: network device
3407 * @peer: peer's MAC address
3408 * @num_packets: how many packets were lost
3409 * @rate: % of packets which failed transmission
3410 * @intvl: interval (in s) over which the TX failure threshold was breached.
3411 * @gfp: context flags
3412 *
3413 * Notify userspace when configured % TX failures over number of packets in a
3414 * given interval is exceeded.
3415 */
3416void cfg80211_cqm_txe_notify(struct net_device *dev, const u8 *peer,
3417 u32 num_packets, u32 rate, u32 intvl, gfp_t gfp);
3418
3419/**
3399 * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying 3420 * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
3400 * @dev: network device 3421 * @dev: network device
3401 * @bssid: BSSID of AP (to avoid races) 3422 * @bssid: BSSID of AP (to avoid races)