Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aeb804dc authored by Jianmin Zhu's avatar Jianmin Zhu Committed by snandini
Browse files

qcacld-3.0: Remove btm cap in SAE assoc req if SAE roam 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 roam, but roam fails and
disconnects from current AP, users will complain this unexpected
disconnect.

Change-Id: Ife9860addef6898a518618f555158e7888ac74db
CRs-Fixed: 2884694
parent 7e68726b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -71,10 +71,8 @@ enum ani_akm_type {
	ANI_AKM_TYPE_FT_RSN_PSK,
	ANI_AKM_TYPE_RSN_PSK_SHA256,
	ANI_AKM_TYPE_RSN_8021X_SHA256,
#ifdef WLAN_FEATURE_SAE
	ANI_AKM_TYPE_SAE,
	ANI_AKM_TYPE_FT_SAE,
#endif
	ANI_AKM_TYPE_SUITEB_EAP_SHA256,
	ANI_AKM_TYPE_SUITEB_EAP_SHA384,
	ANI_AKM_TYPE_FT_SUITEB_EAP_SHA384,
+14 −0
Original line number Diff line number Diff line
@@ -1228,6 +1228,20 @@ QDF_STATUS populate_dot11f_twt_extended_caps(struct mac_context *mac_ctx,
}
#endif

/**
 * populate_dot11f_btm_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_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
+2 −0
Original line number Diff line number Diff line
@@ -2204,6 +2204,8 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
			lim_merge_extcap_struct(&frm->ExtCap, &bcn_ext_cap,
							false);
		}

		populate_dot11f_btm_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
+25 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include "wlan_mlme_public_struct.h"
#include "wlan_mlme_ucfg_api.h"
#include "wlan_mlme_api.h"
#include "wlan_crypto_global_api.h"

#define RSN_OUI_SIZE 4
/* ////////////////////////////////////////////////////////////////////// */
@@ -6246,4 +6247,28 @@ QDF_STATUS populate_dot11f_twt_extended_caps(struct mac_context *mac_ctx,
}
#endif

QDF_STATUS populate_dot11f_btm_caps(struct mac_context *mac_ctx,
				    struct pe_session *pe_session,
				    struct sDot11fIEExtCap *dot11f)
{
	struct s_ext_cap *p_ext_cap;
	uint32_t fw_akm_bitmap;
	bool sae_can_roam;

	dot11f->num_bytes = DOT11F_IE_EXTCAP_MAX_LEN;
	p_ext_cap = (struct s_ext_cap *)dot11f->bytes;
	fw_akm_bitmap = mac_ctx->mlme_cfg->lfr.fw_akm_bitmap;
	sae_can_roam = (((fw_akm_bitmap) & (1 << AKM_SAE)) ? true : false);

	 if (pe_session->connected_akm == ANI_AKM_TYPE_SAE &&
	    !sae_can_roam) {
		p_ext_cap->bss_transition = 0;
		pe_debug("Disable btm cap for SAE roam not supported");
	}

	dot11f->num_bytes = lim_compute_ext_cap_ie_length(dot11f);

	return QDF_STATUS_SUCCESS;
}

/* parser_api.c ends here. */