aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-11-28 04:42:36 -0500
committerLuciano Coelho <coelho@ti.com>2012-12-11 03:26:23 -0500
commitc23280eb1436edd30814e5e40e4c46ae4cdb3cf4 (patch)
tree56a9a1c811e92d835ef7fe98b3677dd9b0af75f7 /drivers
parent387116b89e987521653b7e9b70a13a9dc1ea6a85 (diff)
wlcore: set 5Ghz probe-req template for DFS channels
Even passive scans on DFS channels require us to send probe requests, so configure the probe-req in this case. Also use this opportunity to prevent the code from crashing in case no SSIDs are sent from above. This will likely happen in the DFS case introduced. Even a passive scan might need the probe request configured because of DFS channels. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ti/wl18xx/scan.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/scan.c b/drivers/net/wireless/ti/wl18xx/scan.c
index daaebad78e1c..1df88d5336f3 100644
--- a/drivers/net/wireless/ti/wl18xx/scan.c
+++ b/drivers/net/wireless/ti/wl18xx/scan.c
@@ -108,27 +108,27 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif,
108 if (cmd->active[0]) { 108 if (cmd->active[0]) {
109 u8 band = IEEE80211_BAND_2GHZ; 109 u8 band = IEEE80211_BAND_2GHZ;
110 ret = wl12xx_cmd_build_probe_req(wl, wlvif, 110 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
111 cmd->role_id, band, 111 cmd->role_id, band,
112 req->ssids[0].ssid, 112 req->ssids ? req->ssids[0].ssid : NULL,
113 req->ssids[0].ssid_len, 113 req->ssids ? req->ssids[0].ssid_len : 0,
114 req->ie, 114 req->ie,
115 req->ie_len, 115 req->ie_len,
116 false); 116 false);
117 if (ret < 0) { 117 if (ret < 0) {
118 wl1271_error("2.4GHz PROBE request template failed"); 118 wl1271_error("2.4GHz PROBE request template failed");
119 goto out; 119 goto out;
120 } 120 }
121 } 121 }
122 122
123 if (cmd->active[1]) { 123 if (cmd->active[1] || cmd->dfs) {
124 u8 band = IEEE80211_BAND_5GHZ; 124 u8 band = IEEE80211_BAND_5GHZ;
125 ret = wl12xx_cmd_build_probe_req(wl, wlvif, 125 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
126 cmd->role_id, band, 126 cmd->role_id, band,
127 req->ssids[0].ssid, 127 req->ssids ? req->ssids[0].ssid : NULL,
128 req->ssids[0].ssid_len, 128 req->ssids ? req->ssids[0].ssid_len : 0,
129 req->ie, 129 req->ie,
130 req->ie_len, 130 req->ie_len,
131 false); 131 false);
132 if (ret < 0) { 132 if (ret < 0) {
133 wl1271_error("5GHz PROBE request template failed"); 133 wl1271_error("5GHz PROBE request template failed");
134 goto out; 134 goto out;
@@ -230,27 +230,27 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl,
230 if (cmd->active[0]) { 230 if (cmd->active[0]) {
231 u8 band = IEEE80211_BAND_2GHZ; 231 u8 band = IEEE80211_BAND_2GHZ;
232 ret = wl12xx_cmd_build_probe_req(wl, wlvif, 232 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
233 cmd->role_id, band, 233 cmd->role_id, band,
234 req->ssids[0].ssid, 234 req->ssids ? req->ssids[0].ssid : NULL,
235 req->ssids[0].ssid_len, 235 req->ssids ? req->ssids[0].ssid_len : 0,
236 ies->ie[band], 236 ies->ie[band],
237 ies->len[band], 237 ies->len[band],
238 true); 238 true);
239 if (ret < 0) { 239 if (ret < 0) {
240 wl1271_error("2.4GHz PROBE request template failed"); 240 wl1271_error("2.4GHz PROBE request template failed");
241 goto out; 241 goto out;
242 } 242 }
243 } 243 }
244 244
245 if (cmd->active[1]) { 245 if (cmd->active[1] || cmd->dfs) {
246 u8 band = IEEE80211_BAND_5GHZ; 246 u8 band = IEEE80211_BAND_5GHZ;
247 ret = wl12xx_cmd_build_probe_req(wl, wlvif, 247 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
248 cmd->role_id, band, 248 cmd->role_id, band,
249 req->ssids[0].ssid, 249 req->ssids ? req->ssids[0].ssid : NULL,
250 req->ssids[0].ssid_len, 250 req->ssids ? req->ssids[0].ssid_len : 0,
251 ies->ie[band], 251 ies->ie[band],
252 ies->len[band], 252 ies->len[band],
253 true); 253 true);
254 if (ret < 0) { 254 if (ret < 0) {
255 wl1271_error("5GHz PROBE request template failed"); 255 wl1271_error("5GHz PROBE request template failed");
256 goto out; 256 goto out;