diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-05-13 10:58:57 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-16 14:10:40 -0400 |
commit | 7527a782e187d1214a5b3dc2897ce441033bb4ef (patch) | |
tree | 3310adf988e72cb91736c0638d4c17edcccebfe1 /net/wireless/core.h | |
parent | 805d7d23ef9806e47b550ad80270c4cea4ffc984 (diff) | |
download | linux-7527a782e187d1214a5b3dc2897ce441033bb4ef.tar.gz linux-7527a782e187d1214a5b3dc2897ce441033bb4ef.tar.bz2 linux-7527a782e187d1214a5b3dc2897ce441033bb4ef.zip |
cfg80211: advertise possible interface combinations
Add the ability to advertise interface combinations in nl80211.
This allows the driver to indicate what the combinations are
that it supports. "Combinations" of just a single interface are
implicit, as previously. Note that cfg80211 will enforce that
the restrictions are met, but not for all drivers yet (once all
drivers are updated, we can remove the flag and enforce for all).
When no combinations are actually supported, an empty list will
be exported so that userspace can know if the kernel exported
this info or not (although it isn't clear to me what tools using
the info should do if the kernel didn't export it).
Since some interface types are purely virtual/software and don't
fit the restrictions, those are exposed in a new list of pure SW
types, not subject to restrictions. This mainly exists to handle
AP-VLAN and monitor interfaces in mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index d4b8f4c0bbbb..bf0fb40e3c8b 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -422,6 +422,17 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, u32 *flags, struct vif_params *params); void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); +int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, + struct wireless_dev *wdev, + enum nl80211_iftype iftype); + +static inline int +cfg80211_can_add_interface(struct cfg80211_registered_device *rdev, + enum nl80211_iftype iftype) +{ + return cfg80211_can_change_interface(rdev, NULL, iftype); +} + struct ieee80211_channel * rdev_freq_to_chan(struct cfg80211_registered_device *rdev, int freq, enum nl80211_channel_type channel_type); |