[MERGED] osmo-bts[master]: sysmobts: Make reservation for mode/netmask/ip and suc

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Holger Freyther gerrit-no-reply at lists.osmocom.org
Sat Apr 29 12:31:57 UTC 2017


Holger Freyther has submitted this change and it was merged.

Change subject: sysmobts: Make reservation for mode/netmask/ip and suc
......................................................................


sysmobts: Make reservation for mode/netmask/ip and suc

Change-Id: Ib98856356dc296be9e449d35479bc9234c0c4d32
---
M src/osmo-bts-sysmo/misc/sysmobts_eeprom.h
M src/osmo-bts-sysmo/misc/sysmobts_par.c
2 files changed, 16 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h b/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h
index 0dec4f6..120d968 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h
+++ b/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h
@@ -16,7 +16,15 @@
 	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));
 
@@ -26,4 +34,9 @@
 	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 d1fc37a..e3a3c56 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_par.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_par.c
@@ -294,4 +294,6 @@
 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);

-- 
To view, visit https://gerrit.osmocom.org/449
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib98856356dc296be9e449d35479bc9234c0c4d32
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list