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

Commit 8eed0360 authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Gerrit - the friendly Code Review server
Browse files

wlan: Add changes for auth in send mgmt path

propagation from qcacld-3.0 to prima

Add changes to support authentication in send mgmt path.
With these changes, supplicant/upper layer can send
authentication frame for station mode.

Change-Id: I6807f49acc9284e69c6362e07a583ff26f15edca
CRs-Fixed: 2531064
parent d6d8dd22
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -1289,6 +1289,7 @@ int __wlan_hdd_mgmt_tx( struct wiphy *wiphy, struct net_device *dev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
    uint8_t home_ch = 0;
#endif
    eHalStatus hal_status;

    ENTER();

@@ -1313,6 +1314,18 @@ int __wlan_hdd_mgmt_tx( struct wiphy *wiphy, struct net_device *dev,
    hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d type: %d",
                            __func__, pAdapter->device_mode, type);

    /* When frame to be transmitted is auth mgmt, then trigger
     * sme_send_mgmt_tx to send auth frame.
     */
    if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) &&
        (type == SIR_MAC_MGMT_FRAME && subType == SIR_MAC_MGMT_AUTH)) {
         hal_status = sme_send_mgmt_tx(WLAN_HDD_GET_HAL_CTX(pAdapter),
                                       pAdapter->sessionId, buf, len);
         if (HAL_STATUS_SUCCESS(hal_status))
              return 0;
         else
              return -EINVAL;
    }

    if ((type == SIR_MAC_MGMT_FRAME) &&
            (subType == SIR_MAC_MGMT_ACTION) &&
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2013, 2016-2017 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2013, 2016-2017, 2019 The Linux Foundation. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -402,6 +402,7 @@ enum eWniMsgTypes
    eWNI_SME_ECSA_CHAN_CHANGE_RSP,
    eWNI_SME_STA_DEL_BA_REQ,
    eWNI_SME_TRIGGER_SAE,
    eWNI_SME_SEND_MGMT_FRAME_TX,
    eWNI_SME_MSG_TYPES_END
};

+15 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -266,6 +266,20 @@ typedef struct sSirMbMsgP2p
    tANI_U32 data[1];
} tSirMbMsgP2p, *tpSirMbMsgP2p;

/**
 * struct sir_mgmt_msg - Structure used to send auth frame from CSR to LIM
 * @type: Message type
 * @msg_len: Message length
 * @session_id: session id
 * @data: Pointer to data tobe transmitted
 */
struct sir_mgmt_msg {
    uint16_t type;
    uint16_t msg_len;
    uint8_t session_id;
    uint8_t *data;
};

/// Message queue definitions
//  msgtype(2bytes) reserved(2bytes) bodyptr(4bytes) bodyval(4bytes)
//  NOTE tSirMsgQ should be always multiples of WORD(4Bytes)
+13 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -481,8 +481,18 @@ tpPESession peFindSessionByPeerSta(tpAniSirGlobal pMac, tANI_U8* sa, tANI_U8* s
--------------------------------------------------------------------------*/
 tpPESession peFindSessionByStaId(tpAniSirGlobal pMac,  tANI_U8  staid,    tANI_U8* sessionId);



/**
 * pe_find_session_by_sme_session_id() - looks up the PE session for given sme
 * session id
 * @mac_ctx: pointer to global adapter context
 * @sme_session_id: sme session id
 *
 * Looks up the PE session for given sme session id
 *
 * Return: pe session entry for given sme session if found else NULL
 */
tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
                                              uint8_t sme_session_id);


/*--------------------------------------------------------------------------
+7 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2017, 2019 The Linux Foundation. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -1769,6 +1769,12 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
            limMsg->bodyptr = NULL;
            break;

        case eWNI_SME_SEND_MGMT_FRAME_TX:
            lim_send_mgmt_frame_tx(pMac, limMsg);
            vos_mem_free(limMsg->bodyptr);
            limMsg->bodyptr = NULL;
            break;

#ifdef WLAN_FEATURE_RMC
        case eWNI_SME_ENABLE_RMC_REQ:
        case eWNI_SME_DISABLE_RMC_REQ:
Loading