Bladeren bron

qcacld-3.0: [11AX] Update shortgi to handle values upto 4

Update shortgi to handle values upto 4. With support
of 802.11ax, short gi value can go upto 4. This change
set will add support to handle that.

Change-Id: Ifb7e6b0b6298995758bf065c6e54d58d5bd65496
CRs-Fixed: 1073481
Krishna Kumaar Natarajan 8 jaren geleden
bovenliggende
commit
a5c5aad943
3 gewijzigde bestanden met toevoegingen van 20 en 6 verwijderingen
  1. 10 4
      core/hdd/src/wlan_hdd_hostapd.c
  2. 8 2
      core/hdd/src/wlan_hdd_wext.c
  3. 2 0
      core/sme/src/common/sme_api.c

+ 10 - 4
core/hdd/src/wlan_hdd_hostapd.c

@@ -3033,7 +3033,13 @@ static __iw_softap_setparam(struct net_device *dev,
 	case QCASAP_SHORT_GI:
 	{
 		hdd_notice("QCASAP_SET_SHORT_GI val %d", set_value);
-		/* same as 40MHZ */
+		/*
+		 * wma_cli_set_command should be called instead of
+		 * sme_update_ht_config since SGI is used for HT/HE.
+		 * This should be refactored.
+		 *
+		 * SGI is same for 20MHZ and 40MHZ.
+		 */
 		ret = sme_update_ht_config(hHal, pHostapdAdapter->sessionId,
 					   WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ,
 					   set_value);
@@ -3457,9 +3463,9 @@ static __iw_softap_getparam(struct net_device *dev,
 
 	case QCASAP_SHORT_GI:
 	{
-		*value = (int)sme_get_ht_config(hHal,
-						pHostapdAdapter->sessionId,
-						WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ);
+		*value = wma_cli_get_command(pHostapdAdapter->sessionId,
+					     WMI_VDEV_PARAM_SGI,
+					     VDEV_CMD);
 		break;
 	}
 

+ 8 - 2
core/hdd/src/wlan_hdd_wext.c

@@ -7794,6 +7794,11 @@ static int __iw_setint_getnone(struct net_device *dev,
 	case WE_SET_SHORT_GI:
 	{
 		hdd_notice("WMI_VDEV_PARAM_SGI val %d", set_value);
+		/*
+		 * wma_cli_set_command should be called instead of
+		 * sme_update_ht_config since SGI is used for HT/HE.
+		 * This should be refactored.
+		 */
 		ret = sme_update_ht_config(hHal, pAdapter->sessionId,
 					   WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ,
 					   set_value);
@@ -8968,8 +8973,9 @@ static int __iw_setnone_getint(struct net_device *dev,
 	case WE_GET_SHORT_GI:
 	{
 		hdd_notice("GET WMI_VDEV_PARAM_SGI");
-		*value = sme_get_ht_config(hHal, pAdapter->sessionId,
-					   WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ);
+		*value = wma_cli_get_command(pAdapter->sessionId,
+					     WMI_VDEV_PARAM_SGI,
+					     VDEV_CMD);
 		break;
 	}
 

+ 2 - 0
core/sme/src/common/sme_api.c

@@ -11468,9 +11468,11 @@ int sme_update_ht_config(tHalHandle hHal, uint8_t sessionId, uint16_t htCapab,
 		pSession->htConfig.ht_rx_stbc = value;
 		break;
 	case WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ:
+		value = value ? 1 : 0; /* HT SGI can be only 1 or 0 */
 		pSession->htConfig.ht_sgi20 = value;
 		break;
 	case WNI_CFG_HT_CAP_INFO_SHORT_GI_40MHZ:
+		value = value ? 1 : 0; /* HT SGI can be only 1 or 0 */
 		pSession->htConfig.ht_sgi40 = value;
 		break;
 	}