diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2014-05-29 11:08:58 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-30 18:18:09 +0200 |
commit | 9167055ed21ebfccc241289b8b8c1c6cdcd098d3 (patch) | |
tree | 96d2a1e0a99d184bd25d232b4b34e402abe70229 /src/gprs_rlcmac_ts_alloc.cpp | |
parent | 8f3520579a6d1b11c98176e1da1515b9d995a73f (diff) |
Fixed calculation of colliding UL/DL slots in TS allocation algorithm B
Counter j must be wrapped to prevent beeing negative, when it is
initialized. This wrapping happens, if TS 0 is used for PDCH in
combination with regular GPRS phones (MS class 12 or similar).
Diffstat (limited to 'src/gprs_rlcmac_ts_alloc.cpp')
-rw-r--r-- | src/gprs_rlcmac_ts_alloc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 366732c2..4825db12 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -281,7 +281,7 @@ static int reduce_rx_window(const int ms_type, const struct gprs_rlcmac_tbf *old ul_usage |= (1 << ts_no); /* mark bits from TS-t .. TS+r */ - for (j = ts_no - Tt; j != ((ts_no + Tr + 1) & 7); j = (j + 1) & 7) + for (j = (ts_no - Tt) & 7; j != ((ts_no + Tr + 1) & 7); j = (j + 1) & 7) collide |= (1 << j); } |