Changes between Version 14 and Version 15 of 802.11/app_notes/FDD-NoMAC


Ignore:
Timestamp:
Feb 15, 2017, 11:46:24 AM (7 years ago)
Author:
murphpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/app_notes/FDD-NoMAC

    v14 v15  
    226226}}}
    227227
    228 The "finish Tx" processing that normally occurs in {{{frame_transmit()}}} must be moved to a new function. This function polls the status of the Tx PHY and immediately returns if the transmission is not yet complete. Add the following function to {{{wlan_mac_nomac.c}}}, then add the functions declaration to {{{include/wlan_mac_nomac.h}}}:
     228The "finish Tx" processing that normally occurs in {{{frame_transmit()}}} must be moved to a new function. This function polls the status of the Tx PHY and immediately returns if the transmission is not yet complete. Add the following function to {{{wlan_mac_nomac.c}}} and add the function's declaration to {{{include/wlan_mac_nomac.h}}}:
    229229
    230230{{{#!c
     
    267267Next the Rx processing must be similarly divided into separate "start" and "finish" functions. First modify {{{frame_receive()}}} to immediately return instead of blocking:
    268268
    269  we need to perform a similar dissection of the {{{frame_receive()}}} context to quit early before the reception has finished. Note: it is important to return the value {{{FRAME_RX_RET_SKIP_RX_STARTED_RESET}}} from this context to prevent the MAC Low Framework from resetting the PHY while the reception is still ongoing. Replace {{{frame_receive()}}} with the following:
    270 
    271269{{{#!c
    272270u32 frame_receive(u8 rx_pkt_buf, phy_rx_details_t* phy_details){
     
    291289}}}
    292290
    293 Note that this function returns {{{FRAME_RX_RET_SKIP_RX_STARTED_RESET}}}. This flag informs the MAC framework that the application is not finishes processing the current Rx event and that the framework should not reset the Rx state.
     291Note that {{{frame_receive()}}} now returns {{{FRAME_RX_RET_SKIP_RX_STARTED_RESET}}}. This flag informs the MAC framework that the application is not finishes processing the current Rx event and that the framework should not reset the Rx state, ensuring the {{{finish_frame_receive()}}} below has the opportunity to process the reception once it completes.
    294292
    295293Next add a new function to handle the "finish" step for Rx processing. Add the following function to {{{wlan_mac_nomac.c}}} and add the function's declaration to {{{include/wlan_mac_nomac.h}}}:
     
    351349}}}
    352350
    353 The final step is to update the {{{main()}}} function to call the new Tx/Rx start/finish functions, depending on the global Tx/Rx state. Replace the {{{while(1)}}} loop with the following:
     351The final step is to update the {{{main()}}} function to call the new Tx/Rx start/finish functions depending on the global Tx/Rx state. Replace the {{{while(1)}}} loop with the following:
    354352
    355353{{{#!c