cfg80211: convert bools into flags
We've accumulated a number of options for wiphys which make more sense as flags as we keep adding more. Convert the existing ones. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
9bd568a50c
commit
5be83de54c
11 changed files with 70 additions and 67 deletions
|
@ -1008,7 +1008,7 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
|
|||
|
||||
if (last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
|
||||
request_wiphy && request_wiphy == wiphy &&
|
||||
request_wiphy->strict_regulatory) {
|
||||
request_wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) {
|
||||
/*
|
||||
* This gaurantees the driver's requested regulatory domain
|
||||
* will always be used as a base for further regulatory
|
||||
|
@ -1051,13 +1051,13 @@ static bool ignore_reg_update(struct wiphy *wiphy,
|
|||
if (!last_request)
|
||||
return true;
|
||||
if (initiator == NL80211_REGDOM_SET_BY_CORE &&
|
||||
wiphy->custom_regulatory)
|
||||
wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY)
|
||||
return true;
|
||||
/*
|
||||
* wiphy->regd will be set once the device has its own
|
||||
* desired regulatory domain set
|
||||
*/
|
||||
if (wiphy->strict_regulatory && !wiphy->regd &&
|
||||
if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd &&
|
||||
!is_world_regdom(last_request->alpha2))
|
||||
return true;
|
||||
return false;
|
||||
|
@ -1093,7 +1093,7 @@ static void handle_reg_beacon(struct wiphy *wiphy,
|
|||
|
||||
chan->beacon_found = true;
|
||||
|
||||
if (wiphy->disable_beacon_hints)
|
||||
if (wiphy->flags & WIPHY_FLAG_DISABLE_BEACON_HINTS)
|
||||
return;
|
||||
|
||||
chan_before.center_freq = chan->center_freq;
|
||||
|
@ -1164,7 +1164,7 @@ static bool reg_is_world_roaming(struct wiphy *wiphy)
|
|||
return true;
|
||||
if (last_request &&
|
||||
last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
|
||||
wiphy->custom_regulatory)
|
||||
wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -1591,7 +1591,8 @@ static void reg_process_hint(struct regulatory_request *reg_request)
|
|||
|
||||
r = __regulatory_hint(wiphy, reg_request);
|
||||
/* This is required so that the orig_* parameters are saved */
|
||||
if (r == -EALREADY && wiphy && wiphy->strict_regulatory)
|
||||
if (r == -EALREADY && wiphy &&
|
||||
wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY)
|
||||
wiphy_update_regulatory(wiphy, reg_request->initiator);
|
||||
out:
|
||||
mutex_unlock(®_mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue