/* * Copyright (c) 2010 Broadcom Corporation * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define BRCMS_NUMRATES 16 /* max # of rates in a rateset */
/* phy types */ #define PHY_TYPE_A 0 /* Phy type A */ #define PHY_TYPE_G 2 /* Phy type G */ #define PHY_TYPE_N 4 /* Phy type N */ #define PHY_TYPE_LP 5 /* Phy type Low Power A/B/G */ #define PHY_TYPE_SSN 6 /* Phy type Single Stream N */ #define PHY_TYPE_LCN 8 /* Phy type Single Stream N */ #define PHY_TYPE_LCNXN 9 /* Phy type 2-stream N */ #define PHY_TYPE_HT 7 /* Phy type 3-Stream N */
#define BRCMS_RSSI_MINVAL -200 /* Low value, e.g. for forcing roam */ #define BRCMS_RSSI_NO_SIGNAL -91 /* NDIS RSSI link quality cutoffs */ #define BRCMS_RSSI_VERY_LOW -80 /* Very low quality cutoffs */ #define BRCMS_RSSI_LOW -70 /* Low quality cutoffs */ #define BRCMS_RSSI_GOOD -68 /* Good quality cutoffs */ #define BRCMS_RSSI_VERY_GOOD -58 /* Very good quality cutoffs */ #define BRCMS_RSSI_EXCELLENT -57 /* Excellent quality cutoffs */
/* a large TX Power as an init value to factor out of min() calculations, * keep low enough to fit in an s8, units are .25 dBm
*/ #define BRCMS_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */
/* rate related definitions */ #define BRCMS_RATE_FLAG 0x80 /* Flag to indicate it is a basic rate */ #define BRCMS_RATE_MASK 0x7f /* Rate value mask w/o basic rate flag */
/* legacy rx Antenna diversity for SISO rates */ /* Tx on antenna 0, "legacy term Main" */ #define ANT_TX_FORCE_0 0 /* Tx on antenna 1, "legacy term Aux" */ #define ANT_TX_FORCE_1 1 /* Tx on phy's last good Rx antenna */ #define ANT_TX_LAST_RX 3 /* driver's default tx antenna setting */ #define ANT_TX_DEF 3
/* Tx Chain values */ /* def bitmap of txchain */ #define TXCHAIN_DEF 0x1 /* default bitmap of tx chains for nphy */ #define TXCHAIN_DEF_NPHY 0x3 /* default bitmap of tx chains for nphy */ #define TXCHAIN_DEF_HTPHY 0x7 /* def bitmap of rxchain */ #define RXCHAIN_DEF 0x1 /* default bitmap of rx chains for nphy */ #define RXCHAIN_DEF_NPHY 0x3 /* default bitmap of rx chains for nphy */ #define RXCHAIN_DEF_HTPHY 0x7 /* no antenna switch */ #define ANTSWITCH_NONE 0 /* antenna switch on 4321CB2, 2of3 */ #define ANTSWITCH_TYPE_1 1 /* antenna switch on 4321MPCI, 2of3 */ #define ANTSWITCH_TYPE_2 2 /* antenna switch on 4322, 2of3 */ #define ANTSWITCH_TYPE_3 3
#define RXBUFSZ PKTBUFSZ
#define MAX_STREAMS_SUPPORTED 4 /* max number of streams supported */
struct brcm_rateset { /* # rates in this set */
u32 count; /* rates in 500kbps units w/hi bit set if basic */
u8 rates[WL_NUMRATES];
};
struct brcms_c_rateset {
uint count; /* number of rates in rates[] */ /* rates in 500kbps units w/hi bit set if basic */
u8 rates[BRCMS_NUMRATES];
u8 htphy_membership; /* HT PHY Membership */
u8 mcs[MCSSET_LEN]; /* supported mcs index bit map */
};
/* All the HT-specific default advertised capabilities (including AMPDU) * should be grouped here at one place
*/ #define AMPDU_DEF_MPDU_DENSITY 6 /* default mpdu density (110 ==> 4us) */
/* wlc internal bss_info */ struct brcms_bss_info {
u8 BSSID[ETH_ALEN]; /* network BSSID */
u16 flags; /* flags for internal attributes */
u8 SSID_len; /* the length of SSID */
u8 SSID[32]; /* SSID string */
s16 RSSI; /* receive signal strength (in dBm) */
s16 SNR; /* receive signal SNR in dB */
u16 beacon_period; /* units are Kusec */
u16 chanspec; /* Channel num, bw, ctrl_sb and band */ struct brcms_c_rateset rateset; /* supported rates */
};
/* * Public portion of common driver state structure. * The wlc handle points at this.
*/ struct brcms_pub { struct brcms_c_info *wlc; struct ieee80211_hw *ieee_hw; struct scb_ampdu *global_ampdu;
uint mac80211_state;
uint unit; /* device instance number */
uint corerev; /* core revision */ struct si_pub *sih; /* SI handle (cookie for siutils calls) */ bool up; /* interface up and running */ bool hw_off; /* HW is off */ bool hw_up; /* one time hw up/down */ bool _piomode; /* true if pio mode */
uint _nbands; /* # bands supported */
uint now; /* # elapsed seconds */
bool delayed_down; /* down delayed */ bool associated; /* true:part of [I]BSS, false: not */ /* (union of stas_associated, aps_associated) */ bool _ampdu; /* ampdu enabled or not */
u8 _n_enab; /* bitmap of 11N + HT support */
u8 cur_etheraddr[ETH_ALEN]; /* our local ethernet address */
u32 radio_disabled; /* bit vector for radio disabled reasons */
u16 boardrev; /* version # of particular board */
u8 sromrev; /* version # of the srom */ char srom_ccode[BRCM_CNTRY_BUF_SZ]; /* Country Code in SROM */
u32 boardflags; /* Board specific flags from srom */
u32 boardflags2; /* More board flags if sromrev >= 4 */ bool phy_11ncapable; /* the PHY/HW is capable of 802.11N */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.