diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-01-13 14:40:59 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-13 14:40:59 -0500 |
commit | f13352519ee8c4b22b87fc1a47743d1f53ea193e (patch) | |
tree | 48c18144f3e5e530ec61d5eadbb5a34675a69fe8 /net/wireless/util.c | |
parent | 559c33d84da71e07816e692bfd73ad92675256a6 (diff) | |
parent | 26b0e411d37a2ca5992d02884dc3fa4e1907e598 (diff) | |
download | op-kernel-dev-f13352519ee8c4b22b87fc1a47743d1f53ea193e.zip op-kernel-dev-f13352519ee8c4b22b87fc1a47743d1f53ea193e.tar.gz |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 5618888..d39c371 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -879,7 +879,9 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, dev->ieee80211_ptr->use_4addr = false; dev->ieee80211_ptr->mesh_id_up_len = 0; + wdev_lock(dev->ieee80211_ptr); rdev_set_qos_map(rdev, dev, NULL); + wdev_unlock(dev->ieee80211_ptr); switch (otype) { case NL80211_IFTYPE_AP: @@ -1479,6 +1481,19 @@ int ieee80211_get_ratemask(struct ieee80211_supported_band *sband, return 0; } +unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy) +{ + enum ieee80211_band band; + unsigned int n_channels = 0; + + for (band = 0; band < IEEE80211_NUM_BANDS; band++) + if (wiphy->bands[band]) + n_channels += wiphy->bands[band]->n_channels; + + return n_channels; +} +EXPORT_SYMBOL(ieee80211_get_num_supported_channels); + /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ const unsigned char rfc1042_header[] __aligned(2) = |