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:
parent
19080d531f
commit
ae3da5f8c3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue