Skip to content

Commit 59cbfbb

Browse files
authored
Merge pull request hathach#1971 from MattMills/class_net_net_device_mac_address_shouldnt_be_consts
Update net_device.h to make MAC addresses not const.
2 parents f640163 + 033627e commit 59cbfbb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/device/net_lwip_webserver/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static struct pbuf *received_frame;
6464
/* this is used by this code, ./class/net/net_driver.c, and usb_descriptors.c */
6565
/* ideally speaking, this should be generated from the hardware's unique ID (if available) */
6666
/* it is suggested that the first byte is 0x02 to indicate a link-local address */
67-
const uint8_t tud_network_mac_address[6] = {0x02,0x02,0x84,0x6A,0x96,0x00};
67+
uint8_t tud_network_mac_address[6] = {0x02,0x02,0x84,0x6A,0x96,0x00};
6868

6969
/* network parameters of this MCU */
7070
static const ip4_addr_t ipaddr = INIT_IP4(192, 168, 7, 1);

src/class/net/net_device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void tud_network_init_cb(void);
9494

9595
// client must provide this: 48-bit MAC address
9696
// TODO removed later since it is not part of tinyusb stack
97-
extern const uint8_t tud_network_mac_address[6];
97+
extern uint8_t tud_network_mac_address[6];
9898

9999
//------------- NCM -------------//
100100

test/fuzz/net_fuzz.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void tud_network_init_cb(void) {
6767

6868
// client must provide this: 48-bit MAC address
6969
// TODO removed later since it is not part of tinyusb stack
70-
const uint8_t tud_network_mac_address[6] = {0};
70+
uint8_t tud_network_mac_address[6] = {0};
7171

7272
//------------- NCM -------------//
7373

0 commit comments

Comments
 (0)