svn commit: r188797 - in projects/vap7/sys: . contrib/pf dev
dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210
dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212
dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...
Sam Leffler
sam at FreeBSD.org
Wed Feb 18 21:50:50 PST 2009
Author: sam
Date: Thu Feb 19 05:50:50 2009
New Revision: 188797
URL: http://svn.freebsd.org/changeset/base/188797
Log:
merge r188780: use c99 initializers
Modified:
projects/vap7/sys/ (props changed)
projects/vap7/sys/contrib/pf/ (props changed)
projects/vap7/sys/dev/ (props changed)
projects/vap7/sys/dev/ath/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed)
projects/vap7/sys/dev/cxgb/ (props changed)
projects/vap7/sys/dev/usb2/ (props changed)
projects/vap7/sys/i386/conf/USB2 (props changed)
projects/vap7/sys/modules/usb2/ (props changed)
projects/vap7/sys/net80211/ (props changed)
projects/vap7/sys/net80211/ieee80211_ioctl.c
projects/vap7/sys/net80211/ieee80211_proto.c
Modified: projects/vap7/sys/net80211/ieee80211_ioctl.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211_ioctl.c Thu Feb 19 05:50:15 2009 (r188796)
+++ projects/vap7/sys/net80211/ieee80211_ioctl.c Thu Feb 19 05:50:50 2009 (r188797)
@@ -1758,17 +1758,17 @@ static struct ieee80211_channel *
findchannel(struct ieee80211com *ic, int ieee, int mode)
{
static const u_int chanflags[IEEE80211_MODE_MAX] = {
- 0, /* IEEE80211_MODE_AUTO */
- IEEE80211_CHAN_A, /* IEEE80211_MODE_11A */
- IEEE80211_CHAN_B, /* IEEE80211_MODE_11B */
- IEEE80211_CHAN_G, /* IEEE80211_MODE_11G */
- IEEE80211_CHAN_FHSS, /* IEEE80211_MODE_FH */
- IEEE80211_CHAN_108A, /* IEEE80211_MODE_TURBO_A */
- IEEE80211_CHAN_108G, /* IEEE80211_MODE_TURBO_G */
- IEEE80211_CHAN_STURBO, /* IEEE80211_MODE_STURBO_A */
- /* NB: handled specially below */
- IEEE80211_CHAN_A, /* IEEE80211_MODE_11NA */
- IEEE80211_CHAN_G, /* IEEE80211_MODE_11NG */
+ [IEEE80211_MODE_AUTO] = 0,
+ [IEEE80211_MODE_11A] = IEEE80211_CHAN_A,
+ [IEEE80211_MODE_11B] = IEEE80211_CHAN_B,
+ [IEEE80211_MODE_11G] = IEEE80211_CHAN_G,
+ [IEEE80211_MODE_FH] = IEEE80211_CHAN_FHSS,
+ [IEEE80211_MODE_TURBO_A] = IEEE80211_CHAN_108A,
+ [IEEE80211_MODE_TURBO_G] = IEEE80211_CHAN_108G,
+ [IEEE80211_MODE_STURBO_A] = IEEE80211_CHAN_STURBO,
+ /* NB: handled specially below */
+ [IEEE80211_MODE_11NA] = IEEE80211_CHAN_A,
+ [IEEE80211_MODE_11NG] = IEEE80211_CHAN_G,
};
u_int modeflags;
int i;
Modified: projects/vap7/sys/net80211/ieee80211_proto.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211_proto.c Thu Feb 19 05:50:15 2009 (r188796)
+++ projects/vap7/sys/net80211/ieee80211_proto.c Thu Feb 19 05:50:50 2009 (r188797)
@@ -655,16 +655,16 @@ setbasicrates(struct ieee80211_rateset *
enum ieee80211_phymode mode, int add)
{
static const struct ieee80211_rateset basic[IEEE80211_MODE_MAX] = {
- { .rs_nrates = 0 }, /* IEEE80211_MODE_AUTO */
- { 3, { 12, 24, 48 } }, /* IEEE80211_MODE_11A */
- { 2, { 2, 4 } }, /* IEEE80211_MODE_11B */
- { 4, { 2, 4, 11, 22 } }, /* IEEE80211_MODE_11G (mixed b/g) */
- { .rs_nrates = 0 }, /* IEEE80211_MODE_FH */
- { 3, { 12, 24, 48 } }, /* IEEE80211_MODE_TURBO_A */
- { 4, { 2, 4, 11, 22 } }, /* IEEE80211_MODE_TURBO_G (mixed b/g) */
- { 3, { 12, 24, 48 } }, /* IEEE80211_MODE_STURBO_A */
- { 3, { 12, 24, 48 } }, /* IEEE80211_MODE_11NA */
- { 4, { 2, 4, 11, 22 } }, /* IEEE80211_MODE_11NG (mixed b/g) */
+ [IEEE80211_MODE_11A] = { 3, { 12, 24, 48 } },
+ [IEEE80211_MODE_11B] = { 2, { 2, 4 } },
+ /* NB: mixed b/g */
+ [IEEE80211_MODE_11G] = { 4, { 2, 4, 11, 22 } },
+ [IEEE80211_MODE_TURBO_A] = { 3, { 12, 24, 48 } },
+ [IEEE80211_MODE_TURBO_G] = { 4, { 2, 4, 11, 22 } },
+ [IEEE80211_MODE_STURBO_A] = { 3, { 12, 24, 48 } },
+ [IEEE80211_MODE_11NA] = { 3, { 12, 24, 48 } },
+ /* NB: mixed b/g */
+ [IEEE80211_MODE_11NG] = { 4, { 2, 4, 11, 22 } },
};
int i, j;
@@ -717,89 +717,89 @@ typedef struct phyParamType {
} paramType;
static const struct phyParamType phyParamForAC_BE[IEEE80211_MODE_MAX] = {
- { 3, 4, 6, 0, 0 }, /* IEEE80211_MODE_AUTO */
- { 3, 4, 6, 0, 0 }, /* IEEE80211_MODE_11A */
- { 3, 4, 6, 0, 0 }, /* IEEE80211_MODE_11B */
- { 3, 4, 6, 0, 0 }, /* IEEE80211_MODE_11G */
- { 3, 4, 6, 0, 0 }, /* IEEE80211_MODE_FH */
- { 2, 3, 5, 0, 0 }, /* IEEE80211_MODE_TURBO_A */
- { 2, 3, 5, 0, 0 }, /* IEEE80211_MODE_TURBO_G */
- { 2, 3, 5, 0, 0 }, /* IEEE80211_MODE_STURBO_A */
- { 3, 4, 6, 0, 0 }, /* IEEE80211_MODE_11NA */
- { 3, 4, 6, 0, 0 }, /* IEEE80211_MODE_11NG */
+ [IEEE80211_MODE_AUTO] = { 3, 4, 6, 0, 0 },
+ [IEEE80211_MODE_11A] = { 3, 4, 6, 0, 0 },
+ [IEEE80211_MODE_11B] = { 3, 4, 6, 0, 0 },
+ [IEEE80211_MODE_11G] = { 3, 4, 6, 0, 0 },
+ [IEEE80211_MODE_FH] = { 3, 4, 6, 0, 0 },
+ [IEEE80211_MODE_TURBO_A]= { 2, 3, 5, 0, 0 },
+ [IEEE80211_MODE_TURBO_G]= { 2, 3, 5, 0, 0 },
+ [IEEE80211_MODE_STURBO_A]={ 2, 3, 5, 0, 0 },
+ [IEEE80211_MODE_11NA] = { 3, 4, 6, 0, 0 },
+ [IEEE80211_MODE_11NG] = { 3, 4, 6, 0, 0 },
};
static const struct phyParamType phyParamForAC_BK[IEEE80211_MODE_MAX] = {
- { 7, 4, 10, 0, 0 }, /* IEEE80211_MODE_AUTO */
- { 7, 4, 10, 0, 0 }, /* IEEE80211_MODE_11A */
- { 7, 4, 10, 0, 0 }, /* IEEE80211_MODE_11B */
- { 7, 4, 10, 0, 0 }, /* IEEE80211_MODE_11G */
- { 7, 4, 10, 0, 0 }, /* IEEE80211_MODE_FH */
- { 7, 3, 10, 0, 0 }, /* IEEE80211_MODE_TURBO_A */
- { 7, 3, 10, 0, 0 }, /* IEEE80211_MODE_TURBO_G */
- { 7, 3, 10, 0, 0 }, /* IEEE80211_MODE_STURBO_A */
- { 7, 4, 10, 0, 0 }, /* IEEE80211_MODE_11NA */
- { 7, 4, 10, 0, 0 }, /* IEEE80211_MODE_11NG */
+ [IEEE80211_MODE_AUTO] = { 7, 4, 10, 0, 0 },
+ [IEEE80211_MODE_11A] = { 7, 4, 10, 0, 0 },
+ [IEEE80211_MODE_11B] = { 7, 4, 10, 0, 0 },
+ [IEEE80211_MODE_11G] = { 7, 4, 10, 0, 0 },
+ [IEEE80211_MODE_FH] = { 7, 4, 10, 0, 0 },
+ [IEEE80211_MODE_TURBO_A]= { 7, 3, 10, 0, 0 },
+ [IEEE80211_MODE_TURBO_G]= { 7, 3, 10, 0, 0 },
+ [IEEE80211_MODE_STURBO_A]={ 7, 3, 10, 0, 0 },
+ [IEEE80211_MODE_11NA] = { 7, 4, 10, 0, 0 },
+ [IEEE80211_MODE_11NG] = { 7, 4, 10, 0, 0 },
};
static const struct phyParamType phyParamForAC_VI[IEEE80211_MODE_MAX] = {
- { 1, 3, 4, 94, 0 }, /* IEEE80211_MODE_AUTO */
- { 1, 3, 4, 94, 0 }, /* IEEE80211_MODE_11A */
- { 1, 3, 4, 188, 0 }, /* IEEE80211_MODE_11B */
- { 1, 3, 4, 94, 0 }, /* IEEE80211_MODE_11G */
- { 1, 3, 4, 188, 0 }, /* IEEE80211_MODE_FH */
- { 1, 2, 3, 94, 0 }, /* IEEE80211_MODE_TURBO_A */
- { 1, 2, 3, 94, 0 }, /* IEEE80211_MODE_TURBO_G */
- { 1, 2, 3, 94, 0 }, /* IEEE80211_MODE_STURBO_A */
- { 1, 3, 4, 94, 0 }, /* IEEE80211_MODE_11NA */
- { 1, 3, 4, 94, 0 }, /* IEEE80211_MODE_11NG */
+ [IEEE80211_MODE_AUTO] = { 1, 3, 4, 94, 0 },
+ [IEEE80211_MODE_11A] = { 1, 3, 4, 94, 0 },
+ [IEEE80211_MODE_11B] = { 1, 3, 4, 188, 0 },
+ [IEEE80211_MODE_11G] = { 1, 3, 4, 94, 0 },
+ [IEEE80211_MODE_FH] = { 1, 3, 4, 188, 0 },
+ [IEEE80211_MODE_TURBO_A]= { 1, 2, 3, 94, 0 },
+ [IEEE80211_MODE_TURBO_G]= { 1, 2, 3, 94, 0 },
+ [IEEE80211_MODE_STURBO_A]={ 1, 2, 3, 94, 0 },
+ [IEEE80211_MODE_11NA] = { 1, 3, 4, 94, 0 },
+ [IEEE80211_MODE_11NG] = { 1, 3, 4, 94, 0 },
};
static const struct phyParamType phyParamForAC_VO[IEEE80211_MODE_MAX] = {
- { 1, 2, 3, 47, 0 }, /* IEEE80211_MODE_AUTO */
- { 1, 2, 3, 47, 0 }, /* IEEE80211_MODE_11A */
- { 1, 2, 3, 102, 0 }, /* IEEE80211_MODE_11B */
- { 1, 2, 3, 47, 0 }, /* IEEE80211_MODE_11G */
- { 1, 2, 3, 102, 0 }, /* IEEE80211_MODE_FH */
- { 1, 2, 2, 47, 0 }, /* IEEE80211_MODE_TURBO_A */
- { 1, 2, 2, 47, 0 }, /* IEEE80211_MODE_TURBO_G */
- { 1, 2, 2, 47, 0 }, /* IEEE80211_MODE_STURBO_A */
- { 1, 2, 3, 47, 0 }, /* IEEE80211_MODE_11NA */
- { 1, 2, 3, 47, 0 }, /* IEEE80211_MODE_11NG */
+ [IEEE80211_MODE_AUTO] = { 1, 2, 3, 47, 0 },
+ [IEEE80211_MODE_11A] = { 1, 2, 3, 47, 0 },
+ [IEEE80211_MODE_11B] = { 1, 2, 3, 102, 0 },
+ [IEEE80211_MODE_11G] = { 1, 2, 3, 47, 0 },
+ [IEEE80211_MODE_FH] = { 1, 2, 3, 102, 0 },
+ [IEEE80211_MODE_TURBO_A]= { 1, 2, 2, 47, 0 },
+ [IEEE80211_MODE_TURBO_G]= { 1, 2, 2, 47, 0 },
+ [IEEE80211_MODE_STURBO_A]={ 1, 2, 2, 47, 0 },
+ [IEEE80211_MODE_11NA] = { 1, 2, 3, 47, 0 },
+ [IEEE80211_MODE_11NG] = { 1, 2, 3, 47, 0 },
};
static const struct phyParamType bssPhyParamForAC_BE[IEEE80211_MODE_MAX] = {
- { 3, 4, 10, 0, 0 }, /* IEEE80211_MODE_AUTO */
- { 3, 4, 10, 0, 0 }, /* IEEE80211_MODE_11A */
- { 3, 4, 10, 0, 0 }, /* IEEE80211_MODE_11B */
- { 3, 4, 10, 0, 0 }, /* IEEE80211_MODE_11G */
- { 3, 4, 10, 0, 0 }, /* IEEE80211_MODE_FH */
- { 2, 3, 10, 0, 0 }, /* IEEE80211_MODE_TURBO_A */
- { 2, 3, 10, 0, 0 }, /* IEEE80211_MODE_TURBO_G */
- { 2, 3, 10, 0, 0 }, /* IEEE80211_MODE_STURBO_A */
- { 3, 4, 10, 0, 0 }, /* IEEE80211_MODE_11NA */
- { 3, 4, 10, 0, 0 }, /* IEEE80211_MODE_11NG */
+ [IEEE80211_MODE_AUTO] = { 3, 4, 10, 0, 0 },
+ [IEEE80211_MODE_11A] = { 3, 4, 10, 0, 0 },
+ [IEEE80211_MODE_11B] = { 3, 4, 10, 0, 0 },
+ [IEEE80211_MODE_11G] = { 3, 4, 10, 0, 0 },
+ [IEEE80211_MODE_FH] = { 3, 4, 10, 0, 0 },
+ [IEEE80211_MODE_TURBO_A]= { 2, 3, 10, 0, 0 },
+ [IEEE80211_MODE_TURBO_G]= { 2, 3, 10, 0, 0 },
+ [IEEE80211_MODE_STURBO_A]={ 2, 3, 10, 0, 0 },
+ [IEEE80211_MODE_11NA] = { 3, 4, 10, 0, 0 },
+ [IEEE80211_MODE_11NG] = { 3, 4, 10, 0, 0 },
};
static const struct phyParamType bssPhyParamForAC_VI[IEEE80211_MODE_MAX] = {
- { 2, 3, 4, 94, 0 }, /* IEEE80211_MODE_AUTO */
- { 2, 3, 4, 94, 0 }, /* IEEE80211_MODE_11A */
- { 2, 3, 4, 188, 0 }, /* IEEE80211_MODE_11B */
- { 2, 3, 4, 94, 0 }, /* IEEE80211_MODE_11G */
- { 2, 3, 4, 188, 0 }, /* IEEE80211_MODE_FH */
- { 2, 2, 3, 94, 0 }, /* IEEE80211_MODE_TURBO_A */
- { 2, 2, 3, 94, 0 }, /* IEEE80211_MODE_TURBO_G */
- { 2, 2, 3, 94, 0 }, /* IEEE80211_MODE_STURBO_A */
- { 2, 3, 4, 94, 0 }, /* IEEE80211_MODE_11NA */
- { 2, 3, 4, 94, 0 }, /* IEEE80211_MODE_11NG */
+ [IEEE80211_MODE_AUTO] = { 2, 3, 4, 94, 0 },
+ [IEEE80211_MODE_11A] = { 2, 3, 4, 94, 0 },
+ [IEEE80211_MODE_11B] = { 2, 3, 4, 188, 0 },
+ [IEEE80211_MODE_11G] = { 2, 3, 4, 94, 0 },
+ [IEEE80211_MODE_FH] = { 2, 3, 4, 188, 0 },
+ [IEEE80211_MODE_TURBO_A]= { 2, 2, 3, 94, 0 },
+ [IEEE80211_MODE_TURBO_G]= { 2, 2, 3, 94, 0 },
+ [IEEE80211_MODE_STURBO_A]={ 2, 2, 3, 94, 0 },
+ [IEEE80211_MODE_11NA] = { 2, 3, 4, 94, 0 },
+ [IEEE80211_MODE_11NG] = { 2, 3, 4, 94, 0 },
};
static const struct phyParamType bssPhyParamForAC_VO[IEEE80211_MODE_MAX] = {
- { 2, 2, 3, 47, 0 }, /* IEEE80211_MODE_AUTO */
- { 2, 2, 3, 47, 0 }, /* IEEE80211_MODE_11A */
- { 2, 2, 3, 102, 0 }, /* IEEE80211_MODE_11B */
- { 2, 2, 3, 47, 0 }, /* IEEE80211_MODE_11G */
- { 2, 2, 3, 102, 0 }, /* IEEE80211_MODE_FH */
- { 1, 2, 2, 47, 0 }, /* IEEE80211_MODE_TURBO_A */
- { 1, 2, 2, 47, 0 }, /* IEEE80211_MODE_TURBO_G */
- { 1, 2, 2, 47, 0 }, /* IEEE80211_MODE_STURBO_A */
- { 2, 2, 3, 47, 0 }, /* IEEE80211_MODE_11NA */
- { 2, 2, 3, 47, 0 }, /* IEEE80211_MODE_11NG */
+ [IEEE80211_MODE_AUTO] = { 2, 2, 3, 47, 0 },
+ [IEEE80211_MODE_11A] = { 2, 2, 3, 47, 0 },
+ [IEEE80211_MODE_11B] = { 2, 2, 3, 102, 0 },
+ [IEEE80211_MODE_11G] = { 2, 2, 3, 47, 0 },
+ [IEEE80211_MODE_FH] = { 2, 2, 3, 102, 0 },
+ [IEEE80211_MODE_TURBO_A]= { 1, 2, 2, 47, 0 },
+ [IEEE80211_MODE_TURBO_G]= { 1, 2, 2, 47, 0 },
+ [IEEE80211_MODE_STURBO_A]={ 1, 2, 2, 47, 0 },
+ [IEEE80211_MODE_11NA] = { 2, 2, 3, 47, 0 },
+ [IEEE80211_MODE_11NG] = { 2, 2, 3, 47, 0 },
};
static void
@@ -922,16 +922,16 @@ void
ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
{
static const paramType phyParam[IEEE80211_MODE_MAX] = {
- { 2, 4, 10, 64, 0 }, /* IEEE80211_MODE_AUTO */
- { 2, 4, 10, 64, 0 }, /* IEEE80211_MODE_11A */
- { 2, 5, 10, 64, 0 }, /* IEEE80211_MODE_11B */
- { 2, 4, 10, 64, 0 }, /* IEEE80211_MODE_11G */
- { 2, 5, 10, 64, 0 }, /* IEEE80211_MODE_FH */
- { 1, 3, 10, 64, 0 }, /* IEEE80211_MODE_TURBO_A */
- { 1, 3, 10, 64, 0 }, /* IEEE80211_MODE_TURBO_G */
- { 1, 3, 10, 64, 0 }, /* IEEE80211_MODE_STURBO_A */
- { 2, 4, 10, 64, 0 }, /* IEEE80211_MODE_11NA */ /*XXXcheck*/
- { 2, 4, 10, 64, 0 }, /* IEEE80211_MODE_11NG */ /*XXXcheck*/
+ [IEEE80211_MODE_AUTO] = { 2, 4, 10, 64, 0 },
+ [IEEE80211_MODE_11A] = { 2, 4, 10, 64, 0 },
+ [IEEE80211_MODE_11B] = { 2, 5, 10, 64, 0 },
+ [IEEE80211_MODE_11G] = { 2, 4, 10, 64, 0 },
+ [IEEE80211_MODE_FH] = { 2, 5, 10, 64, 0 },
+ [IEEE80211_MODE_TURBO_A] = { 1, 3, 10, 64, 0 },
+ [IEEE80211_MODE_TURBO_G] = { 1, 3, 10, 64, 0 },
+ [IEEE80211_MODE_STURBO_A] = { 1, 3, 10, 64, 0 },
+ [IEEE80211_MODE_11NA] = { 2, 4, 10, 64, 0 }, /* XXXcheck*/
+ [IEEE80211_MODE_11NG] = { 2, 4, 10, 64, 0 }, /* XXXcheck*/
};
struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_wme_state *wme = &ic->ic_wme;
@@ -1007,17 +1007,17 @@ ieee80211_wme_updateparams_locked(struct
/* XXX multi-bss */
if (vap->iv_opmode == IEEE80211_M_HOSTAP &&
ic->ic_sta_assoc < 2 && (wme->wme_flags & WME_F_AGGRMODE) != 0) {
- static const uint8_t logCwMin[IEEE80211_MODE_MAX] = {
- 3, /* IEEE80211_MODE_AUTO */
- 3, /* IEEE80211_MODE_11A */
- 4, /* IEEE80211_MODE_11B */
- 3, /* IEEE80211_MODE_11G */
- 4, /* IEEE80211_MODE_FH */
- 3, /* IEEE80211_MODE_TURBO_A */
- 3, /* IEEE80211_MODE_TURBO_G */
- 3, /* IEEE80211_MODE_STURBO_A */
- 3, /* IEEE80211_MODE_11NA */
- 3, /* IEEE80211_MODE_11NG */
+ static const uint8_t logCwMin[IEEE80211_MODE_MAX] = {
+ [IEEE80211_MODE_AUTO] = 3,
+ [IEEE80211_MODE_11A] = 3,
+ [IEEE80211_MODE_11B] = 4,
+ [IEEE80211_MODE_11G] = 3,
+ [IEEE80211_MODE_FH] = 4,
+ [IEEE80211_MODE_TURBO_A] = 3,
+ [IEEE80211_MODE_TURBO_G] = 3,
+ [IEEE80211_MODE_STURBO_A] = 3,
+ [IEEE80211_MODE_11NA] = 3,
+ [IEEE80211_MODE_11NG] = 3,
};
chanp = &wme->wme_chanParams.cap_wmeParams[WME_AC_BE];
bssp = &wme->wme_bssChanParams.cap_wmeParams[WME_AC_BE];
More information about the svn-src-projects
mailing list