Browse Source

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 năm trước cách đây
mục cha
commit
266f87715e
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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,