From 2fd336c5d29d4ab45f98d2970b467e13dff46e98 Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Sun, 4 Sep 2022 16:06:50 +0200 Subject: [PATCH] net: l2: ieee802154: AR shall be provided in association requests The spec clearly states: "association requests shall set the AR bit". Even though Zephyr can currently only implement RFD devices which are not expected to support incoming association requests, because this MAC command is actually processed until being voluntarily ignored, let's ensure the expected "ar" value is right to avoid failing because of a wrong reason. Signed-off-by: Miquel Raynal --- subsys/net/l2/ieee802154/ieee802154_frame.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subsys/net/l2/ieee802154/ieee802154_frame.c b/subsys/net/l2/ieee802154/ieee802154_frame.c index b21fee39143..b61603b1e29 100644 --- a/subsys/net/l2/ieee802154/ieee802154_frame.c +++ b/subsys/net/l2/ieee802154/ieee802154_frame.c @@ -283,6 +283,7 @@ static inline bool validate_mac_command(struct ieee802154_mpdu *mpdu, uint8_t *b case IEEE802154_CFI_UNKNOWN: return false; case IEEE802154_CFI_ASSOCIATION_REQUEST: + ar = 1U; len += IEEE802154_CMD_ASSOC_REQ_LENGTH; src_bf = BIT(IEEE802154_ADDR_MODE_EXTENDED); src_pan_brdcst_chk = true;