aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-12 13:45:08 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-13 10:16:11 -0400
commit5b7ccaf3fc7446e42b83a77fd7aa7ad92850acdd (patch)
treee87b3f28cdfe513de4f3527fabaaacca63eedc24 /net/mac80211/cfg.c
parent075e08477d51709ae1998a05c35aadf59ef823b9 (diff)
cfg80211/mac80211: re-add get_channel operation
This essentially reverts commit 2e165b818456 but introduces the get_channel operation with a new wireless_dev argument so that you can retrieve the channel per interface. This is necessary as even though we can track all interface channels (except monitor) we can't track the channel type used. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index e95f24eef870..10dd9631e4da 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2982,6 +2982,16 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
2982 return 0; 2982 return 0;
2983} 2983}
2984 2984
2985static struct ieee80211_channel *
2986ieee80211_cfg_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
2987 enum nl80211_channel_type *type)
2988{
2989 struct ieee80211_local *local = wiphy_priv(wiphy);
2990
2991 *type = local->_oper_channel_type;
2992 return local->oper_channel;
2993}
2994
2985#ifdef CONFIG_PM 2995#ifdef CONFIG_PM
2986static void ieee80211_set_wakeup(struct wiphy *wiphy, bool enabled) 2996static void ieee80211_set_wakeup(struct wiphy *wiphy, bool enabled)
2987{ 2997{
@@ -3062,4 +3072,5 @@ struct cfg80211_ops mac80211_config_ops = {
3062 .get_et_sset_count = ieee80211_get_et_sset_count, 3072 .get_et_sset_count = ieee80211_get_et_sset_count,
3063 .get_et_stats = ieee80211_get_et_stats, 3073 .get_et_stats = ieee80211_get_et_stats,
3064 .get_et_strings = ieee80211_get_et_strings, 3074 .get_et_strings = ieee80211_get_et_strings,
3075 .get_channel = ieee80211_cfg_get_channel,
3065}; 3076};