Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wmm.h
Go to the documentation of this file.
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 
24  MWIFIEX_AIFSN = (BIT(0) | BIT(1) | BIT(2) | BIT(3)),
26  MWIFIEX_ACI = (BIT(5) | BIT(6)),
27 };
28 
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_ra_list_tbl *ptr)
39 {
40  struct sk_buff *skb;
41 
42  if (skb_queue_empty(&ptr->skb_head))
43  return 0;
44 
45  skb = skb_peek(&ptr->skb_head);
46 
47  return skb->priority;
48 }
49 
50 /*
51  * This function gets the length of a list.
52  */
53 static inline int
54 mwifiex_wmm_list_len(struct list_head *head)
55 {
56  struct list_head *pos;
57  int count = 0;
58 
59  list_for_each(pos, head)
60  ++count;
61 
62  return count;
63 }
64 
65 /*
66  * This function checks if a RA list is empty or not.
67  */
68 static inline u8
69 mwifiex_wmm_is_ra_list_empty(struct list_head *ra_list_hhead)
70 {
71  struct mwifiex_ra_list_tbl *ra_list;
72  int is_list_empty;
73 
74  list_for_each_entry(ra_list, ra_list_hhead, list) {
75  is_list_empty = skb_queue_empty(&ra_list->skb_head);
76  if (!is_list_empty)
77  return false;
78  }
79 
80  return true;
81 }
82 
84  struct sk_buff *skb);
86 
90  struct mwifiex_ra_list_tbl *ra_list, int tid);
91 
93  const struct sk_buff *skb);
95 
97  u8 **assoc_buf,
99  *wmmie,
100  struct ieee80211_ht_cap
101  *htcap);
102 
105  *wmm_ie);
108  const struct host_cmd_ds_command *resp);
109 
110 #endif /* !_MWIFIEX_WMM_H_ */