Commit | Line | Data |
---|---|---|
c08437b4 AS |
1 | /* |
2 | * Copyright (c) 2014 Broadcom Corporation | |
3 | * | |
4 | * Permission to use, copy, modify, and/or distribute this software for any | |
5 | * purpose with or without fee is hereby granted, provided that the above | |
6 | * copyright notice and this permission notice appear in all copies. | |
7 | * | |
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | |
11 | * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION | |
13 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
15 | */ | |
16 | #ifndef _BRCMF_FEATURE_H | |
17 | #define _BRCMF_FEATURE_H | |
18 | ||
19 | /* | |
20 | * Features: | |
21 | * | |
28d96e5e | 22 | * MBSS: multiple BSSID support (eg. guest network in AP mode). |
c08437b4 | 23 | * MCHAN: multi-channel for concurrent P2P. |
7a7a87dc | 24 | * PNO: preferred network offload. |
28d96e5e | 25 | * WOWL: Wake-On-WLAN. |
2b560d71 | 26 | * P2P: peer-to-peer |
8abffd81 | 27 | * RSDB: Real Simultaneous Dual Band |
a7b82d47 | 28 | * TDLS: Tunneled Direct Link Setup |
c08437b4 AS |
29 | */ |
30 | #define BRCMF_FEAT_LIST \ | |
a44aa400 | 31 | BRCMF_FEAT_DEF(MBSS) \ |
4eb3af7c | 32 | BRCMF_FEAT_DEF(MCHAN) \ |
7a7a87dc | 33 | BRCMF_FEAT_DEF(PNO) \ |
2b560d71 | 34 | BRCMF_FEAT_DEF(WOWL) \ |
8abffd81 | 35 | BRCMF_FEAT_DEF(P2P) \ |
a7b82d47 HM |
36 | BRCMF_FEAT_DEF(RSDB) \ |
37 | BRCMF_FEAT_DEF(TDLS) | |
8abffd81 | 38 | |
c08437b4 AS |
39 | /* |
40 | * Quirks: | |
41 | * | |
42 | * AUTO_AUTH: workaround needed for automatic authentication type. | |
43 | * NEED_MPC: driver needs to disable MPC during scanning operation. | |
44 | */ | |
45 | #define BRCMF_QUIRK_LIST \ | |
46 | BRCMF_QUIRK_DEF(AUTO_AUTH) \ | |
47 | BRCMF_QUIRK_DEF(NEED_MPC) | |
48 | ||
49 | #define BRCMF_FEAT_DEF(_f) \ | |
50 | BRCMF_FEAT_ ## _f, | |
51 | /* | |
52 | * expand feature list to enumeration. | |
53 | */ | |
54 | enum brcmf_feat_id { | |
55 | BRCMF_FEAT_LIST | |
56 | BRCMF_FEAT_LAST | |
57 | }; | |
58 | #undef BRCMF_FEAT_DEF | |
59 | ||
60 | #define BRCMF_QUIRK_DEF(_q) \ | |
61 | BRCMF_FEAT_QUIRK_ ## _q, | |
62 | /* | |
63 | * expand quirk list to enumeration. | |
64 | */ | |
65 | enum brcmf_feat_quirk { | |
66 | BRCMF_QUIRK_LIST | |
67 | BRCMF_FEAT_QUIRK_LAST | |
68 | }; | |
69 | #undef BRCMF_QUIRK_DEF | |
70 | ||
71 | /** | |
72 | * brcmf_feat_attach() - determine features and quirks. | |
73 | * | |
74 | * @drvr: driver instance. | |
75 | */ | |
76 | void brcmf_feat_attach(struct brcmf_pub *drvr); | |
77 | ||
78 | /** | |
79 | * brcmf_feat_is_enabled() - query feature. | |
80 | * | |
81 | * @ifp: interface instance. | |
82 | * @id: feature id to check. | |
83 | * | |
84 | * Return: true is feature is enabled; otherwise false. | |
85 | */ | |
86 | bool brcmf_feat_is_enabled(struct brcmf_if *ifp, enum brcmf_feat_id id); | |
87 | ||
88 | /** | |
89 | * brcmf_feat_is_quirk_enabled() - query chip quirk. | |
90 | * | |
91 | * @ifp: interface instance. | |
92 | * @quirk: quirk id to check. | |
93 | * | |
94 | * Return: true is quirk is enabled; otherwise false. | |
95 | */ | |
96 | bool brcmf_feat_is_quirk_enabled(struct brcmf_if *ifp, | |
97 | enum brcmf_feat_quirk quirk); | |
98 | ||
99 | #endif /* _BRCMF_FEATURE_H */ |