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

unit: Update to the new mpdu_validate API

mpdu_validate will directly return a const pointer if the validation
succeeds.
This commit is contained in:
Tomasz Bursztyka 2015-01-22 17:58:22 +02:00 committed by Denis Kenzior
parent e02f02fa69
commit 8fba847b9d

View File

@ -63,13 +63,10 @@ static struct deauthentication_data deauthentication_test_1 = {
static void deauthentication_test(const void *data) static void deauthentication_test(const void *data)
{ {
const struct deauthentication_data *test = data; const struct deauthentication_data *test = data;
struct mpdu *mpdu; const struct mpdu *mpdu;
bool ret;
ret = mpdu_validate(test->frame, test->frame_len); mpdu = mpdu_validate(test->frame, test->frame_len);
assert(ret); assert(mpdu);
mpdu = (struct mpdu *)test->frame;
assert(mpdu->fc.type == MPDU_TYPE_MANAGEMENT); assert(mpdu->fc.type == MPDU_TYPE_MANAGEMENT);
assert(mpdu->fc.subtype == MPDU_MANAGEMENT_SUBTYPE_DEAUTHENTICATION); assert(mpdu->fc.subtype == MPDU_MANAGEMENT_SUBTYPE_DEAUTHENTICATION);