laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35298?usp=email )
Change subject: layer23: fix incorrect check in gsm_arfcn_refer_pcs() ......................................................................
layer23: fix incorrect check in gsm_arfcn_refer_pcs()
Change-Id: I1f4107bdbb0f696ed3bd3cceaa94353ebe69f78f Fixes: 046ee64e3dd7bf285d0e965996bde47acae53099 Fixes: CID#336542 --- M src/host/layer23/src/common/sysinfo.c 1 file changed, 12 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified jolly: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/host/layer23/src/common/sysinfo.c b/src/host/layer23/src/common/sysinfo.c index 7fdc6ff..efbc519 100644 --- a/src/host/layer23/src/common/sysinfo.c +++ b/src/host/layer23/src/common/sysinfo.c @@ -70,7 +70,7 @@ uint16_t gsm_arfcn_refer_pcs(uint16_t cell_arfcn, const struct gsm48_sysinfo *cell_s, uint16_t arfcn) { /* If ARFCN is not one of the overlapping channel of PCS and DCS. */ - if (arfcn < 512 && arfcn > 810) + if (arfcn < 512 || arfcn > 810) return arfcn;
/* If the 'cell' does not refer to PCS. */