Skip to content

Commit 5c18a32

Browse files
committed
add TUD_EPBUF_DEF for ecm rndis, also separate notify and control buffer, use edpt_claim() to prevent race condition
1 parent 1eb72af commit 5c18a32

File tree

2 files changed

+131
-185
lines changed

2 files changed

+131
-185
lines changed

lib/networking/rndis_reports.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ static usb_eth_stat_t usb_eth_stat = { 0, 0, 0, 0 };
4343
static uint32_t oid_packet_filter = 0x0000000;
4444
static rndis_state_t rndis_state;
4545

46-
CFG_TUD_MEM_SECTION CFG_TUSB_MEM_ALIGN static uint8_t ndis_report[8] = { 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
47-
4846
static const uint32_t OIDSupportedList[] =
4947
{
5048
OID_GEN_SUPPORTED_LIST,
@@ -76,8 +74,8 @@ static const uint32_t OIDSupportedList[] =
7674

7775
static void *encapsulated_buffer;
7876

79-
static void rndis_report(void)
80-
{
77+
static void rndis_report(void) {
78+
uint8_t ndis_report[8] = { 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
8179
netd_report(ndis_report, sizeof(ndis_report));
8280
}
8381

0 commit comments

Comments
 (0)