]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
drivers: add explicit interrupt.h includes
[mirror_ubuntu-artful-kernel.git] / drivers / net / wireless / broadcom / brcm80211 / brcmfmac / feature.h
CommitLineData
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
48ed16e8 29 * SCAN_RANDOM_MAC: Random MAC during (net detect) scheduled scan.
5c22fb85
HM
30 * WOWL_ND: WOWL net detect (PNO)
31 * WOWL_GTK: (WOWL) GTK rekeying offload
73ef9e64 32 * WOWL_ARP_ND: ARP and Neighbor Discovery offload support during WOWL.
240d61a9 33 * MFP: 802.11w Management Frame Protection.
c08437b4
AS
34 */
35#define BRCMF_FEAT_LIST \
a44aa400 36 BRCMF_FEAT_DEF(MBSS) \
4eb3af7c 37 BRCMF_FEAT_DEF(MCHAN) \
7a7a87dc 38 BRCMF_FEAT_DEF(PNO) \
2b560d71 39 BRCMF_FEAT_DEF(WOWL) \
8abffd81 40 BRCMF_FEAT_DEF(P2P) \
a7b82d47 41 BRCMF_FEAT_DEF(RSDB) \
48ed16e8 42 BRCMF_FEAT_DEF(TDLS) \
5c22fb85
HM
43 BRCMF_FEAT_DEF(SCAN_RANDOM_MAC) \
44 BRCMF_FEAT_DEF(WOWL_ND) \
73ef9e64 45 BRCMF_FEAT_DEF(WOWL_GTK) \
240d61a9
HM
46 BRCMF_FEAT_DEF(WOWL_ARP_ND) \
47 BRCMF_FEAT_DEF(MFP)
8abffd81 48
c08437b4
AS
49/*
50 * Quirks:
51 *
52 * AUTO_AUTH: workaround needed for automatic authentication type.
53 * NEED_MPC: driver needs to disable MPC during scanning operation.
54 */
55#define BRCMF_QUIRK_LIST \
56 BRCMF_QUIRK_DEF(AUTO_AUTH) \
57 BRCMF_QUIRK_DEF(NEED_MPC)
58
59#define BRCMF_FEAT_DEF(_f) \
60 BRCMF_FEAT_ ## _f,
61/*
62 * expand feature list to enumeration.
63 */
64enum brcmf_feat_id {
65 BRCMF_FEAT_LIST
66 BRCMF_FEAT_LAST
67};
68#undef BRCMF_FEAT_DEF
69
70#define BRCMF_QUIRK_DEF(_q) \
71 BRCMF_FEAT_QUIRK_ ## _q,
72/*
73 * expand quirk list to enumeration.
74 */
75enum brcmf_feat_quirk {
76 BRCMF_QUIRK_LIST
77 BRCMF_FEAT_QUIRK_LAST
78};
79#undef BRCMF_QUIRK_DEF
80
81/**
82 * brcmf_feat_attach() - determine features and quirks.
83 *
84 * @drvr: driver instance.
85 */
86void brcmf_feat_attach(struct brcmf_pub *drvr);
87
88/**
89 * brcmf_feat_is_enabled() - query feature.
90 *
91 * @ifp: interface instance.
92 * @id: feature id to check.
93 *
94 * Return: true is feature is enabled; otherwise false.
95 */
96bool brcmf_feat_is_enabled(struct brcmf_if *ifp, enum brcmf_feat_id id);
97
98/**
99 * brcmf_feat_is_quirk_enabled() - query chip quirk.
100 *
101 * @ifp: interface instance.
102 * @quirk: quirk id to check.
103 *
104 * Return: true is quirk is enabled; otherwise false.
105 */
106bool brcmf_feat_is_quirk_enabled(struct brcmf_if *ifp,
107 enum brcmf_feat_quirk quirk);
108
109#endif /* _BRCMF_FEATURE_H */