qcacld-3.0: Add 6GHz support in SAP mode

Add support to populate 6GHz IE in SAP mode.

Change-Id: Ib9ec2e571bc8c6bb7e591fca191eda208efdcdbd
CRs-Fixed: 2516531
This commit is contained in:
Kiran Kumar Lokere
2019-08-27 19:16:36 -07:00
committed by nshrivas
parent 390f1daa42
commit b2ea027c0e
8 changed files with 147 additions and 17 deletions

View File

@@ -1146,6 +1146,18 @@ QDF_STATUS populate_dot11f_he_caps(struct mac_context *, struct pe_session *,
tDot11fIEhe_cap *);
QDF_STATUS populate_dot11f_he_operation(struct mac_context *, struct pe_session *,
tDot11fIEhe_op *);
/**
* populate_dot11f_he_6ghz_cap() - pouldate HE 6GHz caps IE
* @mac_ctx: Global MAC context
* @session: PE session
* @he_6g_cap: pointer to HE 6GHz IE
*
* Populdate the HE 6GHz IE based on the session.
*/
QDF_STATUS
populate_dot11f_he_6ghz_cap(struct mac_context *mac_ctx,
struct pe_session *session,
tDot11fIEhe_6ghz_band_cap *he_6g_cap);
#ifdef WLAN_FEATURE_11AX_BSS_COLOR
QDF_STATUS populate_dot11f_he_bss_color_change(struct mac_context *mac_ctx,
struct pe_session *session,
@@ -1172,6 +1184,14 @@ static inline QDF_STATUS populate_dot11f_he_operation(struct mac_context *mac_ct
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
populate_dot11f_he_6ghz_cap(struct mac_context *mac_ctx,
struct pe_session *session,
tDot11fIEhe_6ghz_band_cap *he_6g_cap)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS populate_dot11f_he_bss_color_change(
struct mac_context *mac_ctx,
struct pe_session *session,

View File

@@ -540,6 +540,7 @@ struct pe_session {
tDot11fIEhe_cap he_config;
tDot11fIEhe_op he_op;
uint32_t he_sta_obsspd;
bool he_6ghz_band;
#ifdef WLAN_FEATURE_11AX_BSS_COLOR
tDot11fIEbss_color_change he_bss_color_change;
struct bss_color_info bss_color_info[MAX_BSS_COLOR_VALUE];

View File

@@ -655,6 +655,11 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
if (IS_DOT11_MODE_HE(session->dot11mode)) {
lim_update_session_he_capable(mac_ctx, session);
lim_copy_bss_he_cap(session, sme_start_bss_req);
} else if (wlan_reg_is_6ghz_chan_freq(session->curr_op_freq)) {
pe_err("Invalid oper_ch_freq %d for dot11mode %d",
session->curr_op_freq, session->dot11mode);
ret_code = eSIR_SME_INVALID_PARAMETERS;
goto free;
}
session->txLdpcIniFeatureEnabled =

View File

@@ -1203,6 +1203,8 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
&frm.he_cap);
populate_dot11f_he_operation(mac_ctx, pe_session,
&frm.he_op);
populate_dot11f_he_6ghz_cap(mac_ctx, pe_session,
&frm.he_6ghz_band_cap);
}
#ifdef WLAN_FEATURE_11W
if (eSIR_MAC_TRY_AGAIN_LATER == status_code) {

View File

@@ -7106,13 +7106,34 @@ void lim_log_he_op(struct mac_context *mac, tDot11fIEhe_op *he_ops)
pe_debug("he basic mcs nss: 0x%04x",
*((uint16_t *)he_ops->basic_mcs_nss));
if (he_ops->vht_oper_present)
if (!he_ops->vht_oper_present)
pe_debug("VHT Info not present in HE Operation");
else
pe_debug("VHT Info: chan_width: %d, center_freq0: %d, center_freq1: %d",
he_ops->vht_oper.info.chan_width,
he_ops->vht_oper.info.center_freq_seg0,
he_ops->vht_oper.info.center_freq_seg1);
he_ops->vht_oper.info.chan_width,
he_ops->vht_oper.info.center_freq_seg0,
he_ops->vht_oper.info.center_freq_seg1);
if (!he_ops->oper_info_6g_present)
pe_err("6G op_info not present in HE Operation");
else
pe_err("6G_oper_info: chan_width: %d, center_freq0: %d, center_freq1: %d dup_bcon %d, min_rate %d",
he_ops->oper_info_6g.info.ch_width,
he_ops->oper_info_6g.info.center_freq_seg0,
he_ops->oper_info_6g.info.center_freq_seg1,
he_ops->oper_info_6g.info.dup_bcon,
he_ops->oper_info_6g.info.min_rate);
}
void lim_log_he_6g_cap(struct mac_context *mac,
tDot11fIEhe_6ghz_band_cap *he_6g_cap)
{
pe_debug("min_mpdu_space: %0d, max_mpdu_len_exp: %0x, max_mpdu_len %0x, smps %0x, rd %0x rx_ant_ptn %d tx_ant_ptn %d",
he_6g_cap->min_mpdu_start_spacing,
he_6g_cap->max_ampdu_len_exp, he_6g_cap->max_mpdu_len,
he_6g_cap->sm_pow_save, he_6g_cap->rd_responder,
he_6g_cap->rx_ant_pattern_consistency,
he_6g_cap->tx_ant_pattern_consistency);
}
#ifdef WLAN_FEATURE_11AX_BSS_COLOR
@@ -7154,6 +7175,11 @@ void lim_update_stads_he_capable(tpDphHashNode sta_ds, tpSirAssocReq assoc_req)
void lim_update_session_he_capable(struct mac_context *mac, struct pe_session *session)
{
session->he_capable = true;
if (wlan_reg_is_6ghz_chan_freq(session->curr_op_freq)) {
session->htCapability = 0;
session->vhtCapability = 0;
session->he_6ghz_band = 1;
}
pe_debug("he_capable: %d", session->he_capable);
}

View File

@@ -1002,6 +1002,18 @@ void lim_copy_bss_he_cap(struct pe_session *session,
void lim_copy_join_req_he_cap(struct pe_session *session,
struct join_req *sme_join_req);
/**
* lim_log_he_6g_cap() - Print HE 6G cap IE
* @mac: pointer to MAC context
* @he_6g_cap: pointer to HE 6G cap IE
*
* Print HE 6G caps stored as dot11f structure
*
* Return: None
*/
void lim_log_he_6g_cap(struct mac_context *mac,
tDot11fIEhe_6ghz_band_cap *he_6g_cap);
/**
* lim_log_he_op() - Print HE Operation
* @mac: pointer to MAC context

View File

@@ -472,6 +472,8 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess
&bcn_2->he_cap);
populate_dot11f_he_operation(mac_ctx, session,
&bcn_2->he_op);
populate_dot11f_he_6ghz_cap(mac_ctx, session,
&bcn_2->he_6ghz_band_cap);
populate_dot11f_he_bss_color_change(mac_ctx, session,
&bcn_2->bss_color_change);
}

View File

@@ -914,6 +914,11 @@ populate_dot11f_vht_caps(struct mac_context *mac,
nCfgValue = 0;
/* With VHT it suffices if we just examine HT */
if (pe_session) {
if (!pe_session->vhtCapability) {
pDot11f->present = 0;
return QDF_STATUS_SUCCESS;
}
if (pe_session->ht_config.ht_rx_ldpc)
pDot11f->ldpcCodingCap =
pe_session->vht_config.ldpc_coding;
@@ -1074,6 +1079,9 @@ populate_dot11f_vht_operation(struct mac_context *mac,
struct pe_session *pe_session,
tDot11fIEVHTOperation *pDot11f)
{
if (!pe_session || !pe_session->vhtCapability)
return QDF_STATUS_SUCCESS;
pDot11f->present = 1;
if (pe_session->ch_width > CH_WIDTH_40MHZ) {
@@ -5987,28 +5995,82 @@ populate_dot11f_he_operation(struct mac_context *mac_ctx,
{
qdf_mem_copy(he_op, &session->he_op, sizeof(*he_op));
he_op->vht_oper_present = 1;
he_op->present = 1;
if (session->ch_width > CH_WIDTH_40MHZ) {
he_op->vht_oper.info.chan_width = 1;
he_op->vht_oper.info.center_freq_seg0 =
session->ch_center_freq_seg0;
if (session->ch_width == CH_WIDTH_80P80MHZ ||
session->ch_width == CH_WIDTH_160MHZ)
he_op->vht_oper.info.center_freq_seg1 =
session->ch_center_freq_seg1;
else
if (!session->he_6ghz_band) {
he_op->vht_oper_present = 1;
if (session->ch_width > CH_WIDTH_40MHZ) {
he_op->vht_oper.info.chan_width = 1;
he_op->vht_oper.info.center_freq_seg0 =
session->ch_center_freq_seg0;
if (session->ch_width == CH_WIDTH_80P80MHZ ||
session->ch_width == CH_WIDTH_160MHZ)
he_op->vht_oper.info.center_freq_seg1 =
session->ch_center_freq_seg1;
else
he_op->vht_oper.info.center_freq_seg1 = 0;
} else {
he_op->vht_oper.info.chan_width = 0;
he_op->vht_oper.info.center_freq_seg0 = 0;
he_op->vht_oper.info.center_freq_seg1 = 0;
}
} else {
he_op->vht_oper.info.chan_width = 0;
he_op->vht_oper.info.center_freq_seg0 = 0;
he_op->vht_oper.info.center_freq_seg1 = 0;
he_op->oper_info_6g_present = 1;
if (session->ch_width > CH_WIDTH_40MHZ) {
he_op->oper_info_6g.info.ch_width = 1;
he_op->oper_info_6g.info.center_freq_seg0 =
session->ch_center_freq_seg0;
if (session->ch_width == CH_WIDTH_80P80MHZ ||
session->ch_width == CH_WIDTH_160MHZ)
he_op->oper_info_6g.info.center_freq_seg1 =
session->ch_center_freq_seg1;
else
he_op->oper_info_6g.info.center_freq_seg1 = 0;
} else {
he_op->oper_info_6g.info.ch_width = 0;
he_op->oper_info_6g.info.center_freq_seg0 = 0;
he_op->oper_info_6g.info.center_freq_seg1 = 0;
}
he_op->oper_info_6g.info.primary_ch =
wlan_reg_freq_to_chan(mac_ctx->pdev,
session->curr_op_freq);
he_op->oper_info_6g.info.dup_bcon = 0;
he_op->oper_info_6g.info.min_rate = 0;
}
lim_log_he_op(mac_ctx, he_op);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
populate_dot11f_he_6ghz_cap(struct mac_context *mac_ctx,
struct pe_session *session,
tDot11fIEhe_6ghz_band_cap *he_6g_cap)
{
struct mlme_ht_capabilities_info *ht_cap_info;
struct mlme_vht_capabilities_info *vht_cap_info;
if (!session || !session->he_6ghz_band)
return QDF_STATUS_SUCCESS;
ht_cap_info = &mac_ctx->mlme_cfg->ht_caps.ht_cap_info;
vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
he_6g_cap->present = 1;
he_6g_cap->min_mpdu_start_spacing =
mac_ctx->mlme_cfg->ht_caps.ampdu_params.mpdu_density;
he_6g_cap->max_ampdu_len_exp =
session->vht_config.max_ampdu_lenexp;
he_6g_cap->max_mpdu_len = vht_cap_info->ampdu_len;
he_6g_cap->sm_pow_save = ht_cap_info->mimo_power_save;
he_6g_cap->rd_responder = 0;
he_6g_cap->rx_ant_pattern_consistency = 0;
he_6g_cap->tx_ant_pattern_consistency = 0;
lim_log_he_6g_cap(mac_ctx, he_6g_cap);
return QDF_STATUS_SUCCESS;
}
#ifdef WLAN_FEATURE_11AX_BSS_COLOR
/**
* populate_dot11f_he_bss_color_change() - pouldate HE BSS color change IE