1daeccac2SArend van Spriel // SPDX-License-Identifier: ISC 205491d2cSKalle Valo /* 305491d2cSKalle Valo * Copyright (c) 2014 Broadcom Corporation 405491d2cSKalle Valo */ 505491d2cSKalle Valo #ifndef _BRCMF_FEATURE_H 605491d2cSKalle Valo #define _BRCMF_FEATURE_H 705491d2cSKalle Valo 805491d2cSKalle Valo /* 905491d2cSKalle Valo * Features: 1005491d2cSKalle Valo * 1105491d2cSKalle Valo * MBSS: multiple BSSID support (eg. guest network in AP mode). 1205491d2cSKalle Valo * MCHAN: multi-channel for concurrent P2P. 1305491d2cSKalle Valo * PNO: preferred network offload. 1405491d2cSKalle Valo * WOWL: Wake-On-WLAN. 1505491d2cSKalle Valo * P2P: peer-to-peer 168abffd81SHante Meuleman * RSDB: Real Simultaneous Dual Band 17a7b82d47SHante Meuleman * TDLS: Tunneled Direct Link Setup 1848ed16e8SHante Meuleman * SCAN_RANDOM_MAC: Random MAC during (net detect) scheduled scan. 195c22fb85SHante Meuleman * WOWL_ND: WOWL net detect (PNO) 205c22fb85SHante Meuleman * WOWL_GTK: (WOWL) GTK rekeying offload 2173ef9e64SHante Meuleman * WOWL_ARP_ND: ARP and Neighbor Discovery offload support during WOWL. 22240d61a9SHante Meuleman * MFP: 802.11w Management Frame Protection. 239fe929aaSArend van Spriel * GSCAN: enhanced scan offload feature. 24b8a64f0eSArend van Spriel * FWSUP: Firmware supplicant. 2501f69dfaSRafał Miłecki * MONITOR: firmware can pass monitor packets to host. 2620f2c5faSRafał Miłecki * MONITOR_FLAG: firmware flags monitor packets. 27e63410acSRafał Miłecki * MONITOR_FMT_RADIOTAP: firmware provides monitor packets with radiotap header 28e665988bSRafał Miłecki * MONITOR_FMT_HW_RX_HDR: firmware provides monitor packets with hw/ucode header 29011a56a3SArend van Spriel * DOT11H: firmware supports 802.11h 303b1e0a7bSChung-Hsien Hsu * SAE: simultaneous authentication of equals 3105491d2cSKalle Valo */ 3205491d2cSKalle Valo #define BRCMF_FEAT_LIST \ 3305491d2cSKalle Valo BRCMF_FEAT_DEF(MBSS) \ 3405491d2cSKalle Valo BRCMF_FEAT_DEF(MCHAN) \ 3505491d2cSKalle Valo BRCMF_FEAT_DEF(PNO) \ 3605491d2cSKalle Valo BRCMF_FEAT_DEF(WOWL) \ 378abffd81SHante Meuleman BRCMF_FEAT_DEF(P2P) \ 38a7b82d47SHante Meuleman BRCMF_FEAT_DEF(RSDB) \ 3948ed16e8SHante Meuleman BRCMF_FEAT_DEF(TDLS) \ 405c22fb85SHante Meuleman BRCMF_FEAT_DEF(SCAN_RANDOM_MAC) \ 415c22fb85SHante Meuleman BRCMF_FEAT_DEF(WOWL_ND) \ 4273ef9e64SHante Meuleman BRCMF_FEAT_DEF(WOWL_GTK) \ 43240d61a9SHante Meuleman BRCMF_FEAT_DEF(WOWL_ARP_ND) \ 449fe929aaSArend van Spriel BRCMF_FEAT_DEF(MFP) \ 45b8a64f0eSArend van Spriel BRCMF_FEAT_DEF(GSCAN) \ 4601f69dfaSRafał Miłecki BRCMF_FEAT_DEF(FWSUP) \ 47e63410acSRafał Miłecki BRCMF_FEAT_DEF(MONITOR) \ 4820f2c5faSRafał Miłecki BRCMF_FEAT_DEF(MONITOR_FLAG) \ 49e665988bSRafał Miłecki BRCMF_FEAT_DEF(MONITOR_FMT_RADIOTAP) \ 50011a56a3SArend van Spriel BRCMF_FEAT_DEF(MONITOR_FMT_HW_RX_HDR) \ 513b1e0a7bSChung-Hsien Hsu BRCMF_FEAT_DEF(DOT11H) \ 523b1e0a7bSChung-Hsien Hsu BRCMF_FEAT_DEF(SAE) 538abffd81SHante Meuleman 5405491d2cSKalle Valo /* 5505491d2cSKalle Valo * Quirks: 5605491d2cSKalle Valo * 5705491d2cSKalle Valo * AUTO_AUTH: workaround needed for automatic authentication type. 5805491d2cSKalle Valo * NEED_MPC: driver needs to disable MPC during scanning operation. 5905491d2cSKalle Valo */ 6005491d2cSKalle Valo #define BRCMF_QUIRK_LIST \ 6105491d2cSKalle Valo BRCMF_QUIRK_DEF(AUTO_AUTH) \ 6205491d2cSKalle Valo BRCMF_QUIRK_DEF(NEED_MPC) 6305491d2cSKalle Valo 6405491d2cSKalle Valo #define BRCMF_FEAT_DEF(_f) \ 6505491d2cSKalle Valo BRCMF_FEAT_ ## _f, 6605491d2cSKalle Valo /* 6705491d2cSKalle Valo * expand feature list to enumeration. 6805491d2cSKalle Valo */ 6905491d2cSKalle Valo enum brcmf_feat_id { 7005491d2cSKalle Valo BRCMF_FEAT_LIST 7105491d2cSKalle Valo BRCMF_FEAT_LAST 7205491d2cSKalle Valo }; 7305491d2cSKalle Valo #undef BRCMF_FEAT_DEF 7405491d2cSKalle Valo 7505491d2cSKalle Valo #define BRCMF_QUIRK_DEF(_q) \ 7605491d2cSKalle Valo BRCMF_FEAT_QUIRK_ ## _q, 7705491d2cSKalle Valo /* 7805491d2cSKalle Valo * expand quirk list to enumeration. 7905491d2cSKalle Valo */ 8005491d2cSKalle Valo enum brcmf_feat_quirk { 8105491d2cSKalle Valo BRCMF_QUIRK_LIST 8205491d2cSKalle Valo BRCMF_FEAT_QUIRK_LAST 8305491d2cSKalle Valo }; 8405491d2cSKalle Valo #undef BRCMF_QUIRK_DEF 8505491d2cSKalle Valo 8605491d2cSKalle Valo /** 8705491d2cSKalle Valo * brcmf_feat_attach() - determine features and quirks. 8805491d2cSKalle Valo * 8905491d2cSKalle Valo * @drvr: driver instance. 9005491d2cSKalle Valo */ 9105491d2cSKalle Valo void brcmf_feat_attach(struct brcmf_pub *drvr); 9205491d2cSKalle Valo 9305491d2cSKalle Valo /** 9434789d0cSArend Van Spriel * brcmf_feat_debugfs_create() - create debugfs entries. 9534789d0cSArend Van Spriel * 9634789d0cSArend Van Spriel * @drvr: driver instance. 9734789d0cSArend Van Spriel */ 9834789d0cSArend Van Spriel void brcmf_feat_debugfs_create(struct brcmf_pub *drvr); 9934789d0cSArend Van Spriel 10034789d0cSArend Van Spriel /** 10105491d2cSKalle Valo * brcmf_feat_is_enabled() - query feature. 10205491d2cSKalle Valo * 10305491d2cSKalle Valo * @ifp: interface instance. 10405491d2cSKalle Valo * @id: feature id to check. 10505491d2cSKalle Valo * 10605491d2cSKalle Valo * Return: true is feature is enabled; otherwise false. 10705491d2cSKalle Valo */ 10805491d2cSKalle Valo bool brcmf_feat_is_enabled(struct brcmf_if *ifp, enum brcmf_feat_id id); 10905491d2cSKalle Valo 11005491d2cSKalle Valo /** 11105491d2cSKalle Valo * brcmf_feat_is_quirk_enabled() - query chip quirk. 11205491d2cSKalle Valo * 11305491d2cSKalle Valo * @ifp: interface instance. 11405491d2cSKalle Valo * @quirk: quirk id to check. 11505491d2cSKalle Valo * 11605491d2cSKalle Valo * Return: true is quirk is enabled; otherwise false. 11705491d2cSKalle Valo */ 11805491d2cSKalle Valo bool brcmf_feat_is_quirk_enabled(struct brcmf_if *ifp, 11905491d2cSKalle Valo enum brcmf_feat_quirk quirk); 12005491d2cSKalle Valo 12105491d2cSKalle Valo #endif /* _BRCMF_FEATURE_H */ 122