add TUD_EPBUF_DEF for ecm rndis, also separate notify and control buffer, use edpt_claim() to prevent race condition

This commit is contained in:
hathach
2024-11-22 20:09:29 +07:00
parent 1eb72af433
commit 5c18a32aaa
2 changed files with 129 additions and 183 deletions

View File

@@ -43,8 +43,6 @@ static usb_eth_stat_t usb_eth_stat = { 0, 0, 0, 0 };
static uint32_t oid_packet_filter = 0x0000000;
static rndis_state_t rndis_state;
CFG_TUD_MEM_SECTION CFG_TUSB_MEM_ALIGN static uint8_t ndis_report[8] = { 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
static const uint32_t OIDSupportedList[] =
{
OID_GEN_SUPPORTED_LIST,
@@ -76,8 +74,8 @@ static const uint32_t OIDSupportedList[] =
static void *encapsulated_buffer;
static void rndis_report(void)
{
static void rndis_report(void) {
uint8_t ndis_report[8] = { 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
netd_report(ndis_report, sizeof(ndis_report));
}