import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / misc / mediatek / connectivity / combo / drv_wlan / mt6630 / wlan / mgmt / p2p_assoc.c
CommitLineData
6fa3eb70
S
1/*
2** $Id: @(#) p2p_assoc.c@@
3*/
4
5/*! \file "p2p_assoc.c"
6 * \brief This file includes the Wi-Fi Direct association-related functions.
7 *
8 * This file includes the association-related functions.
9 */
10
11
12
13
14/*******************************************************************************
15 * C O M P I L E R F L A G S
16 ********************************************************************************
17 */
18
19/*******************************************************************************
20 * E X T E R N A L R E F E R E N C E S
21 ********************************************************************************
22 */
23
24#include "precomp.h"
25
26/*******************************************************************************
27 * C O N S T A N T S
28 ********************************************************************************
29 */
30
31/*******************************************************************************
32 * D A T A T Y P E S
33 ********************************************************************************
34 */
35
36/*******************************************************************************
37 * P U B L I C D A T A
38 ********************************************************************************
39 */
40
41/*******************************************************************************
42 * P R I V A T E D A T A
43 ********************************************************************************
44 */
45
46/*******************************************************************************
47 * M A C R O S
48 ********************************************************************************
49 */
50
51/*******************************************************************************
52 * F U N C T I O N D E C L A R A T I O N S
53 ********************************************************************************
54 */
55
56/*******************************************************************************
57 * F U N C T I O N S
58 ********************************************************************************
59 */
60
61/*----------------------------------------------------------------------------*/
62/*!
63 * @brief This function is used to compose Common Information Elements for P2P Association
64 * Request Frame.
65 *
66 * @param[in] prMsduInfo Pointer to the composed MSDU_INFO_T.
67 *
68 * @return (none)
69 */
70/*----------------------------------------------------------------------------*/
71PUINT_8
72p2pBuildReAssocReqFrameCommonIEs(IN P_ADAPTER_T prAdapter,
73 IN P_MSDU_INFO_T prMsduInfo, IN PUINT_8 pucBuffer)
74{
75 P_BSS_INFO_T prP2pBssInfo = (P_BSS_INFO_T)NULL;
76
77 prP2pBssInfo = GET_BSS_INFO_BY_INDEX(prAdapter, prMsduInfo->ucBssIndex);
78
79 /* Fill the SSID element. */
80 SSID_IE(pucBuffer)->ucId = ELEM_ID_SSID;
81
82 /* NOTE(Kevin): We copy the SSID from CONNECTION_SETTINGS for the case of
83 * Passive Scan and the target BSS didn't broadcast SSID on its Beacon Frame.
84 */
85
86 COPY_SSID(SSID_IE(pucBuffer)->aucSSID,
87 SSID_IE(pucBuffer)->ucLength, prP2pBssInfo->aucSSID, prP2pBssInfo->ucSSIDLen);
88
89 prMsduInfo->u2FrameLength += IE_SIZE(pucBuffer);
90 pucBuffer += IE_SIZE(pucBuffer);
91 return pucBuffer;
92}