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