aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2011-04-07 18:08:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-12 16:57:39 -0400
commitc93b5e717ec47b57abfe0229360bc11e77520984 (patch)
tree1e6f703c3c1b1c2e55b759b4e992ef04e81f973e /include
parent96b78dff0321d881ef27d858a462c476e0444619 (diff)
nl80211: New notification to discover mesh peer candidates.
Notify userspace when a beacon/presp is received from a suitable mesh peer candidate for whom no sta information exists. Userspace can then decide to create a sta info for the candidate. If userspace is not ready to authenticate the peer right away, it can create the sta info with the authenticated flag unset and set it later. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h12
-rw-r--r--include/net/cfg80211.h16
2 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 5ec4ac3a0ef4..b87481866dde 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -410,6 +410,16 @@
410 * notification. This event is used to indicate that an unprotected 410 * notification. This event is used to indicate that an unprotected
411 * disassociation frame was dropped when MFP is in use. 411 * disassociation frame was dropped when MFP is in use.
412 * 412 *
413 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a
414 * beacon or probe response from a compatible mesh peer. This is only
415 * sent while no station information (sta_info) exists for the new peer
416 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On
417 * reception of this notification, userspace may decide to create a new
418 * station (@NL80211_CMD_NEW_STATION). To stop this notification from
419 * reoccurring, the userspace authentication daemon may want to create the
420 * new station with the AUTHENTICATED flag unset and maybe change it later
421 * depending on the authentication result.
422 *
413 * @NL80211_CMD_MAX: highest used command number 423 * @NL80211_CMD_MAX: highest used command number
414 * @__NL80211_CMD_AFTER_LAST: internal use 424 * @__NL80211_CMD_AFTER_LAST: internal use
415 */ 425 */
@@ -522,6 +532,8 @@ enum nl80211_commands {
522 NL80211_CMD_UNPROT_DEAUTHENTICATE, 532 NL80211_CMD_UNPROT_DEAUTHENTICATE,
523 NL80211_CMD_UNPROT_DISASSOCIATE, 533 NL80211_CMD_UNPROT_DISASSOCIATE,
524 534
535 NL80211_CMD_NEW_PEER_CANDIDATE,
536
525 /* add new commands above here */ 537 /* add new commands above here */
526 538
527 /* used to define NL80211_CMD_MAX below */ 539 /* used to define NL80211_CMD_MAX below */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index e77603bd1630..f40cd30847de 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2489,6 +2489,22 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
2489void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); 2489void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp);
2490 2490
2491/** 2491/**
2492 * cfg80211_notify_new_candidate - notify cfg80211 of a new mesh peer candidate
2493 *
2494 * @dev: network device
2495 * @macaddr: the MAC address of the new candidate
2496 * @ie: information elements advertised by the peer candidate
2497 * @ie_len: lenght of the information elements buffer
2498 * @gfp: allocation flags
2499 *
2500 * This function notifies cfg80211 that the mesh peer candidate has been
2501 * detected, most likely via a beacon or, less likely, via a probe response.
2502 * cfg80211 then sends a notification to userspace.
2503 */
2504void cfg80211_notify_new_peer_candidate(struct net_device *dev,
2505 const u8 *macaddr, const u8 *ie, u8 ie_len, gfp_t gfp);
2506
2507/**
2492 * DOC: RFkill integration 2508 * DOC: RFkill integration
2493 * 2509 *
2494 * RFkill integration in cfg80211 is almost invisible to drivers, 2510 * RFkill integration in cfg80211 is almost invisible to drivers,