aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlc.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-23 16:40:56 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-01 13:58:12 +0100
commite1ca87f0570674526e6586c697e06a1c83b8071b (patch)
tree150b34d8f5a9273021e4611f7bb39aefc0540a86 /src/rlc.h
parent93c55d04e5917aa54ce37a9e997d0af87cc8be85 (diff)
rlc/edge: Consistently use uint16_t for BSNs and SSNs
Currently in some places uint8_t is being used to encode BSNs and SSNs. This is inconsistent and (even worse) not enough for EPGRS which uses an SNS of 2014. This commit changes these to uint16_t. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/rlc.h')
-rw-r--r--src/rlc.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rlc.h b/src/rlc.h
index 4905aa1f..f16a910a 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -158,7 +158,7 @@ struct gprs_rlc_dl_window {
/* Methods to manage reception */
int resend_needed();
int mark_for_resend();
- void update(BTS *bts, char *show_rbb, uint8_t ssn,
+ void update(BTS *bts, char *show_rbb, uint16_t ssn,
uint16_t *lost, uint16_t *received);
int move_window();
void show_state(char *show_rbb);
@@ -196,8 +196,8 @@ struct gprs_rlc_ul_window {
const uint16_t ssn() const;
- bool is_in_window(uint8_t bsn) const;
- bool is_received(uint8_t bsn) const;
+ bool is_in_window(uint16_t bsn) const;
+ bool is_received(uint16_t bsn) const;
void update_rbb(char *rbb);
void raise_v_r_to(int moves);
@@ -400,7 +400,7 @@ inline const int16_t gprs_rlc_dl_window::distance() const
return (m_v_s - m_v_a) & mod_sns();
}
-inline bool gprs_rlc_ul_window::is_in_window(uint8_t bsn) const
+inline bool gprs_rlc_ul_window::is_in_window(uint16_t bsn) const
{
uint16_t offset_v_q;
@@ -411,7 +411,7 @@ inline bool gprs_rlc_ul_window::is_in_window(uint8_t bsn) const
return offset_v_q < ws();
}
-inline bool gprs_rlc_ul_window::is_received(uint8_t bsn) const
+inline bool gprs_rlc_ul_window::is_received(uint16_t bsn) const
{
uint16_t offset_v_r;