|
@@ -916,15 +916,18 @@ static tSirMacStatusCodes lim_check_wpa_ie(struct pe_session *session,
|
|
|
* @hdr: pointer to the MAC head
|
|
|
* @assoc_req: pointer to ASSOC/REASSOC Request frame
|
|
|
* @pmf_connection: flag indicating pmf connection
|
|
|
+ * @akm_type: AKM type
|
|
|
*
|
|
|
* This function checks if wpa/rsn IE is present and validates
|
|
|
* ie version, length and mismatch.
|
|
|
*
|
|
|
* Return: true if no error, false otherwise
|
|
|
*/
|
|
|
-static bool lim_check_wpa_rsn_ie(struct pe_session *session, struct mac_context *mac_ctx,
|
|
|
+static bool lim_check_wpa_rsn_ie(struct pe_session *session,
|
|
|
+ struct mac_context *mac_ctx,
|
|
|
uint8_t sub_type, tpSirMacMgmtHdr hdr,
|
|
|
- tpSirAssocReq assoc_req, bool *pmf_connection)
|
|
|
+ tpSirAssocReq assoc_req, bool *pmf_connection,
|
|
|
+ enum ani_akm_type *akm_type)
|
|
|
{
|
|
|
uint32_t ret;
|
|
|
tDot11fIEWPA dot11f_ie_wpa = {0};
|
|
@@ -996,6 +999,8 @@ static bool lim_check_wpa_rsn_ie(struct pe_session *session, struct mac_context
|
|
|
1, hdr->sa, sub_type, 0, session);
|
|
|
return false;
|
|
|
}
|
|
|
+ *akm_type = lim_translate_rsn_oui_to_akm_type(
|
|
|
+ dot11f_ie_rsn.akm_suite[0]);
|
|
|
} else if (assoc_req->wpaPresent) {
|
|
|
if (!(assoc_req->wpa.length)) {
|
|
|
pe_warn("Re/Assoc rejected from: "
|
|
@@ -1036,7 +1041,8 @@ static bool lim_check_wpa_rsn_ie(struct pe_session *session, struct mac_context
|
|
|
hdr->sa, sub_type, 0, session);
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+ *akm_type = lim_translate_rsn_oui_to_akm_type(
|
|
|
+ dot11f_ie_wpa.auth_suites[0]);
|
|
|
}
|
|
|
|
|
|
return true;
|
|
@@ -1050,6 +1056,7 @@ static bool lim_check_wpa_rsn_ie(struct pe_session *session, struct mac_context
|
|
|
* @assoc_req: pointer to ASSOC/REASSOC Request frame
|
|
|
* @sub_type: Assoc(=0) or Reassoc(=1) Requestframe
|
|
|
* @pmf_connection: flag indicating pmf connection
|
|
|
+ * @akm_type: AKM type
|
|
|
*
|
|
|
* wpa ie related checks
|
|
|
*
|
|
@@ -1059,7 +1066,9 @@ static bool lim_chk_n_process_wpa_rsn_ie(struct mac_context *mac_ctx,
|
|
|
tpSirMacMgmtHdr hdr,
|
|
|
struct pe_session *session,
|
|
|
tpSirAssocReq assoc_req,
|
|
|
- uint8_t sub_type, bool *pmf_connection)
|
|
|
+ uint8_t sub_type,
|
|
|
+ bool *pmf_connection,
|
|
|
+ enum ani_akm_type *akm_type)
|
|
|
{
|
|
|
const uint8_t *wps_ie = NULL;
|
|
|
|
|
@@ -1078,7 +1087,8 @@ static bool lim_chk_n_process_wpa_rsn_ie(struct mac_context *mac_ctx,
|
|
|
session->pLimStartBssReq->privacy &&
|
|
|
session->pLimStartBssReq->rsnIE.length)
|
|
|
return lim_check_wpa_rsn_ie(session, mac_ctx, sub_type,
|
|
|
- hdr, assoc_req, pmf_connection);
|
|
|
+ hdr, assoc_req, pmf_connection,
|
|
|
+ akm_type);
|
|
|
} else {
|
|
|
pe_debug("Assoc req WSE IE is present");
|
|
|
}
|
|
@@ -1362,6 +1372,7 @@ static bool lim_chk_wmm(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
|
|
|
* @sub_type: Assoc(=0) or Reassoc(=1) Requestframe
|
|
|
* @sta_ds: station dph entry
|
|
|
* @auth_type: indicates security type
|
|
|
+ * @akm_type: indicates security type in akm
|
|
|
* @assoc_req_copied: boolean to indicate if assoc req was copied to tmp above
|
|
|
* @peer_idx: peer index
|
|
|
* @qos_mode: qos mode
|
|
@@ -1372,9 +1383,11 @@ static bool lim_chk_wmm(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
|
|
|
* Return: true of no error, false otherwise
|
|
|
*/
|
|
|
static bool lim_update_sta_ds(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
|
|
|
- struct pe_session *session, tpSirAssocReq assoc_req,
|
|
|
+ struct pe_session *session,
|
|
|
+ tpSirAssocReq assoc_req,
|
|
|
uint8_t sub_type, tpDphHashNode sta_ds,
|
|
|
tAniAuthType auth_type,
|
|
|
+ enum ani_akm_type akm_type,
|
|
|
bool *assoc_req_copied, uint16_t peer_idx,
|
|
|
tHalBitVal qos_mode, bool pmf_connection)
|
|
|
{
|
|
@@ -1436,8 +1449,11 @@ static bool lim_update_sta_ds(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
|
|
|
|
|
|
sta_ds->valid = 0;
|
|
|
sta_ds->mlmStaContext.authType = auth_type;
|
|
|
+ sta_ds->mlmStaContext.akm_type = akm_type;
|
|
|
sta_ds->staType = STA_ENTRY_PEER;
|
|
|
|
|
|
+ pe_debug("auth_type = %d, akm_type = %d", auth_type, akm_type);
|
|
|
+
|
|
|
/*
|
|
|
* TODO: If listen interval is more than certain limit, reject the
|
|
|
* association. Need to check customer requirements and then implement.
|
|
@@ -1916,6 +1932,7 @@ bool lim_send_assoc_ind_to_sme(struct mac_context *mac_ctx,
|
|
|
uint8_t sub_type,
|
|
|
tpSirMacMgmtHdr hdr,
|
|
|
tpSirAssocReq assoc_req,
|
|
|
+ enum ani_akm_type akm_type,
|
|
|
bool pmf_connection,
|
|
|
bool *assoc_req_copied,
|
|
|
bool dup_entry)
|
|
@@ -2001,7 +2018,7 @@ bool lim_send_assoc_ind_to_sme(struct mac_context *mac_ctx,
|
|
|
|
|
|
send_ind_to_sme:
|
|
|
if (!lim_update_sta_ds(mac_ctx, hdr, session, assoc_req,
|
|
|
- sub_type, sta_ds, auth_type,
|
|
|
+ sub_type, sta_ds, auth_type, akm_type,
|
|
|
assoc_req_copied, peer_idx, qos_mode,
|
|
|
pmf_connection))
|
|
|
return false;
|
|
@@ -2056,6 +2073,7 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
|
|
|
tHalBitVal qos_mode;
|
|
|
tpSirMacMgmtHdr hdr;
|
|
|
struct tLimPreAuthNode *sta_pre_auth_ctx;
|
|
|
+ enum ani_akm_type akm_type = ANI_AKM_TYPE_NONE;
|
|
|
tSirMacCapabilityInfo local_cap;
|
|
|
tpDphHashNode sta_ds = NULL;
|
|
|
tpSirAssocReq assoc_req;
|
|
@@ -2274,7 +2292,9 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
|
|
|
lim_print_ht_cap(mac_ctx, session, assoc_req);
|
|
|
|
|
|
if (false == lim_chk_n_process_wpa_rsn_ie(mac_ctx, hdr, session,
|
|
|
- assoc_req, sub_type, &pmf_connection))
|
|
|
+ assoc_req, sub_type,
|
|
|
+ &pmf_connection,
|
|
|
+ &akm_type))
|
|
|
goto error;
|
|
|
|
|
|
/* Extract pre-auth context for the STA, if any. */
|
|
@@ -2301,7 +2321,7 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
|
|
|
|
|
|
/* Send assoc indication to SME */
|
|
|
if (!lim_send_assoc_ind_to_sme(mac_ctx, session, sub_type, hdr,
|
|
|
- assoc_req, pmf_connection,
|
|
|
+ assoc_req, akm_type, pmf_connection,
|
|
|
&assoc_req_copied, dup_entry))
|
|
|
goto error;
|
|
|
|
|
@@ -2545,6 +2565,7 @@ void lim_send_mlm_assoc_ind(struct mac_context *mac_ctx,
|
|
|
assoc_req->ssId.length + 1);
|
|
|
assoc_ind->sessionId = session_entry->peSessionId;
|
|
|
assoc_ind->authType = sta_ds->mlmStaContext.authType;
|
|
|
+ assoc_ind->akm_type = sta_ds->mlmStaContext.akm_type;
|
|
|
assoc_ind->capabilityInfo = assoc_req->capabilityInfo;
|
|
|
|
|
|
/* Fill in RSN IE information */
|