control.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. control.c
  5. Abstract:
  6. This module implements control frame handling functionality for the 802.11
  7. core wireless networking library.
  8. Author:
  9. Chris Stevens 20-Oct-2015
  10. Environment:
  11. Kernel
  12. --*/
  13. //
  14. // ------------------------------------------------------------------- Includes
  15. //
  16. #include "net80211.h"
  17. //
  18. // ---------------------------------------------------------------- Definitions
  19. //
  20. //
  21. // ------------------------------------------------------ Data Type Definitions
  22. //
  23. //
  24. // ----------------------------------------------- Internal Function Prototypes
  25. //
  26. //
  27. // -------------------------------------------------------------------- Globals
  28. //
  29. //
  30. // ------------------------------------------------------------------ Functions
  31. //
  32. VOID
  33. Net80211pProcessControlFrame (
  34. PNET80211_LINK Link,
  35. PNET_PACKET_BUFFER Packet
  36. )
  37. /*++
  38. Routine Description:
  39. This routine processes an 802.11 control frame.
  40. Arguments:
  41. Link - Supplies a pointer to the 802.11 link on which the frame arrived.
  42. Packet - Supplies a pointer to the network packet.
  43. Return Value:
  44. None.
  45. --*/
  46. {
  47. ULONG FrameSubtype;
  48. PNET80211_FRAME_HEADER Header;
  49. Header = Packet->Buffer + Packet->DataOffset;
  50. FrameSubtype = NET80211_GET_FRAME_SUBTYPE(Header);
  51. switch (FrameSubtype) {
  52. case NET80211_CONTROL_FRAME_SUBTYPE_ACK:
  53. case NET80211_CONTROL_FRAME_SUBTYPE_CONTROL_WRAPPER:
  54. case NET80211_CONTROL_FRAME_SUBTYPE_BLOCK_ACK_REQUEST:
  55. case NET80211_CONTROL_FRAME_SUBTYPE_BLOCK_ACK:
  56. case NET80211_CONTROL_FRAME_SUBTYPE_PS_POLL:
  57. case NET80211_CONTROL_FRAME_SUBTYPE_RTS:
  58. case NET80211_CONTROL_FRAME_SUBTYPE_CTS:
  59. case NET80211_CONTROL_FRAME_SUBTYPE_CF_END:
  60. case NET80211_CONTROL_FRAME_SUBTYPE_CF_END_ACK:
  61. default:
  62. break;
  63. }
  64. return;
  65. }
  66. //
  67. // --------------------------------------------------------- Internal Functions
  68. //