cosmetic: it's n_r in check_for_first_ciphrd(), not n_s

When we introduced the n_s verification in
2cc37035d7, the variable name n_s was
used for what is actually n_r N(R) read from the LAPDm frame

Change-Id: Iaef1648f35ceae9d7f4cd1d9d5409e05115d199a
This commit is contained in:
Harald Welte 2018-05-10 17:25:52 +02:00
parent 19080d531f
commit ae3da5f8c3
1 changed files with 3 additions and 3 deletions

View File

@ -956,7 +956,7 @@ static void radio_link_timeout(struct gsm_lchan *lchan, int bad_frame)
static inline int check_for_first_ciphrd(struct gsm_lchan *lchan,
uint8_t *data, int len)
{
uint8_t n_s;
uint8_t n_r;
/* if this is the first valid message after enabling Rx
* decryption, we have to enable Tx encryption */
@ -972,8 +972,8 @@ static inline int check_for_first_ciphrd(struct gsm_lchan *lchan,
if ((data[1] & 0x01) != 0)
return 0;
n_s = data[1] >> 5;
if (lchan->ciph_ns != n_s)
n_r = data[1] >> 5;
if (lchan->ciph_ns != n_r)
return 0;
return 1;