Explorar o código

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 %!s(int64=2) %!d(string=hai) anos
pai
achega
266f87715e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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;
 	sscan_req.req_id = SPECTRAL_GET_CAPABILITY_INFO;
 	status = ucfg_spectral_control(pdev, &sscan_req);
 	status = ucfg_spectral_control(pdev, &sscan_req);
+	if (QDF_IS_STATUS_ERROR(status))
+		return -EINVAL;
 	scaps = &sscan_req.caps_req.sscan_caps;
 	scaps = &sscan_req.caps_req.sscan_caps;
 
 
 	skb = wlan_cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
 	skb = wlan_cfg80211_vendor_cmd_alloc_reply_skb(wiphy,