aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-08-29 19:26:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-05 16:17:42 -0400
commitf59ac0481660e66cec67f1d6b024e78b9dc715fe (patch)
treee9c69b04ac5863b1429bca5a9df1d75026703cde /include
parentc6e387a214f4b2c4bd48020409e366c133385d98 (diff)
cfg80211: keep track of supported interface modes
It is obviously good for userspace to know up front which interface modes a given piece of hardware might support (even if adding such an interface might fail later because of concurrency issues), so let's make cfg80211 aware of that. For good measure, disallow adding interfaces in all other modes so drivers don't forget to announce support for one mode when they add it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h6
-rw-r--r--include/net/wireless.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 0c1147de3ec7..5e51f4e7600b 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -210,6 +210,10 @@ enum nl80211_commands {
210 * @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from 210 * @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from
211 * association request when used with NL80211_CMD_NEW_STATION) 211 * association request when used with NL80211_CMD_NEW_STATION)
212 * 212 *
213 * @NL80211_ATTR_SUPPORTED_IFTYPES: nested attribute containing all
214 * supported interface types, each a flag attribute with the number
215 * of the interface mode.
216 *
213 * @NL80211_ATTR_MAX: highest attribute number currently defined 217 * @NL80211_ATTR_MAX: highest attribute number currently defined
214 * @__NL80211_ATTR_AFTER_LAST: internal use 218 * @__NL80211_ATTR_AFTER_LAST: internal use
215 */ 219 */
@@ -259,6 +263,8 @@ enum nl80211_attrs {
259 263
260 NL80211_ATTR_HT_CAPABILITY, 264 NL80211_ATTR_HT_CAPABILITY,
261 265
266 NL80211_ATTR_SUPPORTED_IFTYPES,
267
262 /* add attributes here, update the policy in nl80211.c */ 268 /* add attributes here, update the policy in nl80211.c */
263 269
264 __NL80211_ATTR_AFTER_LAST, 270 __NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/wireless.h b/include/net/wireless.h
index 9324f8dd183e..1dc8ec3daa2f 100644
--- a/include/net/wireless.h
+++ b/include/net/wireless.h
@@ -185,6 +185,9 @@ struct wiphy {
185 /* permanent MAC address */ 185 /* permanent MAC address */
186 u8 perm_addr[ETH_ALEN]; 186 u8 perm_addr[ETH_ALEN];
187 187
188 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
189 u16 interface_modes;
190
188 /* If multiple wiphys are registered and you're handed e.g. 191 /* If multiple wiphys are registered and you're handed e.g.
189 * a regular netdev with assigned ieee80211_ptr, you won't 192 * a regular netdev with assigned ieee80211_ptr, you won't
190 * know whether it points to a wiphy your driver has registered 193 * know whether it points to a wiphy your driver has registered