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: |
| 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 new cases to this switch: |