Skip to content

Commit

Permalink
some BE fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Dec 15, 2023
1 parent 688ee01 commit a589864
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions include/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,7 @@ typedef struct qos_frame qos_t;
*/
struct mac_frame
{
#ifdef BIG_ENDIAN_HOST
unsigned subtype : 4;
unsigned type : 2;
unsigned version : 2;

unsigned ordered : 1;
unsigned prot : 1;
unsigned more_data : 1;
unsigned power : 1;
unsigned retry : 1;
unsigned more_frag : 1;
unsigned from_ds : 1;
unsigned to_ds : 1;
#else
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned version : 2;
unsigned type : 2;
unsigned subtype : 4;
Expand All @@ -317,6 +304,19 @@ struct mac_frame
unsigned more_data : 1;
unsigned prot : 1;
unsigned ordered : 1;
#elif __BYTE_ORDER == __BIG_ENDIAN
unsigned subtype : 4;
unsigned type : 2;
unsigned version : 2;

unsigned ordered : 1;
unsigned prot : 1;
unsigned more_data : 1;
unsigned power : 1;
unsigned retry : 1;
unsigned more_frag : 1;
unsigned from_ds : 1;
unsigned to_ds : 1;
#endif
uint16_t duration;
uint8_t addr1[6];
Expand Down

0 comments on commit a589864

Please sign in to comment.