diff options
author | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:36:59 -0600 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:36:59 -0600 |
commit | f4f0f044df1251d64d44bf62d25b488fd04a05c8 (patch) | |
tree | 12efee1447a67d8cf37b6f447c011708264b8266 /src/kernel/ao_radio_cmac.c | |
parent | b25690062ac04a588ad4d11740597c20e516eb1a (diff) | |
parent | 570daace9caf7647a09c53d5c75593cc4c98b93b (diff) |
Merge branch 'branch-1.6' into debian
Diffstat (limited to 'src/kernel/ao_radio_cmac.c')
-rw-r--r-- | src/kernel/ao_radio_cmac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/ao_radio_cmac.c b/src/kernel/ao_radio_cmac.c index bff848f6..b6835346 100644 --- a/src/kernel/ao_radio_cmac.c +++ b/src/kernel/ao_radio_cmac.c @@ -91,7 +91,6 @@ radio_cmac_recv(uint8_t len, uint16_t timeout) __reentrant return AO_RADIO_CMAC_TIMEOUT; } - ao_radio_cmac_rssi = ao_radio_rssi; if (!(cmac_data[len + AO_CMAC_KEY_LEN +1] & AO_RADIO_STATUS_CRC_OK)) return AO_RADIO_CMAC_CRC_ERROR; @@ -114,13 +113,15 @@ radio_cmac_recv(uint8_t len, uint16_t timeout) __reentrant /* Check the packet signature against the signature provided * over the link */ - + if (memcmp(&cmac_data[len], &cmac_data[len + AO_CMAC_KEY_LEN + 2], AO_CMAC_KEY_LEN) != 0) { return AO_RADIO_CMAC_MAC_ERROR; } + ao_radio_cmac_rssi = ao_radio_rssi; + return AO_RADIO_CMAC_OK; } @@ -161,4 +162,3 @@ ao_radio_cmac_recv(__xdata void *packet, uint8_t len, uint16_t timeout) __reentr ao_mutex_put(&ao_radio_cmac_mutex); return i; } - |