mirror of
https://github.com/proski/madwifi
synced 2024-11-25 07:49:43 +03:00
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:
parent
16a7158cf2
commit
622cfce180
@ -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 "
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user