diff options
author | Javier Cardona <javier@cozybit.com> | 2011-04-07 15:08:34 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-12 16:57:39 -0400 |
commit | c93b5e717ec47b57abfe0229360bc11e77520984 (patch) | |
tree | 1e6f703c3c1b1c2e55b759b4e992ef04e81f973e /include | |
parent | 96b78dff0321d881ef27d858a462c476e0444619 (diff) | |
download | kernel_goldelico_gta04-c93b5e717ec47b57abfe0229360bc11e77520984.zip kernel_goldelico_gta04-c93b5e717ec47b57abfe0229360bc11e77520984.tar.gz kernel_goldelico_gta04-c93b5e717ec47b57abfe0229360bc11e77520984.tar.bz2 |
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.h | 12 | ||||
-rw-r--r-- | include/net/cfg80211.h | 16 |
2 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 5ec4ac3..b874818 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h @@ -410,6 +410,16 @@ * notification. This event is used to indicate that an unprotected * disassociation frame was dropped when MFP is in use. * + * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a + * beacon or probe response from a compatible mesh peer. This is only + * sent while no station information (sta_info) exists for the new peer + * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On + * reception of this notification, userspace may decide to create a new + * station (@NL80211_CMD_NEW_STATION). To stop this notification from + * reoccurring, the userspace authentication daemon may want to create the + * new station with the AUTHENTICATED flag unset and maybe change it later + * depending on the authentication result. + * * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use */ @@ -522,6 +532,8 @@ enum nl80211_commands { NL80211_CMD_UNPROT_DEAUTHENTICATE, NL80211_CMD_UNPROT_DISASSOCIATE, + NL80211_CMD_NEW_PEER_CANDIDATE, + /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index e77603b..f40cd30 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, void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); /** + * cfg80211_notify_new_candidate - notify cfg80211 of a new mesh peer candidate + * + * @dev: network device + * @macaddr: the MAC address of the new candidate + * @ie: information elements advertised by the peer candidate + * @ie_len: lenght of the information elements buffer + * @gfp: allocation flags + * + * This function notifies cfg80211 that the mesh peer candidate has been + * detected, most likely via a beacon or, less likely, via a probe response. + * cfg80211 then sends a notification to userspace. + */ +void cfg80211_notify_new_peer_candidate(struct net_device *dev, + const u8 *macaddr, const u8 *ie, u8 ie_len, gfp_t gfp); + +/** * DOC: RFkill integration * * RFkill integration in cfg80211 is almost invisible to drivers, |