1 | /** @file wlan_mac_dl_list.h |
---|
2 | * @brief Doubly-linked List Framework |
---|
3 | * |
---|
4 | * This contains the code for managing doubly-linked lists. |
---|
5 | * |
---|
6 | * @copyright Copyright 2014-2019, Mango Communications. All rights reserved. |
---|
7 | * Distributed under the Mango Communications Reference Design License |
---|
8 | * See LICENSE.txt included in the design archive or |
---|
9 | * at http://mangocomm.com/802.11/license |
---|
10 | * |
---|
11 | * This file is part of the Mango 802.11 Reference Design (https://mangocomm.com/802.11) |
---|
12 | */ |
---|
13 | |
---|
14 | /*************************** Constant Definitions ****************************/ |
---|
15 | #ifndef WLAN_MAC_DL_LIST_H_ |
---|
16 | #define WLAN_MAC_DL_LIST_H_ |
---|
17 | |
---|
18 | |
---|
19 | /***************************** Include Files *********************************/ |
---|
20 | #include "xil_types.h" |
---|
21 | #include "wlan_common_types.h" |
---|
22 | |
---|
23 | |
---|
24 | //----------------------------------------------- |
---|
25 | // Macros |
---|
26 | // |
---|
27 | #define dl_entry_next(x) (((x))->next) |
---|
28 | #define dl_entry_prev(x) (((x))->prev) |
---|
29 | |
---|
30 | /*************************** Function Prototypes *****************************/ |
---|
31 | |
---|
32 | void dl_list_init(dl_list* list); |
---|
33 | void dl_entry_insertAfter(dl_list* list, dl_entry* entry, dl_entry* entry_new); |
---|
34 | void dl_entry_insertBefore(dl_list* list, dl_entry* entry, dl_entry* entry_new); |
---|
35 | void dl_entry_insertBeginning(dl_list* list, dl_entry* entry_new); |
---|
36 | void dl_entry_insertEnd(dl_list* list, dl_entry* entry_new); |
---|
37 | int dl_entry_move(dl_list * src_list, dl_list * dest_list, u16 num_entries); |
---|
38 | void dl_entry_remove(dl_list* list, dl_entry* entry); |
---|
39 | u32 dl_list_copy_data(u8* dest, dl_entry* start_entry, dl_entry** end_entry, u32 num_entries, u32 offset_per_entry, u32 size_per_entry); |
---|
40 | |
---|
41 | |
---|
42 | #endif /* WLAN_MAC_DL_LIST_H_ */ |
---|