Changes between Version 8 and Version 9 of 802.11/MAC/Upper/MACHighFramework/TX_queue


Ignore:
Timestamp:
Apr 8, 2014, 11:11:02 AM (10 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/MAC/Upper/MACHighFramework/TX_queue

    v8 v9  
    3434  * {{{queue_sel}}}: identification of queue that should be purged
    3535
     36=== Example Snippets ===
     37
     38==== Adding a single packet to a queue ====
     39
     40{{{#!c
     41//Checkout 1 element from the queue;
     42        queue_checkout(&checkout,1);
     43
     44        if(checkout.length == 1){ //There was at least 1 free queue element
     45                tx_queue_entry = checkout.first;
     46
     47                tx_queue = (tx_queue_buffer*)(tx_queue_entry->data);
     48
     49                //Here is where you can construct the packet in tx_queue_entry->data and its corresponding
     50                //tx_queue_entry->frame_info
     51
     52
     53                wlan_mac_high_setup_tx_header( &tx_header_common, (u8 *)bcast_addr, wlan_mac_addr );
     54        tx_length = wlan_create_beacon_frame((void*)(tx_queue->frame),&tx_header_common, BEACON_INTERVAL_MS, strlen(access_point_ssid), (u8*)access_point_ssid, mac_param_chan,1,tim_control,tim_bitmap);
     55
     56                enqueue_after_end(YOUR_QUEUE_ID, &checkout);
     57        }
     58}}}
     59
     60
     61
    3662== Implementation ==
    3763The transmit queue is implemented in [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_high_framework/wlan_mac_queue.c wlan_mac_queue.c].