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:

committed by
John W. Linville

parent
9bd568a50c
commit
5be83de54c
@@ -450,7 +450,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
|
||||
const struct ieee80211_regdomain *regd;
|
||||
|
||||
wiphy->reg_notifier = reg_notifier;
|
||||
wiphy->strict_regulatory = true;
|
||||
wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
|
||||
|
||||
if (ath_is_world_regd(reg)) {
|
||||
/*
|
||||
@@ -458,8 +458,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
|
||||
* saved on the wiphy orig_* parameters
|
||||
*/
|
||||
regd = ath_world_regdomain(reg);
|
||||
wiphy->custom_regulatory = true;
|
||||
wiphy->strict_regulatory = false;
|
||||
wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
|
||||
} else {
|
||||
/*
|
||||
* This gets applied in the case of the absense of CRDA,
|
||||
|
@@ -2400,16 +2400,14 @@ static int iwl_setup_mac(struct iwl_priv *priv)
|
||||
BIT(NL80211_IFTYPE_STATION) |
|
||||
BIT(NL80211_IFTYPE_ADHOC);
|
||||
|
||||
hw->wiphy->custom_regulatory = true;
|
||||
|
||||
/* Firmware does not support this */
|
||||
hw->wiphy->disable_beacon_hints = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY |
|
||||
WIPHY_FLAG_DISABLE_BEACON_HINTS;
|
||||
|
||||
/*
|
||||
* For now, disable PS by default because it affects
|
||||
* RX performance significantly.
|
||||
*/
|
||||
hw->wiphy->ps_default = false;
|
||||
hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
|
||||
|
||||
hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX;
|
||||
/* we create the 802.11 header and a zero-length SSID element */
|
||||
|
@@ -3904,10 +3904,8 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)
|
||||
BIT(NL80211_IFTYPE_STATION) |
|
||||
BIT(NL80211_IFTYPE_ADHOC);
|
||||
|
||||
hw->wiphy->custom_regulatory = true;
|
||||
|
||||
/* Firmware does not support this */
|
||||
hw->wiphy->disable_beacon_hints = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY |
|
||||
WIPHY_FLAG_DISABLE_BEACON_HINTS;
|
||||
|
||||
hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945;
|
||||
/* we create the 802.11 header and a zero-length SSID element */
|
||||
|
@@ -1146,46 +1146,46 @@ static int __init init_mac80211_hwsim(void)
|
||||
break;
|
||||
case HWSIM_REGTEST_WORLD_ROAM:
|
||||
if (i == 0) {
|
||||
hw->wiphy->custom_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
|
||||
wiphy_apply_custom_regulatory(hw->wiphy,
|
||||
&hwsim_world_regdom_custom_01);
|
||||
}
|
||||
break;
|
||||
case HWSIM_REGTEST_CUSTOM_WORLD:
|
||||
hw->wiphy->custom_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
|
||||
wiphy_apply_custom_regulatory(hw->wiphy,
|
||||
&hwsim_world_regdom_custom_01);
|
||||
break;
|
||||
case HWSIM_REGTEST_CUSTOM_WORLD_2:
|
||||
if (i == 0) {
|
||||
hw->wiphy->custom_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
|
||||
wiphy_apply_custom_regulatory(hw->wiphy,
|
||||
&hwsim_world_regdom_custom_01);
|
||||
} else if (i == 1) {
|
||||
hw->wiphy->custom_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
|
||||
wiphy_apply_custom_regulatory(hw->wiphy,
|
||||
&hwsim_world_regdom_custom_02);
|
||||
}
|
||||
break;
|
||||
case HWSIM_REGTEST_STRICT_ALL:
|
||||
hw->wiphy->strict_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
|
||||
break;
|
||||
case HWSIM_REGTEST_STRICT_FOLLOW:
|
||||
case HWSIM_REGTEST_STRICT_AND_DRIVER_REG:
|
||||
if (i == 0)
|
||||
hw->wiphy->strict_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
|
||||
break;
|
||||
case HWSIM_REGTEST_ALL:
|
||||
if (i == 0) {
|
||||
hw->wiphy->custom_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
|
||||
wiphy_apply_custom_regulatory(hw->wiphy,
|
||||
&hwsim_world_regdom_custom_01);
|
||||
} else if (i == 1) {
|
||||
hw->wiphy->custom_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
|
||||
wiphy_apply_custom_regulatory(hw->wiphy,
|
||||
&hwsim_world_regdom_custom_02);
|
||||
} else if (i == 4)
|
||||
hw->wiphy->strict_regulatory = true;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@@ -579,7 +579,7 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
|
||||
* For now, disable PS by default because it affects
|
||||
* link stability significantly.
|
||||
*/
|
||||
dev->wiphy->ps_default = false;
|
||||
dev->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
|
||||
|
||||
mutex_init(&priv->conf_mutex);
|
||||
mutex_init(&priv->eeprom_mutex);
|
||||
|
Reference in New Issue
Block a user