Skip to content

Commit

Permalink
Add missing diff in radio.c from the GSDK 4.4.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmnotran committed Jan 22, 2024
1 parent e63f682 commit ec3dc64
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/src/radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,13 +675,17 @@ static bool isFilterMaskValid(uint8_t mask)
* Case 3: We don't have either the destination addressing field or destination PanId
* in the received packet to determine if the dest address and dest pan match.
*/
if (
// Case 1
((mask & RADIO_BCAST_PANID_FILTER_MASK) || (mask & RADIO_BCAST_ADDR_FILTER_MASK)) ||
// Case 2
((mask & 0x0F) == (mask >> 4)) ||
// Case 3
(((mask & 0x0F) == 0) || ((mask >> 4) == 0)))
if (((mask & RADIO_BCAST_PANID_FILTER_MASK) || (mask & RADIO_BCAST_ADDR_FILTER_MASK)) || // Case 1
// Find any non-broadcast PAN ID match and get ready to compare it
((((mask & (RADIO_INDEX0_PANID_FILTER_MASK | RADIO_INDEX1_PANID_FILTER_MASK | RADIO_INDEX2_PANID_FILTER_MASK))
>> RADIO_PANID_FILTER_SHIFT)
&
// ...To see if it coincides with any address matches for same IID
(RADIO_GET_ADDR_FILTER_MASK(mask) >> RADIO_ADDR_FILTER_SHIFT))
!= 0)
|| // Case 2
(((RADIO_GET_PANID_FILTER_MASK(mask)) == 0) || ((RADIO_GET_ADDR_FILTER_MASK(mask)) == 0)) // Case 3
)
{
valid = true;
}
Expand Down

0 comments on commit ec3dc64

Please sign in to comment.