wlc_rate.h

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

H
95
字号
/* * Common OS-independent driver header for rate management. * * * 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_RATE_H#define _WLC_RATE_Hextern const uint8 rate_info[];extern const struct rateset * cck_ofdm_rates;extern const struct rateset * ofdm_rates;extern const struct rateset * cck_rates;extern const struct rateset * gphy_legacy_rates;extern const struct rateset * wlc_lrs_rates;extern const struct rateset * rate_limit_1_2;/* rate spec : holds rate and mode specific information required to generate a tx frame. *//* Legacy CCK and OFDM information is held in the same manner as was done in the past    *//* (in the lower byte) the upper 3 bytes primarily hold MIMO specific information        */typedef uint32	ratespec_t;/* defined rate in 500kbps */#define WLC_MAXRATE	108	/* in 500kbps units */#define WLC_RATE_1M	2	/* in 500kbps units */#define WLC_RATE_2M	4	/* in 500kbps units */#define WLC_RATE_5M5	11	/* in 500kbps units */#define WLC_RATE_11M	22	/* in 500kbps units */#define WLC_RATE_6M	12	/* in 500kbps units */#define WLC_RATE_9M	18	/* in 500kbps units */#define WLC_RATE_12M	24	/* in 500kbps units */#define WLC_RATE_18M	36	/* in 500kbps units */#define WLC_RATE_24M	48	/* in 500kbps units */#define WLC_RATE_36M	72	/* in 500kbps units */#define WLC_RATE_48M	96	/* in 500kbps units */#define WLC_RATE_54M	108	/* in 500kbps units */#define	WLC_RATE_FLAG	0x80	/* Rate flag: basic or ofdm *//* Macros to use the rate_info table */#define	RATE_MASK	0x7f		/* Rate value mask w/o basic rate flag */#define	RATE_MASK_FULL	0xff		/* Rate value mask with basic rate flag */#define WLC_RATE_500K_TO_BPS(rate)	((rate) * 500000)	/* convert 500kbps to bps *//* rate spec bit fields */#define RSPC_RATE_MASK		0x0000007F     	/* 500Kbps units */#define RSPC_ACTIVE(rs)		(rs & (RSPC_RATE_MASK))#define RSPEC2RATE(rs)		(rs & RSPC_RATE_MASK)	/* Rate info table */#define	IS_OFDM(r)	(rate_info[(r) & RSPC_RATE_MASK] & WLC_RATE_FLAG)#define	IS_CCK(r)	(!IS_OFDM(r))/* Macros to use the rate_info table */#define	RATE_MASK	0x7f		/* Rate value mask w/o basic rate flag */#define	RATE_MASK_FULL	0xff		/* Rate value mask with basic rate flag *//* Convert encoded rate value in plcp header to numerical rates in 500 KHz increments */extern const uint8 ofdm_rate_lookup[];#define OFDM_PHY2MAC_RATE(rlpt)		(ofdm_rate_lookup[rlpt & 0x7])#define CCK_PHY2MAC_RATE(signal)	(signal/5)/* use the stuct form instead of typedef to fix dependency problems */struct rateset;/* sanitize and sort a rateset, preserving the basic bit(s) */extern void wlc_sort_rates(struct rateset *rs, const struct rateset *hw_rs);/* copy rateset src to dst as-is (no masking or sorting) */extern void wlc_rateset_copy(const struct rateset *src, struct rateset *dst);/* would be nice to have these documented ... */extern bool wlc_valid_rateset(struct rateset *rs, struct rateset *hwrs);extern int wlc_compute_rate(d11rxhdr_t *rxh, void *plcp);extern void wlc_rateset_filter(struct rateset *src, struct rateset *dst,	bool basic_only, bool cck_only, uint xmask);extern int16 wlc_rate_ofdm_phyctl(uint rate);char* wlc_dumprateset(char *name, struct rateset *rateset, char *buf);#endif	/* _WLC_RATE_H */

⌨️ 快捷键说明

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