Changes between Version 14 and Version 15 of 802.11/wlan_exp/app_notes/tutorial_token_mac/CPU_LOW
- Timestamp:
- Jul 15, 2015, 9:21:30 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
802.11/wlan_exp/app_notes/tutorial_token_mac/CPU_LOW
v14 v15 5 5 = Alterations to CPU_LOW = 6 6 7 In this section, we will describe and discuss the changes needed to the low-level MAC code to realize the design. Here, we will not start off with the DCF code since the vast majority of that DCF behavior is irrelevant to TokenMAC. Instead, we will use the very simple [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_nomac NoMAC]project as a starting point. Unaltered, this project acts as a straight passthrough connection between the high-level MAC and the PHY.7 In this section, we will describe and discuss the changes needed to the low-level MAC code to realize the design. Here, we will not start off with the DCF code since the vast majority of that DCF behavior is irrelevant to TokenMAC. Instead, we will use the very simple NoMAC project as a starting point. Unaltered, this project acts as a straight passthrough connection between the high-level MAC and the PHY. 8 8 9 9 Furthermore, we will make some changes to the MAC Low Framework to handle new inter-processor communication (IPC) messages with CPU_HIGH. … … 14 14 === MAC Low Framework === 15 15 16 Changes should be made to [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_framework/wlan_mac_low.c wlan_mac_low.c].16 Changes should be made to {{{wlan_mac_low.c}}} in the project SDK workspace zip. 17 17 18 18 ---- 19 19 20 In [wiki:802.11/wlan_exp/app_notes/tutorial_token_mac/CPU_HIGH#CodeCommontoCPU_HIGHandCPU_LOW the CPU_HIGH alterations section], we created the {{{TOKEN_NEW_RESERVATION}}} and {{{TOKEN_END_RESERVATION}}} IPC messages. Now we need to alter the MAC Low Framework to deal with these messages and pass their contents to whatever CPU_LOW project uses the framework. First, we need to create some new global variables at the top of [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_framework/wlan_mac_low.c wlan_mac_low.c]:20 In [wiki:802.11/wlan_exp/app_notes/tutorial_token_mac/CPU_HIGH#CodeCommontoCPU_HIGHandCPU_LOW the CPU_HIGH alterations section], we created the {{{TOKEN_NEW_RESERVATION}}} and {{{TOKEN_END_RESERVATION}}} IPC messages. Now we need to alter the MAC Low Framework to deal with these messages and pass their contents to whatever CPU_LOW project uses the framework. First, we need to create some new global variables at the top of {{{wlan_mac_low.c}}}: 21 21 22 22 {{{ … … 259 259 === NoMAC === 260 260 261 Changes should be made to [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_nomac/wlan_mac_nomac.c wlan_mac_nomac.c] and [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_nomac/include/wlan_mac_nomac.h wlan_mac_nomac.h].261 Changes should be made to {{{wlan_mac_nomac.c}}} and {{{wlan_mac_nomac.h}}} in the project SDK workspace zip. 262 262 263 263 NoMAC is intended to be a near "blank slate" to make building totally custom MACs more straightforward. It does not have any of the complexities of the DCF. Transmissions are directly connected to the PHY. There is no carrier sensing, no acknowledgments, no retransmissions, no random backoffs, etc. NoMAC is the perfect place for us to add the low-level behavior of TokenMAC. We will construct TokenMAC in such a way that the same CPU_LOW project can be attached to either the AP or STA CPU_HIGH project to program a board. In other words, our modifications to NoMAC will have to work for either role of issuing tokens or accepting tokens. … … 265 265 ---- 266 266 267 First, we need to modify [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_nomac/include/wlan_mac_nomac.h wlan_mac_nomac.h]with a few new definitions.267 First, we need to modify {{{wlan_mac_nomac.h}}} with a few new definitions. 268 268 269 269 {{{ … … 331 331 ---- 332 332 333 Next, we will perform a little bit of bookkeeping and declare two new global variables we will need at the top of [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_nomac/wlan_mac_nomac.c wlan_mac_nomac.c]:333 Next, we will perform a little bit of bookkeeping and declare two new global variables we will need at the top of {{{wlan_mac_nomac.c}}}: 334 334 335 335 {{{ … … 418 418 eeprom_addr, 419 419 0, 420 new_reservation->res_duration); //TODO: Calculate appropriate duration420 new_reservation->res_duration); 421 421 422 422 … … 513 513 wlan_mac_low_disable_new_mpdu_tx(); 514 514 ipc_payload.reason = TOKEN_DURATION_COMPLETE; 515 //ipc_payload.low_tx_details; //TODO516 515 ipc_mailbox_write_msg(&ipc_msg_to_high); 517 516 } … … 598 597 eeprom_addr, 599 598 0, 600 rx_token_frame->res_duration_usec); //TODO: Calculate appropriate duration599 rx_token_frame->res_duration_usec); 601 600 602 601 … … 686 685 687 686 We assigned this function to the new callback in the MAC Low Framework in a previous change. 688