Changes between Version 5 and Version 6 of 802.11/wlan_exp/app_notes/tutorial_token_mac/extensions


Ignore:
Timestamp:
Jul 13, 2015, 4:00:07 PM (9 years ago)
Author:
chunter
Comment:

--

Legend:

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

    v5 v6  
    101101----
    102102
     103=== Access Point (AP) ===
     104
     105Changes should be made to [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_high_ap/wlan_mac_ap.c wlan_mac_ap.c].
     106
     107----
     108
     109First, we need to add a few global variables to the top of the AP code. Add the following code snippet:
     110
     111{{{
     112#!c
     113
     114u8              token_addr[6];
     115u64             token_ap_num_tx_bytes;
     116u8              token_ap_res_mult_factor;
     117
     118u64             token_sta_num_rx_bytes_start;
     119}}}
     120
     121We will use these variables in the coming sections. Furthermore, add the following line somewhere in the AP's main() function to give it a sane default:
     122
     123{{{
     124#!c
     125
     126token_ap_res_mult_factor = TOKEN_RES_MULT_FACTOR_MIN;
     127}}}
     128
     129----
     130
     131Next we will let {{{set_new_reservation}}} set the reservation duration as a function of a per-station multiplication factor. In the existing function find the {{{ipc_payload.res_duration = DEFAULT_RESERVATION_DURATION_USEC;}}} line within the {{{if(curr_station_info_entry == NULL){}}} clause. Replaces this line with
     132
     133{{{
     134#!c
     135
     136ipc_payload.res_duration = DEFAULT_RESERVATION_DURATION_USEC * token_ap_res_mult_factor;
     137}}}
     138
     139Here, {{{token_ap_res_mult_factor}}} is the top-level variable we just added. If we make no other changes, then this value will be fixed at {{{TOKEN_RES_MULT_FACTOR_MIN}}}.
     140
     141----
     142
    103143== Characterizing Extended TokenMAC ==
    104144