diff --git a/hcxdumptool.c b/hcxdumptool.c index c73899d86..30c54fe77 100644 --- a/hcxdumptool.c +++ b/hcxdumptool.c @@ -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; @@ -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; @@ -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; diff --git a/include/ieee80211.h b/include/ieee80211.h index 205ca55ee..d8e63bdbc 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -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;