mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Update 6GHz ch_width based on peer HE IE
In 6GHz BSS, the VHT and HT IE are not present and only HE IE is present. Driver needs to update ch_width to peer struct based on HE IE if vht and HT is not supported. Change-Id: Ib48dc63f972cfc040b40c3dbf53a4c46f9e95eee CRs-Fixed: 2583249
This commit is contained in:
parent
b4ad651720
commit
2b0c18bde9
5 changed files with 52 additions and 6 deletions
|
|
@ -3722,15 +3722,10 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
|||
vht_caps, pe_session);
|
||||
}
|
||||
|
||||
pe_debug("vhtCapable %d ch_width %d", pAddBssParams->vhtCapable,
|
||||
pAddBssParams->ch_width);
|
||||
|
||||
if (lim_is_session_he_capable(pe_session) &&
|
||||
(pAssocRsp->he_cap.present)) {
|
||||
lim_add_bss_he_cap(pAddBssParams, pAssocRsp);
|
||||
lim_add_bss_he_cfg(pAddBssParams, pe_session);
|
||||
lim_update_he_6gop_assoc_resp(pAddBssParams, &pAssocRsp->he_op,
|
||||
pe_session);
|
||||
}
|
||||
/*
|
||||
* Populate the STA-related parameters here
|
||||
|
|
@ -3948,6 +3943,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
|||
NULL,
|
||||
pAssocRsp);
|
||||
lim_update_he_stbc_capable(&pAddBssParams->staContext);
|
||||
lim_update_he_6gop_assoc_resp(pAddBssParams,
|
||||
&pAssocRsp->he_op,
|
||||
pe_session);
|
||||
}
|
||||
}
|
||||
pAddBssParams->staContext.smesessionId =
|
||||
|
|
@ -4049,6 +4047,8 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
|||
|
||||
if (lim_is_fils_connection(pe_session))
|
||||
pAddBssParams->no_ptk_4_way = true;
|
||||
pe_debug("vhtCapable %d ch_width %d", pAddBssParams->vhtCapable,
|
||||
pAddBssParams->staContext.ch_width);
|
||||
|
||||
retCode = wma_send_peer_assoc_req(pAddBssParams);
|
||||
if (QDF_IS_STATUS_ERROR(retCode)) {
|
||||
|
|
|
|||
|
|
@ -1704,6 +1704,7 @@ static bool lim_update_sta_ds(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
|
|||
((sta_ds->supportedRates.vhtRxMCSMap & MCSMAPMASK2x2)
|
||||
== MCSMAPMASK2x2) ? 1 : 2;
|
||||
}
|
||||
lim_update_stads_he_6ghz_op(session, sta_ds);
|
||||
|
||||
/* Add STA context at MAC HW (BMU, RHP & TFP) */
|
||||
sta_ds->qosMode = false;
|
||||
|
|
|
|||
|
|
@ -6737,6 +6737,7 @@ void lim_update_he_6gop_assoc_resp(struct bss_params *pAddBssParams,
|
|||
|
||||
if (pAddBssParams->ch_width == CH_WIDTH_160MHZ)
|
||||
pAddBssParams->ch_width = pe_session->ch_width;
|
||||
pAddBssParams->staContext.ch_width = pAddBssParams->ch_width;
|
||||
}
|
||||
|
||||
void lim_update_stads_he_caps(tpDphHashNode sta_ds, tpSirAssocRsp assoc_rsp,
|
||||
|
|
@ -6754,6 +6755,33 @@ void lim_update_stads_he_caps(tpDphHashNode sta_ds, tpSirAssocRsp assoc_rsp,
|
|||
|
||||
}
|
||||
|
||||
void lim_update_stads_he_6ghz_op(struct pe_session *session,
|
||||
tpDphHashNode sta_ds)
|
||||
{
|
||||
tDot11fIEhe_cap *peer_he = &sta_ds->he_config;
|
||||
enum phy_ch_width ch_width;
|
||||
|
||||
if (!session->he_6ghz_band)
|
||||
return;
|
||||
|
||||
if (!peer_he->present) {
|
||||
pe_debug("HE cap not present in peer");
|
||||
return;
|
||||
}
|
||||
|
||||
if (peer_he->chan_width_3)
|
||||
ch_width = CH_WIDTH_80P80MHZ;
|
||||
else if (peer_he->chan_width_2)
|
||||
ch_width = CH_WIDTH_160MHZ;
|
||||
else if (peer_he->chan_width_1)
|
||||
ch_width = CH_WIDTH_80MHZ;
|
||||
else
|
||||
ch_width = CH_WIDTH_20MHZ;
|
||||
if (ch_width > session->ch_width)
|
||||
ch_width = session->ch_width;
|
||||
sta_ds->ch_width = ch_width;
|
||||
}
|
||||
|
||||
void lim_update_usr_he_cap(struct mac_context *mac_ctx, struct pe_session *session)
|
||||
{
|
||||
struct add_ie_params *add_ie = &session->add_ie_params;
|
||||
|
|
|
|||
|
|
@ -1255,6 +1255,17 @@ QDF_STATUS lim_populate_he_mcs_set(struct mac_context *mac_ctx,
|
|||
struct pe_session *session_entry,
|
||||
uint8_t nss);
|
||||
|
||||
/**
|
||||
* lim_update_stads_he_6ghz_op() - Update sta ds channel info
|
||||
* @session: pe session
|
||||
* @sta_ds: pointer to sta ds struct
|
||||
|
||||
* Update sta_ds channel width.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void lim_update_stads_he_6ghz_op(struct pe_session *session,
|
||||
tpDphHashNode sta_ds);
|
||||
#else
|
||||
static inline void lim_add_he_cap(tpAddStaParams add_sta_params,
|
||||
tpSirAssocReq assoc_req)
|
||||
|
|
@ -1401,6 +1412,11 @@ QDF_STATUS lim_populate_he_mcs_set(struct mac_context *mac_ctx,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline void
|
||||
lim_update_stads_he_6ghz_op(struct pe_session *session,
|
||||
tpDphHashNode sta_ds)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2421,7 +2421,8 @@ static QDF_STATUS csr_fill_bss_from_scan_entry(struct mac_context *mac_ctx,
|
|||
bss_desc->beaconInterval = scan_entry->bcn_int;
|
||||
bss_desc->capabilityInfo = scan_entry->cap_info.value;
|
||||
|
||||
if (WLAN_REG_IS_5GHZ_CH_FREQ(scan_entry->channel.chan_freq))
|
||||
if (WLAN_REG_IS_5GHZ_CH_FREQ(scan_entry->channel.chan_freq) ||
|
||||
WLAN_REG_IS_6GHZ_CHAN_FREQ(scan_entry->channel.chan_freq))
|
||||
bss_desc->nwType = eSIR_11A_NW_TYPE;
|
||||
else if (scan_entry->phy_mode == WLAN_PHYMODE_11B)
|
||||
bss_desc->nwType = eSIR_11B_NW_TYPE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue