aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-04 06:18:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 16:13:52 -0500
commitb92ab5d86dafc2b3733c5fdd5def40c8fe7ea7c9 (patch)
tree2676545e9b179102b00e02cc19b9643e8f718871 /include
parentee971924543fe82f279d3e97f6f6d02320b381b7 (diff)
cfg80211: add event for unexpected 4addr frames
The frames are used by AP/STA WDS mode, and hostapd needs to know when such a frame was received to set up the VLAN appropriately to allow using it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h10
-rw-r--r--include/net/cfg80211.h16
2 files changed, 25 insertions, 1 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index c29a284c27e6..09474ab7de8c 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -517,7 +517,13 @@
517 * For the event, the %NL80211_ATTR_MAC attribute carries the TA and 517 * For the event, the %NL80211_ATTR_MAC attribute carries the TA and
518 * other attributes like the interface index are present. 518 * other attributes like the interface index are present.
519 * If used as the command it must have an interface index and you can 519 * If used as the command it must have an interface index and you can
520 * only unsubscribe from the event by closing the socket. 520 * only unsubscribe from the event by closing the socket. Subscription
521 * is also for %NL80211_CMD_UNEXPECTED_4ADDR_FRAME events.
522 *
523 * @NL80211_CMD_UNEXPECTED_4ADDR_FRAME: Sent as an event indicating that the
524 * associated station identified by %NL80211_ATTR_MAC sent a 4addr frame
525 * and wasn't already in a 4-addr VLAN. The event will be sent similarly
526 * to the %NL80211_CMD_UNEXPECTED_FRAME event, to the same listener.
521 * 527 *
522 * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface 528 * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface
523 * by sending a null data frame to it and reporting when the frame is 529 * by sending a null data frame to it and reporting when the frame is
@@ -667,6 +673,8 @@ enum nl80211_commands {
667 673
668 NL80211_CMD_REGISTER_BEACONS, 674 NL80211_CMD_REGISTER_BEACONS,
669 675
676 NL80211_CMD_UNEXPECTED_4ADDR_FRAME,
677
670 /* add new commands above here */ 678 /* add new commands above here */
671 679
672 /* used to define NL80211_CMD_MAX below */ 680 /* used to define NL80211_CMD_MAX below */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d01307f54faa..be3535f0895e 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3227,6 +3227,22 @@ bool cfg80211_rx_spurious_frame(struct net_device *dev,
3227 const u8 *addr, gfp_t gfp); 3227 const u8 *addr, gfp_t gfp);
3228 3228
3229/** 3229/**
3230 * cfg80211_rx_unexpected_4addr_frame - inform about unexpected WDS frame
3231 * @dev: The device the frame matched to
3232 * @addr: the transmitter address
3233 * @gfp: context flags
3234 *
3235 * This function is used in AP mode (only!) to inform userspace that
3236 * an associated station sent a 4addr frame but that wasn't expected.
3237 * It is allowed and desirable to send this event only once for each
3238 * station to avoid event flooding.
3239 * Returns %true if the frame was passed to userspace (or this failed
3240 * for a reason other than not having a subscription.)
3241 */
3242bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev,
3243 const u8 *addr, gfp_t gfp);
3244
3245/**
3230 * cfg80211_probe_status - notify userspace about probe status 3246 * cfg80211_probe_status - notify userspace about probe status
3231 * @dev: the device the probe was sent on 3247 * @dev: the device the probe was sent on
3232 * @addr: the address of the peer 3248 * @addr: the address of the peer