2 * Copyright (c) 2014 Broadcom Corporation
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.
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.
16 #ifndef _BRCMF_FEATURE_H
17 #define _BRCMF_FEATURE_H
22 * MBSS: multiple BSSID support (eg. guest network in AP mode).
23 * MCHAN: multi-channel for concurrent P2P.
24 * PNO: preferred network offload.
27 * RSDB: Real Simultaneous Dual Band
28 * TDLS: Tunneled Direct Link Setup
29 * SCAN_RANDOM_MAC: Random MAC during (net detect) scheduled scan.
31 #define BRCMF_FEAT_LIST \
32 BRCMF_FEAT_DEF(MBSS) \
33 BRCMF_FEAT_DEF(MCHAN) \
35 BRCMF_FEAT_DEF(WOWL) \
37 BRCMF_FEAT_DEF(RSDB) \
38 BRCMF_FEAT_DEF(TDLS) \
39 BRCMF_FEAT_DEF(SCAN_RANDOM_MAC)
44 * AUTO_AUTH: workaround needed for automatic authentication type.
45 * NEED_MPC: driver needs to disable MPC during scanning operation.
47 #define BRCMF_QUIRK_LIST \
48 BRCMF_QUIRK_DEF(AUTO_AUTH) \
49 BRCMF_QUIRK_DEF(NEED_MPC)
51 #define BRCMF_FEAT_DEF(_f) \
54 * expand feature list to enumeration.
62 #define BRCMF_QUIRK_DEF(_q) \
63 BRCMF_FEAT_QUIRK_ ## _q,
65 * expand quirk list to enumeration.
67 enum brcmf_feat_quirk {
71 #undef BRCMF_QUIRK_DEF
74 * brcmf_feat_attach() - determine features and quirks.
76 * @drvr: driver instance.
78 void brcmf_feat_attach(struct brcmf_pub *drvr);
81 * brcmf_feat_is_enabled() - query feature.
83 * @ifp: interface instance.
84 * @id: feature id to check.
86 * Return: true is feature is enabled; otherwise false.
88 bool brcmf_feat_is_enabled(struct brcmf_if *ifp, enum brcmf_feat_id id);
91 * brcmf_feat_is_quirk_enabled() - query chip quirk.
93 * @ifp: interface instance.
94 * @quirk: quirk id to check.
96 * Return: true is quirk is enabled; otherwise false.
98 bool brcmf_feat_is_quirk_enabled(struct brcmf_if *ifp,
99 enum brcmf_feat_quirk quirk);
101 #endif /* _BRCMF_FEATURE_H */