Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Do not enable more channels than Default + CFList
Browse files Browse the repository at this point in the history
  • Loading branch information
htdvisser committed Mar 17, 2020
1 parent 94b296d commit 2e549df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/networkserver/adr.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func getAdrReqPayloads(dev *device.Device, frequencyPlan *band.FrequencyPlan, dr
} else {
for i, ch := range frequencyPlan.UplinkChannels {
for _, dr := range ch.DataRates {
if dr == drIdx {
if dr == drIdx && i < 8 { // We can enable up to 8 channels.
payloads[0].ChMask[i] = true
}
}
Expand Down Expand Up @@ -300,7 +300,7 @@ func getAdrReqPayloads(dev *device.Device, frequencyPlan *band.FrequencyPlan, dr
} else {
for i, ch := range frequencyPlan.UplinkChannels {
for _, dr := range ch.DataRates {
if dr == drIdx {
if dr == drIdx && i < 7 { // We can enable up to 7 channels.
payloads[0].ChMask[i] = true
}
}
Expand Down

0 comments on commit 2e549df

Please sign in to comment.