aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-18 18:56:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-19 11:08:50 -0500
commit5be83de54c16944dea9c16c6a5a53c1fa75ed304 (patch)
treedd251d9331a07ec73c7a4992c79ce30f0553db40 /include/net
parent9bd568a50c446433038dec2a5186c5c57c3dbd23 (diff)
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>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h62
1 files changed, 35 insertions, 27 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 21710fc17eaf..eca36abca8f5 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1108,27 +1108,45 @@ struct cfg80211_ops {
1108 */ 1108 */
1109 1109
1110/** 1110/**
1111 * struct wiphy - wireless hardware description 1111 * enum wiphy_flags - wiphy capability flags
1112 * @idx: the wiphy index assigned to this item 1112 *
1113 * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> 1113 * @WIPHY_FLAG_CUSTOM_REGULATORY: tells us the driver for this device
1114 * @custom_regulatory: tells us the driver for this device
1115 * has its own custom regulatory domain and cannot identify the 1114 * has its own custom regulatory domain and cannot identify the
1116 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled 1115 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled
1117 * we will disregard the first regulatory hint (when the 1116 * we will disregard the first regulatory hint (when the
1118 * initiator is %REGDOM_SET_BY_CORE). 1117 * initiator is %REGDOM_SET_BY_CORE).
1119 * @strict_regulatory: tells us the driver for this device will ignore 1118 * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will
1120 * regulatory domain settings until it gets its own regulatory domain 1119 * ignore regulatory domain settings until it gets its own regulatory
1121 * via its regulatory_hint(). After its gets its own regulatory domain 1120 * domain via its regulatory_hint(). After its gets its own regulatory
1122 * it will only allow further regulatory domain settings to further 1121 * domain it will only allow further regulatory domain settings to
1123 * enhance compliance. For example if channel 13 and 14 are disabled 1122 * further enhance compliance. For example if channel 13 and 14 are
1124 * by this regulatory domain no user regulatory domain can enable these 1123 * disabled by this regulatory domain no user regulatory domain can
1125 * channels at a later time. This can be used for devices which do not 1124 * enable these channels at a later time. This can be used for devices
1126 * have calibration information gauranteed for frequencies or settings 1125 * which do not have calibration information gauranteed for frequencies
1127 * outside of its regulatory domain. 1126 * or settings outside of its regulatory domain.
1128 * @disable_beacon_hints: enable this if your driver needs to ensure that 1127 * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure
1129 * passive scan flags and beaconing flags may not be lifted by cfg80211 1128 * that passive scan flags and beaconing flags may not be lifted by
1130 * due to regulatory beacon hints. For more information on beacon 1129 * cfg80211 due to regulatory beacon hints. For more information on beacon
1131 * hints read the documenation for regulatory_hint_found_beacon() 1130 * hints read the documenation for regulatory_hint_found_beacon()
1131 * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this
1132 * wiphy at all
1133 * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled
1134 * by default -- this flag will be set depending on the kernel's default
1135 * on wiphy_new(), but can be changed by the driver if it has a good
1136 * reason to override the default
1137 */
1138enum wiphy_flags {
1139 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
1140 WIPHY_FLAG_STRICT_REGULATORY = BIT(1),
1141 WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2),
1142 WIPHY_FLAG_NETNS_OK = BIT(3),
1143 WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4),
1144};
1145
1146/**
1147 * struct wiphy - wireless hardware description
1148 * @idx: the wiphy index assigned to this item
1149 * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name>
1132 * @reg_notifier: the driver's regulatory notification callback 1150 * @reg_notifier: the driver's regulatory notification callback
1133 * @regd: the driver's regulatory domain, if one was requested via 1151 * @regd: the driver's regulatory domain, if one was requested via
1134 * the regulatory_hint() API. This can be used by the driver 1152 * the regulatory_hint() API. This can be used by the driver
@@ -1143,11 +1161,6 @@ struct cfg80211_ops {
1143 * -1 = fragmentation disabled, only odd values >= 256 used 1161 * -1 = fragmentation disabled, only odd values >= 256 used
1144 * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled 1162 * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled
1145 * @net: the network namespace this wiphy currently lives in 1163 * @net: the network namespace this wiphy currently lives in
1146 * @netnsok: if set to false, do not allow changing the netns of this
1147 * wiphy at all
1148 * @ps_default: default for powersave, will be set depending on the
1149 * kernel's default on wiphy_new(), but can be changed by the
1150 * driver if it has a good reason to override the default
1151 */ 1164 */
1152struct wiphy { 1165struct wiphy {
1153 /* assign these fields before you register the wiphy */ 1166 /* assign these fields before you register the wiphy */
@@ -1158,12 +1171,7 @@ struct wiphy {
1158 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ 1171 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
1159 u16 interface_modes; 1172 u16 interface_modes;
1160 1173
1161 bool custom_regulatory; 1174 u32 flags;
1162 bool strict_regulatory;
1163 bool disable_beacon_hints;
1164
1165 bool netnsok;
1166 bool ps_default;
1167 1175
1168 enum cfg80211_signal_type signal_type; 1176 enum cfg80211_signal_type signal_type;
1169 1177