Make use of the IEEE80211_IS_CHAN_RADAR macro

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4074 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
benoit 2009-07-11 10:15:28 +00:00
parent 16a7158cf2
commit 622cfce180
3 changed files with 5 additions and 7 deletions

View File

@ -893,7 +893,7 @@ ieee80211_expire_excl_restrictions(struct ieee80211com *ic)
do_gettimeofday(&tv_now);
for (i = 0; i < ic->ic_nchans; i++) {
c = &ic->ic_channels[i];
if (c->ic_flags & IEEE80211_CHAN_RADAR) {
if (IEEE80211_IS_CHAN_RADAR(c)) {
if (timeval_compare(&ic->ic_chan_non_occupy[i],
&tv_now) < 0) {
if_printf(dev,
@ -938,7 +938,7 @@ ieee80211_update_dfs_excl_timer(struct ieee80211com *ic)
tv_next.tv_usec = 0;
for (i = 0; i < ic->ic_nchans; i++) {
chan = &ic->ic_channels[i];
if (chan->ic_flags & IEEE80211_CHAN_RADAR) {
if (IEEE80211_IS_CHAN_RADAR(chan)) {
if ((tv_next.tv_sec == 0) &&
(tv_next.tv_usec == 0)) {
tv_next = ic->ic_chan_non_occupy[i];
@ -1005,8 +1005,7 @@ ieee80211_expire_dfs_excl_timer(unsigned long data)
ic_freq,
vap->iv_des_chan->
ic_flags);
} else if (!(des_chan->ic_flags &
IEEE80211_CHAN_RADAR)) {
} else if (!IEEE80211_IS_CHAN_RADAR(des_chan)) {
IEEE80211_DPRINTF(vap,
IEEE80211_MSG_DOTH,
"%s: Desired channel "

View File

@ -1066,8 +1066,7 @@ ieee80211_scan_dfs_action(struct ieee80211vap *vap,
/* Search for the first channel with no radar detected */
int n = 0;
for (n = 0; n < ic->ic_nchans; n++) {
if (0 == (ic->ic_channels[n].ic_flags &
IEEE80211_CHAN_RADAR)) {
if (!IEEE80211_IS_CHAN_RADAR(&ic->ic_channels[n])) {
new_channel = &ic->ic_channels[n];
break;
}

View File

@ -730,7 +730,7 @@ ieee80211_ioctl_siwfreq(struct net_device *dev, struct iw_request_info *info,
return 0; /* no change, return */
/* Don't allow to change to channel with radar found */
if (c->ic_flags & IEEE80211_CHAN_RADAR)
if (IEEE80211_IS_CHAN_RADAR(c))
return -EINVAL;
/*