105491d2cSKalle Valo /* 205491d2cSKalle Valo * Copyright (c) 2014 Broadcom Corporation 305491d2cSKalle Valo * 405491d2cSKalle Valo * Permission to use, copy, modify, and/or distribute this software for any 505491d2cSKalle Valo * purpose with or without fee is hereby granted, provided that the above 605491d2cSKalle Valo * copyright notice and this permission notice appear in all copies. 705491d2cSKalle Valo * 805491d2cSKalle Valo * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 905491d2cSKalle Valo * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1005491d2cSKalle Valo * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 1105491d2cSKalle Valo * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1205491d2cSKalle Valo * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 1305491d2cSKalle Valo * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 1405491d2cSKalle Valo * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1505491d2cSKalle Valo */ 1605491d2cSKalle Valo #ifndef _BRCMF_FEATURE_H 1705491d2cSKalle Valo #define _BRCMF_FEATURE_H 1805491d2cSKalle Valo 1905491d2cSKalle Valo /* 2005491d2cSKalle Valo * Features: 2105491d2cSKalle Valo * 2205491d2cSKalle Valo * MBSS: multiple BSSID support (eg. guest network in AP mode). 2305491d2cSKalle Valo * MCHAN: multi-channel for concurrent P2P. 2405491d2cSKalle Valo * PNO: preferred network offload. 2505491d2cSKalle Valo * WOWL: Wake-On-WLAN. 2605491d2cSKalle Valo * P2P: peer-to-peer 278abffd81SHante Meuleman * RSDB: Real Simultaneous Dual Band 28a7b82d47SHante Meuleman * TDLS: Tunneled Direct Link Setup 2948ed16e8SHante Meuleman * SCAN_RANDOM_MAC: Random MAC during (net detect) scheduled scan. 305c22fb85SHante Meuleman * WOWL_ND: WOWL net detect (PNO) 315c22fb85SHante Meuleman * WOWL_GTK: (WOWL) GTK rekeying offload 3273ef9e64SHante Meuleman * WOWL_ARP_ND: ARP and Neighbor Discovery offload support during WOWL. 33240d61a9SHante Meuleman * MFP: 802.11w Management Frame Protection. 349fe929aaSArend van Spriel * GSCAN: enhanced scan offload feature. 35b8a64f0eSArend van Spriel * FWSUP: Firmware supplicant. 3601f69dfaSRafał Miłecki * MONITOR: firmware can pass monitor packets to host. 3705491d2cSKalle Valo */ 3805491d2cSKalle Valo #define BRCMF_FEAT_LIST \ 3905491d2cSKalle Valo BRCMF_FEAT_DEF(MBSS) \ 4005491d2cSKalle Valo BRCMF_FEAT_DEF(MCHAN) \ 4105491d2cSKalle Valo BRCMF_FEAT_DEF(PNO) \ 4205491d2cSKalle Valo BRCMF_FEAT_DEF(WOWL) \ 438abffd81SHante Meuleman BRCMF_FEAT_DEF(P2P) \ 44a7b82d47SHante Meuleman BRCMF_FEAT_DEF(RSDB) \ 4548ed16e8SHante Meuleman BRCMF_FEAT_DEF(TDLS) \ 465c22fb85SHante Meuleman BRCMF_FEAT_DEF(SCAN_RANDOM_MAC) \ 475c22fb85SHante Meuleman BRCMF_FEAT_DEF(WOWL_ND) \ 4873ef9e64SHante Meuleman BRCMF_FEAT_DEF(WOWL_GTK) \ 49240d61a9SHante Meuleman BRCMF_FEAT_DEF(WOWL_ARP_ND) \ 509fe929aaSArend van Spriel BRCMF_FEAT_DEF(MFP) \ 51b8a64f0eSArend van Spriel BRCMF_FEAT_DEF(GSCAN) \ 5201f69dfaSRafał Miłecki BRCMF_FEAT_DEF(FWSUP) \ 5301f69dfaSRafał Miłecki BRCMF_FEAT_DEF(MONITOR) 548abffd81SHante Meuleman 5505491d2cSKalle Valo /* 5605491d2cSKalle Valo * Quirks: 5705491d2cSKalle Valo * 5805491d2cSKalle Valo * AUTO_AUTH: workaround needed for automatic authentication type. 5905491d2cSKalle Valo * NEED_MPC: driver needs to disable MPC during scanning operation. 6005491d2cSKalle Valo */ 6105491d2cSKalle Valo #define BRCMF_QUIRK_LIST \ 6205491d2cSKalle Valo BRCMF_QUIRK_DEF(AUTO_AUTH) \ 6305491d2cSKalle Valo BRCMF_QUIRK_DEF(NEED_MPC) 6405491d2cSKalle Valo 6505491d2cSKalle Valo #define BRCMF_FEAT_DEF(_f) \ 6605491d2cSKalle Valo BRCMF_FEAT_ ## _f, 6705491d2cSKalle Valo /* 6805491d2cSKalle Valo * expand feature list to enumeration. 6905491d2cSKalle Valo */ 7005491d2cSKalle Valo enum brcmf_feat_id { 7105491d2cSKalle Valo BRCMF_FEAT_LIST 7205491d2cSKalle Valo BRCMF_FEAT_LAST 7305491d2cSKalle Valo }; 7405491d2cSKalle Valo #undef BRCMF_FEAT_DEF 7505491d2cSKalle Valo 7605491d2cSKalle Valo #define BRCMF_QUIRK_DEF(_q) \ 7705491d2cSKalle Valo BRCMF_FEAT_QUIRK_ ## _q, 7805491d2cSKalle Valo /* 7905491d2cSKalle Valo * expand quirk list to enumeration. 8005491d2cSKalle Valo */ 8105491d2cSKalle Valo enum brcmf_feat_quirk { 8205491d2cSKalle Valo BRCMF_QUIRK_LIST 8305491d2cSKalle Valo BRCMF_FEAT_QUIRK_LAST 8405491d2cSKalle Valo }; 8505491d2cSKalle Valo #undef BRCMF_QUIRK_DEF 8605491d2cSKalle Valo 8705491d2cSKalle Valo /** 8805491d2cSKalle Valo * brcmf_feat_attach() - determine features and quirks. 8905491d2cSKalle Valo * 9005491d2cSKalle Valo * @drvr: driver instance. 9105491d2cSKalle Valo */ 9205491d2cSKalle Valo void brcmf_feat_attach(struct brcmf_pub *drvr); 9305491d2cSKalle Valo 9405491d2cSKalle Valo /** 9534789d0cSArend Van Spriel * brcmf_feat_debugfs_create() - create debugfs entries. 9634789d0cSArend Van Spriel * 9734789d0cSArend Van Spriel * @drvr: driver instance. 9834789d0cSArend Van Spriel */ 9934789d0cSArend Van Spriel void brcmf_feat_debugfs_create(struct brcmf_pub *drvr); 10034789d0cSArend Van Spriel 10134789d0cSArend Van Spriel /** 10205491d2cSKalle Valo * brcmf_feat_is_enabled() - query feature. 10305491d2cSKalle Valo * 10405491d2cSKalle Valo * @ifp: interface instance. 10505491d2cSKalle Valo * @id: feature id to check. 10605491d2cSKalle Valo * 10705491d2cSKalle Valo * Return: true is feature is enabled; otherwise false. 10805491d2cSKalle Valo */ 10905491d2cSKalle Valo bool brcmf_feat_is_enabled(struct brcmf_if *ifp, enum brcmf_feat_id id); 11005491d2cSKalle Valo 11105491d2cSKalle Valo /** 11205491d2cSKalle Valo * brcmf_feat_is_quirk_enabled() - query chip quirk. 11305491d2cSKalle Valo * 11405491d2cSKalle Valo * @ifp: interface instance. 11505491d2cSKalle Valo * @quirk: quirk id to check. 11605491d2cSKalle Valo * 11705491d2cSKalle Valo * Return: true is quirk is enabled; otherwise false. 11805491d2cSKalle Valo */ 11905491d2cSKalle Valo bool brcmf_feat_is_quirk_enabled(struct brcmf_if *ifp, 12005491d2cSKalle Valo enum brcmf_feat_quirk quirk); 12105491d2cSKalle Valo 12205491d2cSKalle Valo #endif /* _BRCMF_FEATURE_H */ 123