static void wl_scan_prep(struct wl_scan_params *params, struct cfg80211_scan_request *request)
{
- u32 n_ssids = request->n_ssids;
- u32 n_channels = request->n_channels;
+ u32 n_ssids;
+ u32 n_channels;
u16 channel;
chanspec_t chanspec;
s32 i, offset;
params->passive_time = htod32(params->passive_time);
params->home_time = htod32(params->home_time);
+ if (!request)
+ return;
+
+ n_ssids = request->n_ssids;
+ n_channels = request->n_channels;
+
/* Copy channel array if applicable */
WL_SCAN(("### List of channelspecs to scan ###\n"));
if (n_channels > 0) {
return -ENOMEM;
}
- if (request != NULL)
- wl_scan_prep(¶ms->params, request);
+ wl_scan_prep(¶ms->params, request);
params->version = htod32(ISCAN_REQ_VERSION);
params->action = htod16(action);
goto exit;
}
- if (request != NULL)
- wl_scan_prep(¶ms->params, request);
+ wl_scan_prep(¶ms->params, request);
params->version = htod32(ESCAN_REQ_VERSION);
params->action = htod16(action);
params->sync_id = htod16(0x1234);