All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] wl12xx: configure the probe response offloading support
@ 2011-10-22 13:14 Guy Eilam
  2011-10-22 13:14 ` [PATCH 2/2] wl12xx: configure probe-resp template according to notification Guy Eilam
  0 siblings, 1 reply; 2+ messages in thread
From: Guy Eilam @ 2011-10-22 13:14 UTC (permalink / raw)
  To: coelho; +Cc: linux-wireless

Configure and respond to a probe response offload query with
the relevant protocols supported currently by the driver.

Signed-off-by: Guy Eilam <guy@wizery.com>
---
 drivers/net/wireless/wl12xx/conf.h |    2 ++
 drivers/net/wireless/wl12xx/main.c |   15 +++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index 04bb8fb..714f9d4 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -1264,6 +1264,8 @@ struct conf_drv_settings {
 	struct conf_rate_policy_settings rate;
 	struct conf_hangover_settings hangover;
 	u8 hci_io_ds;
+	/* a bitmap of supported protocols for probe response offloading */
+	u32 probe_resp_offload;
 };
 
 #endif
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index f76be5a..0a7d020 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -373,6 +373,10 @@ static struct conf_drv_settings default_conf = {
 		.increase_time              = 1,
 		.window_size                = 16,
 	},
+	.probe_resp_offload =
+		BIT(NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS) |
+		BIT(NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2) |
+		BIT(NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P),
 };
 
 static char *fwlog_param;
@@ -4081,6 +4085,16 @@ static int wl1271_op_get_survey(struct ieee80211_hw *hw, int idx,
 	return 0;
 }
 
+static int wl1271_op_get_probe_resp_offload(struct ieee80211_hw *hw,
+				u32 *supp_protocols)
+{
+	struct wl1271 *wl = hw->priv;
+
+	*supp_protocols = wl->conf.probe_resp_offload;
+
+	return 0;
+}
+
 static int wl1271_allocate_sta(struct wl1271 *wl,
 			     struct wl12xx_vif *wlvif,
 			     struct ieee80211_sta *sta)
@@ -4666,6 +4680,7 @@ static const struct ieee80211_ops wl1271_ops = {
 	.tx_frames_pending = wl1271_tx_frames_pending,
 	.set_bitrate_mask = wl12xx_set_bitrate_mask,
 	.channel_switch = wl12xx_op_channel_switch,
+	.get_probe_resp_offload = wl1271_op_get_probe_resp_offload,
 	CFG80211_TESTMODE_CMD(wl1271_tm_cmd)
 };
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-22 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-22 13:14 [PATCH 1/2] wl12xx: configure the probe response offloading support Guy Eilam
2011-10-22 13:14 ` [PATCH 2/2] wl12xx: configure probe-resp template according to notification Guy Eilam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.