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,
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];
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 "
/* 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;
}
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;
/*