Skip to content

Commit 822e453

Browse files
committed
ns: Rename macspec helper function
1 parent b618ff3 commit 822e453

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pkg/networkserver/mac/link_adr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func HandleLinkADRAns(
330330
// with a LinkADRAns indicating which command elements were accepted and which were
331331
// rejected. This behavior differs from when the uplink ADR bit is set, in which case the end-
332332
// device accepts or rejects the entire command.
333-
if macspec.UseADRBit(macState.LorawanVersion) {
333+
if macspec.LinkADRReqRejected(macState.LorawanVersion) {
334334
rejected = !pld.ChannelMaskAck ||
335335
(adrEnabled && !pld.DataRateIndexAck) ||
336336
(adrEnabled && !pld.TxPowerIndexAck)

pkg/specification/macspec/specification.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ func ValidateUplinkPayloadSize(v ttnpb.MACVersion) bool {
238238
return compareMACVersion(v, ttnpb.MACVersion_MAC_V1_1) >= 0
239239
}
240240

241-
// UseADRBit reports whether v uses the ADR bit in the FCtrl field.
242-
func UseADRBit(v ttnpb.MACVersion) bool {
241+
// LinkADRReqRejected reports whether v uses the ADR bit in the FCtrl field
242+
// to modify which ACK bits needs to check in the LinkADRAns.
243+
func LinkADRReqRejected(v ttnpb.MACVersion) bool {
243244
return compareMACVersion(v, ttnpb.MACVersion_MAC_V1_0_3) >= 0 &&
244245
compareMACVersion(v, ttnpb.MACVersion_MAC_V1_0_4) <= 0
245246
}

0 commit comments

Comments
 (0)