瀏覽代碼

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.
Throw error if it is an invalid operation.

CRs-Fixed: 3308464
Change-Id: I11bbd3a9a9ffc8462e420946d54f06a11fad558e
Sreeramya Soratkal 2 年之前
父節點
當前提交
266f87715e
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      os_if/linux/spectral/src/wlan_cfg80211_spectral.c

+ 2 - 0
os_if/linux/spectral/src/wlan_cfg80211_spectral.c

@@ -851,6 +851,8 @@ int wlan_cfg80211_spectral_scan_get_cap(struct wiphy *wiphy,
 
 	sscan_req.req_id = SPECTRAL_GET_CAPABILITY_INFO;
 	status = ucfg_spectral_control(pdev, &sscan_req);
+	if (QDF_IS_STATUS_ERROR(status))
+		return -EINVAL;
 	scaps = &sscan_req.caps_req.sscan_caps;
 
 	skb = wlan_cfg80211_vendor_cmd_alloc_reply_skb(wiphy,