Changes between Version 14 and Version 15 of 802.11/app_notes/FDD-NoMAC
- Timestamp:
- Feb 15, 2017, 11:46:24 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
802.11/app_notes/FDD-NoMAC
v14 v15 226 226 }}} 227 227 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}}}: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}}} and add the function's declaration to {{{include/wlan_mac_nomac.h}}}: 229 229 230 230 {{{#!c … … 267 267 Next the Rx processing must be similarly divided into separate "start" and "finish" functions. First modify {{{frame_receive()}}} to immediately return instead of blocking: 268 268 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 271 269 {{{#!c 272 270 u32 frame_receive(u8 rx_pkt_buf, phy_rx_details_t* phy_details){ … … 291 289 }}} 292 290 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.291 Note 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. 294 292 295 293 Next 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}}}: … … 351 349 }}} 352 350 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:351 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: 354 352 355 353 {{{#!c