On Tue, 2013-12-03 at 21:16 +0200, Ilan Peer wrote: > +#ifdef CONFIG_CFG80211_REG_SOFT_CONFIGURATIONS > +/* For GO only, check if the channel can be used under permissive conditions > + * mandated by the some regulatory bodies, i.e., the channel is marked with > + * IEEE80211_CHAN_GO_CONCURRENT and there is an additional station interface > + * associated to an AP on the same channel or on the same UNII band > + * (assuming that the AP is an authorized master). > + */ > +static bool cfg80211_go_permissive_chan(struct cfg80211_registered_device *rdev, > + struct ieee80211_channel *chan) > +{ Seems like you could move the ifdef here ... > + struct wireless_dev *wdev_iter; > + > + ASSERT_RTNL(); > + > + if (!(chan->flags & IEEE80211_CHAN_GO_CONCURRENT)) > + return false; > + > + list_for_each_entry(wdev_iter, &rdev->wdev_list, list) { > + struct ieee80211_channel *other_chan = NULL; > + > + if (wdev_iter->iftype != NL80211_IFTYPE_STATION || > + !netif_running(wdev_iter->netdev)) > + continue; > + > + wdev_lock(wdev_iter); > + if (wdev_iter->current_bss) > + other_chan = wdev_iter->current_bss->pub.channel; > + wdev_unlock(wdev_iter); > + > + if (!other_chan) > + continue; > + > + if (chan == other_chan) { > + return true; > + } else if (chan->band == IEEE80211_BAND_5GHZ) { > + int r1 = cfg80211_get_unii(chan->center_freq); > + int r2 = cfg80211_get_unii(other_chan->center_freq); > + > + if (r1 != -EINVAL && r1 == r2) > + return true; > + } > + } and here instead of duplicating the function prototype > + return false; > +} johannes