diff options
| author | Chandrasekaran, Manishekar <cmshekar@qti.qualcomm.com> | 2014-03-26 00:09:30 +0530 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-03-26 21:24:29 -0700 |
| commit | c5ec232c67735395c5d96874118a777f00fe9892 (patch) | |
| tree | 0e144711cb06e71cfd911ed48b023bf7572e8d28 | |
| parent | 18c115f0aa493484240f56fadcf9685c7b9a0c33 (diff) | |
qcacld: Provision of sequence number to p2p action frames
In the current implementation, the sequence number is
zero for p2p action frames. This fix will ensure that the
sequence numbers are non-zero for p2p action frames.
Change-Id: Ia37a210ffd5b709352f679131288f2ef06df657a
CRs-Fixed: 638228
| -rw-r--r-- | CORE/MAC/src/pe/lim/limP2P.c | 6 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSendManagementFrames.c | 33 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limTypes.h | 4 |
3 files changed, 42 insertions, 1 deletions
diff --git a/CORE/MAC/src/pe/lim/limP2P.c b/CORE/MAC/src/pe/lim/limP2P.c index 853494d29115..065b7d3e3fac 100644 --- a/CORE/MAC/src/pe/lim/limP2P.c +++ b/CORE/MAC/src/pe/lim/limP2P.c @@ -1113,6 +1113,12 @@ send_frame1: // Paranoia: vos_mem_set(pFrame, nBytes, 0); +#ifdef QCA_WIFI_2_0 + /* Add sequence number to action frames */ + /* Frames are handed over in .11 format by supplicant already */ + limPopulateP2pMacHeader(pMac, (tANI_U8*)pMbMsg->data); +#endif /* QCA_WIFI_2_0 */ + if ((noaLen > 0) && (noaLen<(SIR_MAX_NOA_ATTR_LEN + SIR_P2P_IE_HEADER_LEN))) { // Add 2 bytes for length and Arribute field diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index a3d1fad1dc9e..8b63ecf97801 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -240,6 +240,39 @@ limAddMgmtSeqNum (tpAniSirGlobal pMac, tpSirMacMgmtHdr pMacHdr) pMacHdr->seqControl.seqNumHi = ((pMac->mgmtSeqNum & HIGH_SEQ_NUM_MASK) >> HIGH_SEQ_NUM_OFFSET); } + +/** + * + * \brief This function is called before sending a p2p action frame + * inorder to add sequence numbers to action packets + * + * \param pMac Pointer to Global MAC structure + * + * \param pBD Pointer to the frame buffer that needs to be populate + * + * The pMacHdr argument points to the MAC management header. The + * sequence number stored in the pMac structure will be incremented + * and updated to the MAC management header. The start sequence + * number is WLAN_HOST_SEQ_NUM_MIN and the end value is + * WLAN_HOST_SEQ_NUM_MAX. After reaching the MAX value, the sequence + * number will roll over. + * + */ +void +limPopulateP2pMacHeader(tpAniSirGlobal pMac, tANI_U8* pBD) +{ + tpSirMacMgmtHdr pMacHdr; + + /// Prepare MAC management header + pMacHdr = (tpSirMacMgmtHdr) (pBD); + + /* Prepare sequence number */ + limAddMgmtSeqNum(pMac, pMacHdr); + limLog(pMac, LOG1,"seqNumLo=%d, seqNumHi=%d, mgmtSeqNum=%d", + pMacHdr->seqControl.seqNumLo, + pMacHdr->seqControl.seqNumHi, + pMac->mgmtSeqNum); +} #endif /* QCA_WIFI_2_0 */ /** diff --git a/CORE/MAC/src/pe/lim/limTypes.h b/CORE/MAC/src/pe/lim/limTypes.h index e33be2991664..30d9e90aa402 100644 --- a/CORE/MAC/src/pe/lim/limTypes.h +++ b/CORE/MAC/src/pe/lim/limTypes.h @@ -666,7 +666,9 @@ void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession); void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession); void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo); - +#ifdef QCA_WIFI_2_0 +void limPopulateP2pMacHeader(tpAniSirGlobal, tANI_U8*); +#endif /* QCA_WIFI_2_0 */ tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr); tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *); void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8); |
