qcacld-3.0: separate HE caps per band

currently some HE capability is shared same value from
MIN value of 2G and 5G capability, separate them per band.

Change-Id: I37831b4044d4ca2deaf5015fb44227c824996136
CRs-Fixed: 2239070
This commit is contained in:
Jinwei Chen
2018-06-20 17:20:34 +08:00
committed by nshrivas
parent 1e20bcc70c
commit 998a1a0e95
7 changed files with 60 additions and 4 deletions

View File

@@ -240,6 +240,8 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
cfg->ppet_5g, HE_MAX_PPET_SIZE); cfg->ppet_5g, HE_MAX_PPET_SIZE);
if (status == QDF_STATUS_E_FAILURE) if (status == QDF_STATUS_E_FAILURE)
hdd_alert("could not set 5G HE PPET"); hdd_alert("could not set 5G HE PPET");
sme_update_tgt_he_cap(hdd_ctx->hHal, cfg);
} }
void wlan_hdd_check_11ax_support(struct hdd_beacon_data *beacon, void wlan_hdd_check_11ax_support(struct hdd_beacon_data *beacon,

View File

@@ -922,6 +922,10 @@ typedef struct sAniSirGlobal {
uint8_t no_ack_policy_cfg[MAX_NUM_AC]; uint8_t no_ack_policy_cfg[MAX_NUM_AC];
uint32_t he_sgi_ltf_cfg_bit_mask; uint32_t he_sgi_ltf_cfg_bit_mask;
struct mgmt_beacon_probe_filter bcn_filter; struct mgmt_beacon_probe_filter bcn_filter;
#ifdef WLAN_FEATURE_11AX
tDot11fIEhe_cap he_cap_2g;
tDot11fIEhe_cap he_cap_5g;
#endif
} tAniSirGlobal; } tAniSirGlobal;

View File

@@ -2255,6 +2255,15 @@ int sme_set_auto_rate_he_ltf(tHalHandle hal, uint8_t session_id,
uint8_t cfg_val); uint8_t cfg_val);
#ifdef WLAN_FEATURE_11AX #ifdef WLAN_FEATURE_11AX
/**
* sme_update_tgt_he_cap() - sets the HE caps to pmac
* @hal: Pointer to HAL
* @cfg: Pointer to wma target cfg
*
* Return: None
*/
void sme_update_tgt_he_cap(tHalHandle hal, struct wma_tgt_cfg *cfg);
/** /**
* sme_update_he_cap_nss() - sets the nss based on user request * sme_update_he_cap_nss() - sets the nss based on user request
* @hal: Pointer to HAL * @hal: Pointer to HAL
@@ -2327,6 +2336,9 @@ int sme_update_he_frag_supp(tHalHandle hal, uint8_t session_id,
int sme_update_he_ldpc_supp(tHalHandle hal, uint8_t session_id, int sme_update_he_ldpc_supp(tHalHandle hal, uint8_t session_id,
uint16_t he_ldpc); uint16_t he_ldpc);
#else #else
static inline void sme_update_tgt_he_cap(tHalHandle hal,
struct wma_tgt_cfg *cfg)
{}
static inline void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id, static inline void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id,
uint8_t nss) uint8_t nss)
{} {}

View File

@@ -12935,6 +12935,19 @@ int sme_update_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
return sme_update_he_tx_bfee_supp(hal, session_id, cfg_val); return sme_update_he_tx_bfee_supp(hal, session_id, cfg_val);
} }
#ifdef WLAN_FEATURE_11AX #ifdef WLAN_FEATURE_11AX
void sme_update_tgt_he_cap(tHalHandle hal, struct wma_tgt_cfg *cfg)
{
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
qdf_mem_copy(&mac_ctx->he_cap_2g,
&cfg->he_cap_2g,
sizeof(tDot11fIEhe_cap));
qdf_mem_copy(&mac_ctx->he_cap_5g,
&cfg->he_cap_5g,
sizeof(tDot11fIEhe_cap));
}
void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id, void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id,
uint8_t nss) uint8_t nss)
{ {

View File

@@ -2377,6 +2377,11 @@ uint32_t csr_convert_phy_cb_state_to_ini_value(ePhyChanBondState phyCbState)
} }
#ifdef WLAN_FEATURE_11AX #ifdef WLAN_FEATURE_11AX
#define CSR_REVISE_REQ_HE_CAP_PER_BAND(_req, _pmac, _channelid) \
(_req)->he_config.bfee_sts_lt_80 = WLAN_CHAN_IS_2GHZ((_channelid)) ? \
(_pmac)->he_cap_2g.bfee_sts_lt_80 : \
(_pmac)->he_cap_5g.bfee_sts_lt_80
/** /**
* csr_update_he_config_param() - Update MAC context with HE config param * csr_update_he_config_param() - Update MAC context with HE config param
* @mac_ctx: pointer to MAC context * @mac_ctx: pointer to MAC context
@@ -2634,6 +2639,8 @@ void csr_update_session_he_cap(tpAniSirGlobal mac_ctx,
} }
#else #else
#define CSR_REVISE_REQ_HE_CAP_PER_BAND(_req, _pmac, _channelid) /* no op */
static inline void csr_update_he_config_param(tpAniSirGlobal mac_ctx, static inline void csr_update_he_config_param(tpAniSirGlobal mac_ctx,
tCsrConfigParam *param) tCsrConfigParam *param)
{ {
@@ -15773,8 +15780,12 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
(unsigned int)(*(uint32_t *) &csr_join_req-> (unsigned int)(*(uint32_t *) &csr_join_req->
vht_config)); vht_config));
if (IS_DOT11_MODE_HE(csr_join_req->dot11mode)) if (IS_DOT11_MODE_HE(csr_join_req->dot11mode)) {
csr_join_req_copy_he_cap(csr_join_req, pSession); csr_join_req_copy_he_cap(csr_join_req, pSession);
/* change the HE caps like sts per band */
CSR_REVISE_REQ_HE_CAP_PER_BAND(csr_join_req, pMac,
pBssDescription->channelId);
}
if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP, if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP,
&value) != eSIR_SUCCESS) &value) != eSIR_SUCCESS)
@@ -16684,8 +16695,12 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t
&pParam->extendedRateSet, &pParam->extendedRateSet,
sizeof(tSirMacRateSet)); sizeof(tSirMacRateSet));
if (IS_DOT11_MODE_HE(pMsg->dot11mode)) if (IS_DOT11_MODE_HE(pMsg->dot11mode)) {
csr_start_bss_copy_he_cap(pMsg, pSession); csr_start_bss_copy_he_cap(pMsg, pSession);
/* change the HE caps like sts per band */
CSR_REVISE_REQ_HE_CAP_PER_BAND(pMsg, pMac,
pBssDesc->channelId);
}
qdf_mem_copy(&pMsg->addIeParams, qdf_mem_copy(&pMsg->addIeParams,
&pParam->addIeParams, &pParam->addIeParams,

View File

@@ -207,6 +207,8 @@ struct wma_tgt_cfg {
tDot11fIEhe_cap he_cap; tDot11fIEhe_cap he_cap;
uint8_t ppet_2g[HE_MAX_PPET_SIZE]; uint8_t ppet_2g[HE_MAX_PPET_SIZE];
uint8_t ppet_5g[HE_MAX_PPET_SIZE]; uint8_t ppet_5g[HE_MAX_PPET_SIZE];
tDot11fIEhe_cap he_cap_2g;
tDot11fIEhe_cap he_cap_5g;
#endif #endif
bool dfs_cac_offload; bool dfs_cac_offload;
bool tx_bfee_8ss_enabled; bool tx_bfee_8ss_enabled;

View File

@@ -830,6 +830,8 @@ void wma_update_target_ext_he_cap(struct target_psoc_info *tgt_hdl,
tDot11fIEhe_cap he_cap_mac; tDot11fIEhe_cap he_cap_mac;
tDot11fIEhe_cap tmp_he_cap = {0}; tDot11fIEhe_cap tmp_he_cap = {0};
qdf_mem_zero(&tgt_cfg->he_cap_2g, sizeof(tgt_cfg->he_cap_2g));
qdf_mem_zero(&tgt_cfg->he_cap_5g, sizeof(tgt_cfg->he_cap_5g));
num_hw_modes = target_psoc_get_num_hw_modes(tgt_hdl); num_hw_modes = target_psoc_get_num_hw_modes(tgt_hdl);
mac_phy_cap = target_psoc_get_mac_phy_cap(tgt_hdl); mac_phy_cap = target_psoc_get_mac_phy_cap(tgt_hdl);
total_mac_phy_cnt = target_psoc_get_total_mac_phy_cnt(tgt_hdl); total_mac_phy_cnt = target_psoc_get_total_mac_phy_cnt(tgt_hdl);
@@ -865,9 +867,12 @@ void wma_update_target_ext_he_cap(struct target_psoc_info *tgt_hdl,
&mac_cap->he_ppet2G); &mac_cap->he_ppet2G);
} }
if (he_cap_mac.present) if (he_cap_mac.present) {
wma_derive_ext_he_cap(&tmp_he_cap, wma_derive_ext_he_cap(&tmp_he_cap,
&he_cap_mac); &he_cap_mac);
wma_derive_ext_he_cap(&tgt_cfg->he_cap_2g,
&he_cap_mac);
}
qdf_mem_zero(&he_cap_mac, qdf_mem_zero(&he_cap_mac,
sizeof(tDot11fIEhe_cap)); sizeof(tDot11fIEhe_cap));
@@ -885,9 +890,12 @@ void wma_update_target_ext_he_cap(struct target_psoc_info *tgt_hdl,
(struct wmi_host_ppe_threshold *) (struct wmi_host_ppe_threshold *)
&mac_cap->he_ppet5G); &mac_cap->he_ppet5G);
} }
if (he_cap_mac.present) if (he_cap_mac.present) {
wma_derive_ext_he_cap(&tmp_he_cap, wma_derive_ext_he_cap(&tmp_he_cap,
&he_cap_mac); &he_cap_mac);
wma_derive_ext_he_cap(&tgt_cfg->he_cap_5g,
&he_cap_mac);
}
} }
qdf_mem_copy(he_cap, &tmp_he_cap, sizeof(*he_cap)); qdf_mem_copy(he_cap, &tmp_he_cap, sizeof(*he_cap));