Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LMICuslike_canMapChannels should not reject zero mask when setting bank-by-bank #820

Closed
terrillmoore opened this issue Nov 20, 2021 · 0 comments · Fixed by #821
Closed
Assignees
Labels

Comments

@terrillmoore
Copy link
Member

terrillmoore commented Nov 20, 2021

In preparing the fix for #819, discovered a similar (but unreported) problem with the setting of channel masks directly here:

} else if (chpage == MCMD_LinkADRReq_ChMaskCntl_USLIKE_BANK) {
if (chmap == 0 || (chmap & 0xFF00) != 0) {
// no bits set, or reserved bitsset , fail.
return 0;
}

Originally posted by @terrillmoore in #819 (comment)

Filed as a separate bug because it's independent of #819, but want to use same PR.

As with #819, the problem is that we can't reject "all channels off" while processing a MAC command; another in the same message might turn some on. We can only check minimum number of channels after all MAC commands have been parsed. It's fine to have the second part of the if, because out-of-range channels are illegal; but not ok to have the first (because we don't know that all channels off is illegal yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant