llc: Fix LLC UI frame detection (Coverity)

Currently the wrong nibble is masked out, so the conditional
expression always yields true.

Therefore gprs_llc::is_user_data_frame() always returns true. As a
consequence, the low watermark feature of
gprs_rlcmac_dl_tbf::llc_dequeue() is not being used in fact.

This commit fixes the mask value.

Fixes: Coverity CID 1292834, 1292835
Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2015-06-11 11:47:06 +02:00
parent 09fdf6622a
commit d0aee85b29
1 changed files with 2 additions and 2 deletions

View File

@ -89,8 +89,8 @@ bool gprs_llc::is_user_data_frame(uint8_t *data, size_t len)
if ((data[0] & 0x0f) == 1 /* GPRS_SAPI_GMM */)
return false;
if ((data[0] & 0x0e) != 0xc0 /* LLC UI */)
/* It is not an LLC UI frame */
if ((data[0] & 0xe0) != 0xc0 /* LLC UI */)
/* It is not an LLC UI frame, see TS 44.064, 6.3 */
return false;
return true;