18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (c) 2010 Broadcom Corporation
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
118c2ecf20Sopenharmony_ci * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
138c2ecf20Sopenharmony_ci * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
148c2ecf20Sopenharmony_ci * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
158c2ecf20Sopenharmony_ci */
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#ifndef _BRCM_PUB_H_
188c2ecf20Sopenharmony_ci#define _BRCM_PUB_H_
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#include <linux/bcma/bcma.h>
218c2ecf20Sopenharmony_ci#include <brcmu_wifi.h>
228c2ecf20Sopenharmony_ci#include "types.h"
238c2ecf20Sopenharmony_ci#include "defs.h"
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#define	BRCMS_NUMRATES	16	/* max # of rates in a rateset */
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci/* phy types */
288c2ecf20Sopenharmony_ci#define	PHY_TYPE_A	0	/* Phy type A */
298c2ecf20Sopenharmony_ci#define	PHY_TYPE_G	2	/* Phy type G */
308c2ecf20Sopenharmony_ci#define	PHY_TYPE_N	4	/* Phy type N */
318c2ecf20Sopenharmony_ci#define	PHY_TYPE_LP	5	/* Phy type Low Power A/B/G */
328c2ecf20Sopenharmony_ci#define	PHY_TYPE_SSN	6	/* Phy type Single Stream N */
338c2ecf20Sopenharmony_ci#define	PHY_TYPE_LCN	8	/* Phy type Single Stream N */
348c2ecf20Sopenharmony_ci#define	PHY_TYPE_LCNXN	9	/* Phy type 2-stream N */
358c2ecf20Sopenharmony_ci#define	PHY_TYPE_HT	7	/* Phy type 3-Stream N */
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci/* bw */
388c2ecf20Sopenharmony_ci#define BRCMS_10_MHZ	10	/* 10Mhz nphy channel bandwidth */
398c2ecf20Sopenharmony_ci#define BRCMS_20_MHZ	20	/* 20Mhz nphy channel bandwidth */
408c2ecf20Sopenharmony_ci#define BRCMS_40_MHZ	40	/* 40Mhz nphy channel bandwidth */
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci#define	BRCMS_RSSI_MINVAL	-200	/* Low value, e.g. for forcing roam */
438c2ecf20Sopenharmony_ci#define	BRCMS_RSSI_NO_SIGNAL	-91	/* NDIS RSSI link quality cutoffs */
448c2ecf20Sopenharmony_ci#define	BRCMS_RSSI_VERY_LOW	-80	/* Very low quality cutoffs */
458c2ecf20Sopenharmony_ci#define	BRCMS_RSSI_LOW		-70	/* Low quality cutoffs */
468c2ecf20Sopenharmony_ci#define	BRCMS_RSSI_GOOD		-68	/* Good quality cutoffs */
478c2ecf20Sopenharmony_ci#define	BRCMS_RSSI_VERY_GOOD	-58	/* Very good quality cutoffs */
488c2ecf20Sopenharmony_ci#define	BRCMS_RSSI_EXCELLENT	-57	/* Excellent quality cutoffs */
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci/* a large TX Power as an init value to factor out of min() calculations,
518c2ecf20Sopenharmony_ci * keep low enough to fit in an s8, units are .25 dBm
528c2ecf20Sopenharmony_ci */
538c2ecf20Sopenharmony_ci#define BRCMS_TXPWR_MAX		(127)	/* ~32 dBm = 1,500 mW */
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci/* rate related definitions */
568c2ecf20Sopenharmony_ci#define	BRCMS_RATE_FLAG	0x80	/* Flag to indicate it is a basic rate */
578c2ecf20Sopenharmony_ci#define	BRCMS_RATE_MASK	0x7f	/* Rate value mask w/o basic rate flag */
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci/* legacy rx Antenna diversity for SISO rates */
608c2ecf20Sopenharmony_ci#define	ANT_RX_DIV_FORCE_0	0	/* Use antenna 0 */
618c2ecf20Sopenharmony_ci#define	ANT_RX_DIV_FORCE_1	1	/* Use antenna 1 */
628c2ecf20Sopenharmony_ci#define	ANT_RX_DIV_START_1	2	/* Choose starting with 1 */
638c2ecf20Sopenharmony_ci#define	ANT_RX_DIV_START_0	3	/* Choose starting with 0 */
648c2ecf20Sopenharmony_ci#define	ANT_RX_DIV_ENABLE	3	/* APHY bbConfig Enable RX Diversity */
658c2ecf20Sopenharmony_ci/* default antdiv setting */
668c2ecf20Sopenharmony_ci#define ANT_RX_DIV_DEF		ANT_RX_DIV_START_0
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci/* legacy rx Antenna diversity for SISO rates */
698c2ecf20Sopenharmony_ci/* Tx on antenna 0, "legacy term Main" */
708c2ecf20Sopenharmony_ci#define ANT_TX_FORCE_0		0
718c2ecf20Sopenharmony_ci/* Tx on antenna 1, "legacy term Aux" */
728c2ecf20Sopenharmony_ci#define ANT_TX_FORCE_1		1
738c2ecf20Sopenharmony_ci/* Tx on phy's last good Rx antenna */
748c2ecf20Sopenharmony_ci#define ANT_TX_LAST_RX		3
758c2ecf20Sopenharmony_ci/* driver's default tx antenna setting */
768c2ecf20Sopenharmony_ci#define ANT_TX_DEF		3
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci/* Tx Chain values */
798c2ecf20Sopenharmony_ci/* def bitmap of txchain */
808c2ecf20Sopenharmony_ci#define TXCHAIN_DEF		0x1
818c2ecf20Sopenharmony_ci/* default bitmap of tx chains for nphy */
828c2ecf20Sopenharmony_ci#define TXCHAIN_DEF_NPHY	0x3
838c2ecf20Sopenharmony_ci/* default bitmap of tx chains for nphy */
848c2ecf20Sopenharmony_ci#define TXCHAIN_DEF_HTPHY	0x7
858c2ecf20Sopenharmony_ci/* def bitmap of rxchain */
868c2ecf20Sopenharmony_ci#define RXCHAIN_DEF		0x1
878c2ecf20Sopenharmony_ci/* default bitmap of rx chains for nphy */
888c2ecf20Sopenharmony_ci#define RXCHAIN_DEF_NPHY	0x3
898c2ecf20Sopenharmony_ci/* default bitmap of rx chains for nphy */
908c2ecf20Sopenharmony_ci#define RXCHAIN_DEF_HTPHY	0x7
918c2ecf20Sopenharmony_ci/* no antenna switch */
928c2ecf20Sopenharmony_ci#define ANTSWITCH_NONE		0
938c2ecf20Sopenharmony_ci/* antenna switch on 4321CB2, 2of3 */
948c2ecf20Sopenharmony_ci#define ANTSWITCH_TYPE_1	1
958c2ecf20Sopenharmony_ci/* antenna switch on 4321MPCI, 2of3 */
968c2ecf20Sopenharmony_ci#define ANTSWITCH_TYPE_2	2
978c2ecf20Sopenharmony_ci/* antenna switch on 4322, 2of3 */
988c2ecf20Sopenharmony_ci#define ANTSWITCH_TYPE_3	3
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ci#define RXBUFSZ		PKTBUFSZ
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci#define MAX_STREAMS_SUPPORTED	4	/* max number of streams supported */
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_cistruct brcm_rateset {
1058c2ecf20Sopenharmony_ci	/* # rates in this set */
1068c2ecf20Sopenharmony_ci	u32 count;
1078c2ecf20Sopenharmony_ci	/* rates in 500kbps units w/hi bit set if basic */
1088c2ecf20Sopenharmony_ci	u8 rates[WL_NUMRATES];
1098c2ecf20Sopenharmony_ci};
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_cistruct brcms_c_rateset {
1128c2ecf20Sopenharmony_ci	uint count;		/* number of rates in rates[] */
1138c2ecf20Sopenharmony_ci	 /* rates in 500kbps units w/hi bit set if basic */
1148c2ecf20Sopenharmony_ci	u8 rates[BRCMS_NUMRATES];
1158c2ecf20Sopenharmony_ci	u8 htphy_membership;	/* HT PHY Membership */
1168c2ecf20Sopenharmony_ci	u8 mcs[MCSSET_LEN];	/* supported mcs index bit map */
1178c2ecf20Sopenharmony_ci};
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci/* All the HT-specific default advertised capabilities (including AMPDU)
1208c2ecf20Sopenharmony_ci * should be grouped here at one place
1218c2ecf20Sopenharmony_ci */
1228c2ecf20Sopenharmony_ci#define AMPDU_DEF_MPDU_DENSITY	6	/* default mpdu density (110 ==> 4us) */
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci/* wlc internal bss_info */
1258c2ecf20Sopenharmony_cistruct brcms_bss_info {
1268c2ecf20Sopenharmony_ci	u8 BSSID[ETH_ALEN];	/* network BSSID */
1278c2ecf20Sopenharmony_ci	u16 flags;		/* flags for internal attributes */
1288c2ecf20Sopenharmony_ci	u8 SSID_len;		/* the length of SSID */
1298c2ecf20Sopenharmony_ci	u8 SSID[32];		/* SSID string */
1308c2ecf20Sopenharmony_ci	s16 RSSI;		/* receive signal strength (in dBm) */
1318c2ecf20Sopenharmony_ci	s16 SNR;		/* receive signal SNR in dB */
1328c2ecf20Sopenharmony_ci	u16 beacon_period;	/* units are Kusec */
1338c2ecf20Sopenharmony_ci	u16 chanspec;	/* Channel num, bw, ctrl_sb and band */
1348c2ecf20Sopenharmony_ci	struct brcms_c_rateset rateset;	/* supported rates */
1358c2ecf20Sopenharmony_ci};
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci#define MAC80211_PROMISC_BCNS	(1 << 0)
1388c2ecf20Sopenharmony_ci#define MAC80211_SCAN		(1 << 1)
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ci/*
1418c2ecf20Sopenharmony_ci * Public portion of common driver state structure.
1428c2ecf20Sopenharmony_ci * The wlc handle points at this.
1438c2ecf20Sopenharmony_ci */
1448c2ecf20Sopenharmony_cistruct brcms_pub {
1458c2ecf20Sopenharmony_ci	struct brcms_c_info *wlc;
1468c2ecf20Sopenharmony_ci	struct ieee80211_hw *ieee_hw;
1478c2ecf20Sopenharmony_ci	struct scb_ampdu *global_ampdu;
1488c2ecf20Sopenharmony_ci	uint mac80211_state;
1498c2ecf20Sopenharmony_ci	uint unit;		/* device instance number */
1508c2ecf20Sopenharmony_ci	uint corerev;		/* core revision */
1518c2ecf20Sopenharmony_ci	struct si_pub *sih;	/* SI handle (cookie for siutils calls) */
1528c2ecf20Sopenharmony_ci	bool up;		/* interface up and running */
1538c2ecf20Sopenharmony_ci	bool hw_off;		/* HW is off */
1548c2ecf20Sopenharmony_ci	bool hw_up;		/* one time hw up/down */
1558c2ecf20Sopenharmony_ci	bool _piomode;		/* true if pio mode */
1568c2ecf20Sopenharmony_ci	uint _nbands;		/* # bands supported */
1578c2ecf20Sopenharmony_ci	uint now;		/* # elapsed seconds */
1588c2ecf20Sopenharmony_ci
1598c2ecf20Sopenharmony_ci	bool delayed_down;	/* down delayed */
1608c2ecf20Sopenharmony_ci	bool associated;	/* true:part of [I]BSS, false: not */
1618c2ecf20Sopenharmony_ci	/* (union of stas_associated, aps_associated) */
1628c2ecf20Sopenharmony_ci	bool _ampdu;		/* ampdu enabled or not */
1638c2ecf20Sopenharmony_ci	u8 _n_enab;		/* bitmap of 11N + HT support */
1648c2ecf20Sopenharmony_ci
1658c2ecf20Sopenharmony_ci	u8 cur_etheraddr[ETH_ALEN];	/* our local ethernet address */
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci	u32 radio_disabled;	/* bit vector for radio disabled reasons */
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci	u16 boardrev;	/* version # of particular board */
1708c2ecf20Sopenharmony_ci	u8 sromrev;		/* version # of the srom */
1718c2ecf20Sopenharmony_ci	char srom_ccode[BRCM_CNTRY_BUF_SZ];	/* Country Code in SROM */
1728c2ecf20Sopenharmony_ci	u32 boardflags;	/* Board specific flags from srom */
1738c2ecf20Sopenharmony_ci	u32 boardflags2;	/* More board flags if sromrev >= 4 */
1748c2ecf20Sopenharmony_ci	bool phy_11ncapable;	/* the PHY/HW is capable of 802.11N */
1758c2ecf20Sopenharmony_ci
1768c2ecf20Sopenharmony_ci	struct wl_cnt *_cnt;	/* low-level counters in driver */
1778c2ecf20Sopenharmony_ci	struct dentry *dbgfs_dir;
1788c2ecf20Sopenharmony_ci};
1798c2ecf20Sopenharmony_ci
1808c2ecf20Sopenharmony_cienum wlc_par_id {
1818c2ecf20Sopenharmony_ci	IOV_MPC = 1,
1828c2ecf20Sopenharmony_ci	IOV_RTSTHRESH,
1838c2ecf20Sopenharmony_ci	IOV_QTXPOWER,
1848c2ecf20Sopenharmony_ci	IOV_BCN_LI_BCN		/* Beacon listen interval in # of beacons */
1858c2ecf20Sopenharmony_ci};
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci/***********************************************
1888c2ecf20Sopenharmony_ci * Feature-related macros to optimize out code *
1898c2ecf20Sopenharmony_ci * *********************************************
1908c2ecf20Sopenharmony_ci */
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ci#define ENAB_1x1	0x01
1938c2ecf20Sopenharmony_ci#define ENAB_2x2	0x02
1948c2ecf20Sopenharmony_ci#define ENAB_3x3	0x04
1958c2ecf20Sopenharmony_ci#define ENAB_4x4	0x08
1968c2ecf20Sopenharmony_ci#define SUPPORT_11N	(ENAB_1x1|ENAB_2x2)
1978c2ecf20Sopenharmony_ci#define SUPPORT_HT	(ENAB_1x1|ENAB_2x2|ENAB_3x3)
1988c2ecf20Sopenharmony_ci
1998c2ecf20Sopenharmony_ci/* WL11N Support */
2008c2ecf20Sopenharmony_ci#define AMPDU_AGG_HOST	1
2018c2ecf20Sopenharmony_ci
2028c2ecf20Sopenharmony_ci/* network protection config */
2038c2ecf20Sopenharmony_ci#define	BRCMS_PROT_G_SPEC		1	/* SPEC g protection */
2048c2ecf20Sopenharmony_ci#define	BRCMS_PROT_G_OVR		2	/* SPEC g prot override */
2058c2ecf20Sopenharmony_ci#define	BRCMS_PROT_G_USER		3	/* gmode specified by user */
2068c2ecf20Sopenharmony_ci#define	BRCMS_PROT_OVERLAP	4	/* overlap */
2078c2ecf20Sopenharmony_ci#define	BRCMS_PROT_N_USER		10	/* nmode specified by user */
2088c2ecf20Sopenharmony_ci#define	BRCMS_PROT_N_CFG		11	/* n protection */
2098c2ecf20Sopenharmony_ci#define	BRCMS_PROT_N_CFG_OVR	12	/* n protection override */
2108c2ecf20Sopenharmony_ci#define	BRCMS_PROT_N_NONGF	13	/* non-GF protection */
2118c2ecf20Sopenharmony_ci#define	BRCMS_PROT_N_NONGF_OVR	14	/* non-GF protection override */
2128c2ecf20Sopenharmony_ci#define	BRCMS_PROT_N_PAM_OVR	15	/* n preamble override */
2138c2ecf20Sopenharmony_ci#define	BRCMS_PROT_N_OBSS		16	/* non-HT OBSS present */
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_ci/*
2168c2ecf20Sopenharmony_ci * 54g modes (basic bits may still be overridden)
2178c2ecf20Sopenharmony_ci *
2188c2ecf20Sopenharmony_ci * GMODE_LEGACY_B
2198c2ecf20Sopenharmony_ci *	Rateset: 1b, 2b, 5.5, 11
2208c2ecf20Sopenharmony_ci *	Preamble: Long
2218c2ecf20Sopenharmony_ci *	Shortslot: Off
2228c2ecf20Sopenharmony_ci * GMODE_AUTO
2238c2ecf20Sopenharmony_ci *	Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
2248c2ecf20Sopenharmony_ci *	Extended Rateset: 6, 9, 12, 48
2258c2ecf20Sopenharmony_ci *	Preamble: Long
2268c2ecf20Sopenharmony_ci *	Shortslot: Auto
2278c2ecf20Sopenharmony_ci * GMODE_ONLY
2288c2ecf20Sopenharmony_ci *	Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
2298c2ecf20Sopenharmony_ci *	Extended Rateset: 6b, 9, 12b, 48
2308c2ecf20Sopenharmony_ci *	Preamble: Short required
2318c2ecf20Sopenharmony_ci *	Shortslot: Auto
2328c2ecf20Sopenharmony_ci * GMODE_B_DEFERRED
2338c2ecf20Sopenharmony_ci *	Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
2348c2ecf20Sopenharmony_ci *	Extended Rateset: 6, 9, 12, 48
2358c2ecf20Sopenharmony_ci *	Preamble: Long
2368c2ecf20Sopenharmony_ci *	Shortslot: On
2378c2ecf20Sopenharmony_ci * GMODE_PERFORMANCE
2388c2ecf20Sopenharmony_ci *	Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
2398c2ecf20Sopenharmony_ci *	Preamble: Short required
2408c2ecf20Sopenharmony_ci *	Shortslot: On and required
2418c2ecf20Sopenharmony_ci * GMODE_LRS
2428c2ecf20Sopenharmony_ci *	Rateset: 1b, 2b, 5.5b, 11b
2438c2ecf20Sopenharmony_ci *	Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
2448c2ecf20Sopenharmony_ci *	Preamble: Long
2458c2ecf20Sopenharmony_ci *	Shortslot: Auto
2468c2ecf20Sopenharmony_ci */
2478c2ecf20Sopenharmony_ci#define GMODE_LEGACY_B		0
2488c2ecf20Sopenharmony_ci#define GMODE_AUTO		1
2498c2ecf20Sopenharmony_ci#define GMODE_ONLY		2
2508c2ecf20Sopenharmony_ci#define GMODE_B_DEFERRED	3
2518c2ecf20Sopenharmony_ci#define GMODE_PERFORMANCE	4
2528c2ecf20Sopenharmony_ci#define GMODE_LRS		5
2538c2ecf20Sopenharmony_ci#define GMODE_MAX		6
2548c2ecf20Sopenharmony_ci
2558c2ecf20Sopenharmony_ci/* MCS values greater than this enable multiple streams */
2568c2ecf20Sopenharmony_ci#define HIGHEST_SINGLE_STREAM_MCS	7
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_ci#define	MAXBANDS		2	/* Maximum #of bands */
2598c2ecf20Sopenharmony_ci
2608c2ecf20Sopenharmony_ci/* max number of antenna configurations */
2618c2ecf20Sopenharmony_ci#define ANT_SELCFG_MAX		4
2628c2ecf20Sopenharmony_ci
2638c2ecf20Sopenharmony_cistruct brcms_antselcfg {
2648c2ecf20Sopenharmony_ci	u8 ant_config[ANT_SELCFG_MAX];	/* antenna configuration */
2658c2ecf20Sopenharmony_ci	u8 num_antcfg;	/* number of available antenna configurations */
2668c2ecf20Sopenharmony_ci};
2678c2ecf20Sopenharmony_ci
2688c2ecf20Sopenharmony_ci/* common functions for every port */
2698c2ecf20Sopenharmony_cistruct brcms_c_info *brcms_c_attach(struct brcms_info *wl,
2708c2ecf20Sopenharmony_ci				    struct bcma_device *core, uint unit,
2718c2ecf20Sopenharmony_ci				    bool piomode, uint *perr);
2728c2ecf20Sopenharmony_ciuint brcms_c_detach(struct brcms_c_info *wlc);
2738c2ecf20Sopenharmony_ciint brcms_c_up(struct brcms_c_info *wlc);
2748c2ecf20Sopenharmony_ciuint brcms_c_down(struct brcms_c_info *wlc);
2758c2ecf20Sopenharmony_ci
2768c2ecf20Sopenharmony_cibool brcms_c_chipmatch(struct bcma_device *core);
2778c2ecf20Sopenharmony_civoid brcms_c_init(struct brcms_c_info *wlc, bool mute_tx);
2788c2ecf20Sopenharmony_civoid brcms_c_reset(struct brcms_c_info *wlc);
2798c2ecf20Sopenharmony_ci
2808c2ecf20Sopenharmony_civoid brcms_c_intrson(struct brcms_c_info *wlc);
2818c2ecf20Sopenharmony_ciu32 brcms_c_intrsoff(struct brcms_c_info *wlc);
2828c2ecf20Sopenharmony_civoid brcms_c_intrsrestore(struct brcms_c_info *wlc, u32 macintmask);
2838c2ecf20Sopenharmony_cibool brcms_c_intrsupd(struct brcms_c_info *wlc);
2848c2ecf20Sopenharmony_cibool brcms_c_isr(struct brcms_c_info *wlc);
2858c2ecf20Sopenharmony_cibool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded);
2868c2ecf20Sopenharmony_cibool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu,
2878c2ecf20Sopenharmony_ci			      struct ieee80211_hw *hw);
2888c2ecf20Sopenharmony_cibool brcms_c_aggregatable(struct brcms_c_info *wlc, u8 tid);
2898c2ecf20Sopenharmony_civoid brcms_c_protection_upd(struct brcms_c_info *wlc, uint idx, int val);
2908c2ecf20Sopenharmony_ciint brcms_c_get_header_len(void);
2918c2ecf20Sopenharmony_civoid brcms_c_set_addrmatch(struct brcms_c_info *wlc, int match_reg_offset,
2928c2ecf20Sopenharmony_ci			   const u8 *addr);
2938c2ecf20Sopenharmony_civoid brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
2948c2ecf20Sopenharmony_ci			   const struct ieee80211_tx_queue_params *arg,
2958c2ecf20Sopenharmony_ci			   bool suspend);
2968c2ecf20Sopenharmony_cistruct brcms_pub *brcms_c_pub(struct brcms_c_info *wlc);
2978c2ecf20Sopenharmony_civoid brcms_c_ampdu_flush(struct brcms_c_info *wlc, struct ieee80211_sta *sta,
2988c2ecf20Sopenharmony_ci			 u16 tid);
2998c2ecf20Sopenharmony_civoid brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
3008c2ecf20Sopenharmony_ci				  u8 ba_wsize, uint max_rx_ampdu_bytes);
3018c2ecf20Sopenharmony_ciint brcms_c_module_register(struct brcms_pub *pub, const char *name,
3028c2ecf20Sopenharmony_ci			    struct brcms_info *hdl,
3038c2ecf20Sopenharmony_ci			    int (*down_fn)(void *handle));
3048c2ecf20Sopenharmony_ciint brcms_c_module_unregister(struct brcms_pub *pub, const char *name,
3058c2ecf20Sopenharmony_ci			      struct brcms_info *hdl);
3068c2ecf20Sopenharmony_civoid brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc);
3078c2ecf20Sopenharmony_civoid brcms_c_enable_mac(struct brcms_c_info *wlc);
3088c2ecf20Sopenharmony_civoid brcms_c_associate_upd(struct brcms_c_info *wlc, bool state);
3098c2ecf20Sopenharmony_civoid brcms_c_scan_start(struct brcms_c_info *wlc);
3108c2ecf20Sopenharmony_civoid brcms_c_scan_stop(struct brcms_c_info *wlc);
3118c2ecf20Sopenharmony_ciint brcms_c_get_curband(struct brcms_c_info *wlc);
3128c2ecf20Sopenharmony_ciint brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel);
3138c2ecf20Sopenharmony_ciint brcms_c_set_rate_limit(struct brcms_c_info *wlc, u16 srl, u16 lrl);
3148c2ecf20Sopenharmony_civoid brcms_c_get_current_rateset(struct brcms_c_info *wlc,
3158c2ecf20Sopenharmony_ci				 struct brcm_rateset *currs);
3168c2ecf20Sopenharmony_ciint brcms_c_set_rateset(struct brcms_c_info *wlc, struct brcm_rateset *rs);
3178c2ecf20Sopenharmony_ciint brcms_c_set_beacon_period(struct brcms_c_info *wlc, u16 period);
3188c2ecf20Sopenharmony_ciu16 brcms_c_get_phy_type(struct brcms_c_info *wlc, int phyidx);
3198c2ecf20Sopenharmony_civoid brcms_c_set_shortslot_override(struct brcms_c_info *wlc,
3208c2ecf20Sopenharmony_ci				    s8 sslot_override);
3218c2ecf20Sopenharmony_civoid brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval);
3228c2ecf20Sopenharmony_ciu64 brcms_c_tsf_get(struct brcms_c_info *wlc);
3238c2ecf20Sopenharmony_civoid brcms_c_tsf_set(struct brcms_c_info *wlc, u64 tsf);
3248c2ecf20Sopenharmony_ciint brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr);
3258c2ecf20Sopenharmony_ciint brcms_c_get_tx_power(struct brcms_c_info *wlc);
3268c2ecf20Sopenharmony_cibool brcms_c_check_radio_disabled(struct brcms_c_info *wlc);
3278c2ecf20Sopenharmony_civoid brcms_c_mute(struct brcms_c_info *wlc, bool on);
3288c2ecf20Sopenharmony_cibool brcms_c_tx_flush_completed(struct brcms_c_info *wlc);
3298c2ecf20Sopenharmony_civoid brcms_c_start_station(struct brcms_c_info *wlc, u8 *addr);
3308c2ecf20Sopenharmony_civoid brcms_c_start_ap(struct brcms_c_info *wlc, u8 *addr, const u8 *bssid,
3318c2ecf20Sopenharmony_ci		      u8 *ssid, size_t ssid_len);
3328c2ecf20Sopenharmony_civoid brcms_c_start_adhoc(struct brcms_c_info *wlc, u8 *addr);
3338c2ecf20Sopenharmony_civoid brcms_c_update_beacon(struct brcms_c_info *wlc);
3348c2ecf20Sopenharmony_civoid brcms_c_set_new_beacon(struct brcms_c_info *wlc, struct sk_buff *beacon,
3358c2ecf20Sopenharmony_ci			    u16 tim_offset, u16 dtim_period);
3368c2ecf20Sopenharmony_civoid brcms_c_set_new_probe_resp(struct brcms_c_info *wlc,
3378c2ecf20Sopenharmony_ci				struct sk_buff *probe_resp);
3388c2ecf20Sopenharmony_civoid brcms_c_enable_probe_resp(struct brcms_c_info *wlc, bool enable);
3398c2ecf20Sopenharmony_civoid brcms_c_set_ssid(struct brcms_c_info *wlc, u8 *ssid, size_t ssid_len);
3408c2ecf20Sopenharmony_ci
3418c2ecf20Sopenharmony_ci#endif				/* _BRCM_PUB_H_ */
342