mirror of
https://github.com/chirpstack/chirpstack.git
synced 2024-12-22 06:27:49 +00:00
Fix sending channel-mask twice for US915 (like).
This commit is contained in:
parent
258e103f22
commit
4031c5cb95
@ -791,9 +791,8 @@ impl JoinRequest {
|
|||||||
|
|
||||||
device_profile.reset_session_to_boot_params(&mut ds);
|
device_profile.reset_session_to_boot_params(&mut ds);
|
||||||
|
|
||||||
if let Some(CFList::Channels(channels)) =
|
match region_conf.get_cf_list(device_profile.mac_version) {
|
||||||
region_conf.get_cf_list(device_profile.mac_version)
|
Some(CFList::Channels(channels)) => {
|
||||||
{
|
|
||||||
for f in channels.iter().cloned() {
|
for f in channels.iter().cloned() {
|
||||||
if f == 0 {
|
if f == 0 {
|
||||||
continue;
|
continue;
|
||||||
@ -821,6 +820,20 @@ impl JoinRequest {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Some(CFList::ChannelMask(masks)) => {
|
||||||
|
ds.enabled_uplink_channel_indices = vec![];
|
||||||
|
|
||||||
|
for (block_i, block) in masks.iter().enumerate() {
|
||||||
|
for (channel_i, enabled) in block.into_iter().enumerate() {
|
||||||
|
if enabled {
|
||||||
|
ds.enabled_uplink_channel_indices
|
||||||
|
.push((channel_i + (block_i * 16)) as u32);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
None => {}
|
||||||
|
}
|
||||||
|
|
||||||
device_session::save(&ds)
|
device_session::save(&ds)
|
||||||
.await
|
.await
|
||||||
|
@ -141,6 +141,10 @@ impl CFListChannelMasks {
|
|||||||
|
|
||||||
Ok(b)
|
Ok(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn iter(&self) -> std::slice::Iter<'_, ChMask> {
|
||||||
|
self.0.iter()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ChMask encodes the channels usable for uplink access. 0 = channel 1,
|
/// ChMask encodes the channels usable for uplink access. 0 = channel 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user