p2p_assoc.c 3.2 KB

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