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_CHANNEL_H_
188c2ecf20Sopenharmony_ci#define _BRCM_CHANNEL_H_
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci/* conversion for phy txpwr calculations that use .25 dB units */
218c2ecf20Sopenharmony_ci#define BRCMS_TXPWR_DB_FACTOR 4
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci/* bits for locale_info flags */
248c2ecf20Sopenharmony_ci#define BRCMS_PEAK_CONDUCTED	0x00	/* Peak for locals */
258c2ecf20Sopenharmony_ci#define BRCMS_EIRP		0x01	/* Flag for EIRP */
268c2ecf20Sopenharmony_ci#define BRCMS_DFS_TPC		0x02	/* Flag for DFS TPC */
278c2ecf20Sopenharmony_ci#define BRCMS_NO_OFDM		0x04	/* Flag for No OFDM */
288c2ecf20Sopenharmony_ci#define BRCMS_NO_40MHZ		0x08	/* Flag for No MIMO 40MHz */
298c2ecf20Sopenharmony_ci#define BRCMS_NO_MIMO		0x10	/* Flag for No MIMO, 20 or 40 MHz */
308c2ecf20Sopenharmony_ci#define BRCMS_RADAR_TYPE_EU       0x20	/* Flag for EU */
318c2ecf20Sopenharmony_ci#define BRCMS_DFS_FCC             BRCMS_DFS_TPC	/* Flag for DFS FCC */
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define BRCMS_DFS_EU (BRCMS_DFS_TPC | BRCMS_RADAR_TYPE_EU) /* Flag for DFS EU */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_cistruct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc);
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_civoid brcms_c_channel_mgr_detach(struct brcms_cm_info *wlc_cm);
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_cibool brcms_c_valid_chanspec_db(struct brcms_cm_info *wlc_cm, u16 chspec);
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_civoid brcms_c_channel_reg_limits(struct brcms_cm_info *wlc_cm, u16 chanspec,
428c2ecf20Sopenharmony_ci				struct txpwr_limits *txpwr);
438c2ecf20Sopenharmony_civoid brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, u16 chanspec,
448c2ecf20Sopenharmony_ci				  u8 local_constraint_qdbm);
458c2ecf20Sopenharmony_civoid brcms_c_regd_init(struct brcms_c_info *wlc);
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci#endif				/* _WLC_CHANNEL_H */
48