3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-21 22:09:23 +01:00

unit: Use new mpdu.h structs

This commit is contained in:
Andrew Zaborowski 2017-08-31 04:04:44 +02:00 committed by Denis Kenzior
parent c8854d9a4c
commit fd661d5e9f
2 changed files with 8 additions and 10 deletions

View File

@ -63,7 +63,7 @@ static struct deauthentication_data deauthentication_test_1 = {
static void deauthentication_test(const void *data)
{
const struct deauthentication_data *test = data;
const struct mpdu *mpdu;
const struct mmpdu_header *mpdu;
mpdu = mpdu_validate(test->frame, test->frame_len);
assert(mpdu);
@ -72,15 +72,13 @@ static void deauthentication_test(const void *data)
assert(mpdu->fc.subtype == MPDU_MANAGEMENT_SUBTYPE_DEAUTHENTICATION);
assert(mpdu->fc.protocol_version == 0x00);
assert(L_LE16_TO_CPU(mpdu->mgmt_hdr.duration) == test->duration);
assert(!memcmp(mpdu->mgmt_hdr.address_1, test->dest, 6));
assert(!memcmp(mpdu->mgmt_hdr.address_2, test->src, 6));
assert(!memcmp(mpdu->mgmt_hdr.address_3, test->bssid, 6));
assert(L_LE16_TO_CPU(mpdu->duration) == test->duration);
assert(!memcmp(mpdu->address_1, test->dest, 6));
assert(!memcmp(mpdu->address_2, test->src, 6));
assert(!memcmp(mpdu->address_3, test->bssid, 6));
assert(L_LE16_TO_CPU(mpdu->mgmt_hdr.fragment_number) ==
test->fragment_number);
assert(MPDU_MGMT_SEQUENCE_NUMBER(mpdu->mgmt_hdr) ==
test->sequence_number);
assert(L_LE16_TO_CPU(mpdu->fragment_number) == test->fragment_number);
assert(MPDU_SEQUENCE_NUMBER(*mpdu) == test->sequence_number);
}
int main(int argc, char *argv[])

View File

@ -1912,7 +1912,7 @@ static void verify_deauthenticate(uint32_t ifindex, const uint8_t *aa,
{
struct verify_data *data = user_data;
assert(reason_code == MPDU_REASON_CODE_IEEE8021X_FAILED);
assert(reason_code == MMPDU_REASON_CODE_IEEE8021X_FAILED);
data->eapol_failed = true;
}