Merge "qcacld-3.0: Add .ini configuration for max number of AMSDU"

This commit is contained in:
Linux Build Service Account 2017-07-09 07:58:25 -07:00 • committed by Gerrit - the friendly Code Review server
commit 111c5563e8
17 changed files with 83 additions and 39 deletions

View file

@ -6614,11 +6614,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_SNR_MONITORING_MAX (1)
#define CFG_ENABLE_SNR_MONITORING_DEFAULT (0)
#define CFG_AMSDU_SUPPORT_IN_AMPDU_NAME "gAmsduSupportInAMPDU"
#define CFG_AMSDU_SUPPORT_IN_AMPDU_MIN (0)
#define CFG_AMSDU_SUPPORT_IN_AMPDU_MAX (1)
#define CFG_AMSDU_SUPPORT_IN_AMPDU_DEFAULT (0) /* disabled */
/*
* <ini>
* gEnableIpTcpUdpChecksumOffload - It enables IP, TCP and UDP checksum
@ -7182,6 +7177,26 @@ enum hdd_link_speed_rpt_type {
#define CFG_AUTO_DETECT_POWER_FAIL_MODE_DEFAULT (0)
#define CFG_AUTO_DETECT_POWER_FAIL_MODE_MIN (0)
#define CFG_AUTO_DETECT_POWER_FAIL_MODE_MAX (1)
/*
* <ini>
* gMaxAmsduNum - Max number of MSDU's in aggregate
* @Min: 0
* @Max: 3
* @Default: 1
* gMaxAmsduNum is the number of MSDU's transmitted in the 11n aggregate
* frame. Setting it to a value larger than 1 enables transmit aggregation.
* It is a PHY parameter that applies to all vdev's in firmware.
*
* Supported Feature: 11n aggregation
*
* Usage: Internal
*
* </ini>
*/
#define CFG_MAX_AMSDU_NUM_NAME "gMaxAmsduNum"
#define CFG_MAX_AMSDU_NUM_MIN (0)
#define CFG_MAX_AMSDU_NUM_MAX (3)
#define CFG_MAX_AMSDU_NUM_DEFAULT (1)
/*
* <ini>
@ -10817,7 +10832,7 @@ struct hdd_config {
uint32_t configPNOScanTimerRepeatValue;
uint32_t pno_slow_scan_multiplier;
#endif
uint8_t isAmsduSupportInAMPDU;
uint8_t max_amsdu_num;
uint8_t nSelect5GHzMargin;
uint8_t isCoalesingInIBSSAllowed;

View file

@ -2567,12 +2567,12 @@ struct reg_table_entry g_registry_table[] = {
CFG_PNO_SLOW_SCAN_MULTIPLIER_MIN,
CFG_PNO_SLOW_SCAN_MULTIPLIER_MAX),
#endif
REG_VARIABLE(CFG_AMSDU_SUPPORT_IN_AMPDU_NAME, WLAN_PARAM_Integer,
struct hdd_config, isAmsduSupportInAMPDU,
REG_VARIABLE(CFG_MAX_AMSDU_NUM_NAME , WLAN_PARAM_Integer,
struct hdd_config, max_amsdu_num,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_AMSDU_SUPPORT_IN_AMPDU_DEFAULT,
CFG_AMSDU_SUPPORT_IN_AMPDU_MIN,
CFG_AMSDU_SUPPORT_IN_AMPDU_MAX),
CFG_MAX_AMSDU_NUM_DEFAULT,
CFG_MAX_AMSDU_NUM_MIN,
CFG_MAX_AMSDU_NUM_MAX),
REG_VARIABLE(CFG_STRICT_5GHZ_PREF_BY_MARGIN, WLAN_PARAM_Integer,
struct hdd_config, nSelect5GHzMargin,
@ -5583,8 +5583,8 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
pHddCtx->config->goKeepAlivePeriod);
hdd_info("Name = [gApKeepAlivePeriod]Value = [%u]",
pHddCtx->config->apKeepAlivePeriod);
hdd_info("Name = [gAmsduSupportInAMPDU] Value = [%u] ",
pHddCtx->config->isAmsduSupportInAMPDU);
hdd_debug("Name = [max_amsdu_num] Value = [%u] ",
pHddCtx->config->max_amsdu_num);
hdd_info("Name = [nSelect5GHzMargin] Value = [%u] ",
pHddCtx->config->nSelect5GHzMargin);
hdd_info("Name = [gCoalesingInIBSS] Value = [%u] ",
@ -7464,8 +7464,7 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
smeConfig->csrConfig.cc_switch_mode = pConfig->WlanMccToSccSwitchMode;
#endif
smeConfig->csrConfig.isAmsduSupportInAMPDU =
pConfig->isAmsduSupportInAMPDU;
smeConfig->csrConfig.max_amsdu_num = pConfig->max_amsdu_num;
smeConfig->csrConfig.nSelect5GHzMargin = pConfig->nSelect5GHzMargin;
smeConfig->csrConfig.isCoalesingInIBSSAllowed =

View file

@ -3638,6 +3638,17 @@ int hdd_set_fw_params(hdd_adapter_t *adapter)
goto error;
}
hdd_debug("SET AMSDU num %d", hdd_ctx->config->max_amsdu_num);
ret = wma_cli_set_command(adapter->sessionId,
GEN_VDEV_PARAM_AMSDU,
hdd_ctx->config->max_amsdu_num,
GEN_CMD);
if (ret != 0) {
hdd_err("GEN_VDEV_PARAM_AMSDU set failed %d", ret);
goto error;
}
hdd_set_fw_log_params(hdd_ctx, adapter);
EXIT();

View file

@ -8298,6 +8298,9 @@ static int __iw_setint_getnone(struct net_device *dev,
ret = wma_cli_set_command(pAdapter->sessionId,
GEN_VDEV_PARAM_AMSDU,
set_value, GEN_CMD);
/* Update the stored ini value */
if (!ret)
hdd_ctx->config->max_amsdu_num = set_value;
break;
}

