locked
NDIS driver indicate packets RRS feed

  • Question

  • Hi,

    I have modified a NIC driver in oredr to send and receive data over a serial interface rather than through the NIC. I am getting a Debug Check when I call NdisMEthIndicateReceive and NdisMEthIndicateReceiveComplete:

    DEBUGCHK failed in file c:\macallan\private\winceos\comm\ndis51\sys\efilter.c at line 1249

    I find the treatment of the AdapterHandle in the call stack curious.

     

    I have saved the AdapterHandle in the initialisation routine and all the other parameters look OK.

     

    837:          Test = pRxBits->MyAdapterHandle;
    0224549C    ldr         r3, [pc, #0xCC]
    022454A0    ldr         r3, [r3]
    022454A4    add         r3, r3, #4
    022454A8    ldr         r3, [r3]
    022454AC    str         r3, Test
    838:          NdisMEthIndicateReceive((NDIS_HANDLE)(Test),
    839:              (NDIS_HANDLE) &Context,
    840:              (void *) pBuffer,
    841:              (UINT) ETHERNET_HEADER_SIZE,
    842:              (void *) (pBuffer + ETHERNET_HEADER_SIZE),
    843:              TempRange - ETHERNET_HEADER_SIZE,
    844:              TempRange - ETHERNET_HEADER_SIZE);
    022454B0    ldrh        r3, TempRange
    022454B4    sub         r3, r3, #0xE
    022454B8    str         r3, [sp, #0xC]
    022454BC    ldrh        r3, TempRange
    022454C0    sub         r3, r3, #0xE
    022454C4    str         r3, [sp, #8]
    022454C8    ldr         r3, pBuffer
    022454CC    add         r3, r3, #0xE
    022454D0    str         r3, [sp, #4]
    022454D4    mov         r3, #0xE
    022454D8    str         r3, [sp]
    022454DC    ldr         r3, pBuffer
    022454E0    ldr         r2, pBuffer
    022454E4    add         r1, sp, #0x18
    022454E8    ldr         r0, Test
    022454EC    add         r0, r0, #0xF8
    022454F0    ldr         r0, [r0]
    022454F4    ldr         lr, Test
    022454F8    add         lr, lr, #0x82, 30
    022454FC    ldr         r4, [lr]
    02245500    mov         lr, pc
    02245504    bx          r4

    I have used the local variable 'Test' just to ensure the value of the stored variable is correct, which it is.

     

    Any help would be most welcome.

     

    Regards,

    Bruce

    Wednesday, August 22, 2007 1:01 PM