Search Linux Wireless

[PATCH 2/4] mac80211: Get the probe response offloading support from the driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux