Browse Source

qcacld-3.0: Handle FW not support SBS

If FW doesn't support SBS, return QDF_STATUS_E_NOSUPPORT
to allow connect request in current HW mode.

Change-Id: Ie960fe993ea95cf40dd43fb56c71edd94efda63b
CRs-Fixed: 2370206
Liangwei Dong 6 years ago
parent
commit
b007863932
1 changed files with 12 additions and 13 deletions
  1. 12 13
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

+ 12 - 13
components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

@@ -925,21 +925,20 @@ QDF_STATUS policy_mgr_validate_dbs_switch(
 		return status;
 	}
 
-	if (hw_mode.sbs_cap) {
-		if ((action == PM_SBS) || (action == PM_SBS_DOWNGRADE)) {
-			if (!policy_mgr_is_hw_sbs_capable(psoc)) {
-				/* No action */
-				policy_mgr_notice("firmware is not sbs capable");
-				return QDF_STATUS_E_NOSUPPORT;
-			}
-			/* current mode is already SBS nothing to be
-			 * done
-			 */
-			 policy_mgr_notice("current mode is already SBS");
+	if ((action == PM_SBS) || (action == PM_SBS_DOWNGRADE)) {
+		if (!policy_mgr_is_hw_sbs_capable(psoc)) {
+			/* No action */
+			policy_mgr_notice("firmware is not sbs capable");
+			return QDF_STATUS_E_NOSUPPORT;
+		}
+		/* current mode is already SBS nothing to be
+		 * done
+		 */
+		if (hw_mode.sbs_cap && action == PM_SBS) {
+			policy_mgr_notice("current mode is already SBS");
 			return QDF_STATUS_E_ALREADY;
-		} else {
-			return QDF_STATUS_SUCCESS;
 		}
+		return QDF_STATUS_SUCCESS;
 	}
 
 	if (!hw_mode.dbs_cap) {