staging: wilc1000: assign scan result callback before starting the scan
When scan is triggered, sometimes scan results are received before the scan result callback is assigned, causing the recieved results to be ignored. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3589e74873
commit
eab0754655
@ -313,6 +313,9 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
|
|||||||
wid_list[index].val = (s8 *)&scan_source;
|
wid_list[index].val = (s8 *)&scan_source;
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
|
hif_drv->usr_scan_req.scan_result = scan_result_fn;
|
||||||
|
hif_drv->usr_scan_req.arg = user_arg;
|
||||||
|
|
||||||
result = wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
|
result = wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
|
||||||
index,
|
index,
|
||||||
wilc_get_vif_idx(vif));
|
wilc_get_vif_idx(vif));
|
||||||
@ -321,8 +324,6 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
hif_drv->usr_scan_req.scan_result = scan_result_fn;
|
|
||||||
hif_drv->usr_scan_req.arg = user_arg;
|
|
||||||
hif_drv->scan_timer_vif = vif;
|
hif_drv->scan_timer_vif = vif;
|
||||||
mod_timer(&hif_drv->scan_timer,
|
mod_timer(&hif_drv->scan_timer,
|
||||||
jiffies + msecs_to_jiffies(WILC_HIF_SCAN_TIMEOUT_MS));
|
jiffies + msecs_to_jiffies(WILC_HIF_SCAN_TIMEOUT_MS));
|
||||||
|
Loading…
Reference in New Issue
Block a user