mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
net: wireless: bcmdhd: Fix proper scan command even if request is NULL
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
f227b88c89
commit
599c8566fa
|
|
@ -1130,8 +1130,8 @@ wl_cfg80211_notify_ifchange(void)
|
|||
|
||||
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;
|
||||
|
|
@ -1160,6 +1160,12 @@ static void wl_scan_prep(struct wl_scan_params *params, struct cfg80211_scan_req
|
|||
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) {
|
||||
|
|
@ -1248,8 +1254,7 @@ wl_run_iscan(struct wl_iscan_ctrl *iscan, struct cfg80211_scan_request *request,
|
|||
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);
|
||||
|
|
@ -1340,8 +1345,7 @@ wl_run_escan(struct wl_priv *wl, struct net_device *ndev,
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user