Commit b4bf5cbf authored by Stancu Florin's avatar Stancu Florin Committed by Christopher Friedt
Browse files

tests: ieee802154: fix test MAC addresses



Fake driver interface initialization and packet dst address were wrong.

Signed-off-by: default avatarStancu Florin <niflostancu@gmail.com>
parent 4561ea0a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -100,6 +100,8 @@ static void fake_iface_init(struct net_if *iface)

	net_if_set_link_addr(iface, mac, 8, NET_LINK_IEEE802154);

	ieee802154_init(iface);

	ctx->pan_id = 0xabcd;
	ctx->channel = 26U;
	ctx->sequence = 62U;
+3 −3
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ static bool test_ns_sending(struct ieee802154_pkt_test *t)
static bool test_ack_reply(struct ieee802154_pkt_test *t)
{
	static uint8_t data_pkt[] = {
		0x61, 0xdc, 0x16, 0xcd, 0xab, 0x26, 0x11, 0x32, 0x00, 0x00, 0x4b,
		0x61, 0xdc, 0x16, 0xcd, 0xab, 0xc2, 0xa3, 0x9e, 0x00, 0x00, 0x4b,
		0x12, 0x00, 0x26, 0x18, 0x32, 0x00, 0x00, 0x4b, 0x12, 0x00, 0x7b,
		0x00, 0x3a, 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x01, 0x0d, 0xb8,
@@ -227,8 +227,8 @@ static bool test_ack_reply(struct ieee802154_pkt_test *t)

	net_pkt_frag_add(pkt, frag);

	if (net_recv_data(iface, pkt) == NET_DROP) {
		NET_ERR("Packet dropped");
	if (net_recv_data(iface, pkt) < 0) {
		NET_ERR("Recv data failed");
		return false;
	}