Changes between Version 12 and Version 13 of 802.11/wlan_exp/app_notes/tutorial_token_mac/CPU_HIGH


Ignore:
Timestamp:
Feb 4, 2016, 11:02:14 AM (8 years ago)
Author:
welsh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/wlan_exp/app_notes/tutorial_token_mac/CPU_HIGH

    v12 v13  
    181181----
    182182
    183 Finally, we need to actually call the {{{token_new_reservation_callback()}}} function pointer. We need to establish a contract with CPU_LOW. Specifically, we will assume that every time the AP sends down a {{{TOKEN_NEW_RESERVATION}}} IPC message to CPU_LOW, there will be a response of a {{{TOKEN_END_RESERVATION}}} IPC message at some point after that event. In other words, CPU_HIGH will not be responsible for determining when any given reservation period is over. We will assume CPU_LOW will tell CPU_HIGH when a new token reservation period should be issued. As such, we just need to call {{{token_new_reservation_callback()}}} whenever we get a {{{TOKEN_END_RESERVATION}}} IPC message from CPU_LOW. This is an easy modification to make. In {{{wlan_mac_high_process_ipc_msg()}}}, there is a big switch statement that handled every type of IPC message ID. All we need to do as add a new case to this switch:
     183Finally, we need to actually call the {{{token_new_reservation_callback()}}} function pointer. We need to establish a contract with CPU_LOW. Specifically, we will assume that every time the AP sends down a {{{TOKEN_NEW_RESERVATION}}} IPC message to CPU_LOW, there will be a response of a {{{TOKEN_END_RESERVATION}}} IPC message at some point after that event. In other words, CPU_HIGH will not be responsible for determining when any given reservation period is over. We will assume CPU_LOW will tell CPU_HIGH when a new token reservation period should be issued. As such, we just need to call {{{token_new_reservation_callback()}}} whenever we get a {{{TOKEN_END_RESERVATION}}} IPC message from CPU_LOW. This is an easy modification to make. In {{{wlan_mac_high_process_ipc_msg()}}}, there is a big switch statement that handled every type of IPC message ID. All we need to do as add new cases to this switch:
    184184
    185185{{{
    186186#!c
    187187
     188                case IPC_MBOX_TOKEN_NEW_RESERVATION:
     189                        // Do nothing - To remove warning about "Unknown IPC message type"
     190                break;
     191
    188192                case IPC_MBOX_TOKEN_END_RESERVATION:
    189193                        token_new_reservation_callback();
    190194                break;
     195
    191196}}}
    192197
    193198----
    194