qcacmn: Validate status of spectral control request processed
Validate the result of spectral specific ucfg control operation after processing the control request to get the spectral system capability information and the spectral diag status. Throw error if it is an invalid operation. CRs-Fixed: 3272699 Change-Id: Iba1b165caa41a7b4a133e9d9f3df7203a60a2b75
This commit is contained in:

committed by
Madan Koyyalamudi

parent
42039b3f6b
commit
fd8b102007
@@ -1019,6 +1019,8 @@ int wlan_cfg80211_spectral_scan_get_diag_stats(struct wiphy *wiphy,
|
|||||||
|
|
||||||
sscan_req.req_id = SPECTRAL_GET_DIAG_STATS;
|
sscan_req.req_id = SPECTRAL_GET_DIAG_STATS;
|
||||||
status = ucfg_spectral_control(pdev, &sscan_req);
|
status = ucfg_spectral_control(pdev, &sscan_req);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
return -EINVAL;
|
||||||
spetcral_diag = &sscan_req.diag_req.sscan_diag;
|
spetcral_diag = &sscan_req.diag_req.sscan_diag;
|
||||||
|
|
||||||
skb = wlan_cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
|
skb = wlan_cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
|
||||||
|
@@ -438,7 +438,9 @@ spectral_control_cmn(struct wlan_objmgr_pdev *pdev,
|
|||||||
struct spectral_caps *caps;
|
struct spectral_caps *caps;
|
||||||
|
|
||||||
caps = &sscan_req->caps_req.sscan_caps;
|
caps = &sscan_req->caps_req.sscan_caps;
|
||||||
sc->sptrlc_get_spectral_capinfo(pdev, caps);
|
ret = sc->sptrlc_get_spectral_capinfo(pdev, caps);
|
||||||
|
if (QDF_IS_STATUS_ERROR(ret))
|
||||||
|
goto bad;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -447,7 +449,9 @@ spectral_control_cmn(struct wlan_objmgr_pdev *pdev,
|
|||||||
struct spectral_diag_stats *diag;
|
struct spectral_diag_stats *diag;
|
||||||
|
|
||||||
diag = &sscan_req->diag_req.sscan_diag;
|
diag = &sscan_req->diag_req.sscan_diag;
|
||||||
sc->sptrlc_get_spectral_diagstats(pdev, diag);
|
ret = sc->sptrlc_get_spectral_diagstats(pdev, diag);
|
||||||
|
if (QDF_IS_STATUS_ERROR(ret))
|
||||||
|
goto bad;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user