xref: /freebsd/sys/contrib/dev/broadcom/brcm80211/brcmsmac/channel.h (revision b4c3e9b5b09c829b4135aff738bd2893ed052377)
1*b4c3e9b5SBjoern A. Zeeb /*
2*b4c3e9b5SBjoern A. Zeeb  * Copyright (c) 2010 Broadcom Corporation
3*b4c3e9b5SBjoern A. Zeeb  *
4*b4c3e9b5SBjoern A. Zeeb  * Permission to use, copy, modify, and/or distribute this software for any
5*b4c3e9b5SBjoern A. Zeeb  * purpose with or without fee is hereby granted, provided that the above
6*b4c3e9b5SBjoern A. Zeeb  * copyright notice and this permission notice appear in all copies.
7*b4c3e9b5SBjoern A. Zeeb  *
8*b4c3e9b5SBjoern A. Zeeb  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*b4c3e9b5SBjoern A. Zeeb  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*b4c3e9b5SBjoern A. Zeeb  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11*b4c3e9b5SBjoern A. Zeeb  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*b4c3e9b5SBjoern A. Zeeb  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13*b4c3e9b5SBjoern A. Zeeb  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14*b4c3e9b5SBjoern A. Zeeb  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*b4c3e9b5SBjoern A. Zeeb  */
16*b4c3e9b5SBjoern A. Zeeb 
17*b4c3e9b5SBjoern A. Zeeb #ifndef _BRCM_CHANNEL_H_
18*b4c3e9b5SBjoern A. Zeeb #define _BRCM_CHANNEL_H_
19*b4c3e9b5SBjoern A. Zeeb 
20*b4c3e9b5SBjoern A. Zeeb /* conversion for phy txpwr calculations that use .25 dB units */
21*b4c3e9b5SBjoern A. Zeeb #define BRCMS_TXPWR_DB_FACTOR 4
22*b4c3e9b5SBjoern A. Zeeb 
23*b4c3e9b5SBjoern A. Zeeb /* bits for locale_info flags */
24*b4c3e9b5SBjoern A. Zeeb #define BRCMS_PEAK_CONDUCTED	0x00	/* Peak for locals */
25*b4c3e9b5SBjoern A. Zeeb #define BRCMS_EIRP		0x01	/* Flag for EIRP */
26*b4c3e9b5SBjoern A. Zeeb #define BRCMS_DFS_TPC		0x02	/* Flag for DFS TPC */
27*b4c3e9b5SBjoern A. Zeeb #define BRCMS_NO_OFDM		0x04	/* Flag for No OFDM */
28*b4c3e9b5SBjoern A. Zeeb #define BRCMS_NO_40MHZ		0x08	/* Flag for No MIMO 40MHz */
29*b4c3e9b5SBjoern A. Zeeb #define BRCMS_NO_MIMO		0x10	/* Flag for No MIMO, 20 or 40 MHz */
30*b4c3e9b5SBjoern A. Zeeb #define BRCMS_RADAR_TYPE_EU       0x20	/* Flag for EU */
31*b4c3e9b5SBjoern A. Zeeb #define BRCMS_DFS_FCC             BRCMS_DFS_TPC	/* Flag for DFS FCC */
32*b4c3e9b5SBjoern A. Zeeb 
33*b4c3e9b5SBjoern A. Zeeb #define BRCMS_DFS_EU (BRCMS_DFS_TPC | BRCMS_RADAR_TYPE_EU) /* Flag for DFS EU */
34*b4c3e9b5SBjoern A. Zeeb 
35*b4c3e9b5SBjoern A. Zeeb struct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc);
36*b4c3e9b5SBjoern A. Zeeb 
37*b4c3e9b5SBjoern A. Zeeb void brcms_c_channel_mgr_detach(struct brcms_cm_info *wlc_cm);
38*b4c3e9b5SBjoern A. Zeeb 
39*b4c3e9b5SBjoern A. Zeeb bool brcms_c_valid_chanspec_db(struct brcms_cm_info *wlc_cm, u16 chspec);
40*b4c3e9b5SBjoern A. Zeeb 
41*b4c3e9b5SBjoern A. Zeeb void brcms_c_channel_reg_limits(struct brcms_cm_info *wlc_cm, u16 chanspec,
42*b4c3e9b5SBjoern A. Zeeb 				struct txpwr_limits *txpwr);
43*b4c3e9b5SBjoern A. Zeeb void brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, u16 chanspec,
44*b4c3e9b5SBjoern A. Zeeb 				  u8 local_constraint_qdbm);
45*b4c3e9b5SBjoern A. Zeeb void brcms_c_regd_init(struct brcms_c_info *wlc);
46*b4c3e9b5SBjoern A. Zeeb 
47*b4c3e9b5SBjoern A. Zeeb #endif				/* _WLC_CHANNEL_H */
48