From: Guy Eilam <guy@wizery.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 2/4] mac80211: Get the probe response offloading support from the driver
Date: Sat, 22 Oct 2011 15:11:50 +0200 [thread overview]
Message-ID: <1319289112-21896-2-git-send-email-guy@wizery.com> (raw)
In-Reply-To: <1319289112-21896-1-git-send-email-guy@wizery.com>
Query the driver for probe response offloading support
in order to notify the userspace on the protocols supported
by the driver for offloading.
Signed-off-by: Guy Eilam <guy@wizery.com>
---
include/net/mac80211.h | 3 +++
net/mac80211/cfg.c | 9 +++++++++
net/mac80211/driver-ops.h | 11 +++++++++++
3 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cd108df..1c58fd7 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2080,6 +2080,7 @@ enum ieee80211_frame_release_type {
* The @tids parameter is a bitmap and tells the driver which TIDs the
* frames will be on; it will at most have two bits set.
* This callback must be atomic.
+ * @get_probe_resp_offload: Get probe response offload support from driver.
*/
struct ieee80211_ops {
void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -2206,6 +2207,8 @@ struct ieee80211_ops {
u16 tids, int num_frames,
enum ieee80211_frame_release_type reason,
bool more_data);
+ int (*get_probe_resp_offload) (struct ieee80211_hw *hw,
+ u32 *supp_protocols);
};
/**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 1309bb9..3cdb4a9 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2470,6 +2470,14 @@ static int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
return 0;
}
+static int ieee80211_get_probe_resp_offload(struct wiphy *wiphy,
+ u32 *supp_protocols)
+{
+ struct ieee80211_local *local = wiphy_priv(wiphy);
+
+ return drv_get_probe_resp_offload(local, supp_protocols);
+}
+
struct cfg80211_ops mac80211_config_ops = {
.add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface,
@@ -2535,4 +2543,5 @@ struct cfg80211_ops mac80211_config_ops = {
.set_rekey_data = ieee80211_set_rekey_data,
.tdls_oper = ieee80211_tdls_oper,
.tdls_mgmt = ieee80211_tdls_mgmt,
+ .get_probe_resp_offload = ieee80211_get_probe_resp_offload,
};
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 5f165d7..cd8da74 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -701,4 +701,15 @@ drv_allow_buffered_frames(struct ieee80211_local *local,
more_data);
trace_drv_return_void(local);
}
+static inline int drv_get_probe_resp_offload(struct ieee80211_local *local,
+ u32 *supp_protocols)
+{
+ int ret = -EOPNOTSUPP;
+ might_sleep();
+ if (local->ops->get_probe_resp_offload)
+ ret = local->ops->get_probe_resp_offload(&local->hw,
+ supp_protocols);
+ return ret;
+}
+
#endif /* __MAC80211_DRIVER_OPS */
--
1.7.4.1
next prev parent reply other threads:[~2011-10-22 13:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-22 13:11 [PATCH 1/4] nl80211: Add probe response offload attribute Guy Eilam
2011-10-22 13:11 ` Guy Eilam [this message]
2011-10-22 13:11 ` [PATCH 3/4] nl80211: Pass probe response data to drivers Guy Eilam
2011-10-22 13:11 ` [PATCH 4/4] mac80211: Save probe response data for BSS Guy Eilam
2011-10-22 13:34 ` [PATCH 1/4] nl80211: Add probe response offload attribute Johannes Berg
2011-10-22 13:36 ` Johannes Berg
2011-10-22 17:26 ` Guy Eilam
2011-10-22 17:39 ` Johannes Berg
2011-10-22 17:42 ` Guy Eilam
2011-10-22 17:44 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1319289112-21896-2-git-send-email-guy@wizery.com \
--to=guy@wizery.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox