/* This function takes a pointer to MAC address string (i.e."XX:XX:XX:XX:XX:XX", where "XX" is a two-digit hex number) and stores it in one of the MAC address fields of the EEPROM local copy.  */
static void set_mac_address(unsigned int index, const char *string)
/* This function takes a pointer to MAC address string (i.e."XX:XX:XX:XX:XX:XX", where "XX" is a two-digit hex number) and stores it in one of the MAC address fields of the EEPROM local copy.  */
static void set_mac_address(unsigned int index, const char *string)
{
	char *p = (char *) string;
	unsigned int i;
	if (!string) {
		printf("Usage: mac <n> XX:XX:XX:XX:XX:XX\n");
		return;
	}
	for (i = 0; *p && (i < 6); i++) {
		e.mac[index][i] = simple_strtoul(p, &p, 16);
		if (*p == ':')
			p++;
	}
	update_crc();
}