View file

@ -1189,7 +1189,7 @@ typedef struct sSirSmeJoinReq {
uint8_t htSmps;
bool send_smps_action;
uint8_t isAmsduSupportInAMPDU;
uint8_t max_amsdu_num;
tAniBool isWMEenabled;
tAniBool isQosEnabled;
tAniBool isOSENConnection;

View file

@ -1697,6 +1697,7 @@ typedef enum eHTCapability {
eHT_PSMP,
eHT_DSSS_CCK_MODE_40MHZ,
eHT_MAX_AMSDU_LENGTH,
eHT_MAX_AMSDU_NUM,
eHT_RX_STBC,
eHT_TX_STBC,
eHT_SHORT_GI_40MHZ,

View file

@ -374,7 +374,7 @@ typedef struct sPESession /* Added to Support BT-AMP */
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
int8_t rssi;
#endif
uint8_t isAmsduSupportInAMPDU;
uint8_t max_amsdu_num;
uint8_t isCoalesingInIBSSAllowed;
tSirHTConfig htConfig;

View file

@ -2767,6 +2767,9 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta,
pAddStaParams->maxAmsduSize =
lim_get_ht_capability(pMac, eHT_MAX_AMSDU_LENGTH,
psessionEntry);
pAddStaParams->max_amsdu_num =
lim_get_ht_capability(pMac, eHT_MAX_AMSDU_NUM,
psessionEntry);
pAddStaParams->fDsssCckMode40Mhz =
lim_get_ht_capability(pMac, eHT_DSSS_CCK_MODE_40MHZ,
psessionEntry);

View file

@ -512,6 +512,9 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
pAddStaParams->maxAmsduSize =
lim_get_ht_capability(pMac, eHT_MAX_AMSDU_LENGTH,
psessionEntry);
pAddStaParams->max_amsdu_num =
lim_get_ht_capability(pMac, eHT_MAX_AMSDU_NUM,
psessionEntry);
pAddStaParams->fDsssCckMode40Mhz =
lim_get_ht_capability(pMac, eHT_DSSS_CCK_MODE_40MHZ,
psessionEntry);

View file

@ -409,6 +409,9 @@ static void mlm_add_sta(tpAniSirGlobal mac_ctx, tpAddStaParams sta_param,
sta_param->maxAmsduSize =
lim_get_ht_capability(mac_ctx, eHT_MAX_AMSDU_LENGTH,
session_entry);
sta_param->max_amsdu_num =
lim_get_ht_capability(mac_ctx, eHT_MAX_AMSDU_NUM,
session_entry);
sta_param->fDsssCckMode40Mhz =
lim_get_ht_capability(mac_ctx, eHT_DSSS_CCK_MODE_40MHZ,
session_entry);

View file

@ -1596,8 +1596,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
pe_debug("SessionId:%d New session created",
session_id);
}
session->isAmsduSupportInAMPDU =
sme_join_req->isAmsduSupportInAMPDU;
session->max_amsdu_num = sme_join_req->max_amsdu_num;
/*
* Store Session related parameters

View file

@ -2856,6 +2856,10 @@ uint8_t lim_get_ht_capability(tpAniSirGlobal pMac,
retVal = (uint8_t) macHTCapabilityInfo.maximalAMSDUsize;
break;
case eHT_MAX_AMSDU_NUM:
retVal = (uint8_t) psessionEntry->max_amsdu_num;
break;
case eHT_RX_STBC:
retVal = (uint8_t) psessionEntry->htConfig.ht_rx_stbc;
break;

View file

@ -1246,7 +1246,7 @@ typedef struct tagCsrConfigParam {
uint8_t scanCfgAgingTime;
uint8_t enable_tx_ldpc;
uint8_t enable_rx_ldpc;
uint8_t isAmsduSupportInAMPDU;
uint8_t max_amsdu_num;
uint8_t nSelect5GHzMargin;
uint8_t isCoalesingInIBSSAllowed;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH

View file

@ -568,7 +568,7 @@ typedef struct tagCsrConfig {
* Enable/Disable heartbeat offload
*/
bool enableHeartBeatOffload;
uint8_t isAmsduSupportInAMPDU;
uint8_t max_amsdu_num;
uint8_t nSelect5GHzMargin;
uint8_t isCoalesingInIBSSAllowed;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH

View file

@ -2678,8 +2678,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pMac->roam.configParam.rx_ldpc_enable = pParam->enable_rx_ldpc;
pMac->roam.configParam.ignore_peer_erp_info =
pParam->ignore_peer_erp_info;
pMac->roam.configParam.isAmsduSupportInAMPDU =
pParam->isAmsduSupportInAMPDU;
pMac->roam.configParam.max_amsdu_num =
pParam->max_amsdu_num;
pMac->roam.configParam.nSelect5GHzMargin =
pParam->nSelect5GHzMargin;
pMac->roam.configParam.isCoalesingInIBSSAllowed =
@ -2932,7 +2932,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
#endif
pParam->enable_tx_ldpc = cfg_params->tx_ldpc_enable;
pParam->enable_rx_ldpc = cfg_params->rx_ldpc_enable;
pParam->isAmsduSupportInAMPDU = cfg_params->isAmsduSupportInAMPDU;
pParam->max_amsdu_num = cfg_params->max_amsdu_num;
pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin;
pParam->isCoalesingInIBSSAllowed = cfg_params->isCoalesingInIBSSAllowed;
pParam->allowDFSChannelRoam = cfg_params->allowDFSChannelRoam;
@ -14661,8 +14661,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
csr_join_req->send_smps_action =
pMac->roam.configParam.send_smps_action;
csr_join_req->isAmsduSupportInAMPDU =
(uint8_t) pMac->roam.configParam.isAmsduSupportInAMPDU;
csr_join_req->max_amsdu_num =
(uint8_t) pMac->roam.configParam.max_amsdu_num;
if (pMac->roam.roamSession[sessionId].fWMMConnection)
csr_join_req->isWMEenabled = true;

View file

@ -229,6 +229,7 @@ typedef struct sAniProbeRspStruct {
* @atimIePresent: Peer Atim Info
* @peerAtimWindowLength: peer ATIM Window length
* @nss: Return the number of spatial streams supported
* @max_amsdu_num: Maximum number of MSDUs in a tx aggregate frame
*
* This structure contains parameter required for
* add sta request of upper layer.
@ -332,6 +333,7 @@ typedef struct {
tDot11fIEvendor_he_cap he_config;
tDot11fIEvendor_he_op he_op;
#endif
uint8_t max_amsdu_num;
} tAddStaParams, *tpAddStaParams;
/**

View file

@ -992,19 +992,20 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
}
break;
case GEN_VDEV_PARAM_AMSDU:
if (soc) {
ret = cdp_aggr_cfg(soc, vdev, 0,
privcmd->param_value);
if (ret)
WMA_LOGE("cdp_aggr_cfg set amsdu failed ret %d",
ret);
else
intr[privcmd->param_vdev_id].config.
amsdu = privcmd->param_value;
} else {
WMA_LOGE("%s:SOC context is NULL", __func__);
return;
}
/*
* Firmware currently does not support set operation
* for AMSDU. It may cause crash if the configuration
* is sent to firmware.
* Firmware enhancement will advertise a service bit
* to enable AMSDU configuration through WMI. Then
* add the WMI command to configure AMSDU parameter.
* For the older chipset that does not advertise the
* service bit, enable the following legacy code:
* ol_txrx_aggr_cfg(vdev, 0, privcmd->param_value);
* intr[privcmd->param_vdev_id].config.amsdu =
* privcmd->param_value;
*/
WMA_LOGE("SET GEN_VDEV_PARAM_AMSDU command is currently not supported");
break;
case GEN_PARAM_CRASH_INJECT:
if (QDF_GLOBAL_FTM_MODE == cds_get_conparam())