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

Commit 4b527e53 authored by Pankaj Singh's avatar Pankaj Singh
Browse files

wlan: Reject assoc req with PMF disabled from SAE STA

For WPA3 SAE test case 4.2.7, SAP should reject the association
request with PMF disabled from SAE STA.

Change-Id: Ie2298313ce5a7a363afdb4478f541cf2da612603
CRs-Fixed: 2734701
parent d11efa48
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -716,7 +716,9 @@ typedef enum eSirMacStatusCodes
    eSIR_MAC_DSSS_OFDM_NOT_SUPPORTED_STATUS       = 26, //Association denied due to requesting station not supporting the DSSS-OFDM option
    // reserved                                     27-29
    eSIR_MAC_TRY_AGAIN_LATER                      = 30, //Association request rejected temporarily, try again later
    // reserved                                     31
#ifdef WLAN_FEATURE_11W
    eSIR_MAC_ROBUST_MGMT_FRAMES_POLICY_VIOLATION_STATUS = 31,    /* Robust management frames policy violation */
#endif
    eSIR_MAC_QOS_UNSPECIFIED_FAILURE_STATUS       = 32, //Unspecified, QoS-related failure
    eSIR_MAC_QAP_NO_BANDWIDTH_STATUS              = 33, //Association denied because QoS AP has insufficient bandwidth to handle another
                                                        //QoS STA
+34 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@


#include "vos_types.h"

#define RSN_CAP_MFP_ENABLED     0x80

/**
 * limConvertSupportedChannels
 *
@@ -231,6 +234,37 @@ static void lim_defer_sme_indication(tpAniSirGlobal mac_ctx,
    sta_pre_auth_ctx->assoc_req.sta_ds = sta_ds;
}

/**
  * lim_check_sae_pmf_cap() - check pmf capability for SAE STA
  * @session: pointer to pe session entry
  * @rsn: pointer to RSN
  *
  * This function checks if SAE STA is pmf capable when SAE SAP is pmf
  * capable. Reject with eSIR_MAC_ROBUST_MGMT_FRAMES_POLICY_VIOLATION
  * if SAE STA is pmf disable.
  *
  * Return: mac_status_code
  */
#ifdef WLAN_FEATURE_SAE
static enum eSirMacStatusCodes lim_check_sae_pmf_cap(tpPESession session,
                                                    tDot11fIERSN *rsn)
{
    enum eSirMacStatusCodes status = eSIR_MAC_SUCCESS_STATUS;

    if (session->pLimStartBssReq->pmfCapable &&
        (rsn->RSN_Cap[0] & RSN_CAP_MFP_ENABLED) == 0)
            status = eSIR_MAC_ROBUST_MGMT_FRAMES_POLICY_VIOLATION_STATUS;

    return status;
}
#else
static enum eSirMacStatusCodes lim_check_sae_pmf_cap(tpPESession session,
                                                    tDot11fIERSN *rsn)
{
    return eSIR_MAC_SUCCESS_STATUS;
}
#endif

/**---------------------------------------------------------------
\fn     limProcessAssocReqFrame
\brief  This function is called by limProcessMessageQueue()