diff options
author | sam <sam@FreeBSD.org> | 2009-02-19 04:40:47 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-02-19 04:40:47 +0000 |
commit | fe861a3d8d52e95e4b0f5f4727ef776824b94ce7 (patch) | |
tree | d629ed4de928cfb323f73f0b5633b4ebadfe5dc6 | |
parent | 3f5ab4a07f2b81c9fbc3cc3a53ea0e88facd61be (diff) | |
download | FreeBSD-src-fe861a3d8d52e95e4b0f5f4727ef776824b94ce7.zip FreeBSD-src-fe861a3d8d52e95e4b0f5f4727ef776824b94ce7.tar.gz |
use c99 initializer
-rw-r--r-- | sys/net80211/ieee80211_scan_sta.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c index 6d6b5b2..f9210a0 100644 --- a/sys/net80211/ieee80211_scan_sta.c +++ b/sys/net80211/ieee80211_scan_sta.c @@ -405,17 +405,20 @@ find11gchannel(struct ieee80211com *ic, int i, int freq) } return NULL; } + static const u_int chanflags[IEEE80211_MODE_MAX] = { - IEEE80211_CHAN_B, /* 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_A, /* IEEE80211_MODE_TURBO_A (check base channel)*/ - IEEE80211_CHAN_G, /* IEEE80211_MODE_TURBO_G */ - IEEE80211_CHAN_ST, /* IEEE80211_MODE_STURBO_A */ - IEEE80211_CHAN_A, /* IEEE80211_MODE_11NA (check legacy) */ - IEEE80211_CHAN_G, /* IEEE80211_MODE_11NG (check legacy) */ + [IEEE80211_MODE_AUTO] = IEEE80211_CHAN_B, + [IEEE80211_MODE_11A] = IEEE80211_CHAN_A, + [IEEE80211_MODE_11B] = IEEE80211_CHAN_B, + [IEEE80211_MODE_11G] = IEEE80211_CHAN_G, + [IEEE80211_MODE_FH] = IEEE80211_CHAN_FHSS, + /* check base channel */ + [IEEE80211_MODE_TURBO_A] = IEEE80211_CHAN_A, + [IEEE80211_MODE_TURBO_G] = IEEE80211_CHAN_G, + [IEEE80211_MODE_STURBO_A] = IEEE80211_CHAN_ST, + /* check legacy */ + [IEEE80211_MODE_11NA] = IEEE80211_CHAN_A, + [IEEE80211_MODE_11NG] = IEEE80211_CHAN_G, }; static void |