Changes between Version 15 and Version 16 of 802.11/wlan_exp/app_notes/tutorial_token_mac/CPU_LOW


Ignore:
Timestamp:
Jul 15, 2015, 1:50:15 PM (9 years ago)
Author:
chunter
Comment:

--

Legend:

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

    v15 v16  
    3838        adjust_reservation_ts_callback = (function_ptr_t)nullCallback;
    3939        allow_new_mpdu_tx        = 0;
    40         pkt_buf_pending_tx       = -1;
     40        pkt_buf_pending_tx       = -1; // -1 is an invalid pkt_buf index
    4141}}}
    4242
     
    6868{{{
    6969#!c
     70
    7071case IPC_MBOX_TOKEN_NEW_RESERVATION:
    7172        new_reservation = (ipc_token_new_reservation*)msg->payload_ptr;
     
    8081{{{
    8182#!c
    82 
     83// Note: the below function is a copy and paste of the code that was already present in the IPC_MBOX_TX_MPDU_READY case
    8384void wlan_mac_low_proc_pkt_buf(u16 tx_pkt_buf){
    8485        u32                      status;
     
    382383        ipc_msg_to_high_start.msg_id            = IPC_MBOX_MSG_ID(IPC_MBOX_TOKEN_NEW_RESERVATION);
    383384
     385        //The below chunk of code is just to make sure that we pad an extra u32 word if the
     386        //ipc_token_new_reservation struct is not 32-bit aligned.
    384387        if( (sizeof(u32)*(sizeof(ipc_token_new_reservation)/sizeof(u32))) ==  sizeof(ipc_token_new_reservation) ){
    385388                ipc_msg_to_high_start.num_payload_words = (sizeof(ipc_token_new_reservation)/sizeof(u32));
     
    392395        ipc_msg_to_high_end.msg_id            = IPC_MBOX_MSG_ID(IPC_MBOX_TOKEN_END_RESERVATION);
    393396
     397        //The below chunk of code is just to make sure that we pad an extra u32 word if the
     398        //ipc_token_end_reservation struct is not 32-bit aligned.
    394399        if( (sizeof(u32)*(sizeof(ipc_token_end_reservation)/sizeof(u32))) ==  sizeof(ipc_token_end_reservation) ){
    395400                ipc_msg_to_high_end.num_payload_words = (sizeof(ipc_token_end_reservation)/sizeof(u32));
     
    501506        ipc_msg_to_high.msg_id            = IPC_MBOX_MSG_ID(IPC_MBOX_TOKEN_END_RESERVATION);
    502507
     508        //The below chunk of code is just to make sure that we pad an extra u32 word if the
     509        //ipc_token_end_reservation struct is not 32-bit aligned.
    503510        if( (sizeof(u32)*(sizeof(ipc_token_end_reservation)/sizeof(u32))) ==  sizeof(ipc_token_end_reservation) ){
    504511                ipc_msg_to_high.num_payload_words = (sizeof(ipc_token_end_reservation)/sizeof(u32));
     
    559566        ipc_msg_to_high_start.msg_id            = IPC_MBOX_MSG_ID(IPC_MBOX_TOKEN_NEW_RESERVATION);
    560567
     568        //The below chunk of code is just to make sure that we pad an extra u32 word if the
     569        //ipc_token_new_reservation struct is not 32-bit aligned.
    561570        if( (sizeof(u32)*(sizeof(ipc_token_new_reservation)/sizeof(u32))) ==  sizeof(ipc_token_new_reservation) ){
    562571                ipc_msg_to_high_start.num_payload_words = (sizeof(ipc_token_new_reservation)/sizeof(u32));