* Use new NM_ATT_BS11 definitions instead of magic numbers
* rename FECTORY_LOGON into LMT_LOGON since it's not always factory level
This commit is contained in:
parent
934e68bbcf
commit
043d04a99a
|
@ -190,8 +190,8 @@ enum abis_nm_msgtype {
|
|||
|
||||
NM_MT_BS11_GET_STATE = 0xe3,
|
||||
NM_MT_BS11_GET_STATE_ACK,
|
||||
NM_MT_BS11_FACTORY_LOGON = 0xe5,
|
||||
NM_MT_BS11_FACTORY_LOGON_ACK,
|
||||
NM_MT_BS11_LMT_LOGON = 0xe5,
|
||||
NM_MT_BS11_LMT_LOGON_ACK,
|
||||
NM_MT_BS11_RESTART = 0xe7,
|
||||
NM_MT_BS11_RESTART_ACK,
|
||||
NM_MT_BS11_DISCONNECT = 0xe9,
|
||||
|
|
|
@ -882,11 +882,14 @@ int abis_nm_bs11_factory_logon(struct gsm_bts *bts, int on)
|
|||
if (on) {
|
||||
u_int8_t len = 3*2 + sizeof(bs11_logon_c7)
|
||||
+ sizeof(bs11_logon_c8) + sizeof(bs11_logon_c9);
|
||||
fill_om_fom_hdr(oh, len, NM_MT_BS11_FACTORY_LOGON,
|
||||
fill_om_fom_hdr(oh, len, NM_MT_BS11_LMT_LOGON,
|
||||
NM_OC_BS11_A3, 0xff, 0xff, 0xff);
|
||||
msgb_tlv_put(msg, 0xc7, sizeof(bs11_logon_c7), bs11_logon_c7);
|
||||
msgb_tlv_put(msg, 0xc8, sizeof(bs11_logon_c8), bs11_logon_c8);
|
||||
msgb_tlv_put(msg, 0xc9, sizeof(bs11_logon_c9), bs11_logon_c9);
|
||||
msgb_tlv_put(msg, NM_ATT_BS11_LMT_LOGIN_TIME,
|
||||
sizeof(bs11_logon_c7), bs11_logon_c7);
|
||||
msgb_tlv_put(msg, NM_ATT_BS11_LMT_USER_ACC_LEV,
|
||||
sizeof(bs11_logon_c8), bs11_logon_c8);
|
||||
msgb_tlv_put(msg, NM_ATT_BS11_LMT_USER_NAME,
|
||||
sizeof(bs11_logon_c9), bs11_logon_c9);
|
||||
} else {
|
||||
fill_om_fom_hdr(oh, 0, NM_MT_BS11_LOGOFF,
|
||||
NM_OC_BS11_A3, 0xff, 0xff, 0xff);
|
||||
|
|
|
@ -373,8 +373,8 @@ static int handle_serial_msg(struct msgb *rx_msg)
|
|||
oh = (struct abis_om_hdr *) msgb_l2(rx_msg);
|
||||
foh = (struct abis_om_fom_hdr *) oh->data;
|
||||
switch (foh->msg_type) {
|
||||
case NM_MT_BS11_FACTORY_LOGON_ACK:
|
||||
printf("FACTORY LOGON: ACK\n");
|
||||
case NM_MT_BS11_LMT_LOGON_ACK:
|
||||
printf("LMT LOGON: ACK\n");
|
||||
if (bs11cfg_state == STATE_NONE)
|
||||
bs11cfg_state = STATE_LOGON_ACK;
|
||||
rc = 0;
|
||||
|
|
Loading…
Reference in New Issue