diff options
author | Harald Welte <laforge@gnumonks.org> | 2014-08-27 22:13:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-09-22 16:39:04 +0200 |
commit | a313bb0a476aca8570abea3592dbe7593d11ecc9 (patch) | |
tree | 9e2761b245b896524f8d692f837a1b63d64d19bf /src/osmo-bts-sysmo/l1_if.c | |
parent | 923e324abc6d529aea884ca7082220ba66906054 (diff) |
l1sap: Port code to new ciphering handling
... introduced in 2cc37035d73191b71b9ba9c0d559a0da6a5f35e5
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 76a0ba8e..30eb2669 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -363,31 +363,6 @@ static int check_for_ciph_cmd(struct femtol1_hdl *fl1h, return 1; } -static inline void check_for_first_ciphrd(struct femtol1_hdl *fl1h, - GsmL1_MsgUnitParam_t *msgUnitParam, - struct gsm_lchan *lchan) -{ - uint8_t n_s; - - /* if this is the first valid message after enabling Rx - * decryption, we have to enable Tx encryption */ - if (lchan->ciph_state != LCHAN_CIPH_RX_CONF) - return; - - /* HACK: check if it's an I frame, in order to - * ignore some still buffered/queued UI frames received - * before decryption was enabled */ - if (msgUnitParam->u8Buffer[0] != 0x01) - return; - if ((msgUnitParam->u8Buffer[1] & 0x01) != 0) - return; - n_s = msgUnitParam->u8Buffer[1] >> 5; - if (lchan->ciph_ns != n_s) - return; - lchan->ciph_state = LCHAN_CIPH_TXRX_REQ; - l1if_set_ciphering(fl1h, lchan, 1); -} - /* public helpers for the test */ int bts_check_for_ciph_cmd(struct femtol1_hdl *fl1h, struct msgb *msg, struct gsm_lchan *lchan) @@ -395,13 +370,6 @@ int bts_check_for_ciph_cmd(struct femtol1_hdl *fl1h, return check_for_ciph_cmd(fl1h, msg, lchan); } -void bts_check_for_first_ciphrd(struct femtol1_hdl *fl1h, - GsmL1_MsgUnitParam_t *msgUnitParam, - struct gsm_lchan *lchan) -{ - return check_for_first_ciphrd(fl1h, msgUnitParam, lchan); -} - static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, |