mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Remove btm cap in SAE assoc req if SAE roaming disabled
Some legacy Helium firmware doesn't support SAE roaming, but btm cap is set in associate request of DUT, then connected SAE AP thinks DUT supports btm, AP will send btm request to DUT, DUT triggers roaming, but fails and disconnects from current AP, users will complain this unexpected disconnect. Change-Id: Ife9860addef6898a518618f555158e7888ac74db CRs-Fixed: 2884694
This commit is contained in:
parent
24de7c4eb0
commit
faa9af44a3
5 changed files with 96 additions and 27 deletions
|
|
@ -44,6 +44,17 @@ QDF_STATUS
|
|||
wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* cm_akm_roam_allowed() - check if roam allowed for some akm type
|
||||
*
|
||||
* @mac_ctx: mac
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: QDF_STATUS: QDF_STATUS_SUCCESS is allowed
|
||||
*/
|
||||
QDF_STATUS
|
||||
cm_akm_roam_allowed(struct mac_context *mac_ctx, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_cmd_allowed() - check roam cmd is allowed or not
|
||||
* @psoc: pointer to psoc object
|
||||
|
|
@ -155,6 +166,12 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
|||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
cm_akm_roam_allowed(struct mac_context *mac_ctx, uint8_t vdev_id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1254,6 +1254,20 @@ QDF_STATUS populate_dot11f_twt_extended_caps(struct mac_context *mac_ctx,
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* populate_dot11f_btm_extended_caps() - populate btm extended capabilities
|
||||
* @mac_ctx: Global MAC context.
|
||||
* @pe_session: Pointer to the PE session.
|
||||
* @dot11f: Pointer to the extended capabilities of the session.
|
||||
*
|
||||
* Disable btm for SAE types for Helium firmware limit
|
||||
*
|
||||
* Return: QDF_STATUS Success or Failure
|
||||
*/
|
||||
QDF_STATUS populate_dot11f_btm_extended_caps(struct mac_context *mac_ctx,
|
||||
struct pe_session *pe_session,
|
||||
struct sDot11fIEExtCap *dot11f);
|
||||
|
||||
/**
|
||||
* lim_truncate_ppet: truncates ppet of trailling zeros
|
||||
* @ppet: ppet to truncate
|
||||
|
|
|
|||
|
|
@ -2368,6 +2368,9 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|||
lim_merge_extcap_struct(&frm->ExtCap, &bcn_ext_cap,
|
||||
false);
|
||||
}
|
||||
|
||||
populate_dot11f_btm_extended_caps(mac_ctx, pe_session,
|
||||
&frm->ExtCap);
|
||||
/*
|
||||
* TWT extended capabilities should be populated after the
|
||||
* intersection of beacon caps and self caps is done because
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#include "wlan_mlme_ucfg_api.h"
|
||||
#include "wlan_mlme_api.h"
|
||||
#include "wlan_reg_services_api.h"
|
||||
#include "wlan_cm_roam_api.h"
|
||||
|
||||
#define RSN_OUI_SIZE 4
|
||||
/* ////////////////////////////////////////////////////////////////////// */
|
||||
|
|
@ -6502,4 +6503,26 @@ QDF_STATUS populate_dot11f_twt_extended_caps(struct mac_context *mac_ctx,
|
|||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS populate_dot11f_btm_extended_caps(struct mac_context *mac_ctx,
|
||||
struct pe_session *pe_session,
|
||||
struct sDot11fIEExtCap *dot11f)
|
||||
{
|
||||
struct s_ext_cap *p_ext_cap;
|
||||
QDF_STATUS status;
|
||||
|
||||
pe_debug("enter");
|
||||
dot11f->num_bytes = DOT11F_IE_EXTCAP_MAX_LEN;
|
||||
p_ext_cap = (struct s_ext_cap *)dot11f->bytes;
|
||||
|
||||
status = cm_akm_roam_allowed(mac_ctx, pe_session->vdev_id);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
p_ext_cap->bss_transition = 0;
|
||||
pe_debug("Disable btm for roaming not suppprted");
|
||||
}
|
||||
|
||||
dot11f->num_bytes = lim_compute_ext_cap_ie_length(dot11f);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* parser_api.c ends here. */
|
||||
|
|
|
|||
|
|
@ -17316,25 +17316,11 @@ csr_roam_offload_scan(struct mac_context *mac_ctx, uint8_t session_id,
|
|||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
uint8_t command, uint8_t reason)
|
||||
cm_akm_roam_allowed(struct mac_context *mac_ctx, uint8_t vdev_id)
|
||||
{
|
||||
uint8_t *state = NULL;
|
||||
struct csr_roam_session *session;
|
||||
struct mac_context *mac_ctx;
|
||||
tpCsrNeighborRoamControlInfo roam_info;
|
||||
enum csr_akm_type roam_profile_akm = eCSR_AUTH_TYPE_UNKNOWN;
|
||||
uint32_t fw_akm_bitmap;
|
||||
bool p2p_disable_sta_roaming = 0, nan_disable_sta_roaming = 0;
|
||||
|
||||
mac_ctx = sme_get_mac_context();
|
||||
if (!mac_ctx) {
|
||||
sme_err("mac_ctx is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
sme_debug("RSO Command %d, vdev %d, Reason %d",
|
||||
command, vdev_id, reason);
|
||||
|
||||
session = CSR_GET_SESSION(mac_ctx, vdev_id);
|
||||
if (!session) {
|
||||
|
|
@ -17343,18 +17329,6 @@ wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
roam_info = &mac_ctx->roam.neighborRoamInfo[vdev_id];
|
||||
|
||||
if (roam_info->neighborRoamState !=
|
||||
eCSR_NEIGHBOR_ROAM_STATE_CONNECTED &&
|
||||
(command == ROAM_SCAN_OFFLOAD_UPDATE_CFG ||
|
||||
command == ROAM_SCAN_OFFLOAD_START ||
|
||||
command == ROAM_SCAN_OFFLOAD_RESTART)) {
|
||||
sme_debug("Session not in connected state, RSO not sent and state=%d ",
|
||||
roam_info->neighborRoamState);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (session->pCurRoamProfile)
|
||||
roam_profile_akm =
|
||||
session->pCurRoamProfile->AuthType.authType[0];
|
||||
|
|
@ -17419,6 +17393,44 @@ wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||
}
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
uint8_t command, uint8_t reason)
|
||||
{
|
||||
uint8_t *state = NULL;
|
||||
struct mac_context *mac_ctx;
|
||||
tpCsrNeighborRoamControlInfo roam_info;
|
||||
bool p2p_disable_sta_roaming = 0, nan_disable_sta_roaming = 0;
|
||||
QDF_STATUS status;
|
||||
|
||||
mac_ctx = sme_get_mac_context();
|
||||
if (!mac_ctx) {
|
||||
sme_err("mac_ctx is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
sme_debug("RSO Command %d, vdev %d, Reason %d",
|
||||
command, vdev_id, reason);
|
||||
|
||||
roam_info = &mac_ctx->roam.neighborRoamInfo[vdev_id];
|
||||
|
||||
if (roam_info->neighborRoamState !=
|
||||
eCSR_NEIGHBOR_ROAM_STATE_CONNECTED &&
|
||||
(command == ROAM_SCAN_OFFLOAD_UPDATE_CFG ||
|
||||
command == ROAM_SCAN_OFFLOAD_START ||
|
||||
command == ROAM_SCAN_OFFLOAD_RESTART)) {
|
||||
sme_debug("Session not in connected state, RSO not sent and state=%d ",
|
||||
roam_info->neighborRoamState);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
status = cm_akm_roam_allowed(mac_ctx, vdev_id);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
|
||||
p2p_disable_sta_roaming =
|
||||
(cfg_p2p_is_roam_config_disabled(psoc) &&
|
||||
(policy_mgr_mode_specific_connection_count(
|
||||
|
|
|
|||
Loading…
Reference in a new issue