diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/wmm.h')
-rw-r--r-- | drivers/net/wireless/mwifiex/wmm.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/wmm.h b/drivers/net/wireless/mwifiex/wmm.h new file mode 100644 index 00000000000..241f1b0b77f --- /dev/null +++ b/drivers/net/wireless/mwifiex/wmm.h | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | * Marvell Wireless LAN device driver: WMM | ||
3 | * | ||
4 | * Copyright (C) 2011, Marvell International Ltd. | ||
5 | * | ||
6 | * This software file (the "File") is distributed by Marvell International | ||
7 | * Ltd. under the terms of the GNU General Public License Version 2, June 1991 | ||
8 | * (the "License"). You may use, redistribute and/or modify this File in | ||
9 | * accordance with the terms and conditions of the License, a copy of which | ||
10 | * is available by writing to the Free Software Foundation, Inc., | ||
11 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the | ||
12 | * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. | ||
13 | * | ||
14 | * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE | ||
15 | * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE | ||
16 | * ARE EXPRESSLY DISCLAIMED. The License provides additional details about | ||
17 | * this warranty disclaimer. | ||
18 | */ | ||
19 | |||
20 | #ifndef _MWIFIEX_WMM_H_ | ||
21 | #define _MWIFIEX_WMM_H_ | ||
22 | |||
23 | enum ieee_types_wmm_aciaifsn_bitmasks { | ||
24 | MWIFIEX_AIFSN = (BIT(0) | BIT(1) | BIT(2) | BIT(3)), | ||
25 | MWIFIEX_ACM = BIT(4), | ||
26 | MWIFIEX_ACI = (BIT(5) | BIT(6)), | ||
27 | }; | ||
28 | |||
29 | enum ieee_types_wmm_ecw_bitmasks { | ||
30 | MWIFIEX_ECW_MIN = (BIT(0) | BIT(1) | BIT(2) | BIT(3)), | ||
31 | MWIFIEX_ECW_MAX = (BIT(4) | BIT(5) | BIT(6) | BIT(7)), | ||
32 | }; | ||
33 | |||
34 | /* | ||
35 | * This function retrieves the TID of the given RA list. | ||
36 | */ | ||
37 | static inline int | ||
38 | mwifiex_get_tid(struct mwifiex_adapter *adapter, | ||
39 | struct mwifiex_ra_list_tbl *ptr) | ||
40 | { | ||
41 | struct sk_buff *skb; | ||
42 | |||
43 | if (skb_queue_empty(&ptr->skb_head)) | ||
44 | return 0; | ||
45 | |||
46 | skb = skb_peek(&ptr->skb_head); | ||
47 | |||
48 | return skb->priority; | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * This function gets the length of a list. | ||
53 | */ | ||
54 | static inline int | ||
55 | mwifiex_wmm_list_len(struct mwifiex_adapter *adapter, struct list_head *head) | ||
56 | { | ||
57 | struct list_head *pos; | ||
58 | int count = 0; | ||
59 | |||
60 | list_for_each(pos, head) | ||
61 | ++count; | ||
62 | |||
63 | return count; | ||
64 | } | ||
65 | |||
66 | /* | ||
67 | * This function checks if a RA list is empty or not. | ||
68 | */ | ||
69 | static inline u8 | ||
70 | mwifiex_wmm_is_ra_list_empty(struct mwifiex_adapter *adapter, | ||
71 | struct list_head *ra_list_hhead) | ||
72 | { | ||
73 | struct mwifiex_ra_list_tbl *ra_list; | ||
74 | int is_list_empty; | ||
75 | |||
76 | list_for_each_entry(ra_list, ra_list_hhead, list) { | ||
77 | is_list_empty = skb_queue_empty(&ra_list->skb_head); | ||
78 | if (!is_list_empty) | ||
79 | return false; | ||
80 | } | ||
81 | |||
82 | return true; | ||
83 | } | ||
84 | |||
85 | void mwifiex_wmm_add_buf_txqueue(struct mwifiex_adapter *adapter, | ||
86 | struct sk_buff *skb); | ||
87 | void mwifiex_ralist_add(struct mwifiex_private *priv, u8 *ra); | ||
88 | |||
89 | int mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter); | ||
90 | void mwifiex_wmm_process_tx(struct mwifiex_adapter *adapter); | ||
91 | int mwifiex_is_ralist_valid(struct mwifiex_private *priv, | ||
92 | struct mwifiex_ra_list_tbl *ra_list, int tid); | ||
93 | |||
94 | u8 mwifiex_wmm_compute_drv_pkt_delay(struct mwifiex_private *priv, | ||
95 | const struct sk_buff *skb); | ||
96 | void mwifiex_wmm_init(struct mwifiex_adapter *adapter); | ||
97 | |||
98 | extern u32 mwifiex_wmm_process_association_req(struct mwifiex_private *priv, | ||
99 | u8 **assoc_buf, | ||
100 | struct ieee_types_wmm_parameter | ||
101 | *wmmie, | ||
102 | struct ieee80211_ht_cap | ||
103 | *htcap); | ||
104 | |||
105 | void mwifiex_wmm_setup_queue_priorities(struct mwifiex_private *priv, | ||
106 | struct ieee_types_wmm_parameter | ||
107 | *wmm_ie); | ||
108 | void mwifiex_wmm_setup_ac_downgrade(struct mwifiex_private *priv); | ||
109 | extern int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, | ||
110 | const struct host_cmd_ds_command *resp); | ||
111 | |||
112 | #endif /* !_MWIFIEX_WMM_H_ */ | ||