qcacmn: Return success during the sched stop request

In a scenario wherein after the sched_scan_start there is a system
recovery and previous pending sched_scan request is lost and during
the sched_scan_stop driver is returning error.
Because of which __cfg80211_stop_sched_scan will not
clear “rdev->sched_scan_req” blocking further sched_scan requests.

Return success in the event that the driver does not have any pending
sched scan to flush.

Change-Id: I6aba88ce033c59ebae54ca792e241a17b649ad73
CRs-Fixed: 2340653
此提交包含在:
Arunk Khandavalli
2018-10-31 18:40:44 +05:30
提交者 nshrivas
父節點 8a2dbfbc78
當前提交 2131523a2b

查看文件

@@ -587,27 +587,31 @@ error:
int wlan_cfg80211_sched_scan_stop(struct wlan_objmgr_pdev *pdev,
struct net_device *dev)
{
int ret = 0;
QDF_STATUS status;
struct wlan_objmgr_vdev *vdev;
vdev = wlan_objmgr_get_vdev_by_macaddr_from_pdev(pdev, dev->dev_addr,
WLAN_OSIF_ID);
if (!vdev) {
/*
* cfg80211 expects sched_scan_stop command to always succeed.
* There can be recovery or any other error in the driver between the
* sched_scan_start and sched_scan_stop commands. If driver does
* not return success in this case there is a possibility of further
* sched_scan_start request might not be received again.
*/
cfg80211_err("vdev object is NULL");
return -EIO;
return 0;
}
status = ucfg_scan_pno_stop(vdev);
if (QDF_IS_STATUS_ERROR(status)) {
if (QDF_IS_STATUS_ERROR(status))
cfg80211_err("Failed to disabled PNO");
ret = -EINVAL;
} else {
else
cfg80211_info("PNO scan disabled");
}
wlan_objmgr_vdev_release_ref(vdev, WLAN_OSIF_ID);
return ret;
return 0;
}
#endif /*FEATURE_WLAN_SCAN_PNO */