You are not logged in.
Hi, I am working on the CPU low mac of 802.11 reference design. More specifically, I am changing wlan_mac_dcf.c. I need to distinguish data packets from beacons in order to change their timing. However, I found it is hard to distinguish the type of a packet in CPU low mac.
I have to distinguish them by some tricks. For example, beacons are broadcast packets, while data packets can be unicast. But that method is not reliable, because data packets can also be broadcast (using ltg to generate such data packet).
So, is there any way to distinguish 802.11 beacon from data packets in wlan_mac_dcf?
Thank you
Offline
I would suggest that you read up MAC frame formats in section 8.2 and 8.3 of the IEEE 802.11-2012 spec. Specifically, understand how the frame control field identifies different types of packets.
For example, Table 8-1 in section 8.2.4.1.3 lists all the valid type and subtype combinations that identify packets. You can also see the C definitions that we created around the 802.11 spec for this in wlan_mac_802_11_defs.h.
Offline
This line of the DCF is an example of the low-level MAC accessing the MAC header of the Rx frame (pointed to by the variable "rx_header"). In that same context, you can evaluate the whether the frame is a beacon or a data packet like this:
if( (rx_header->frame_control_1) == MAC_FRAME_CTRL1_SUBTYPE_BEACON ){ xil_printf("This is a beacon!"); } if( (rx_header->frame_control_1) == MAC_FRAME_CTRL1_SUBTYPE_DATA ){ xil_printf("This is a data frame!"); }
Offline