From 7c7a86c080edd9c92778c941bbe484f59a81f93c Mon Sep 17 00:00:00 2001 From: Aravind Sirsikar Date: Tue, 30 Aug 2016 13:08:28 +0530 Subject: Fix GPRS PUAN encoding: wrong BSN status Earlier there was an incorrect encoding of BSN status in GPRS PUAN message. This was a bottle neck for GPRS performance testing for UL. Which has been fixed in this patch. Related: OS#1806 Change-Id: I98e586aa5cb9200cf03e092556304211d4d459aa --- src/rlc.cpp | 2 +- tests/types/TypesTest.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rlc.cpp b/src/rlc.cpp index e69d1fce..ee2635aa 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -227,7 +227,7 @@ void gprs_rlc_ul_window::update_rbb(char *rbb) { int i; for (i=0; i < ws(); i++) { - if (m_v_n.is_received(ssn()-1-i)) + if (m_v_n.is_received((ssn()-1-i) & mod_sns())) rbb[ws()-1-i] = 'R'; else rbb[ws()-1-i] = 'I'; diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp index c5654f6d..8b3cfd1c 100644 --- a/tests/types/TypesTest.cpp +++ b/tests/types/TypesTest.cpp @@ -325,10 +325,9 @@ static void test_rlc_dl_ul_basic() /* * SSN wrap around case - * TODO: Should not expect any BSN as nacked. - * should be fixed in subsequent patch + * Should not expect any BSN as nacked. */ - rbb = "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRR"; + rbb = "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"; for (int i = 0; i < 128; ++i) { ul_win.receive_bsn(i); ul_win.raise_v_q(); -- cgit v1.2.3