WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2015-Sep-16 00:15:14

wenchao88
Member
Registered: 2015-Aug-22
Posts: 26

Distinguish data packets from beacons

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

 

#2 2015-Sep-16 08:42:31

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Distinguish data packets from beacons

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

 

#3 2015-Sep-16 09:33:50

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: Distinguish data packets from beacons

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:

Code:

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

 

Board footer