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_CHANNEL_H_
1862306a36Sopenharmony_ci#define _BRCM_CHANNEL_H_
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci/* conversion for phy txpwr calculations that use .25 dB units */
2162306a36Sopenharmony_ci#define BRCMS_TXPWR_DB_FACTOR 4
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci/* bits for locale_info flags */
2462306a36Sopenharmony_ci#define BRCMS_PEAK_CONDUCTED	0x00	/* Peak for locals */
2562306a36Sopenharmony_ci#define BRCMS_EIRP		0x01	/* Flag for EIRP */
2662306a36Sopenharmony_ci#define BRCMS_DFS_TPC		0x02	/* Flag for DFS TPC */
2762306a36Sopenharmony_ci#define BRCMS_NO_OFDM		0x04	/* Flag for No OFDM */
2862306a36Sopenharmony_ci#define BRCMS_NO_40MHZ		0x08	/* Flag for No MIMO 40MHz */
2962306a36Sopenharmony_ci#define BRCMS_NO_MIMO		0x10	/* Flag for No MIMO, 20 or 40 MHz */
3062306a36Sopenharmony_ci#define BRCMS_RADAR_TYPE_EU       0x20	/* Flag for EU */
3162306a36Sopenharmony_ci#define BRCMS_DFS_FCC             BRCMS_DFS_TPC	/* Flag for DFS FCC */
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci#define BRCMS_DFS_EU (BRCMS_DFS_TPC | BRCMS_RADAR_TYPE_EU) /* Flag for DFS EU */
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_cistruct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc);
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_civoid brcms_c_channel_mgr_detach(struct brcms_cm_info *wlc_cm);
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_cibool brcms_c_valid_chanspec_db(struct brcms_cm_info *wlc_cm, u16 chspec);
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_civoid brcms_c_channel_reg_limits(struct brcms_cm_info *wlc_cm, u16 chanspec,
4262306a36Sopenharmony_ci				struct txpwr_limits *txpwr);
4362306a36Sopenharmony_civoid brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, u16 chanspec,
4462306a36Sopenharmony_ci				  u8 local_constraint_qdbm);
4562306a36Sopenharmony_civoid brcms_c_regd_init(struct brcms_c_info *wlc);
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#endif				/* _WLC_CHANNEL_H */
48