wlc_channel.h

来自「wi-fi sources for asus wl138g v2 pci car」· C头文件 代码 · 共 79 行

H
79
字号
/* * Common interface to channel definitions. * Copyright 2005-2006, Broadcom Corporation * All Rights Reserved.                 *                                      * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * $Id$ */#ifndef _WLC_CHANNEL_H_#define _WLC_CHANNEL_H_#define WLC_TXPWR_DB_FACTOR 4 /* conversion for phy txpwr cacluations that use .25 dB units */struct wlc_info;/* channel bitvec */typedef struct {	uint8	vec[MAXCHANNEL/NBBY];	/* bitvec of channels */} chanvec_t;/* bits for locale_info flags */#define WLC_PEAK_CONDUCTED	0x00 /* Peak for locals */#define WLC_EIRP		0x01 /* Flag for EIRP */#define WLC_DFS_TPC		0x02 /* Flag for DFS TPC */#define WLC_NO_OFDM		0x04 /* Flag for No OFDM */#if !ACONF#define LOCALES(band2, band5)	band2, NULL#elif !GCONF#define LOCALES(band2, band5)	NULL, band5#else /* must be both */#define LOCALES(band2, band5)	band2, band5#endif	/* !ACONF *//* Specify channel types for get_first and get_next channel routines */#define	CHAN_TYPE_ANY		0	/* Dont care */#define	CHAN_TYPE_CHATTY	1	/* Normal, non-radar channel */#define	CHAN_TYPE_QUIET		2	/* Radar channel */#if	ACONF     /* RADAR */#define	QUIET_CHANNEL(wlc, channel)	isset((wlc)->quiet_channels.vec, channel)#define	SETQUIET(wlc, channel)		setbit((wlc)->quiet_channels.vec, channel)#define	CLRQUIET(wlc, channel)		clrbit((wlc)->quiet_channels.vec, channel)#else#define	QUIET_CHANNEL(wlc, channel)	0#define	SETQUIET(wlc, channel)		do { } while (0)#define	CLRQUIET(wlc, channel)		do { } while (0)#endif /* ACONF */#define VALID_BAND(wlc, band)		((band == WLC_BAND_AUTO) || (band == WLC_BAND_2G) || \	(band == WLC_BAND_5G))/* B channels we support are 1 - 14, anything higher is an A channel. */#define BAND_OF_CHANNEL(wlc, chan)	((chan <= WLC_MAX_2G_CHANNEL) ? WLC_BAND_2G : WLC_BAND_5G)extern bool wlc_valid_channel(int bandtype, uint channel);#define	VALID_CHANNEL_DB(wlc, channel) \	(wlc_valid_channel(wlc->band->bandtype, channel) || \	(wlc_valid_channel(wlc->bandstate[OTHERBANDUNIT(wlc)].bandtype, channel)))#define VALID_CHANNEL_IN_BAND(wlc, bandunit, channel) \	(wlc_valid_channel(wlc->bandstate[bandunit].bandtype, channel))#define VALID_CHANNEL(wlc, channel) wlc_valid_channel(wlc->band->bandtype, channel)extern uint8 wlc_next_channel(struct wlc_info *wlc, uint8 cur_chan, int type, bool any_band);extern int wlc_channels_init(struct wlc_info *wlc);extern bool wlc_check_locale_flags(int bandtype, uint val);extern bool wlc_check_locale_radar(int bandtype, uint channel);#endif /* _WLC_CHANNEL_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?