summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/mac/inc/sir_api.h13
-rw-r--r--core/sme/inc/csr_internal.h1
-rw-r--r--core/sme/inc/csr_support.h10
-rw-r--r--core/sme/src/csr/csr_api_roam.c1
-rw-r--r--core/sme/src/csr/csr_util.c12
-rw-r--r--core/wma/src/wma_scan_roam.c14
6 files changed, 36 insertions, 15 deletions
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 4d8742f8a8ee..8033d68fdc33 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -211,6 +211,18 @@ typedef enum {
#endif
+/* RSN capabilities structure */
+
+struct rsn_caps {
+ uint16_t PreAuthSupported:1;
+ uint16_t NoPairwise:1;
+ uint16_t PTKSAReplayCounter:2;
+ uint16_t GTKSAReplayCounter:2;
+ uint16_t MFPRequired:1;
+ uint16_t MFPCapable:1;
+ uint16_t Reserved:8;
+};
+
/**
* enum sir_roam_op_code - Operation to be done by the callback.
* @SIR_ROAM_SYNCH_PROPAGATION: Propagate the new BSS info after roaming.
@@ -3690,6 +3702,7 @@ typedef struct sSirRoamOffloadScanReq {
struct roam_fils_params roam_fils_params;
#endif
struct scoring_param score_params;
+ struct rsn_caps rsn_caps;
struct wmi_11k_offload_params offload_11k_params;
uint32_t ho_delay_for_rx;
uint32_t min_delay_btw_roam_scans;
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 15a569442108..0c6e94b3db0f 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -1049,6 +1049,7 @@ typedef struct tagCsrRoamSession {
bool ignore_assoc_disallowed;
bool discon_in_progress;
struct csr_disconnect_stats disconnect_stats;
+ struct rsn_caps rsn_caps;
} tCsrRoamSession;
typedef struct tagCsrRoamStruct {
diff --git a/core/sme/inc/csr_support.h b/core/sme/inc/csr_support.h
index 3ded42774efd..046803fdca3b 100644
--- a/core/sme/inc/csr_support.h
+++ b/core/sme/inc/csr_support.h
@@ -166,16 +166,6 @@ typedef struct tagCsrRSNAuthIe {
} qdf_packed AuthOui[1];
} qdf_packed tCsrRSNAuthIe;
-typedef struct tagCsrRSNCapabilities {
- uint16_t PreAuthSupported:1;
- uint16_t NoPairwise:1;
- uint16_t PTKSAReplayCounter:2;
- uint16_t GTKSAReplayCounter:2;
- uint16_t MFPRequired:1;
- uint16_t MFPCapable:1;
- uint16_t Reserved:8;
-} qdf_packed tCsrRSNCapabilities;
-
typedef struct tagCsrRSNPMKIe {
uint16_t cPMKIDs;
struct {
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 397ee9611781..8e71ea463768 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -19366,6 +19366,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
roam_info->cfgParams.nRoamBmissFinalBcnt;
req_buf->RoamBeaconRssiWeight =
roam_info->cfgParams.nRoamBeaconRssiWeight;
+ req_buf->rsn_caps = session->rsn_caps;
qdf_mem_copy(&req_buf->mawc_roam_params,
&mac_ctx->roam.configParam.csr_mawc_config,
sizeof(req_buf->mawc_roam_params));
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index 1d63d770535a..078dcb2e51d3 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -3096,7 +3096,7 @@ static bool csr_get_rsn_information(tHalHandle hal, tCsrAuthList *auth_type,
tCsrEncryptionList *mc_encryption,
tDot11fIERSN *rsn_ie, uint8_t *ucast_cipher,
uint8_t *mcast_cipher, uint8_t *auth_suite,
- tCsrRSNCapabilities *capabilities,
+ struct rsn_caps *capabilities,
eCsrAuthType *negotiated_authtype,
eCsrEncryptionType *negotiated_mccipher,
uint8_t *gp_mgmt_cipher,
@@ -3625,6 +3625,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
{
uint32_t ret;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ tCsrRoamSession *session = CSR_GET_SESSION(pMac, sessionId);
bool fRSNMatch;
uint8_t cbRSNIe = 0;
uint8_t UnicastCypher[CSR_RSN_OUI_SIZE];
@@ -3632,7 +3633,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
uint8_t gp_mgmt_cipher_suite[CSR_RSN_OUI_SIZE];
uint8_t AuthSuite[CSR_RSN_OUI_SIZE];
tCsrRSNAuthIe *pAuthSuite;
- tCsrRSNCapabilities RSNCapabilities;
+ struct rsn_caps RSNCapabilities;
tCsrRSNPMKIe *pPMK;
tPmkidCacheInfo pmkid_cache;
#ifdef WLAN_FEATURE_11W
@@ -3642,6 +3643,8 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
eCsrAuthType negAuthType = eCSR_AUTH_TYPE_UNKNOWN;
tDot11fIERSN rsn_ie = {0};
+ if (!CSR_IS_SESSION_VALID(pMac, sessionId) || !session)
+ return 0;
qdf_mem_zero(&pmkid_cache, sizeof(pmkid_cache));
do {
if (!csr_is_profile_rsn(pProfile))
@@ -3727,7 +3730,8 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
pPMK = (tCsrRSNPMKIe *) (((uint8_t *) (&pAuthSuite->AuthOui[1]))
+ sizeof(uint16_t));
-
+ /* Store RSN capabilities in session */
+ session->rsn_caps = RSNCapabilities;
if (!csr_update_pmksa_for_cache_id(pSirBssDesc,
pProfile, &pmkid_cache))
qdf_mem_copy(pmkid_cache.BSSID.bytes,
@@ -3774,7 +3778,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
pRSNIe->IeHeader.Length =
(uint8_t) (sizeof(*pRSNIe) - sizeof(pRSNIe->IeHeader) +
sizeof(*pAuthSuite) +
- sizeof(tCsrRSNCapabilities));
+ sizeof(struct rsn_caps));
if (pPMK->cPMKIDs)
pRSNIe->IeHeader.Length += (uint8_t) (sizeof(uint16_t) +
(pPMK->cPMKIDs *
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index ba839090d750..1dcfaccc3b19 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -3254,6 +3254,7 @@ cleanup_label:
return status;
}
+#define RSN_CAPS_SHIFT 16
/**
* wma_roam_scan_fill_self_caps() - fill capabilities
* @wma_handle: wma handle
@@ -3358,7 +3359,18 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
selfCaps.immediateBA =
(uint16_t) ((val >> WNI_CFG_BLOCK_ACK_ENABLED_IMMEDIATE) & 1);
pCfgValue16 = (uint16_t *) &selfCaps;
- roam_offload_params->capability = (*pCfgValue16) & 0xFFFF;
+ /*
+ * RSN caps arent been sent to firmware, so in case of PMF required,
+ * the firmware connects to a non PMF AP advertising PMF not required
+ * in the re-assoc request which violates protocol.
+ * So send this to firmware in the roam SCAN offload command to
+ * let it configure the params in the re-assoc request too.
+ * Instead of making another infra, send the RSN-CAPS in MSB of
+ * beacon Caps.
+ */
+ roam_offload_params->capability = *((uint32_t *)(&roam_req->rsn_caps));
+ roam_offload_params->capability <<= RSN_CAPS_SHIFT;
+ roam_offload_params->capability |= ((*pCfgValue16) & 0xFFFF);
if (wlan_cfg_get_int(pMac, WNI_CFG_HT_CAP_INFO, &nCfgValue) !=
eSIR_SUCCESS) {