From 8119ecd2db76e5ef8a88ca9b85c8712386991bf7 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 6 Mar 2019 19:03:01 +0100 Subject: Tighten lqual table limits check Previously MAX_GPRS_CS was used for both EDGE and GPRS which means that we waste extra memory in GPRS case. It also leads to misleading name. Let's fix this by introducing separate definitions for GPRS and EDGE cases and use them as appropriate in limit checks. Change-Id: I3ae1ee64ec8e80247b8fe669cc79505b4dadf58f --- src/bts.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/bts.h') diff --git a/src/bts.h b/src/bts.h index 578ceceb..b83ab4b4 100644 --- a/src/bts.h +++ b/src/bts.h @@ -45,7 +45,9 @@ extern "C" { #define LLC_CODEL_DISABLE 0 #define LLC_CODEL_USE_DEFAULT (-1) -#define MAX_GPRS_CS 9 + +#define MAX_EDGE_MCS 9 +#define MAX_GPRS_CS 4 /* see bts->gsmtap_categ_mask */ enum pcu_gsmtap_category { @@ -143,7 +145,7 @@ struct gprs_rlcmac_bts { uint8_t cs_adj_upper_limit; uint8_t cs_adj_lower_limit; struct {int16_t low; int16_t high; } cs_lqual_ranges[MAX_GPRS_CS]; - struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_GPRS_CS]; + struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_EDGE_MCS]; uint16_t cs_downgrade_threshold; /* downgrade if less packets left (DL) */ uint16_t ws_base; uint16_t ws_pdch; /* increase WS by this value per PDCH */ -- cgit v1.2.3