Эх сурвалжийг харах

qcacld-3.0: Support for configure wlan rts sifs,ampdu count

qcacld-2.0 to qcacld-3.0 propagation

Add support for host enable/disable rts sifs bursting, and set
default tx mpdu aggregation count.

CRs-Fixed: 1089478
Change-Id: Ieb63621f217ccd1a50b925ea4dda05fecad01387
lifeng 8 жил өмнө
parent
commit
959a04cedc

+ 2 - 0
core/hdd/inc/qc_sap_ioctl.h

@@ -258,6 +258,8 @@ enum {
 	QCASAP_SET_PEER_RATE,
 	QCASAP_PARAM_DCM,
 	QCASAP_PARAM_RANGE_EXT,
+	QCSAP_SET_DEFAULT_AMPDU,
+	QCSAP_ENABLE_RTS_BURSTING,
 };
 
 int iw_get_channel_list(struct net_device *dev,

+ 37 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -10021,6 +10021,41 @@ enum l1ss_sleep_allowed {
 #define CFG_FILS_MAX_CHAN_GUARD_TIME_MAX     (10)
 #define CFG_FILS_MAX_CHAN_GUARD_TIME_DEFAULT (0)
 
+/**
+ * gSetRTSForSIFSBursting - set rts for sifs bursting
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini set rts for sifs bursting
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_RTS_FOR_SIFS_BURSTING           "gSetRTSForSIFSBursting"
+#define CFG_SET_RTS_FOR_SIFS_BURSTING_MIN       (0)
+#define CFG_SET_RTS_FOR_SIFS_BURSTING_MAX       (1)
+#define CFG_SET_RTS_FOR_SIFS_BURSTING_DEFAULT   (0)
+
+/**
+ * <ini>
+ * gMaxMPDUsInAMPDU - max mpdus in ampdu
+ * @Min: 0
+ * @Max: 64
+ * @Default: 0
+ *
+ * This ini configure max mpdus in ampdu
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_MAX_MPDUS_IN_AMPDU                  "gMaxMPDUsInAMPDU"
+#define CFG_MAX_MPDUS_IN_AMPDU_MIN              (0)
+#define CFG_MAX_MPDUS_IN_AMPDU_MAX              (64)
+#define CFG_MAX_MPDUS_IN_AMPDU_DEFAULT          (0)
+
 /*
  * enum hdd_external_acs_policy - External ACS policy
  * @HDD_EXTERNAL_ACS_PCL_PREFERRED -Preferable for ACS to select a
@@ -10828,6 +10863,8 @@ struct hdd_config {
 	/* threshold of packet drops at which FW initiates disconnect */
 	uint16_t pkt_err_disconn_th;
 	bool is_force_1x1;
+	uint8_t enable_rts_sifsbursting;
+	uint8_t max_mpdus_inampdu;
 };
 
 #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

+ 14 - 0
core/hdd/src/wlan_hdd_cfg.c

@@ -4354,6 +4354,20 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_FORCE_1X1_DEFAULT,
 		CFG_FORCE_1X1_MIN,
 		CFG_FORCE_1X1_MAX),
+
+	REG_VARIABLE(CFG_SET_RTS_FOR_SIFS_BURSTING, WLAN_PARAM_Integer,
+		struct hdd_config, enable_rts_sifsbursting,
+		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		CFG_SET_RTS_FOR_SIFS_BURSTING_DEFAULT,
+		CFG_SET_RTS_FOR_SIFS_BURSTING_MIN,
+		CFG_SET_RTS_FOR_SIFS_BURSTING_MAX),
+
+	REG_VARIABLE(CFG_MAX_MPDUS_IN_AMPDU, WLAN_PARAM_Integer,
+		struct hdd_config, max_mpdus_inampdu,
+		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		CFG_MAX_MPDUS_IN_AMPDU_DEFAULT,
+		CFG_MAX_MPDUS_IN_AMPDU_MIN,
+		CFG_MAX_MPDUS_IN_AMPDU_MAX),
 };
 
 

+ 22 - 0
core/hdd/src/wlan_hdd_hostapd.c

@@ -3385,6 +3385,18 @@ static __iw_softap_setparam(struct net_device *dev,
 					  WMI_VDEV_PARAM_HE_RANGE_EXT,
 					  set_value, VDEV_CMD);
 		break;
+	case QCSAP_SET_DEFAULT_AMPDU:
+		hdd_notice("QCSAP_SET_DEFAULT_AMPDU val %d", set_value);
+		ret = wma_cli_set_command((int)pHostapdAdapter->sessionId,
+				(int)WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU,
+				set_value, PDEV_CMD);
+		break;
+	case QCSAP_ENABLE_RTS_BURSTING:
+		hdd_notice("QCSAP_ENABLE_RTS_BURSTING val %d", set_value);
+		ret = wma_cli_set_command((int)pHostapdAdapter->sessionId,
+				(int)WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING,
+				set_value, PDEV_CMD);
+		break;
 	default:
 		hdd_err("Invalid setparam command %d value %d",
 		       sub_cmd, set_value);
@@ -5900,6 +5912,16 @@ static const struct iw_priv_args hostapd_private_args[] = {
 		0, "enable_range_ext"
 	}
 	,
+	{	QCSAP_SET_DEFAULT_AMPDU,
+		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+		0, "def_ampdu"
+	}
+	,
+	{	QCSAP_ENABLE_RTS_BURSTING,
+		IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+		0, "rts_bursting"
+	}
+	,
 };
 
 static const iw_handler hostapd_private[] = {

+ 13 - 0
core/hdd/src/wlan_hdd_main.c

@@ -9331,6 +9331,19 @@ int hdd_wlan_startup(struct device *dev)
 		wma_cli_set_command(0, (int)WMI_PDEV_PARAM_SET_IOT_PATTERN,
 				1, PDEV_CMD);
 
+	if (hdd_ctx->config->max_mpdus_inampdu) {
+		set_value = hdd_ctx->config->max_mpdus_inampdu;
+		wma_cli_set_command(0, (int)WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU,
+				    set_value, PDEV_CMD);
+	}
+
+	if (hdd_ctx->config->enable_rts_sifsbursting) {
+		set_value = hdd_ctx->config->enable_rts_sifsbursting;
+		wma_cli_set_command(0,
+				    (int)WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING,
+				    set_value, PDEV_CMD);
+	}
+
 	qdf_mc_timer_start(&hdd_ctx->iface_change_timer,
 			   hdd_ctx->config->iface_change_wait_time);