aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nl80211.h
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-03-23 03:02:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-03-24 16:02:37 -0400
commitd6dc1a386358979e12366d1f35eeb68fc181e101 (patch)
tree4b65ba21328d6984d008b62795dd60d99c350632 /include/linux/nl80211.h
parent921ca03c8f8e982f27fc406bc301caf2196b99f7 (diff)
cfg80211: Add connection quality monitoring support to nl80211
Add support for basic configuration of a connection quality monitoring to the nl80211 interface, and basic support for notifying about triggered monitoring events. Via this interface a user-space connection manager may configure and receive pre-warning events of deteriorating WLAN connection quality, and start preparing for roaming in advance, before the connection is already lost. An example usage of such a trigger is starting scanning for nearby AP's in an attempt to find one with better connection quality, and associate to it before the connection characteristics of the existing connection become too bad or the association is even lost, leading in a prolonged delay in connectivity. The interface currently supports only RSSI, but it could be later extended to include other parameters, such as signal-to-noise ratio, if need for that arises. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r--include/linux/nl80211.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 28ba20fda3e2..89947597b9ce 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -323,6 +323,12 @@
323 * the TX command and %NL80211_ATTR_FRAME includes the contents of the 323 * the TX command and %NL80211_ATTR_FRAME includes the contents of the
324 * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged 324 * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged
325 * the frame. 325 * the frame.
326 * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command
327 * is used to configure connection quality monitoring notification trigger
328 * levels.
329 * @NL80211_CMD_NOTIFY_CQM: Connection quality monitor notification. This
330 * command is used as an event to indicate the that a trigger level was
331 * reached.
326 * 332 *
327 * @NL80211_CMD_MAX: highest used command number 333 * @NL80211_CMD_MAX: highest used command number
328 * @__NL80211_CMD_AFTER_LAST: internal use 334 * @__NL80211_CMD_AFTER_LAST: internal use
@@ -419,6 +425,9 @@ enum nl80211_commands {
419 NL80211_CMD_SET_POWER_SAVE, 425 NL80211_CMD_SET_POWER_SAVE,
420 NL80211_CMD_GET_POWER_SAVE, 426 NL80211_CMD_GET_POWER_SAVE,
421 427
428 NL80211_CMD_SET_CQM,
429 NL80211_CMD_NOTIFY_CQM,
430
422 /* add new commands above here */ 431 /* add new commands above here */
423 432
424 /* used to define NL80211_CMD_MAX below */ 433 /* used to define NL80211_CMD_MAX below */
@@ -691,6 +700,9 @@ enum nl80211_commands {
691 * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was 700 * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was
692 * acknowledged by the recipient. 701 * acknowledged by the recipient.
693 * 702 *
703 * @NL80211_ATTR_CQM: connection quality monitor configuration in a
704 * nested attribute with %NL80211_ATTR_CQM_* sub-attributes.
705 *
694 * @NL80211_ATTR_MAX: highest attribute number currently defined 706 * @NL80211_ATTR_MAX: highest attribute number currently defined
695 * @__NL80211_ATTR_AFTER_LAST: internal use 707 * @__NL80211_ATTR_AFTER_LAST: internal use
696 */ 708 */
@@ -842,6 +854,8 @@ enum nl80211_attrs {
842 854
843 NL80211_ATTR_PS_STATE, 855 NL80211_ATTR_PS_STATE,
844 856
857 NL80211_ATTR_CQM,
858
845 /* add attributes here, update the policy in nl80211.c */ 859 /* add attributes here, update the policy in nl80211.c */
846 860
847 __NL80211_ATTR_AFTER_LAST, 861 __NL80211_ATTR_AFTER_LAST,
@@ -1583,4 +1597,36 @@ enum nl80211_ps_state {
1583 NL80211_PS_ENABLED, 1597 NL80211_PS_ENABLED,
1584}; 1598};
1585 1599
1600/**
1601 * enum nl80211_attr_cqm - connection quality monitor attributes
1602 * @__NL80211_ATTR_CQM_INVALID: invalid
1603 * @NL80211_ATTR_CQM_RSSI_THOLD: RSSI threshold in dBm (zero to disable)
1604 * @NL80211_ATTR_CQM_RSSI_HYST: RSSI hysteresis in dBm
1605 * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
1606 * @__NL80211_ATTR_CQM_AFTER_LAST: internal
1607 * @NL80211_ATTR_CQM_MAX: highest key attribute
1608 */
1609enum nl80211_attr_cqm {
1610 __NL80211_ATTR_CQM_INVALID,
1611 NL80211_ATTR_CQM_RSSI_THOLD,
1612 NL80211_ATTR_CQM_RSSI_HYST,
1613 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT,
1614
1615 /* keep last */
1616 __NL80211_ATTR_CQM_AFTER_LAST,
1617 NL80211_ATTR_CQM_MAX = __NL80211_ATTR_CQM_AFTER_LAST - 1
1618};
1619
1620/**
1621 * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event
1622 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW - The RSSI level is lower than the
1623 * configured threshold
1624 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH - The RSSI is higher than the
1625 * configured threshold
1626 */
1627enum nl80211_cqm_rssi_threshold_event {
1628 NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
1629 NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
1630};
1631
1586#endif /* __LINUX_NL80211_H */ 1632#endif /* __LINUX_NL80211_H */