[WCNCR00152611] misc: Add 1 spatial stream support

[Description]
Add 1 spatial stream support in driver part.

Change-Id: I09862ae98a974086ede0a8ceb3e5bd547ed847bc
Feature: misc
Signed-off-by: wayne.guo <wayne.guo@mediatek.com>
CR-Id: WCNCR00152611
diff --git a/common/wlan_lib.c b/common/wlan_lib.c
index 6f4b1b3..d81bcbc 100644
--- a/common/wlan_lib.c
+++ b/common/wlan_lib.c
@@ -4844,6 +4844,20 @@
 	       prEventNicCapability->ucRfCalFail, prEventNicCapability->ucBbCalFail);
 #endif
 
+#if CFG_SISO_SW_DEVELOP
+	if ((!prEventNicCapability->ucHwNotSupportDBDC) && (!prEventNicCapability->ucHwSetNss1x1)) {
+		prAdapter->rWifiFemCfg.u2WifiPath =
+			(WLAN_FLAG_2G4_WF0 | WLAN_FLAG_5G_WF0 | WLAN_FLAG_2G4_WF1 | WLAN_FLAG_5G_WF1);
+	} else if ((!prEventNicCapability->ucHwNotSupportDBDC) && (prEventNicCapability->ucHwSetNss1x1)) {
+		prAdapter->rWifiFemCfg.u2WifiPath =
+			(WLAN_FLAG_5G_WF0 | WLAN_FLAG_2G4_WF1);
+	} else if ((prEventNicCapability->ucHwNotSupportDBDC) && (prEventNicCapability->ucHwSetNss1x1)) {
+		prAdapter->rWifiFemCfg.u2WifiPath =
+			(WLAN_FLAG_5G_WF0 | WLAN_FLAG_2G4_WF1);
+	} else
+		ASSERT(0);
+#endif
+
 	return WLAN_STATUS_SUCCESS;
 }
 
@@ -9241,8 +9255,9 @@
 
 	if (ucBssIndex > MAX_BSS_INDEX) {
 		DBGLOG(SW4, INFO, "Invalid BssInfo index[%u], skip dump!\n", ucBssIndex);
-		return ucRetValSpeIdx;
+		ASSERT(0);
 	}
+
 	prBssInfo = GET_BSS_INFO_BY_INDEX(prAdapter, ucBssIndex);
 	/*
 	* if DBDC enable return 0, else depend 2.4G/5G & support WF path
@@ -9261,7 +9276,7 @@
 				else
 					ucRetValSpeIdx = ANTENNA_WF1;
 			} else
-				ucRetValSpeIdx = 0x18;
+				ucRetValSpeIdx = 0x0;
 		} else if (eBand == BAND_5G) {
 			if (IS_WIFI_5G_SISO(prAdapter)) {
 				if (IS_WIFI_5G_WF0_SUPPORT(prAdapter))
@@ -9269,9 +9284,9 @@
 				else
 					ucRetValSpeIdx = ANTENNA_WF1;
 			} else
-				ucRetValSpeIdx = 0x18;
+				ucRetValSpeIdx = 0x0;
 		} else
-			ucRetValSpeIdx = 0x18;
+			ucRetValSpeIdx = 0x0;
 	}
 	DBGLOG(INIT, INFO, "SpeIdx:%d,D:%d,G=%d,B=%d,Bss=%d\n",
 						ucRetValSpeIdx, prAdapter->rWifiVar.fgDbDcModeEn,
@@ -9290,8 +9305,9 @@
 
 	if (ucBssIndex > MAX_BSS_INDEX) {
 		DBGLOG(SW4, INFO, "Invalid BssInfo index[%u], skip dump!\n", ucBssIndex);
-		return ucRetValNss;
+		ASSERT(0);
 	}
+
 	prBssInfo = GET_BSS_INFO_BY_INDEX(prAdapter, ucBssIndex);
 	/*
 	* depend 2.4G/5G support SISO/MIMO
diff --git a/include/config.h b/include/config.h
index 42d6e71..e29783b 100644
--- a/include/config.h
+++ b/include/config.h
@@ -901,7 +901,7 @@
  * Support CFG_SISO_SW_DEVELOP
  *------------------------------------------------------------------------------
  */
-#define CFG_SISO_SW_DEVELOP			0
+#define CFG_SISO_SW_DEVELOP			1
 
 /*------------------------------------------------------------------------------
  * Flags for a Goal for MT6632 : Cal Result Backup in Host or NVRam when Android Boot
diff --git a/nic/nic_tx.c b/nic/nic_tx.c
index ff06a49..7fbf620 100644
--- a/nic/nic_tx.c
+++ b/nic/nic_tx.c
@@ -1161,6 +1161,11 @@
 		break;
 
 	case MSDU_RATE_MODE_MANUAL_CR:
+
+#if CFG_SISO_SW_DEVELOP
+		/* Update spatial extension index setting */
+		HAL_MAC_TX_DESC_SET_SPE_IDX(prTxDesc, wlanGetSpeIdx(prAdapter, prBssInfo->ucBssIndex));
+#endif
 		HAL_MAC_TX_DESC_SET_FIXED_RATE_MODE_TO_CR(prTxDesc);
 		HAL_MAC_TX_DESC_SET_FIXED_RATE_ENABLE(prTxDesc);
 		break;