mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-03 17:27:25 -05:00
qcacld-3.0: Send QCN IE to FW as part of scan and assoc IE for LFR3
Currently, host driver adds QCN IE in probe/assoc request initiated from driver. If QCN IE support is enabled in host driver[g_qcn_ie_support INI is 1], add the QCN IE as part of scan/assoc IE's that are sent to FW to be used for probe/assoc/reassoc frames initiated by FW. Change-Id: Ic4d58b2cb827668a9ce9cfa5bad4d882816d607b CRs-Fixed: 1117332
This commit is contained in:
parent
d1225e6f65
commit
ced570637e
6 changed files with 61 additions and 3 deletions
|
|
@ -60,8 +60,11 @@
|
|||
#define MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID 0x04
|
||||
|
||||
/* QCN IE definitions */
|
||||
#define QCN_IE_VERSION_SUBATTR_ID 1
|
||||
#define QCN_IE_VERSION_SUBATTR_LEN 2
|
||||
#define QCN_IE_HDR_LEN 6
|
||||
|
||||
#define QCN_IE_VERSION_SUBATTR_ID 1
|
||||
#define QCN_IE_VERSION_SUBATTR_DATA_LEN 2
|
||||
#define QCN_IE_VERSION_SUBATTR_LEN 4
|
||||
#define QCN_IE_VERSION_SUPPORTED 1
|
||||
#define QCN_IE_SUBVERSION_SUPPORTED 0
|
||||
|
||||
|
|
|
|||
|
|
@ -381,5 +381,7 @@ QDF_STATUS lim_update_ext_cap_ie(tpAniSirGlobal mac_ctx,
|
|||
|
||||
void lim_log(tpAniSirGlobal pMac, uint32_t loglevel,
|
||||
const char *pString, ...);
|
||||
QDF_STATUS lim_add_qcn_ie(tpAniSirGlobal mac_ctx, uint8_t *ie_data,
|
||||
uint16_t *ie_len);
|
||||
/************************************************************/
|
||||
#endif /* __LIM_API_H */
|
||||
|
|
|
|||
|
|
@ -2500,3 +2500,38 @@ void lim_log(tpAniSirGlobal pMac, uint32_t loglevel, const char *pString, ...)
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_add_qcn_ie() - Add QCN IE to a given IE buffer
|
||||
*
|
||||
* @mac_ctx: Pointer to Global MAC structure
|
||||
* @ie_data: IE buffer
|
||||
* @ie_len: length of the @ie_data
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS lim_add_qcn_ie(tpAniSirGlobal mac_ctx, uint8_t *ie_data,
|
||||
uint16_t *ie_len)
|
||||
{
|
||||
tDot11fIEQCN_IE qcn_ie;
|
||||
uint8_t qcn_ie_hdr[QCN_IE_HDR_LEN]
|
||||
= {IE_EID_VENDOR, DOT11F_IE_QCN_IE_MAX_LEN,
|
||||
0x8C, 0xFD, 0xF0, 0x1};
|
||||
|
||||
if (((*ie_len) + DOT11F_IE_QCN_IE_MAX_LEN) > MAX_DEFAULT_SCAN_IE_LEN) {
|
||||
lim_log(mac_ctx, LOGE, FL("IE buffer not enough for QCN IE"));
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* Add QCN IE header */
|
||||
qdf_mem_copy(ie_data + (*ie_len), qcn_ie_hdr, QCN_IE_HDR_LEN);
|
||||
(*ie_len) += QCN_IE_HDR_LEN;
|
||||
|
||||
/* Retrieve Version sub-attribute data */
|
||||
populate_dot11f_qcn_ie(&qcn_ie);
|
||||
|
||||
/* Add QCN IE data[version sub attribute] */
|
||||
qdf_mem_copy(ie_data + (*ie_len), qcn_ie.version,
|
||||
(QCN_IE_VERSION_SUBATTR_LEN));
|
||||
(*ie_len) += (QCN_IE_VERSION_SUBATTR_LEN);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ static void lim_process_set_default_scan_ie_request(tpAniSirGlobal mac_ctx,
|
|||
uint16_t local_ie_len;
|
||||
struct scheduler_msg msg_q;
|
||||
tSirRetStatus ret_code;
|
||||
QDF_STATUS qdf_status;
|
||||
|
||||
if (!msg_buf) {
|
||||
pe_err("msg_buf is NULL");
|
||||
|
|
@ -283,6 +284,13 @@ static void lim_process_set_default_scan_ie_request(tpAniSirGlobal mac_ctx,
|
|||
goto scan_ie_send_fail;
|
||||
}
|
||||
|
||||
if (mac_ctx->roam.configParam.qcn_ie_support) {
|
||||
qdf_status = lim_add_qcn_ie(mac_ctx, local_ie_buf,
|
||||
&local_ie_len);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
goto scan_ie_send_fail;
|
||||
}
|
||||
|
||||
wma_ie_params = qdf_mem_malloc(sizeof(*wma_ie_params) + local_ie_len);
|
||||
if (!wma_ie_params) {
|
||||
pe_err("fail to alloc wma_ie_params");
|
||||
|
|
|
|||
|
|
@ -1247,7 +1247,7 @@ void populate_dot11f_qcn_ie(tDot11fIEQCN_IE *pDot11f)
|
|||
{
|
||||
pDot11f->present = 1;
|
||||
pDot11f->version[0] = QCN_IE_VERSION_SUBATTR_ID;
|
||||
pDot11f->version[1] = QCN_IE_VERSION_SUBATTR_LEN;
|
||||
pDot11f->version[1] = QCN_IE_VERSION_SUBATTR_DATA_LEN;
|
||||
pDot11f->version[2] = QCN_IE_VERSION_SUPPORTED;
|
||||
pDot11f->version[3] = QCN_IE_SUBVERSION_SUPPORTED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17763,6 +17763,11 @@ static void csr_update_driver_assoc_ies(tpAniSirGlobal mac_ctx,
|
|||
uint8_t ese_ie[DOT11F_IE_ESEVERSION_MAX_LEN]
|
||||
= { 0x0, 0x40, 0x96, 0x3, ESE_VERSION_SUPPORTED};
|
||||
#endif
|
||||
uint8_t qcn_ie[DOT11F_IE_QCN_IE_MAX_LEN]
|
||||
= {0x8C, 0xFD, 0xF0, 0x1, QCN_IE_VERSION_SUBATTR_ID,
|
||||
QCN_IE_VERSION_SUBATTR_DATA_LEN,
|
||||
QCN_IE_VERSION_SUPPORTED,
|
||||
QCN_IE_SUBVERSION_SUPPORTED};
|
||||
|
||||
if (session->pConnectBssDesc)
|
||||
max_tx_pwr_cap = csr_get_cfg_max_tx_power(mac_ctx,
|
||||
|
|
@ -17810,6 +17815,11 @@ static void csr_update_driver_assoc_ies(tpAniSirGlobal mac_ctx,
|
|||
}
|
||||
ese_populate_addtional_ies(mac_ctx, session, req_buf);
|
||||
|
||||
/* Append QCN IE if g_support_qcn_ie INI is enabled */
|
||||
if (mac_ctx->roam.configParam.qcn_ie_support)
|
||||
csr_append_assoc_ies(mac_ctx, req_buf, IEEE80211_ELEMID_VENDOR,
|
||||
DOT11F_IE_QCN_IE_MAX_LEN,
|
||||
qcn_ie);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue