Skip to content

Commit

Permalink
some BE fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jan 19, 2024
1 parent 4cf0254 commit 7c47599
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hcxdumptool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ macftx->sequence = __hcx16le(seqcounter3++ << 4);
if(seqcounter1 > 4095) seqcounter3 = 1;
ii += MAC_SIZE_NORM;
associationresponsetx = (ieee80211_assoc_or_reassoc_resp_t*)&wltxbuffer[ii];
associationresponsetx->capability = 0x0431;
associationresponsetx->capability = HCXTXCAPABILITY;
associationresponsetx->status = 0;
associationresponsetx->aid = aid;
ii += IEEE80211_ASSOCIATIONRESPONSE_SIZE;
Expand Down Expand Up @@ -1249,7 +1249,7 @@ macftx->sequence = __hcx16le(seqcounter3++ << 4);
if(seqcounter1 > 4095) seqcounter3 = 1;
ii += MAC_SIZE_NORM;
associationresponsetx = (ieee80211_assoc_or_reassoc_resp_t*)&wltxbuffer[ii];
associationresponsetx->capability = 0x0431;
associationresponsetx->capability = HCXTXCAPABILITY;
associationresponsetx->status = 0;
associationresponsetx->aid = HCXTXAID;
ii += IEEE80211_ASSOCIATIONRESPONSE_SIZE;
Expand Down Expand Up @@ -1310,8 +1310,8 @@ macftx->sequence = __hcx16le(seqcounter3++ << 4);
if(seqcounter1 > 4095) seqcounter3 = 1;
ii += MAC_SIZE_NORM;
reassociationrequest = (ieee80211_reassoc_req_t*)&wltxbuffer[ii];
reassociationrequest->capability = 0x0431;
reassociationrequest->listen_interval = 0x14;
reassociationrequest->capability = HCXTXCAPABILITY;
reassociationrequest->listen_interval = HCXTXLISTENINTERVAL;
memcpy(reassociationrequest->current_macap, (aplist +i)->macap, ETH_ALEN);
ii += sizeof(ieee80211_reassoc_req_t) -1;
wltxbuffer[ii ++] = 0;
Expand Down
5 changes: 5 additions & 0 deletions include/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ typedef struct __attribute__((__packed__))
typedef struct __attribute__((__packed__))
{
u16 capability;
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define HCXTXLISTENINTERVAL 0x0014U
#elif __BYTE_ORDER == __BIG_ENDIAN
#define HCXTXLISTENINTERVAL 0x1400U
#endif
u16 listen_interval;
u8 ie[1];
}ieee80211_assoc_req_t;
Expand Down

0 comments on commit 7c47599

Please sign in to comment.