net: tests: Add a simple IEEE 802.15.4 Beacon frame test
It's an empty beacon frame, juste to validate the Beacon frame parsing logic. Change-Id: I90916eb87187c9eae9b2267f34dc93bee554d4b5 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
daf0d1a134
commit
640d524f69
1 changed files with 19 additions and 0 deletions
|
@ -71,6 +71,21 @@ struct ieee802154_pkt_test test_ack_pkt = {
|
|||
.mhr_check.src_addr = NULL,
|
||||
};
|
||||
|
||||
uint8_t beacon_pkt[] = {
|
||||
0x00, 0xd0, 0x11, 0xcd, 0xab, 0xc2, 0xa3, 0x9e, 0x00, 0x00, 0x4b,
|
||||
0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
struct ieee802154_pkt_test test_beacon_pkt = {
|
||||
.name = "Empty beacon frame",
|
||||
.pkt = beacon_pkt,
|
||||
.length = sizeof(beacon_pkt),
|
||||
.mhr_check.fc_seq = (struct ieee802154_fcf_seq *)beacon_pkt,
|
||||
.mhr_check.dst_addr = NULL,
|
||||
.mhr_check.src_addr =
|
||||
(struct ieee802154_address_field *) (beacon_pkt + 3),
|
||||
};
|
||||
|
||||
struct net_buf *current_buf;
|
||||
struct nano_sem driver_lock;
|
||||
struct net_if *iface;
|
||||
|
@ -275,6 +290,10 @@ void main(void)
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (test_packet_parsing(&test_beacon_pkt) != TC_PASS) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
status = TC_PASS;
|
||||
|
||||
end:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue