qcacld-3.0: Don't fill CCK rates for SAE Pre Auth frame
If while roaming from 2.4 GHz to 5 GHz band with SAE encryption, rates shouldn't be filled from the current session/AP as this may lead to incorrectly filling rates for instance this may lead to incorrectly filling CCk rates for SAE Pre-Auth while roaming from 2.4 GHz to 5 GHz. As even though with roaming offloaded, sae pre_auth due to crypto limitations of fw has to be triggered by the driver. Change-Id: I2293563db047e10ec8a2ade9f3b2a602cf3e3edf CRs-Fixed: 3336853
This commit is contained in:

committed by
Madan Koyyalamudi

parent
1ae74f4dba
commit
a64a7f3558
@@ -566,6 +566,17 @@ void lim_set_twt_ext_capabilities(struct mac_context *mac_ctx,
|
|||||||
{}
|
{}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lim_get_basic_rates() - Get basic rates for the given frequency
|
||||||
|
* @b_rates: Pointer to rates
|
||||||
|
* @chan_freq: frequency for which rates are required
|
||||||
|
*
|
||||||
|
* This api will get basic rates for the given frequency
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void lim_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lim_fill_pe_session() - Lim fill pe session
|
* lim_fill_pe_session() - Lim fill pe session
|
||||||
* @mac_ctx: Pointer to mac context
|
* @mac_ctx: Pointer to mac context
|
||||||
|
@@ -2791,7 +2791,7 @@ lim_fill_ese_params(struct mac_context *mac_ctx, struct pe_session *session,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void lim_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq)
|
void lim_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Some IOT APs don't send supported rates in
|
* Some IOT APs don't send supported rates in
|
||||||
|
@@ -3203,7 +3203,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|||||||
pe_session->vdev_id, QDF_MAC_ADDR_REF(pe_session->bssId),
|
pe_session->vdev_id, QDF_MAC_ADDR_REF(pe_session->bssId),
|
||||||
mac_ctx->mgmtSeqNum);
|
mac_ctx->mgmtSeqNum);
|
||||||
|
|
||||||
min_rid = lim_get_min_session_txrate(pe_session);
|
min_rid = lim_get_min_session_txrate(pe_session, NULL);
|
||||||
lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_ASSOC_START_EVENT,
|
lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_ASSOC_START_EVENT,
|
||||||
pe_session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
|
pe_session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
|
||||||
lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr,
|
lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr,
|
||||||
@@ -3815,7 +3815,7 @@ alloc_packet:
|
|||||||
session->peSessionId, mac_hdr->fc.subType));
|
session->peSessionId, mac_hdr->fc.subType));
|
||||||
|
|
||||||
mac_ctx->auth_ack_status = LIM_ACK_NOT_RCD;
|
mac_ctx->auth_ack_status = LIM_ACK_NOT_RCD;
|
||||||
min_rid = lim_get_min_session_txrate(session);
|
min_rid = lim_get_min_session_txrate(session, NULL);
|
||||||
peer_rssi = mac_ctx->lim.bss_rssi;
|
peer_rssi = mac_ctx->lim.bss_rssi;
|
||||||
lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr,
|
lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr,
|
||||||
session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
|
session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
|
||||||
@@ -6531,7 +6531,8 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id,
|
|||||||
enum rateid min_rid = RATEID_DEFAULT;
|
enum rateid min_rid = RATEID_DEFAULT;
|
||||||
enum QDF_OPMODE opmode;
|
enum QDF_OPMODE opmode;
|
||||||
uint16_t session_id;
|
uint16_t session_id;
|
||||||
uint16_t channel_freq = 0;
|
qdf_freq_t channel_freq = 0;
|
||||||
|
qdf_freq_t *pre_auth_freq = NULL;
|
||||||
|
|
||||||
opmode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, vdev_id);
|
opmode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, vdev_id);
|
||||||
if (opmode != QDF_NAN_DISC_MODE) {
|
if (opmode != QDF_NAN_DISC_MODE) {
|
||||||
@@ -6551,22 +6552,24 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id,
|
|||||||
session_id, 0);
|
session_id, 0);
|
||||||
|
|
||||||
if (opmode != QDF_NAN_DISC_MODE) {
|
if (opmode != QDF_NAN_DISC_MODE) {
|
||||||
min_rid = lim_get_min_session_txrate(session);
|
|
||||||
if (fc->subType == SIR_MAC_MGMT_AUTH) {
|
if (fc->subType == SIR_MAC_MGMT_AUTH) {
|
||||||
tpSirFTPreAuthReq pre_auth_req;
|
tpSirFTPreAuthReq pre_auth_req;
|
||||||
uint16_t auth_algo = *(uint16_t *)(frame +
|
uint16_t auth_algo = *(uint16_t *)(frame +
|
||||||
sizeof(tSirMacMgmtHdr));
|
sizeof(tSirMacMgmtHdr));
|
||||||
|
|
||||||
if ((auth_algo == eSIR_AUTH_TYPE_SAE) &&
|
if (auth_algo == eSIR_AUTH_TYPE_SAE) {
|
||||||
(session->ftPEContext.pFTPreAuthReq)) {
|
if (session->ftPEContext.pFTPreAuthReq) {
|
||||||
pre_auth_req =
|
pre_auth_req =
|
||||||
session->ftPEContext.pFTPreAuthReq;
|
session->ftPEContext.pFTPreAuthReq;
|
||||||
channel_freq =
|
channel_freq =
|
||||||
pre_auth_req->pre_auth_channel_freq;
|
pre_auth_req->pre_auth_channel_freq;
|
||||||
|
}
|
||||||
|
pre_auth_freq = &channel_freq;
|
||||||
}
|
}
|
||||||
pe_debug("TX SAE pre-auth frame on freq %d",
|
pe_debug("TX SAE pre-auth frame on freq %d",
|
||||||
channel_freq);
|
channel_freq);
|
||||||
}
|
}
|
||||||
|
min_rid = lim_get_min_session_txrate(session, pre_auth_freq);
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet,
|
qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet,
|
||||||
|
@@ -9450,37 +9450,69 @@ QDF_STATUS lim_util_get_type_subtype(void *pkt, uint8_t *type,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum rateid lim_get_min_session_txrate(struct pe_session *session)
|
static void lim_get_min_rate(uint8_t *min_rate, tSirMacRateSet *rateset)
|
||||||
{
|
{
|
||||||
enum rateid rid = RATEID_DEFAULT;
|
uint8_t curr_rate, i;
|
||||||
uint8_t min_rate = SIR_MAC_RATE_54, curr_rate, i;
|
|
||||||
tSirMacRateSet *rateset = &session->rateSet;
|
|
||||||
bool enable_he_mcs0_for_6ghz_mgmt = false;
|
|
||||||
qdf_freq_t op_freq;
|
|
||||||
|
|
||||||
if (!session)
|
|
||||||
return rid;
|
|
||||||
else {
|
|
||||||
op_freq = wlan_get_operation_chan_freq(session->vdev);
|
|
||||||
/*
|
|
||||||
* For 6GHz freq and if enable_he_mcs0_for_mgmt_6ghz INI is
|
|
||||||
* enabled then FW will use rate of MCS0 for 11AX and configured
|
|
||||||
* via WMI_MGMT_TX_SEND_CMDID
|
|
||||||
*/
|
|
||||||
wlan_mlme_get_mgmt_6ghz_rate_support(
|
|
||||||
session->mac_ctx->psoc,
|
|
||||||
&enable_he_mcs0_for_6ghz_mgmt);
|
|
||||||
if (op_freq && wlan_reg_is_6ghz_chan_freq(op_freq) &&
|
|
||||||
enable_he_mcs0_for_6ghz_mgmt)
|
|
||||||
return rid;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < rateset->numRates; i++) {
|
for (i = 0; i < rateset->numRates; i++) {
|
||||||
/* Ignore MSB - set to indicate basic rate */
|
/* Ignore MSB - set to indicate basic rate */
|
||||||
curr_rate = rateset->rate[i] & 0x7F;
|
curr_rate = rateset->rate[i] & 0x7F;
|
||||||
min_rate = (curr_rate < min_rate) ? curr_rate : min_rate;
|
*min_rate = (curr_rate < *min_rate) ? curr_rate :
|
||||||
|
*min_rate;
|
||||||
}
|
}
|
||||||
pe_debug("supported min_rate: %0x(%d)", min_rate, min_rate);
|
|
||||||
|
pe_debug("supported min_rate: %0x(%d)", *min_rate, *min_rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool lim_is_enable_he_mcs0_for_6ghz_mgmt(struct pe_session *session,
|
||||||
|
qdf_freq_t freq)
|
||||||
|
{
|
||||||
|
bool enable_he_mcs0_for_6ghz_mgmt = false;
|
||||||
|
|
||||||
|
if (!wlan_reg_is_6ghz_chan_freq(freq))
|
||||||
|
return enable_he_mcs0_for_6ghz_mgmt;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For 6GHz freq and if enable_he_mcs0_for_mgmt_6ghz INI is
|
||||||
|
* enabled then FW will use rate of MCS0 for 11AX and configured
|
||||||
|
* via WMI_MGMT_TX_SEND_CMDID
|
||||||
|
*/
|
||||||
|
wlan_mlme_get_mgmt_6ghz_rate_support(
|
||||||
|
session->mac_ctx->psoc,
|
||||||
|
&enable_he_mcs0_for_6ghz_mgmt);
|
||||||
|
|
||||||
|
return enable_he_mcs0_for_6ghz_mgmt;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum rateid lim_get_min_session_txrate(struct pe_session *session,
|
||||||
|
qdf_freq_t *pre_auth_freq)
|
||||||
|
{
|
||||||
|
enum rateid rid = RATEID_DEFAULT;
|
||||||
|
uint8_t min_rate = SIR_MAC_RATE_54;
|
||||||
|
tSirMacRateSet *rateset;
|
||||||
|
qdf_freq_t op_freq;
|
||||||
|
|
||||||
|
if (!session)
|
||||||
|
return rid;
|
||||||
|
|
||||||
|
rateset = &session->rateSet;
|
||||||
|
|
||||||
|
if (pre_auth_freq) {
|
||||||
|
pe_debug("updated rateset to pre auth freq %d",
|
||||||
|
*pre_auth_freq);
|
||||||
|
if (*pre_auth_freq &&
|
||||||
|
!lim_is_enable_he_mcs0_for_6ghz_mgmt(session,
|
||||||
|
*pre_auth_freq))
|
||||||
|
lim_get_basic_rates(rateset, *pre_auth_freq);
|
||||||
|
else
|
||||||
|
return rid;
|
||||||
|
}
|
||||||
|
|
||||||
|
op_freq = wlan_get_operation_chan_freq(session->vdev);
|
||||||
|
if (lim_is_enable_he_mcs0_for_6ghz_mgmt(session, op_freq))
|
||||||
|
return rid;
|
||||||
|
|
||||||
|
lim_get_min_rate(&min_rate, rateset);
|
||||||
|
|
||||||
switch (min_rate) {
|
switch (min_rate) {
|
||||||
case SIR_MAC_RATE_1:
|
case SIR_MAC_RATE_1:
|
||||||
|
@@ -2385,13 +2385,15 @@ QDF_STATUS lim_util_get_type_subtype(void *pkt, uint8_t *type,
|
|||||||
/**
|
/**
|
||||||
* lim_get_min_session_txrate() - Get the minimum rate supported in the session
|
* lim_get_min_session_txrate() - Get the minimum rate supported in the session
|
||||||
* @session: Pointer to PE session
|
* @session: Pointer to PE session
|
||||||
|
* @pre_auth_freq: Pointer to pre_auth_freq
|
||||||
*
|
*
|
||||||
* This API will find the minimum rate supported by the given PE session and
|
* This API will find the minimum rate supported by the given PE session and
|
||||||
* return the enum rateid corresponding to the rate.
|
* return the enum rateid corresponding to the rate.
|
||||||
*
|
*
|
||||||
* Return: enum rateid
|
* Return: enum rateid
|
||||||
*/
|
*/
|
||||||
enum rateid lim_get_min_session_txrate(struct pe_session *session);
|
enum rateid lim_get_min_session_txrate(struct pe_session *session,
|
||||||
|
qdf_freq_t *pre_auth_freq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lim_send_dfs_chan_sw_ie_update() - updates the channel switch IE in beacon
|
* lim_send_dfs_chan_sw_ie_update() - updates the channel switch IE in beacon
|
||||||
|
Reference in New Issue
Block a user