aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-04 11:18:15 +0100
committerDmitry Shmidt <dimitrysh@google.com>2012-08-24 13:56:07 -0700
commit82342154be417fc39c3afe54788314c5055b889e (patch)
treed46aeb69f01995da63eae9a8c6fc96be9894e94d /include
parenteef4c1efee2f8138ba91143a00adea178bcd5411 (diff)
downloadkernel_samsung_crespo-82342154be417fc39c3afe54788314c5055b889e.zip
kernel_samsung_crespo-82342154be417fc39c3afe54788314c5055b889e.tar.gz
kernel_samsung_crespo-82342154be417fc39c3afe54788314c5055b889e.tar.bz2
nl80211: add API to probe a client
When the AP SME in hostapd is used it wants to probe the clients when they have been idle for some time. Add explicit API to support this. 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.h17
2 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 445613c..fa921b7 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -507,6 +507,14 @@
* If used as the command it must have an interface index and you can
* only unsubscribe from the event by closing the socket.
*
+ * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface
+ * by sending a null data frame to it and reporting when the frame is
+ * acknowleged. This is used to allow timing out inactive clients. Uses
+ * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a
+ * direct reply with an %NL80211_ATTR_COOKIE that is later used to match
+ * up the event with the request. The event includes the same data and
+ * has %NL80211_ATTR_ACK set if the frame was ACKed.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -638,6 +646,8 @@ enum nl80211_commands {
NL80211_CMD_UNEXPECTED_FRAME,
+ NL80211_CMD_PROBE_CLIENT,
+
/* 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 918dc1f..f6f9fb4 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1368,6 +1368,9 @@ struct cfg80211_gtk_rekey_data {
*
* @tdls_mgmt: Transmit a TDLS management frame.
* @tdls_oper: Perform a high-level TDLS operation (e.g. TDLS link setup).
+ *
+ * @probe_client: probe an associated client, must return a cookie that it
+ * later passes to cfg80211_probe_status().
*/
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -1553,6 +1556,9 @@ struct cfg80211_ops {
u16 status_code, const u8 *buf, size_t len);
int (*tdls_oper)(struct wiphy *wiphy, struct net_device *dev,
u8 *peer, enum nl80211_tdls_operation oper);
+
+ int (*probe_client)(struct wiphy *wiphy, struct net_device *dev,
+ const u8 *peer, u64 *cookie);
};
/*
@@ -3161,6 +3167,17 @@ void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index,
bool cfg80211_rx_spurious_frame(struct net_device *dev,
const u8 *addr, gfp_t gfp);
+/**
+ * cfg80211_probe_status - notify userspace about probe status
+ * @dev: the device the probe was sent on
+ * @addr: the address of the peer
+ * @cookie: the cookie filled in @probe_client previously
+ * @acked: indicates whether probe was acked or not
+ * @gfp: allocation flags
+ */
+void cfg80211_probe_status(struct net_device *dev, const u8 *addr,
+ u64 cookie, bool acked, gfp_t gfp);
+
/* Logging, debugging and troubleshooting/diagnostic helpers. */
/* wiphy_printk helpers, similar to dev_printk */