xref: /openbmc/linux/drivers/net/wireless/broadcom/brcm80211/brcmsmac/pub.h (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
105491d2cSKalle Valo /*
205491d2cSKalle Valo  * Copyright (c) 2010 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 
1705491d2cSKalle Valo #ifndef _BRCM_PUB_H_
1805491d2cSKalle Valo #define _BRCM_PUB_H_
1905491d2cSKalle Valo 
2005491d2cSKalle Valo #include <linux/bcma/bcma.h>
2105491d2cSKalle Valo #include <brcmu_wifi.h>
2205491d2cSKalle Valo #include "types.h"
2305491d2cSKalle Valo #include "defs.h"
2405491d2cSKalle Valo 
2505491d2cSKalle Valo #define	BRCMS_NUMRATES	16	/* max # of rates in a rateset */
2605491d2cSKalle Valo 
2705491d2cSKalle Valo /* phy types */
2805491d2cSKalle Valo #define	PHY_TYPE_A	0	/* Phy type A */
2905491d2cSKalle Valo #define	PHY_TYPE_G	2	/* Phy type G */
3005491d2cSKalle Valo #define	PHY_TYPE_N	4	/* Phy type N */
3105491d2cSKalle Valo #define	PHY_TYPE_LP	5	/* Phy type Low Power A/B/G */
3205491d2cSKalle Valo #define	PHY_TYPE_SSN	6	/* Phy type Single Stream N */
3305491d2cSKalle Valo #define	PHY_TYPE_LCN	8	/* Phy type Single Stream N */
3405491d2cSKalle Valo #define	PHY_TYPE_LCNXN	9	/* Phy type 2-stream N */
3505491d2cSKalle Valo #define	PHY_TYPE_HT	7	/* Phy type 3-Stream N */
3605491d2cSKalle Valo 
3705491d2cSKalle Valo /* bw */
3805491d2cSKalle Valo #define BRCMS_10_MHZ	10	/* 10Mhz nphy channel bandwidth */
3905491d2cSKalle Valo #define BRCMS_20_MHZ	20	/* 20Mhz nphy channel bandwidth */
4005491d2cSKalle Valo #define BRCMS_40_MHZ	40	/* 40Mhz nphy channel bandwidth */
4105491d2cSKalle Valo 
4205491d2cSKalle Valo #define	BRCMS_RSSI_MINVAL	-200	/* Low value, e.g. for forcing roam */
4305491d2cSKalle Valo #define	BRCMS_RSSI_NO_SIGNAL	-91	/* NDIS RSSI link quality cutoffs */
4405491d2cSKalle Valo #define	BRCMS_RSSI_VERY_LOW	-80	/* Very low quality cutoffs */
4505491d2cSKalle Valo #define	BRCMS_RSSI_LOW		-70	/* Low quality cutoffs */
4605491d2cSKalle Valo #define	BRCMS_RSSI_GOOD		-68	/* Good quality cutoffs */
4705491d2cSKalle Valo #define	BRCMS_RSSI_VERY_GOOD	-58	/* Very good quality cutoffs */
4805491d2cSKalle Valo #define	BRCMS_RSSI_EXCELLENT	-57	/* Excellent quality cutoffs */
4905491d2cSKalle Valo 
5005491d2cSKalle Valo /* a large TX Power as an init value to factor out of min() calculations,
5105491d2cSKalle Valo  * keep low enough to fit in an s8, units are .25 dBm
5205491d2cSKalle Valo  */
5305491d2cSKalle Valo #define BRCMS_TXPWR_MAX		(127)	/* ~32 dBm = 1,500 mW */
5405491d2cSKalle Valo 
5505491d2cSKalle Valo /* rate related definitions */
5605491d2cSKalle Valo #define	BRCMS_RATE_FLAG	0x80	/* Flag to indicate it is a basic rate */
5705491d2cSKalle Valo #define	BRCMS_RATE_MASK	0x7f	/* Rate value mask w/o basic rate flag */
5805491d2cSKalle Valo 
5905491d2cSKalle Valo /* legacy rx Antenna diversity for SISO rates */
6005491d2cSKalle Valo #define	ANT_RX_DIV_FORCE_0	0	/* Use antenna 0 */
6105491d2cSKalle Valo #define	ANT_RX_DIV_FORCE_1	1	/* Use antenna 1 */
6205491d2cSKalle Valo #define	ANT_RX_DIV_START_1	2	/* Choose starting with 1 */
6305491d2cSKalle Valo #define	ANT_RX_DIV_START_0	3	/* Choose starting with 0 */
6405491d2cSKalle Valo #define	ANT_RX_DIV_ENABLE	3	/* APHY bbConfig Enable RX Diversity */
6505491d2cSKalle Valo /* default antdiv setting */
6605491d2cSKalle Valo #define ANT_RX_DIV_DEF		ANT_RX_DIV_START_0
6705491d2cSKalle Valo 
6805491d2cSKalle Valo /* legacy rx Antenna diversity for SISO rates */
6905491d2cSKalle Valo /* Tx on antenna 0, "legacy term Main" */
7005491d2cSKalle Valo #define ANT_TX_FORCE_0		0
7105491d2cSKalle Valo /* Tx on antenna 1, "legacy term Aux" */
7205491d2cSKalle Valo #define ANT_TX_FORCE_1		1
7305491d2cSKalle Valo /* Tx on phy's last good Rx antenna */
7405491d2cSKalle Valo #define ANT_TX_LAST_RX		3
7505491d2cSKalle Valo /* driver's default tx antenna setting */
7605491d2cSKalle Valo #define ANT_TX_DEF		3
7705491d2cSKalle Valo 
7805491d2cSKalle Valo /* Tx Chain values */
7905491d2cSKalle Valo /* def bitmap of txchain */
8005491d2cSKalle Valo #define TXCHAIN_DEF		0x1
8105491d2cSKalle Valo /* default bitmap of tx chains for nphy */
8205491d2cSKalle Valo #define TXCHAIN_DEF_NPHY	0x3
8305491d2cSKalle Valo /* default bitmap of tx chains for nphy */
8405491d2cSKalle Valo #define TXCHAIN_DEF_HTPHY	0x7
8505491d2cSKalle Valo /* def bitmap of rxchain */
8605491d2cSKalle Valo #define RXCHAIN_DEF		0x1
8705491d2cSKalle Valo /* default bitmap of rx chains for nphy */
8805491d2cSKalle Valo #define RXCHAIN_DEF_NPHY	0x3
8905491d2cSKalle Valo /* default bitmap of rx chains for nphy */
9005491d2cSKalle Valo #define RXCHAIN_DEF_HTPHY	0x7
9105491d2cSKalle Valo /* no antenna switch */
9205491d2cSKalle Valo #define ANTSWITCH_NONE		0
9305491d2cSKalle Valo /* antenna switch on 4321CB2, 2of3 */
9405491d2cSKalle Valo #define ANTSWITCH_TYPE_1	1
9505491d2cSKalle Valo /* antenna switch on 4321MPCI, 2of3 */
9605491d2cSKalle Valo #define ANTSWITCH_TYPE_2	2
9705491d2cSKalle Valo /* antenna switch on 4322, 2of3 */
9805491d2cSKalle Valo #define ANTSWITCH_TYPE_3	3
9905491d2cSKalle Valo 
10005491d2cSKalle Valo #define RXBUFSZ		PKTBUFSZ
10105491d2cSKalle Valo 
10205491d2cSKalle Valo #define MAX_STREAMS_SUPPORTED	4	/* max number of streams supported */
10305491d2cSKalle Valo 
10405491d2cSKalle Valo struct brcm_rateset {
10505491d2cSKalle Valo 	/* # rates in this set */
10605491d2cSKalle Valo 	u32 count;
10705491d2cSKalle Valo 	/* rates in 500kbps units w/hi bit set if basic */
10805491d2cSKalle Valo 	u8 rates[WL_NUMRATES];
10905491d2cSKalle Valo };
11005491d2cSKalle Valo 
11105491d2cSKalle Valo struct brcms_c_rateset {
11205491d2cSKalle Valo 	uint count;		/* number of rates in rates[] */
11305491d2cSKalle Valo 	 /* rates in 500kbps units w/hi bit set if basic */
11405491d2cSKalle Valo 	u8 rates[BRCMS_NUMRATES];
11505491d2cSKalle Valo 	u8 htphy_membership;	/* HT PHY Membership */
11605491d2cSKalle Valo 	u8 mcs[MCSSET_LEN];	/* supported mcs index bit map */
11705491d2cSKalle Valo };
11805491d2cSKalle Valo 
11905491d2cSKalle Valo /* All the HT-specific default advertised capabilities (including AMPDU)
12005491d2cSKalle Valo  * should be grouped here at one place
12105491d2cSKalle Valo  */
12205491d2cSKalle Valo #define AMPDU_DEF_MPDU_DENSITY	6	/* default mpdu density (110 ==> 4us) */
12305491d2cSKalle Valo 
12405491d2cSKalle Valo /* wlc internal bss_info */
12505491d2cSKalle Valo struct brcms_bss_info {
12605491d2cSKalle Valo 	u8 BSSID[ETH_ALEN];	/* network BSSID */
12705491d2cSKalle Valo 	u16 flags;		/* flags for internal attributes */
12805491d2cSKalle Valo 	u8 SSID_len;		/* the length of SSID */
12905491d2cSKalle Valo 	u8 SSID[32];		/* SSID string */
13005491d2cSKalle Valo 	s16 RSSI;		/* receive signal strength (in dBm) */
13105491d2cSKalle Valo 	s16 SNR;		/* receive signal SNR in dB */
13205491d2cSKalle Valo 	u16 beacon_period;	/* units are Kusec */
13305491d2cSKalle Valo 	u16 chanspec;	/* Channel num, bw, ctrl_sb and band */
13405491d2cSKalle Valo 	struct brcms_c_rateset rateset;	/* supported rates */
13505491d2cSKalle Valo };
13605491d2cSKalle Valo 
13705491d2cSKalle Valo #define MAC80211_PROMISC_BCNS	(1 << 0)
13805491d2cSKalle Valo #define MAC80211_SCAN		(1 << 1)
13905491d2cSKalle Valo 
14005491d2cSKalle Valo /*
14105491d2cSKalle Valo  * Public portion of common driver state structure.
14205491d2cSKalle Valo  * The wlc handle points at this.
14305491d2cSKalle Valo  */
14405491d2cSKalle Valo struct brcms_pub {
14505491d2cSKalle Valo 	struct brcms_c_info *wlc;
14605491d2cSKalle Valo 	struct ieee80211_hw *ieee_hw;
14705491d2cSKalle Valo 	struct scb_ampdu *global_ampdu;
14805491d2cSKalle Valo 	uint mac80211_state;
14905491d2cSKalle Valo 	uint unit;		/* device instance number */
15005491d2cSKalle Valo 	uint corerev;		/* core revision */
15105491d2cSKalle Valo 	struct si_pub *sih;	/* SI handle (cookie for siutils calls) */
15205491d2cSKalle Valo 	bool up;		/* interface up and running */
15305491d2cSKalle Valo 	bool hw_off;		/* HW is off */
15405491d2cSKalle Valo 	bool hw_up;		/* one time hw up/down */
15505491d2cSKalle Valo 	bool _piomode;		/* true if pio mode */
15605491d2cSKalle Valo 	uint _nbands;		/* # bands supported */
15705491d2cSKalle Valo 	uint now;		/* # elapsed seconds */
15805491d2cSKalle Valo 
15905491d2cSKalle Valo 	bool delayed_down;	/* down delayed */
16005491d2cSKalle Valo 	bool associated;	/* true:part of [I]BSS, false: not */
16105491d2cSKalle Valo 	/* (union of stas_associated, aps_associated) */
16205491d2cSKalle Valo 	bool _ampdu;		/* ampdu enabled or not */
16305491d2cSKalle Valo 	u8 _n_enab;		/* bitmap of 11N + HT support */
16405491d2cSKalle Valo 
16505491d2cSKalle Valo 	u8 cur_etheraddr[ETH_ALEN];	/* our local ethernet address */
16605491d2cSKalle Valo 
16705491d2cSKalle Valo 	u32 radio_disabled;	/* bit vector for radio disabled reasons */
16805491d2cSKalle Valo 
16905491d2cSKalle Valo 	u16 boardrev;	/* version # of particular board */
17005491d2cSKalle Valo 	u8 sromrev;		/* version # of the srom */
17105491d2cSKalle Valo 	char srom_ccode[BRCM_CNTRY_BUF_SZ];	/* Country Code in SROM */
17205491d2cSKalle Valo 	u32 boardflags;	/* Board specific flags from srom */
17305491d2cSKalle Valo 	u32 boardflags2;	/* More board flags if sromrev >= 4 */
17405491d2cSKalle Valo 	bool phy_11ncapable;	/* the PHY/HW is capable of 802.11N */
17505491d2cSKalle Valo 
17605491d2cSKalle Valo 	struct wl_cnt *_cnt;	/* low-level counters in driver */
17705491d2cSKalle Valo 	struct dentry *dbgfs_dir;
17805491d2cSKalle Valo };
17905491d2cSKalle Valo 
18005491d2cSKalle Valo enum wlc_par_id {
18105491d2cSKalle Valo 	IOV_MPC = 1,
18205491d2cSKalle Valo 	IOV_RTSTHRESH,
18305491d2cSKalle Valo 	IOV_QTXPOWER,
18405491d2cSKalle Valo 	IOV_BCN_LI_BCN		/* Beacon listen interval in # of beacons */
18505491d2cSKalle Valo };
18605491d2cSKalle Valo 
18705491d2cSKalle Valo /***********************************************
18805491d2cSKalle Valo  * Feature-related macros to optimize out code *
18905491d2cSKalle Valo  * *********************************************
19005491d2cSKalle Valo  */
19105491d2cSKalle Valo 
19205491d2cSKalle Valo #define ENAB_1x1	0x01
19305491d2cSKalle Valo #define ENAB_2x2	0x02
19405491d2cSKalle Valo #define ENAB_3x3	0x04
19505491d2cSKalle Valo #define ENAB_4x4	0x08
19605491d2cSKalle Valo #define SUPPORT_11N	(ENAB_1x1|ENAB_2x2)
19705491d2cSKalle Valo #define SUPPORT_HT	(ENAB_1x1|ENAB_2x2|ENAB_3x3)
19805491d2cSKalle Valo 
19905491d2cSKalle Valo /* WL11N Support */
20005491d2cSKalle Valo #define AMPDU_AGG_HOST	1
20105491d2cSKalle Valo 
20205491d2cSKalle Valo /* network protection config */
20305491d2cSKalle Valo #define	BRCMS_PROT_G_SPEC		1	/* SPEC g protection */
20405491d2cSKalle Valo #define	BRCMS_PROT_G_OVR		2	/* SPEC g prot override */
20505491d2cSKalle Valo #define	BRCMS_PROT_G_USER		3	/* gmode specified by user */
20605491d2cSKalle Valo #define	BRCMS_PROT_OVERLAP	4	/* overlap */
20705491d2cSKalle Valo #define	BRCMS_PROT_N_USER		10	/* nmode specified by user */
20805491d2cSKalle Valo #define	BRCMS_PROT_N_CFG		11	/* n protection */
20905491d2cSKalle Valo #define	BRCMS_PROT_N_CFG_OVR	12	/* n protection override */
21005491d2cSKalle Valo #define	BRCMS_PROT_N_NONGF	13	/* non-GF protection */
21105491d2cSKalle Valo #define	BRCMS_PROT_N_NONGF_OVR	14	/* non-GF protection override */
21205491d2cSKalle Valo #define	BRCMS_PROT_N_PAM_OVR	15	/* n preamble override */
21305491d2cSKalle Valo #define	BRCMS_PROT_N_OBSS		16	/* non-HT OBSS present */
21405491d2cSKalle Valo 
21505491d2cSKalle Valo /*
21605491d2cSKalle Valo  * 54g modes (basic bits may still be overridden)
21705491d2cSKalle Valo  *
21805491d2cSKalle Valo  * GMODE_LEGACY_B
21905491d2cSKalle Valo  *	Rateset: 1b, 2b, 5.5, 11
22005491d2cSKalle Valo  *	Preamble: Long
22105491d2cSKalle Valo  *	Shortslot: Off
22205491d2cSKalle Valo  * GMODE_AUTO
22305491d2cSKalle Valo  *	Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
22405491d2cSKalle Valo  *	Extended Rateset: 6, 9, 12, 48
22505491d2cSKalle Valo  *	Preamble: Long
22605491d2cSKalle Valo  *	Shortslot: Auto
22705491d2cSKalle Valo  * GMODE_ONLY
22805491d2cSKalle Valo  *	Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
22905491d2cSKalle Valo  *	Extended Rateset: 6b, 9, 12b, 48
23005491d2cSKalle Valo  *	Preamble: Short required
23105491d2cSKalle Valo  *	Shortslot: Auto
23205491d2cSKalle Valo  * GMODE_B_DEFERRED
23305491d2cSKalle Valo  *	Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
23405491d2cSKalle Valo  *	Extended Rateset: 6, 9, 12, 48
23505491d2cSKalle Valo  *	Preamble: Long
23605491d2cSKalle Valo  *	Shortslot: On
23705491d2cSKalle Valo  * GMODE_PERFORMANCE
23805491d2cSKalle Valo  *	Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
23905491d2cSKalle Valo  *	Preamble: Short required
24005491d2cSKalle Valo  *	Shortslot: On and required
24105491d2cSKalle Valo  * GMODE_LRS
24205491d2cSKalle Valo  *	Rateset: 1b, 2b, 5.5b, 11b
24305491d2cSKalle Valo  *	Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
24405491d2cSKalle Valo  *	Preamble: Long
24505491d2cSKalle Valo  *	Shortslot: Auto
24605491d2cSKalle Valo  */
24705491d2cSKalle Valo #define GMODE_LEGACY_B		0
24805491d2cSKalle Valo #define GMODE_AUTO		1
24905491d2cSKalle Valo #define GMODE_ONLY		2
25005491d2cSKalle Valo #define GMODE_B_DEFERRED	3
25105491d2cSKalle Valo #define GMODE_PERFORMANCE	4
25205491d2cSKalle Valo #define GMODE_LRS		5
25305491d2cSKalle Valo #define GMODE_MAX		6
25405491d2cSKalle Valo 
25505491d2cSKalle Valo /* MCS values greater than this enable multiple streams */
25605491d2cSKalle Valo #define HIGHEST_SINGLE_STREAM_MCS	7
25705491d2cSKalle Valo 
25805491d2cSKalle Valo #define	MAXBANDS		2	/* Maximum #of bands */
25905491d2cSKalle Valo 
26005491d2cSKalle Valo /* max number of antenna configurations */
26105491d2cSKalle Valo #define ANT_SELCFG_MAX		4
26205491d2cSKalle Valo 
26305491d2cSKalle Valo struct brcms_antselcfg {
26405491d2cSKalle Valo 	u8 ant_config[ANT_SELCFG_MAX];	/* antenna configuration */
26505491d2cSKalle Valo 	u8 num_antcfg;	/* number of available antenna configurations */
26605491d2cSKalle Valo };
26705491d2cSKalle Valo 
26805491d2cSKalle Valo /* common functions for every port */
26905491d2cSKalle Valo struct brcms_c_info *brcms_c_attach(struct brcms_info *wl,
27005491d2cSKalle Valo 				    struct bcma_device *core, uint unit,
27105491d2cSKalle Valo 				    bool piomode, uint *perr);
27205491d2cSKalle Valo uint brcms_c_detach(struct brcms_c_info *wlc);
27305491d2cSKalle Valo int brcms_c_up(struct brcms_c_info *wlc);
27405491d2cSKalle Valo uint brcms_c_down(struct brcms_c_info *wlc);
27505491d2cSKalle Valo 
27605491d2cSKalle Valo bool brcms_c_chipmatch(struct bcma_device *core);
27705491d2cSKalle Valo void brcms_c_init(struct brcms_c_info *wlc, bool mute_tx);
27805491d2cSKalle Valo void brcms_c_reset(struct brcms_c_info *wlc);
27905491d2cSKalle Valo 
28005491d2cSKalle Valo void brcms_c_intrson(struct brcms_c_info *wlc);
28105491d2cSKalle Valo u32 brcms_c_intrsoff(struct brcms_c_info *wlc);
28205491d2cSKalle Valo void brcms_c_intrsrestore(struct brcms_c_info *wlc, u32 macintmask);
28305491d2cSKalle Valo bool brcms_c_intrsupd(struct brcms_c_info *wlc);
28405491d2cSKalle Valo bool brcms_c_isr(struct brcms_c_info *wlc);
28505491d2cSKalle Valo bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded);
28605491d2cSKalle Valo bool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu,
28705491d2cSKalle Valo 			      struct ieee80211_hw *hw);
28805491d2cSKalle Valo bool brcms_c_aggregatable(struct brcms_c_info *wlc, u8 tid);
28905491d2cSKalle Valo void brcms_c_protection_upd(struct brcms_c_info *wlc, uint idx, int val);
29005491d2cSKalle Valo int brcms_c_get_header_len(void);
29105491d2cSKalle Valo void brcms_c_set_addrmatch(struct brcms_c_info *wlc, int match_reg_offset,
29205491d2cSKalle Valo 			   const u8 *addr);
29305491d2cSKalle Valo void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
29405491d2cSKalle Valo 			   const struct ieee80211_tx_queue_params *arg,
29505491d2cSKalle Valo 			   bool suspend);
29605491d2cSKalle Valo struct brcms_pub *brcms_c_pub(struct brcms_c_info *wlc);
29705491d2cSKalle Valo void brcms_c_ampdu_flush(struct brcms_c_info *wlc, struct ieee80211_sta *sta,
29805491d2cSKalle Valo 			 u16 tid);
29905491d2cSKalle Valo void brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
300*0701519fSDmitry Antipov 				  uint max_rx_ampdu_bytes);
30105491d2cSKalle Valo int brcms_c_module_register(struct brcms_pub *pub, const char *name,
30205491d2cSKalle Valo 			    struct brcms_info *hdl,
30305491d2cSKalle Valo 			    int (*down_fn)(void *handle));
30405491d2cSKalle Valo int brcms_c_module_unregister(struct brcms_pub *pub, const char *name,
30505491d2cSKalle Valo 			      struct brcms_info *hdl);
30605491d2cSKalle Valo void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc);
30705491d2cSKalle Valo void brcms_c_enable_mac(struct brcms_c_info *wlc);
30805491d2cSKalle Valo void brcms_c_associate_upd(struct brcms_c_info *wlc, bool state);
30905491d2cSKalle Valo void brcms_c_scan_start(struct brcms_c_info *wlc);
31005491d2cSKalle Valo void brcms_c_scan_stop(struct brcms_c_info *wlc);
31105491d2cSKalle Valo int brcms_c_get_curband(struct brcms_c_info *wlc);
31205491d2cSKalle Valo int brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel);
31305491d2cSKalle Valo int brcms_c_set_rate_limit(struct brcms_c_info *wlc, u16 srl, u16 lrl);
31405491d2cSKalle Valo void brcms_c_get_current_rateset(struct brcms_c_info *wlc,
31505491d2cSKalle Valo 				 struct brcm_rateset *currs);
31605491d2cSKalle Valo int brcms_c_set_rateset(struct brcms_c_info *wlc, struct brcm_rateset *rs);
31705491d2cSKalle Valo int brcms_c_set_beacon_period(struct brcms_c_info *wlc, u16 period);
31805491d2cSKalle Valo u16 brcms_c_get_phy_type(struct brcms_c_info *wlc, int phyidx);
31905491d2cSKalle Valo void brcms_c_set_shortslot_override(struct brcms_c_info *wlc,
32005491d2cSKalle Valo 				    s8 sslot_override);
32105491d2cSKalle Valo void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval);
32205491d2cSKalle Valo u64 brcms_c_tsf_get(struct brcms_c_info *wlc);
32305491d2cSKalle Valo void brcms_c_tsf_set(struct brcms_c_info *wlc, u64 tsf);
32405491d2cSKalle Valo int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr);
32505491d2cSKalle Valo int brcms_c_get_tx_power(struct brcms_c_info *wlc);
32605491d2cSKalle Valo bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc);
32705491d2cSKalle Valo void brcms_c_mute(struct brcms_c_info *wlc, bool on);
32805491d2cSKalle Valo bool brcms_c_tx_flush_completed(struct brcms_c_info *wlc);
32905491d2cSKalle Valo void brcms_c_start_station(struct brcms_c_info *wlc, u8 *addr);
33005491d2cSKalle Valo void brcms_c_start_ap(struct brcms_c_info *wlc, u8 *addr, const u8 *bssid,
33105491d2cSKalle Valo 		      u8 *ssid, size_t ssid_len);
33205491d2cSKalle Valo void brcms_c_start_adhoc(struct brcms_c_info *wlc, u8 *addr);
33305491d2cSKalle Valo void brcms_c_update_beacon(struct brcms_c_info *wlc);
33405491d2cSKalle Valo void brcms_c_set_new_beacon(struct brcms_c_info *wlc, struct sk_buff *beacon,
33505491d2cSKalle Valo 			    u16 tim_offset, u16 dtim_period);
33605491d2cSKalle Valo void brcms_c_set_new_probe_resp(struct brcms_c_info *wlc,
33705491d2cSKalle Valo 				struct sk_buff *probe_resp);
33805491d2cSKalle Valo void brcms_c_enable_probe_resp(struct brcms_c_info *wlc, bool enable);
33905491d2cSKalle Valo void brcms_c_set_ssid(struct brcms_c_info *wlc, u8 *ssid, size_t ssid_len);
34005491d2cSKalle Valo 
34105491d2cSKalle Valo #endif				/* _BRCM_PUB_H_ */
342