none
a question about 802.11 code RRS feed

  • Question

  • hello,

    When I read the 802.11 code, there is a question confusing me.

    In file src/driver/ll/sdr_ll_send.c , the data passed from NDIS is <ethHead><data><CRC32>,  then the <ethHead> is replaced by <wlanHead>,  and the data is <wlanHead><data><CRC32>,  then another CRC32(we call it wlanCRC32) is calculated and put into pDLCB->PacketBase.Reserved1, when the frame is sent to radio, the wlanCRC32 is appended to the rear. so the data sent is <PLCP preamble><PLCP head><wlanHead><data><CRC32><wlanCRC32>,  is it right?

    then when the data is received and put uplink, the <PLCP preamble><PLCP head> is removed and the <wlanHead> is replaced into <ethHead>, but the <wlanCRC32> is not removed. It is still in the MDL, and passed to NDIS. That is , the NDISPacket sent to NDIS is factually contains <ethHead><data><CRC32><wlanCRC32>, it is different from the original NDISPacket passed from the NDIS , why? Is it OK?

    thank you!

    Tuesday, December 7, 2010 9:48 AM

Answers

  • The packet from NDIS does NOT contain CRC32, so the format is <ethHead><data>.

    The CRC32 is calculated in sdr_ll_send and stroed in pDLCB->PacketBase.Reserved1. And, etheHead in replaced by wlanHead. NOW, the format is <wlanHead><data><CRC32>.

    In the physical layer, PLCP preamble and PLCP header are prepended. The format now is <PLCP preamble><PLCP head><wlanHead><data><CRC32>.

    On the receive path, the decoded packet will be passed to NDIS along with CRC32 after converting wlan format to eth format. The CRC32 is not removed. But it's OK, because the upper layer will only uses the data part, the CRC32 will not be used.

     

     


    Danial.F
    • Marked as answer by Kun Tan Monday, December 13, 2010 6:04 PM
    Wednesday, December 8, 2010 12:24 PM

All replies

  • The packet from NDIS does NOT contain CRC32, so the format is <ethHead><data>.

    The CRC32 is calculated in sdr_ll_send and stroed in pDLCB->PacketBase.Reserved1. And, etheHead in replaced by wlanHead. NOW, the format is <wlanHead><data><CRC32>.

    In the physical layer, PLCP preamble and PLCP header are prepended. The format now is <PLCP preamble><PLCP head><wlanHead><data><CRC32>.

    On the receive path, the decoded packet will be passed to NDIS along with CRC32 after converting wlan format to eth format. The CRC32 is not removed. But it's OK, because the upper layer will only uses the data part, the CRC32 will not be used.

     

     


    Danial.F
    • Marked as answer by Kun Tan Monday, December 13, 2010 6:04 PM
    Wednesday, December 8, 2010 12:24 PM
  • thank you.

    If I remove the CRC32 of the packet passed to NDIS in the Tx, is there any problem?

    Sunday, December 12, 2010 3:14 AM
  • If you remove the CRC32 at transmitter, then the receiver would not be able to receive packets because the CRC32 check will always be failed. So, the packets will never be delivered to NDIS.
    Danial.F
    • Proposed as answer by Danial.F Tuesday, December 21, 2010 10:50 AM
    Tuesday, December 21, 2010 10:50 AM
  • I remove it in the receiver, and it works. Thank you
    Wednesday, December 22, 2010 2:10 AM
  • I also have a question about the procedure of the packets's send. After link level handles the replacement between etheHead and wlanHead,what will cause the MAC level's SEND PROCEDURE?????(Which function or some other thread??)

    thanks!!!

    Wednesday, July 27, 2011 8:21 AM
  • What do you mean the SEND procedure? The MAC layer or application layer?

    There is one thread waiting for packets from upper layer (i.e., TCP/IP). Once there are packets in the sending list, the thread is woke up and start to do the modulation by calling the physical layer modulation function.

    So, where are packets from? From applications, of course. Also, some packets are from internal protocols such ARP.

    In summary, the the send procedure of MAC is triggered by the packets from application layer or internal protocols.

    A brief outline could help you understand the details:
    Application(s)=>TCP/IP=>Link Layer (eth -> wlan header conversion, insert the converted packets to a list and notify send thread)=>send thread in MAC (send thread is woke up and starts to do modulation)

    Hope this will help you!


    Danial.F
    Thursday, July 28, 2011 4:57 PM