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 <miquel.raynal@bootlin.com>
This commit is contained in:
Miquel Raynal 2022-09-04 16:06:50 +02:00 committed by Carles Cufí
commit 2fd336c5d2

View file

@ -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;