add DFS capability bit and use it to auto-enable DFS support

This commit is contained in:
sam 2008-05-11 23:32:07 +00:00
parent d58b2a7dc0
commit 2aec73fe96
3 changed files with 5 additions and 3 deletions

View File

@ -392,8 +392,9 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap,
(vap->iv_caps & IEEE80211_C_BGSCAN))
vap->iv_flags |= IEEE80211_F_BGSCAN;
vap->iv_flags |= IEEE80211_F_DOTH; /* XXX out of caps, just ena */
/* XXX out of caps, just ena */
if (vap->iv_opmode == IEEE80211_M_HOSTAP)
/* NB: DFS support only makes sense for ap mode right now */
if (vap->iv_opmode == IEEE80211_M_HOSTAP &&
(vap->iv_caps & IEEE80211_C_DFS))
vap->iv_flags_ext |= IEEE80211_FEXT_DFS;
vap->iv_des_chan = IEEE80211_CHAN_ANYC; /* any channel is ok */

View File

@ -73,7 +73,7 @@ __FBSDID("$FreeBSD$");
#define IEEE80211_C_BITS \
"\20\7FF\10TURBOP\11IBSS\12PMGT" \
"\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \
"\21MONITOR\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \
"\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \
"\37TXFRAG"
#define IEEE80211_C_CRYPTO_BITS \

View File

@ -504,6 +504,7 @@ MALLOC_DECLARE(M_80211_VAP);
#define IEEE80211_C_SHSLOT 0x00004000 /* CAPABILITY: short slottime */
#define IEEE80211_C_SHPREAMBLE 0x00008000 /* CAPABILITY: short preamble */
#define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */
#define IEEE80211_C_DFS 0x00020000 /* CAPABILITY: DFS/radar avail*/
/* 0x20000 available */
#define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */
#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */