diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-07-01 18:36:28 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-07-02 10:52:06 +0200 |
commit | befb0dde93181b4ba43e5e63e01db085162a445a (patch) | |
tree | 694e3723e537218c8e0e1d4b2731dfffd78a6afe | |
parent | f41e1ae11b604d2146b658639d732eef61c3dbb0 (diff) |
sysmobts: Make reservation for mode/netmask/ip and suc
Change-Id: I84a7ecb310034d1d3927008f392028b3ef87a394
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_eeprom.h | 15 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_par.c | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h b/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h index f49db1f5..782f7568 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h +++ b/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h @@ -16,7 +16,15 @@ struct sysmobts_eeprom { /* offset */ uint16_t model_flags; /* 34-35 */ uint8_t trx_nr; /* 36 */ uint8_t boot_state[48]; /* 37-84 */ - uint8_t _pad1[36]; /* 85-120 */ + uint8_t _pad1[18]; /* 85-102 */ + struct { + uint8_t mode; /* 103 */ + uint32_t ip; /* 104 - 107 */ + uint32_t mask; /* 108 - 111 */ + uint32_t gw; /* 112 - 115 */ + uint32_t dns; /* 116 - 119 */ + } __attribute__((packed)) net_cfg; + uint8_t crc; /* 120 */ uint8_t gpg_key[128]; /* 121-249 */ } __attribute__((packed)); @@ -25,4 +33,9 @@ enum sysmobts_model_number { MODEL_SYSMOBTS_2050 = 2050, }; +enum sysmobts_net_mode { + NET_MODE_DHCP, + NET_MODE_STATIC, +}; + #endif diff --git a/src/osmo-bts-sysmo/misc/sysmobts_par.c b/src/osmo-bts-sysmo/misc/sysmobts_par.c index d1fc37a2..e3a3c56b 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_par.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_par.c @@ -294,4 +294,6 @@ int sysmobts_par_set_buf(enum sysmobts_par par, const uint8_t *buf, osmo_static_assert(offsetof(struct sysmobts_eeprom, trx_nr) == 36, offset_36); osmo_static_assert(offsetof(struct sysmobts_eeprom, boot_state) == 37, offset_37); osmo_static_assert(offsetof(struct sysmobts_eeprom, _pad1) == 85, offset_85); +osmo_static_assert(offsetof(struct sysmobts_eeprom, net_cfg.mode) == 103, offset_103); +osmo_static_assert((offsetof(struct sysmobts_eeprom, net_cfg.ip) & 0x3) == 0, ip_32bit_aligned); osmo_static_assert(offsetof(struct sysmobts_eeprom, gpg_key) == 121, offset_121); |