Browse Source

qcacld-3.0: Change the order of AP supports check for TWT

In TWT setup request, move Not supported AP check above
scan check

Change-Id: I2087dda860fec490daef846f0d82648a634f35c5
CRs-Fixed: 3143494
Deeksha Gupta 3 years ago
parent
commit
50b08ca835
1 changed files with 9 additions and 8 deletions
  1. 9 8
      os_if/twt/src/osif_twt_ext_req.c

+ 9 - 8
os_if/twt/src/osif_twt_ext_req.c

@@ -945,14 +945,6 @@ int osif_twt_setup_req(struct wlan_objmgr_vdev *vdev,
 	}
 
 	vdev_id = wlan_vdev_get_id(vdev);
-	ret = osif_is_twt_command_allowed(vdev, vdev_id, psoc);
-	if (ret)
-		return ret;
-
-	if (osif_twt_setup_conc_allowed(psoc, vdev_id)) {
-		osif_err_rl("TWT setup reject: SCC or MCC concurrency exists");
-		return -EAGAIN;
-	}
 
 	ret = wlan_cfg80211_nla_parse_nested(tb2,
 					 QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX,
@@ -987,6 +979,15 @@ int osif_twt_setup_req(struct wlan_objmgr_vdev *vdev,
 		return -EOPNOTSUPP;
 	}
 
+	ret = osif_is_twt_command_allowed(vdev, vdev_id, psoc);
+	if (ret)
+		return ret;
+
+	if (osif_twt_setup_conc_allowed(psoc, vdev_id)) {
+		osif_err_rl("TWT setup reject: SCC or MCC concurrency exists");
+		return -EAGAIN;
+	}
+
 	ucfg_twt_cfg_get_congestion_timeout(psoc, &congestion_timeout);
 
 	if (congestion_timeout) {