162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) 2010 Broadcom Corporation 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 562306a36Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 662306a36Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 962306a36Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1062306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 1162306a36Sopenharmony_ci * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1262306a36Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 1362306a36Sopenharmony_ci * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 1462306a36Sopenharmony_ci * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1562306a36Sopenharmony_ci */ 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#ifndef _BRCM_PUB_H_ 1862306a36Sopenharmony_ci#define _BRCM_PUB_H_ 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#include <linux/bcma/bcma.h> 2162306a36Sopenharmony_ci#include <brcmu_wifi.h> 2262306a36Sopenharmony_ci#include "types.h" 2362306a36Sopenharmony_ci#include "defs.h" 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define BRCMS_NUMRATES 16 /* max # of rates in a rateset */ 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci/* phy types */ 2862306a36Sopenharmony_ci#define PHY_TYPE_A 0 /* Phy type A */ 2962306a36Sopenharmony_ci#define PHY_TYPE_G 2 /* Phy type G */ 3062306a36Sopenharmony_ci#define PHY_TYPE_N 4 /* Phy type N */ 3162306a36Sopenharmony_ci#define PHY_TYPE_LP 5 /* Phy type Low Power A/B/G */ 3262306a36Sopenharmony_ci#define PHY_TYPE_SSN 6 /* Phy type Single Stream N */ 3362306a36Sopenharmony_ci#define PHY_TYPE_LCN 8 /* Phy type Single Stream N */ 3462306a36Sopenharmony_ci#define PHY_TYPE_LCNXN 9 /* Phy type 2-stream N */ 3562306a36Sopenharmony_ci#define PHY_TYPE_HT 7 /* Phy type 3-Stream N */ 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci/* bw */ 3862306a36Sopenharmony_ci#define BRCMS_10_MHZ 10 /* 10Mhz nphy channel bandwidth */ 3962306a36Sopenharmony_ci#define BRCMS_20_MHZ 20 /* 20Mhz nphy channel bandwidth */ 4062306a36Sopenharmony_ci#define BRCMS_40_MHZ 40 /* 40Mhz nphy channel bandwidth */ 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci#define BRCMS_RSSI_MINVAL -200 /* Low value, e.g. for forcing roam */ 4362306a36Sopenharmony_ci#define BRCMS_RSSI_NO_SIGNAL -91 /* NDIS RSSI link quality cutoffs */ 4462306a36Sopenharmony_ci#define BRCMS_RSSI_VERY_LOW -80 /* Very low quality cutoffs */ 4562306a36Sopenharmony_ci#define BRCMS_RSSI_LOW -70 /* Low quality cutoffs */ 4662306a36Sopenharmony_ci#define BRCMS_RSSI_GOOD -68 /* Good quality cutoffs */ 4762306a36Sopenharmony_ci#define BRCMS_RSSI_VERY_GOOD -58 /* Very good quality cutoffs */ 4862306a36Sopenharmony_ci#define BRCMS_RSSI_EXCELLENT -57 /* Excellent quality cutoffs */ 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci/* a large TX Power as an init value to factor out of min() calculations, 5162306a36Sopenharmony_ci * keep low enough to fit in an s8, units are .25 dBm 5262306a36Sopenharmony_ci */ 5362306a36Sopenharmony_ci#define BRCMS_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */ 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci/* rate related definitions */ 5662306a36Sopenharmony_ci#define BRCMS_RATE_FLAG 0x80 /* Flag to indicate it is a basic rate */ 5762306a36Sopenharmony_ci#define BRCMS_RATE_MASK 0x7f /* Rate value mask w/o basic rate flag */ 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci/* legacy rx Antenna diversity for SISO rates */ 6062306a36Sopenharmony_ci#define ANT_RX_DIV_FORCE_0 0 /* Use antenna 0 */ 6162306a36Sopenharmony_ci#define ANT_RX_DIV_FORCE_1 1 /* Use antenna 1 */ 6262306a36Sopenharmony_ci#define ANT_RX_DIV_START_1 2 /* Choose starting with 1 */ 6362306a36Sopenharmony_ci#define ANT_RX_DIV_START_0 3 /* Choose starting with 0 */ 6462306a36Sopenharmony_ci#define ANT_RX_DIV_ENABLE 3 /* APHY bbConfig Enable RX Diversity */ 6562306a36Sopenharmony_ci/* default antdiv setting */ 6662306a36Sopenharmony_ci#define ANT_RX_DIV_DEF ANT_RX_DIV_START_0 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci/* legacy rx Antenna diversity for SISO rates */ 6962306a36Sopenharmony_ci/* Tx on antenna 0, "legacy term Main" */ 7062306a36Sopenharmony_ci#define ANT_TX_FORCE_0 0 7162306a36Sopenharmony_ci/* Tx on antenna 1, "legacy term Aux" */ 7262306a36Sopenharmony_ci#define ANT_TX_FORCE_1 1 7362306a36Sopenharmony_ci/* Tx on phy's last good Rx antenna */ 7462306a36Sopenharmony_ci#define ANT_TX_LAST_RX 3 7562306a36Sopenharmony_ci/* driver's default tx antenna setting */ 7662306a36Sopenharmony_ci#define ANT_TX_DEF 3 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci/* Tx Chain values */ 7962306a36Sopenharmony_ci/* def bitmap of txchain */ 8062306a36Sopenharmony_ci#define TXCHAIN_DEF 0x1 8162306a36Sopenharmony_ci/* default bitmap of tx chains for nphy */ 8262306a36Sopenharmony_ci#define TXCHAIN_DEF_NPHY 0x3 8362306a36Sopenharmony_ci/* default bitmap of tx chains for nphy */ 8462306a36Sopenharmony_ci#define TXCHAIN_DEF_HTPHY 0x7 8562306a36Sopenharmony_ci/* def bitmap of rxchain */ 8662306a36Sopenharmony_ci#define RXCHAIN_DEF 0x1 8762306a36Sopenharmony_ci/* default bitmap of rx chains for nphy */ 8862306a36Sopenharmony_ci#define RXCHAIN_DEF_NPHY 0x3 8962306a36Sopenharmony_ci/* default bitmap of rx chains for nphy */ 9062306a36Sopenharmony_ci#define RXCHAIN_DEF_HTPHY 0x7 9162306a36Sopenharmony_ci/* no antenna switch */ 9262306a36Sopenharmony_ci#define ANTSWITCH_NONE 0 9362306a36Sopenharmony_ci/* antenna switch on 4321CB2, 2of3 */ 9462306a36Sopenharmony_ci#define ANTSWITCH_TYPE_1 1 9562306a36Sopenharmony_ci/* antenna switch on 4321MPCI, 2of3 */ 9662306a36Sopenharmony_ci#define ANTSWITCH_TYPE_2 2 9762306a36Sopenharmony_ci/* antenna switch on 4322, 2of3 */ 9862306a36Sopenharmony_ci#define ANTSWITCH_TYPE_3 3 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci#define RXBUFSZ PKTBUFSZ 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci#define MAX_STREAMS_SUPPORTED 4 /* max number of streams supported */ 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_cistruct brcm_rateset { 10562306a36Sopenharmony_ci /* # rates in this set */ 10662306a36Sopenharmony_ci u32 count; 10762306a36Sopenharmony_ci /* rates in 500kbps units w/hi bit set if basic */ 10862306a36Sopenharmony_ci u8 rates[WL_NUMRATES]; 10962306a36Sopenharmony_ci}; 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_cistruct brcms_c_rateset { 11262306a36Sopenharmony_ci uint count; /* number of rates in rates[] */ 11362306a36Sopenharmony_ci /* rates in 500kbps units w/hi bit set if basic */ 11462306a36Sopenharmony_ci u8 rates[BRCMS_NUMRATES]; 11562306a36Sopenharmony_ci u8 htphy_membership; /* HT PHY Membership */ 11662306a36Sopenharmony_ci u8 mcs[MCSSET_LEN]; /* supported mcs index bit map */ 11762306a36Sopenharmony_ci}; 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci/* All the HT-specific default advertised capabilities (including AMPDU) 12062306a36Sopenharmony_ci * should be grouped here at one place 12162306a36Sopenharmony_ci */ 12262306a36Sopenharmony_ci#define AMPDU_DEF_MPDU_DENSITY 6 /* default mpdu density (110 ==> 4us) */ 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci/* wlc internal bss_info */ 12562306a36Sopenharmony_cistruct brcms_bss_info { 12662306a36Sopenharmony_ci u8 BSSID[ETH_ALEN]; /* network BSSID */ 12762306a36Sopenharmony_ci u16 flags; /* flags for internal attributes */ 12862306a36Sopenharmony_ci u8 SSID_len; /* the length of SSID */ 12962306a36Sopenharmony_ci u8 SSID[32]; /* SSID string */ 13062306a36Sopenharmony_ci s16 RSSI; /* receive signal strength (in dBm) */ 13162306a36Sopenharmony_ci s16 SNR; /* receive signal SNR in dB */ 13262306a36Sopenharmony_ci u16 beacon_period; /* units are Kusec */ 13362306a36Sopenharmony_ci u16 chanspec; /* Channel num, bw, ctrl_sb and band */ 13462306a36Sopenharmony_ci struct brcms_c_rateset rateset; /* supported rates */ 13562306a36Sopenharmony_ci}; 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci#define MAC80211_PROMISC_BCNS (1 << 0) 13862306a36Sopenharmony_ci#define MAC80211_SCAN (1 << 1) 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ci/* 14162306a36Sopenharmony_ci * Public portion of common driver state structure. 14262306a36Sopenharmony_ci * The wlc handle points at this. 14362306a36Sopenharmony_ci */ 14462306a36Sopenharmony_cistruct brcms_pub { 14562306a36Sopenharmony_ci struct brcms_c_info *wlc; 14662306a36Sopenharmony_ci struct ieee80211_hw *ieee_hw; 14762306a36Sopenharmony_ci struct scb_ampdu *global_ampdu; 14862306a36Sopenharmony_ci uint mac80211_state; 14962306a36Sopenharmony_ci uint unit; /* device instance number */ 15062306a36Sopenharmony_ci uint corerev; /* core revision */ 15162306a36Sopenharmony_ci struct si_pub *sih; /* SI handle (cookie for siutils calls) */ 15262306a36Sopenharmony_ci bool up; /* interface up and running */ 15362306a36Sopenharmony_ci bool hw_off; /* HW is off */ 15462306a36Sopenharmony_ci bool hw_up; /* one time hw up/down */ 15562306a36Sopenharmony_ci bool _piomode; /* true if pio mode */ 15662306a36Sopenharmony_ci uint _nbands; /* # bands supported */ 15762306a36Sopenharmony_ci uint now; /* # elapsed seconds */ 15862306a36Sopenharmony_ci 15962306a36Sopenharmony_ci bool delayed_down; /* down delayed */ 16062306a36Sopenharmony_ci bool associated; /* true:part of [I]BSS, false: not */ 16162306a36Sopenharmony_ci /* (union of stas_associated, aps_associated) */ 16262306a36Sopenharmony_ci bool _ampdu; /* ampdu enabled or not */ 16362306a36Sopenharmony_ci u8 _n_enab; /* bitmap of 11N + HT support */ 16462306a36Sopenharmony_ci 16562306a36Sopenharmony_ci u8 cur_etheraddr[ETH_ALEN]; /* our local ethernet address */ 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci u32 radio_disabled; /* bit vector for radio disabled reasons */ 16862306a36Sopenharmony_ci 16962306a36Sopenharmony_ci u16 boardrev; /* version # of particular board */ 17062306a36Sopenharmony_ci u8 sromrev; /* version # of the srom */ 17162306a36Sopenharmony_ci char srom_ccode[BRCM_CNTRY_BUF_SZ]; /* Country Code in SROM */ 17262306a36Sopenharmony_ci u32 boardflags; /* Board specific flags from srom */ 17362306a36Sopenharmony_ci u32 boardflags2; /* More board flags if sromrev >= 4 */ 17462306a36Sopenharmony_ci bool phy_11ncapable; /* the PHY/HW is capable of 802.11N */ 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ci struct wl_cnt *_cnt; /* low-level counters in driver */ 17762306a36Sopenharmony_ci struct dentry *dbgfs_dir; 17862306a36Sopenharmony_ci}; 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_cienum wlc_par_id { 18162306a36Sopenharmony_ci IOV_MPC = 1, 18262306a36Sopenharmony_ci IOV_RTSTHRESH, 18362306a36Sopenharmony_ci IOV_QTXPOWER, 18462306a36Sopenharmony_ci IOV_BCN_LI_BCN /* Beacon listen interval in # of beacons */ 18562306a36Sopenharmony_ci}; 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_ci/*********************************************** 18862306a36Sopenharmony_ci * Feature-related macros to optimize out code * 18962306a36Sopenharmony_ci * ********************************************* 19062306a36Sopenharmony_ci */ 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci#define ENAB_1x1 0x01 19362306a36Sopenharmony_ci#define ENAB_2x2 0x02 19462306a36Sopenharmony_ci#define ENAB_3x3 0x04 19562306a36Sopenharmony_ci#define ENAB_4x4 0x08 19662306a36Sopenharmony_ci#define SUPPORT_11N (ENAB_1x1|ENAB_2x2) 19762306a36Sopenharmony_ci#define SUPPORT_HT (ENAB_1x1|ENAB_2x2|ENAB_3x3) 19862306a36Sopenharmony_ci 19962306a36Sopenharmony_ci/* WL11N Support */ 20062306a36Sopenharmony_ci#define AMPDU_AGG_HOST 1 20162306a36Sopenharmony_ci 20262306a36Sopenharmony_ci/* network protection config */ 20362306a36Sopenharmony_ci#define BRCMS_PROT_G_SPEC 1 /* SPEC g protection */ 20462306a36Sopenharmony_ci#define BRCMS_PROT_G_OVR 2 /* SPEC g prot override */ 20562306a36Sopenharmony_ci#define BRCMS_PROT_G_USER 3 /* gmode specified by user */ 20662306a36Sopenharmony_ci#define BRCMS_PROT_OVERLAP 4 /* overlap */ 20762306a36Sopenharmony_ci#define BRCMS_PROT_N_USER 10 /* nmode specified by user */ 20862306a36Sopenharmony_ci#define BRCMS_PROT_N_CFG 11 /* n protection */ 20962306a36Sopenharmony_ci#define BRCMS_PROT_N_CFG_OVR 12 /* n protection override */ 21062306a36Sopenharmony_ci#define BRCMS_PROT_N_NONGF 13 /* non-GF protection */ 21162306a36Sopenharmony_ci#define BRCMS_PROT_N_NONGF_OVR 14 /* non-GF protection override */ 21262306a36Sopenharmony_ci#define BRCMS_PROT_N_PAM_OVR 15 /* n preamble override */ 21362306a36Sopenharmony_ci#define BRCMS_PROT_N_OBSS 16 /* non-HT OBSS present */ 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci/* 21662306a36Sopenharmony_ci * 54g modes (basic bits may still be overridden) 21762306a36Sopenharmony_ci * 21862306a36Sopenharmony_ci * GMODE_LEGACY_B 21962306a36Sopenharmony_ci * Rateset: 1b, 2b, 5.5, 11 22062306a36Sopenharmony_ci * Preamble: Long 22162306a36Sopenharmony_ci * Shortslot: Off 22262306a36Sopenharmony_ci * GMODE_AUTO 22362306a36Sopenharmony_ci * Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 22462306a36Sopenharmony_ci * Extended Rateset: 6, 9, 12, 48 22562306a36Sopenharmony_ci * Preamble: Long 22662306a36Sopenharmony_ci * Shortslot: Auto 22762306a36Sopenharmony_ci * GMODE_ONLY 22862306a36Sopenharmony_ci * Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 22962306a36Sopenharmony_ci * Extended Rateset: 6b, 9, 12b, 48 23062306a36Sopenharmony_ci * Preamble: Short required 23162306a36Sopenharmony_ci * Shortslot: Auto 23262306a36Sopenharmony_ci * GMODE_B_DEFERRED 23362306a36Sopenharmony_ci * Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 23462306a36Sopenharmony_ci * Extended Rateset: 6, 9, 12, 48 23562306a36Sopenharmony_ci * Preamble: Long 23662306a36Sopenharmony_ci * Shortslot: On 23762306a36Sopenharmony_ci * GMODE_PERFORMANCE 23862306a36Sopenharmony_ci * Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 23962306a36Sopenharmony_ci * Preamble: Short required 24062306a36Sopenharmony_ci * Shortslot: On and required 24162306a36Sopenharmony_ci * GMODE_LRS 24262306a36Sopenharmony_ci * Rateset: 1b, 2b, 5.5b, 11b 24362306a36Sopenharmony_ci * Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 24462306a36Sopenharmony_ci * Preamble: Long 24562306a36Sopenharmony_ci * Shortslot: Auto 24662306a36Sopenharmony_ci */ 24762306a36Sopenharmony_ci#define GMODE_LEGACY_B 0 24862306a36Sopenharmony_ci#define GMODE_AUTO 1 24962306a36Sopenharmony_ci#define GMODE_ONLY 2 25062306a36Sopenharmony_ci#define GMODE_B_DEFERRED 3 25162306a36Sopenharmony_ci#define GMODE_PERFORMANCE 4 25262306a36Sopenharmony_ci#define GMODE_LRS 5 25362306a36Sopenharmony_ci#define GMODE_MAX 6 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_ci/* MCS values greater than this enable multiple streams */ 25662306a36Sopenharmony_ci#define HIGHEST_SINGLE_STREAM_MCS 7 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ci#define MAXBANDS 2 /* Maximum #of bands */ 25962306a36Sopenharmony_ci 26062306a36Sopenharmony_ci/* max number of antenna configurations */ 26162306a36Sopenharmony_ci#define ANT_SELCFG_MAX 4 26262306a36Sopenharmony_ci 26362306a36Sopenharmony_cistruct brcms_antselcfg { 26462306a36Sopenharmony_ci u8 ant_config[ANT_SELCFG_MAX]; /* antenna configuration */ 26562306a36Sopenharmony_ci u8 num_antcfg; /* number of available antenna configurations */ 26662306a36Sopenharmony_ci}; 26762306a36Sopenharmony_ci 26862306a36Sopenharmony_ci/* common functions for every port */ 26962306a36Sopenharmony_cistruct brcms_c_info *brcms_c_attach(struct brcms_info *wl, 27062306a36Sopenharmony_ci struct bcma_device *core, uint unit, 27162306a36Sopenharmony_ci bool piomode, uint *perr); 27262306a36Sopenharmony_ciuint brcms_c_detach(struct brcms_c_info *wlc); 27362306a36Sopenharmony_ciint brcms_c_up(struct brcms_c_info *wlc); 27462306a36Sopenharmony_ciuint brcms_c_down(struct brcms_c_info *wlc); 27562306a36Sopenharmony_ci 27662306a36Sopenharmony_cibool brcms_c_chipmatch(struct bcma_device *core); 27762306a36Sopenharmony_civoid brcms_c_init(struct brcms_c_info *wlc, bool mute_tx); 27862306a36Sopenharmony_civoid brcms_c_reset(struct brcms_c_info *wlc); 27962306a36Sopenharmony_ci 28062306a36Sopenharmony_civoid brcms_c_intrson(struct brcms_c_info *wlc); 28162306a36Sopenharmony_ciu32 brcms_c_intrsoff(struct brcms_c_info *wlc); 28262306a36Sopenharmony_civoid brcms_c_intrsrestore(struct brcms_c_info *wlc, u32 macintmask); 28362306a36Sopenharmony_cibool brcms_c_intrsupd(struct brcms_c_info *wlc); 28462306a36Sopenharmony_cibool brcms_c_isr(struct brcms_c_info *wlc); 28562306a36Sopenharmony_cibool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded); 28662306a36Sopenharmony_cibool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu, 28762306a36Sopenharmony_ci struct ieee80211_hw *hw); 28862306a36Sopenharmony_cibool brcms_c_aggregatable(struct brcms_c_info *wlc, u8 tid); 28962306a36Sopenharmony_civoid brcms_c_protection_upd(struct brcms_c_info *wlc, uint idx, int val); 29062306a36Sopenharmony_ciint brcms_c_get_header_len(void); 29162306a36Sopenharmony_civoid brcms_c_set_addrmatch(struct brcms_c_info *wlc, int match_reg_offset, 29262306a36Sopenharmony_ci const u8 *addr); 29362306a36Sopenharmony_civoid brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci, 29462306a36Sopenharmony_ci const struct ieee80211_tx_queue_params *arg, 29562306a36Sopenharmony_ci bool suspend); 29662306a36Sopenharmony_cistruct brcms_pub *brcms_c_pub(struct brcms_c_info *wlc); 29762306a36Sopenharmony_civoid brcms_c_ampdu_flush(struct brcms_c_info *wlc, struct ieee80211_sta *sta, 29862306a36Sopenharmony_ci u16 tid); 29962306a36Sopenharmony_civoid brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, 30062306a36Sopenharmony_ci uint max_rx_ampdu_bytes); 30162306a36Sopenharmony_ciint brcms_c_module_register(struct brcms_pub *pub, const char *name, 30262306a36Sopenharmony_ci struct brcms_info *hdl, 30362306a36Sopenharmony_ci int (*down_fn)(void *handle)); 30462306a36Sopenharmony_ciint brcms_c_module_unregister(struct brcms_pub *pub, const char *name, 30562306a36Sopenharmony_ci struct brcms_info *hdl); 30662306a36Sopenharmony_civoid brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc); 30762306a36Sopenharmony_civoid brcms_c_enable_mac(struct brcms_c_info *wlc); 30862306a36Sopenharmony_civoid brcms_c_associate_upd(struct brcms_c_info *wlc, bool state); 30962306a36Sopenharmony_civoid brcms_c_scan_start(struct brcms_c_info *wlc); 31062306a36Sopenharmony_civoid brcms_c_scan_stop(struct brcms_c_info *wlc); 31162306a36Sopenharmony_ciint brcms_c_get_curband(struct brcms_c_info *wlc); 31262306a36Sopenharmony_ciint brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel); 31362306a36Sopenharmony_ciint brcms_c_set_rate_limit(struct brcms_c_info *wlc, u16 srl, u16 lrl); 31462306a36Sopenharmony_civoid brcms_c_get_current_rateset(struct brcms_c_info *wlc, 31562306a36Sopenharmony_ci struct brcm_rateset *currs); 31662306a36Sopenharmony_ciint brcms_c_set_rateset(struct brcms_c_info *wlc, struct brcm_rateset *rs); 31762306a36Sopenharmony_ciint brcms_c_set_beacon_period(struct brcms_c_info *wlc, u16 period); 31862306a36Sopenharmony_ciu16 brcms_c_get_phy_type(struct brcms_c_info *wlc, int phyidx); 31962306a36Sopenharmony_civoid brcms_c_set_shortslot_override(struct brcms_c_info *wlc, 32062306a36Sopenharmony_ci s8 sslot_override); 32162306a36Sopenharmony_civoid brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval); 32262306a36Sopenharmony_ciu64 brcms_c_tsf_get(struct brcms_c_info *wlc); 32362306a36Sopenharmony_civoid brcms_c_tsf_set(struct brcms_c_info *wlc, u64 tsf); 32462306a36Sopenharmony_ciint brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr); 32562306a36Sopenharmony_ciint brcms_c_get_tx_power(struct brcms_c_info *wlc); 32662306a36Sopenharmony_cibool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); 32762306a36Sopenharmony_civoid brcms_c_mute(struct brcms_c_info *wlc, bool on); 32862306a36Sopenharmony_cibool brcms_c_tx_flush_completed(struct brcms_c_info *wlc); 32962306a36Sopenharmony_civoid brcms_c_start_station(struct brcms_c_info *wlc, u8 *addr); 33062306a36Sopenharmony_civoid brcms_c_start_ap(struct brcms_c_info *wlc, u8 *addr, const u8 *bssid, 33162306a36Sopenharmony_ci u8 *ssid, size_t ssid_len); 33262306a36Sopenharmony_civoid brcms_c_start_adhoc(struct brcms_c_info *wlc, u8 *addr); 33362306a36Sopenharmony_civoid brcms_c_update_beacon(struct brcms_c_info *wlc); 33462306a36Sopenharmony_civoid brcms_c_set_new_beacon(struct brcms_c_info *wlc, struct sk_buff *beacon, 33562306a36Sopenharmony_ci u16 tim_offset, u16 dtim_period); 33662306a36Sopenharmony_civoid brcms_c_set_new_probe_resp(struct brcms_c_info *wlc, 33762306a36Sopenharmony_ci struct sk_buff *probe_resp); 33862306a36Sopenharmony_civoid brcms_c_enable_probe_resp(struct brcms_c_info *wlc, bool enable); 33962306a36Sopenharmony_civoid brcms_c_set_ssid(struct brcms_c_info *wlc, u8 *ssid, size_t ssid_len); 34062306a36Sopenharmony_ci 34162306a36Sopenharmony_ci#endif /* _BRCM_PUB_H_ */ 342