2014-07-12 06:49:39 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 Broadcom Corporation
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
|
|
|
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
|
|
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
#ifndef _BRCMF_FEATURE_H
|
|
|
|
#define _BRCMF_FEATURE_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Features:
|
|
|
|
*
|
2015-04-14 18:10:26 +00:00
|
|
|
* MBSS: multiple BSSID support (eg. guest network in AP mode).
|
2014-07-12 06:49:39 +00:00
|
|
|
* MCHAN: multi-channel for concurrent P2P.
|
2015-04-14 18:10:27 +00:00
|
|
|
* PNO: preferred network offload.
|
2015-04-14 18:10:26 +00:00
|
|
|
* WOWL: Wake-On-WLAN.
|
2015-06-10 22:12:17 +00:00
|
|
|
* P2P: peer-to-peer
|
2015-10-29 19:33:16 +00:00
|
|
|
* RSDB: Real Simultaneous Dual Band
|
2015-12-10 12:43:04 +00:00
|
|
|
* TDLS: Tunneled Direct Link Setup
|
2016-01-02 08:41:38 +00:00
|
|
|
* SCAN_RANDOM_MAC: Random MAC during (net detect) scheduled scan.
|
2016-02-17 10:27:03 +00:00
|
|
|
* WOWL_ND: WOWL net detect (PNO)
|
|
|
|
* WOWL_GTK: (WOWL) GTK rekeying offload
|
2016-02-17 10:27:05 +00:00
|
|
|
* WOWL_ARP_ND: ARP and Neighbor Discovery offload support during WOWL.
|
2016-02-17 10:27:10 +00:00
|
|
|
* MFP: 802.11w Management Frame Protection.
|
2017-04-21 12:05:04 +00:00
|
|
|
* GSCAN: enhanced scan offload feature.
|
2017-06-09 12:08:47 +00:00
|
|
|
* FWSUP: Firmware supplicant.
|
2018-06-24 19:44:35 +00:00
|
|
|
* MONITOR: firmware can pass monitor packets to host.
|
2018-06-24 19:44:36 +00:00
|
|
|
* MONITOR_FMT_RADIOTAP: firmware provides monitor packets with radiotap header
|
2014-07-12 06:49:39 +00:00
|
|
|
*/
|
|
|
|
#define BRCMF_FEAT_LIST \
|
2014-12-03 20:05:33 +00:00
|
|
|
BRCMF_FEAT_DEF(MBSS) \
|
2014-09-30 08:23:18 +00:00
|
|
|
BRCMF_FEAT_DEF(MCHAN) \
|
2015-04-14 18:10:27 +00:00
|
|
|
BRCMF_FEAT_DEF(PNO) \
|
2015-06-10 22:12:17 +00:00
|
|
|
BRCMF_FEAT_DEF(WOWL) \
|
2015-10-29 19:33:16 +00:00
|
|
|
BRCMF_FEAT_DEF(P2P) \
|
2015-12-10 12:43:04 +00:00
|
|
|
BRCMF_FEAT_DEF(RSDB) \
|
2016-01-02 08:41:38 +00:00
|
|
|
BRCMF_FEAT_DEF(TDLS) \
|
2016-02-17 10:27:03 +00:00
|
|
|
BRCMF_FEAT_DEF(SCAN_RANDOM_MAC) \
|
|
|
|
BRCMF_FEAT_DEF(WOWL_ND) \
|
2016-02-17 10:27:05 +00:00
|
|
|
BRCMF_FEAT_DEF(WOWL_GTK) \
|
2016-02-17 10:27:10 +00:00
|
|
|
BRCMF_FEAT_DEF(WOWL_ARP_ND) \
|
2017-04-21 12:05:04 +00:00
|
|
|
BRCMF_FEAT_DEF(MFP) \
|
2017-06-09 12:08:47 +00:00
|
|
|
BRCMF_FEAT_DEF(GSCAN) \
|
2018-06-24 19:44:35 +00:00
|
|
|
BRCMF_FEAT_DEF(FWSUP) \
|
2018-06-24 19:44:36 +00:00
|
|
|
BRCMF_FEAT_DEF(MONITOR) \
|
|
|
|
BRCMF_FEAT_DEF(MONITOR_FMT_RADIOTAP)
|
2015-10-29 19:33:16 +00:00
|
|
|
|
2014-07-12 06:49:39 +00:00
|
|
|
/*
|
|
|
|
* Quirks:
|
|
|
|
*
|
|
|
|
* AUTO_AUTH: workaround needed for automatic authentication type.
|
|
|
|
* NEED_MPC: driver needs to disable MPC during scanning operation.
|
|
|
|
*/
|
|
|
|
#define BRCMF_QUIRK_LIST \
|
|
|
|
BRCMF_QUIRK_DEF(AUTO_AUTH) \
|
|
|
|
BRCMF_QUIRK_DEF(NEED_MPC)
|
|
|
|
|
|
|
|
#define BRCMF_FEAT_DEF(_f) \
|
|
|
|
BRCMF_FEAT_ ## _f,
|
|
|
|
/*
|
|
|
|
* expand feature list to enumeration.
|
|
|
|
*/
|
|
|
|
enum brcmf_feat_id {
|
|
|
|
BRCMF_FEAT_LIST
|
|
|
|
BRCMF_FEAT_LAST
|
|
|
|
};
|
|
|
|
#undef BRCMF_FEAT_DEF
|
|
|
|
|
|
|
|
#define BRCMF_QUIRK_DEF(_q) \
|
|
|
|
BRCMF_FEAT_QUIRK_ ## _q,
|
|
|
|
/*
|
|
|
|
* expand quirk list to enumeration.
|
|
|
|
*/
|
|
|
|
enum brcmf_feat_quirk {
|
|
|
|
BRCMF_QUIRK_LIST
|
|
|
|
BRCMF_FEAT_QUIRK_LAST
|
|
|
|
};
|
|
|
|
#undef BRCMF_QUIRK_DEF
|
|
|
|
|
|
|
|
/**
|
|
|
|
* brcmf_feat_attach() - determine features and quirks.
|
|
|
|
*
|
|
|
|
* @drvr: driver instance.
|
|
|
|
*/
|
|
|
|
void brcmf_feat_attach(struct brcmf_pub *drvr);
|
|
|
|
|
2018-03-22 20:28:24 +00:00
|
|
|
/**
|
|
|
|
* brcmf_feat_debugfs_create() - create debugfs entries.
|
|
|
|
*
|
|
|
|
* @drvr: driver instance.
|
|
|
|
*/
|
|
|
|
void brcmf_feat_debugfs_create(struct brcmf_pub *drvr);
|
|
|
|
|
2014-07-12 06:49:39 +00:00
|
|
|
/**
|
|
|
|
* brcmf_feat_is_enabled() - query feature.
|
|
|
|
*
|
|
|
|
* @ifp: interface instance.
|
|
|
|
* @id: feature id to check.
|
|
|
|
*
|
|
|
|
* Return: true is feature is enabled; otherwise false.
|
|
|
|
*/
|
|
|
|
bool brcmf_feat_is_enabled(struct brcmf_if *ifp, enum brcmf_feat_id id);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* brcmf_feat_is_quirk_enabled() - query chip quirk.
|
|
|
|
*
|
|
|
|
* @ifp: interface instance.
|
|
|
|
* @quirk: quirk id to check.
|
|
|
|
*
|
|
|
|
* Return: true is quirk is enabled; otherwise false.
|
|
|
|
*/
|
|
|
|
bool brcmf_feat_is_quirk_enabled(struct brcmf_if *ifp,
|
|
|
|
enum brcmf_feat_quirk quirk);
|
|
|
|
|
|
|
|
#endif /* _BRCMF_FEATURE_H */
|