none
it's the problem about 802.11 send procedure. RRS feed

  • Question

  • my problem is that when there are some packets to send , system will call MPSendPackets function.Then,in MPSendPackets function,it will call SdrLLSendPacket which is defined in sdr_ll_send.c . but what's the next? how do the packets do in Mac??what function will lead the SEND PROCEDURE down to the MAC?

    thanks!!!

     

    Wednesday, July 27, 2011 3:58 AM

Answers

  • The next is insert the converted frames in a sending list and set a event to n

    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.

    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)

     

    :) copy some contents from another post.


    Danial.F
    Thursday, July 28, 2011 5:24 PM
  • thanks a lot about that! I know that my expression in English is not good, your answer is very good! I review the code again, and I see the wating thread in sendThread in "SdrMacStartThreads" funtion,and then when Sora start Sendthread, a "function"(I don't know if it should be called function,it's from wdk) called KeWaitForSingleObject() would be running when initialize function INIT_SORA_THREAD() in file Sdr_mac_main.c,and it will wait for the event (is that right?),when it's success ,it will return STATUS_SUCCESS, and what's the next??  Will phy run?

    [A]
    Next, dequeue a packet from the waiting list. Call
     the physical layer modulation function.
    You can see the code like this in sdr_mac_send.c:
    //Modulate SendPacket to TxSymbols

    hRes = (*pPhy->FnPHY_Mod)(pPhy, &(pTCB->PacketBase));

     

    Next, transfer the modulated samples to RCB memory. Done!

    What's the relationship between  this porcedure and FSM?(At this time, FSM' state will be in CS,so my QUESTION is that what will trigger the state of CS to TX?) .

    [A]
    FSM and the send procedure are running on two threads. The send thread responses for modulating data (bits) to samples. FSM is the core of MAC. When MAC detects the channel is clean in CS, it will go to TX state and transmit a frame (the samples have already been transferred to RCB). So, the modulation and transmitting can be overlapped and work in a pipeline manner (for example, MAC is transmitting frame i, while send thread is modulating frame i+1). Such a pipeline could reduce the delay from modulation.



    Danial.F
    Saturday, July 30, 2011 4:54 PM

All replies

  • The next is insert the converted frames in a sending list and set a event to n

    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.

    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)

     

    :) copy some contents from another post.


    Danial.F
    Thursday, July 28, 2011 5:24 PM
  • thanks a lot about that! I know that my expression in English is not good, your answer is very good! I review the code again, and I see the wating thread in sendThread in "SdrMacStartThreads" funtion,and then when Sora start Sendthread, a "function"(I don't know if it should be called function,it's from wdk) called KeWaitForSingleObject() would be running when initialize function INIT_SORA_THREAD() in file Sdr_mac_main.c,and it will wait for the event (is that right?),when it's success ,it will return STATUS_SUCCESS, and what's the next??  Will phy run? What's the relationship between  this porcedure and FSM?(At this time, FSM' state will be in CS,so my QUESTION is that what will trigger the state of CS to TX?) .

    thanks for everything!!!

    Friday, July 29, 2011 5:31 AM
  • thanks a lot about that! I know that my expression in English is not good, your answer is very good! I review the code again, and I see the wating thread in sendThread in "SdrMacStartThreads" funtion,and then when Sora start Sendthread, a "function"(I don't know if it should be called function,it's from wdk) called KeWaitForSingleObject() would be running when initialize function INIT_SORA_THREAD() in file Sdr_mac_main.c,and it will wait for the event (is that right?),when it's success ,it will return STATUS_SUCCESS, and what's the next??  Will phy run?

    [A]
    Next, dequeue a packet from the waiting list. Call
     the physical layer modulation function.
    You can see the code like this in sdr_mac_send.c:
    //Modulate SendPacket to TxSymbols

    hRes = (*pPhy->FnPHY_Mod)(pPhy, &(pTCB->PacketBase));

     

    Next, transfer the modulated samples to RCB memory. Done!

    What's the relationship between  this porcedure and FSM?(At this time, FSM' state will be in CS,so my QUESTION is that what will trigger the state of CS to TX?) .

    [A]
    FSM and the send procedure are running on two threads. The send thread responses for modulating data (bits) to samples. FSM is the core of MAC. When MAC detects the channel is clean in CS, it will go to TX state and transmit a frame (the samples have already been transferred to RCB). So, the modulation and transmitting can be overlapped and work in a pipeline manner (for example, MAC is transmitting frame i, while send thread is modulating frame i+1). Such a pipeline could reduce the delay from modulation.



    Danial.F
    Saturday, July 30, 2011 4:54 PM
  • WoW!!!

    WHAT a perfect answer!!I've finally figured that out!!Thanks a lot!! It's not a long time before, I see a function called "SoraFSMStart()",and I don't know what's it's meaning for.And It says "SoraFSMStart will create a thread and assign it to specified core; involving the state-handler for the initial state" in the "sora-manual" doc,but it's done with nothing.

    Can I know what thread of  FSM belongs for??(SYSTEM thread / bla bla....)Can I see the source code of SoraFSMStart()?

    Wednesday, August 3, 2011 8:51 AM