qcacld-3.0: Fix assert due to invalid vdev id in spectral scan req

Assert in firmware due to invalid vdev id in spectral scan
request.

Fix is to check for invalid vdev id before spectral scan
req send to firmware.

Change-Id: I05b2e359a7b2535384fa40276d3aa42469b7ae81
CRs-Fixed: 2259269
This commit is contained in:
Abhinav Kumar 2018-07-04 13:14:23 +05:30 • committed by nshrivas
commit 7e1276f02d

View file

@ -54,6 +54,8 @@ static int __wlan_hdd_cfg80211_spectral_scan_start(struct wiphy *wiphy,
{
int ret;
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
struct net_device *dev = wdev->netdev;
struct hdd_adapter *adapter;
hdd_enter();
@ -66,6 +68,12 @@ static int __wlan_hdd_cfg80211_spectral_scan_start(struct wiphy *wiphy,
return -EPERM;
}
adapter = WLAN_HDD_GET_PRIV_PTR(dev);
if (wlan_hdd_validate_session_id(adapter->session_id)) {
hdd_err("invalid session id: %d", adapter->session_id);
return -EINVAL;
}
ret = wlan_cfg80211_spectral_scan_config_and_start(wiphy,
hdd_ctx->hdd_pdev,
data, data_len);