Configure and respond to a probe response offload query with the relevant protocols supported currently by the driver. Signed-off-by: Guy Eilam <guy@xxxxxxxxxx> --- 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 -- 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