qcacld-3.0: Update incorrect condition in hdd_set_fw_params()

Update incorrect conditional check in hdd_set_fw_params.

Without this fix, even when we support 2x2 mode RX/TX chain mask
will be set for 1x1 mode. Fix the condition to update the chain
mask correctly and also some other FW parameters which are
independent of antenna mode will be updated correctly.

Change-Id: Iaa51a6eb22c6970d294f503159f98d50ca7a0000
CRs-Fixed: 1057742
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 090a6c6..2a0510c 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -2929,51 +2929,51 @@
 	if (!hdd_ctx)
 		return -EINVAL;
 
-	if ((cds_get_conparam() != QDF_GLOBAL_FTM_MODE) ||
+	if ((cds_get_conparam() != QDF_GLOBAL_FTM_MODE) &&
 	    (!hdd_ctx->config->enable2x2)) {
-		hdd_info("enable2x2 not enabled in INI or in FTM mode return");
-		return 0;
-	}
 #define HDD_DTIM_1CHAIN_RX_ID 0x5
 #define HDD_SMPS_PARAM_VALUE_S 29
+		/*
+		 * Disable DTIM 1 chain Rx when in 1x1,
+		 * we are passing two value
+		 * as param_id << 29 | param_value.
+		 * Below param_value = 0(disable)
+		 */
+		ret = wma_cli_set_command(adapter->sessionId,
+					  WMI_STA_SMPS_PARAM_CMDID,
+					  HDD_DTIM_1CHAIN_RX_ID <<
+					  HDD_SMPS_PARAM_VALUE_S,
+					  VDEV_CMD);
+		if (ret) {
+			hdd_err("DTIM 1 chain set failed %d", ret);
+			goto error;
+		}
 
-	/*
-	 * Disable DTIM 1 chain Rx when in 1x1,
-	 * we are passing two value
-	 * as param_id << 29 | param_value.
-	 * Below param_value = 0(disable)
-	 */
-	ret = wma_cli_set_command(adapter->sessionId,
-				  WMI_STA_SMPS_PARAM_CMDID,
-				  HDD_DTIM_1CHAIN_RX_ID <<
-				  HDD_SMPS_PARAM_VALUE_S,
-				  VDEV_CMD);
-	if (ret) {
-		hdd_err("DTIM 1 chain set failed %d", ret);
-		goto error;
-	}
+		ret = wma_cli_set_command(adapter->sessionId,
+					  WMI_PDEV_PARAM_TX_CHAIN_MASK,
+					  hdd_ctx->config->txchainmask1x1,
+					  PDEV_CMD);
+		if (ret) {
+			hdd_err("WMI_PDEV_PARAM_TX_CHAIN_MASK set failed %d",
+				ret);
+			goto error;
+		}
 
-	ret = wma_cli_set_command(adapter->sessionId,
-				  WMI_PDEV_PARAM_TX_CHAIN_MASK,
-				  hdd_ctx->config->txchainmask1x1,
-				  PDEV_CMD);
-	if (ret) {
-		hdd_err("WMI_PDEV_PARAM_TX_CHAIN_MASK set failed %d",
-			ret);
-		goto error;
-	}
-
-	ret = wma_cli_set_command(adapter->sessionId,
-				  WMI_PDEV_PARAM_RX_CHAIN_MASK,
-				  hdd_ctx->config->rxchainmask1x1,
-				  PDEV_CMD);
-	if (ret) {
-		hdd_err("WMI_PDEV_PARAM_RX_CHAIN_MASK set failed %d",
-			ret);
-		goto error;
-	}
+		ret = wma_cli_set_command(adapter->sessionId,
+					  WMI_PDEV_PARAM_RX_CHAIN_MASK,
+					  hdd_ctx->config->rxchainmask1x1,
+					  PDEV_CMD);
+		if (ret) {
+			hdd_err("WMI_PDEV_PARAM_RX_CHAIN_MASK set failed %d",
+				ret);
+			goto error;
+		}
 #undef HDD_DTIM_1CHAIN_RX_ID
 #undef HDD_SMPS_PARAM_VALUE_S
+	} else {
+		hdd_info("FTM Mode or 2x2 mode - Do not set 1x1 params");
+	}
+
 	if (QDF_GLOBAL_FTM_MODE != cds_get_conparam()) {
 		ret = wma_cli_set_command(adapter->sessionId,
 					  WMI_PDEV_PARAM_HYST_EN,