edge: Fix RLC message size

Currently the RLC message length that is obtained from the DSP is
reduced by 1 if the last byte of the buffer includes spare bits.
While this worked well with GPRS, these bits are being used to
encode RLC blocks in EGPRS mode. Thus this last byte must not be
chopped off. The functionality of the code is not affected by this,
since the modified length value is not used.

This commit adds GprsCodingScheme::usedSizeDL/UL to return
the number of bytes needed to encode the message block. If there are
single bits at the end that are to be used (EGPRS), the functions
return the number of full bytes plus 1 (which is the buffer size
reported by the DSP and returned by sizeUL/sizeDL). The commit also
removes the len parameter from rcv_data_block_acknowledged.

Sponsored-by: On-Waves ehf
diff --git a/src/bts.cpp b/src/bts.cpp
index 1ef735b..18bee66 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1138,7 +1138,7 @@
 	}
 
 	LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, "
-		"length: %d (%d))\n", cs.name(), len, cs.maxBytesUL());
+		"length: %d (%d))\n", cs.name(), len, cs.usedSizeUL());
 
 	if (cs.isGprs())
 		return rcv_block_gprs(data, fn, meas, cs);
@@ -1158,7 +1158,7 @@
 	int rc;
 	struct gprs_rlc_data_info rlc_dec;
 	struct gprs_rlcmac_ul_tbf *tbf;
-	unsigned len = cs.maxBytesUL();
+	unsigned len = cs.sizeUL();
 
 	/* These are always data blocks, since EGPRS still uses CS-1 for
 	 * control blocks (see 44.060, section 10.3, 1st par.)
@@ -1208,7 +1208,7 @@
 		return 0;
 	}
 
-	return tbf->rcv_data_block_acknowledged(&rlc_dec, data, len, meas);
+	return tbf->rcv_data_block_acknowledged(&rlc_dec, data, meas);
 }
 
 int gprs_rlcmac_pdch::rcv_block_gprs(uint8_t *data, uint32_t fn,