1 --- a/net/mac80211/cfg.c
2 +++ b/net/mac80211/cfg.c
3 @@ -1154,6 +1154,18 @@ static int ieee80211_set_txq_params(stru
7 +static int ieee80211_get_oper_channel(struct wiphy *wiphy,
8 + struct ieee80211_channel **chan,
9 + enum nl80211_channel_type *channel_type)
11 + struct ieee80211_local *local = wiphy_priv(wiphy);
13 + *chan = local->oper_channel;
14 + *channel_type = local->oper_channel_type;
19 static int ieee80211_set_channel(struct wiphy *wiphy,
20 struct ieee80211_channel *chan,
21 enum nl80211_channel_type channel_type)
22 @@ -1494,6 +1506,7 @@ struct cfg80211_ops mac80211_config_ops
24 .change_bss = ieee80211_change_bss,
25 .set_txq_params = ieee80211_set_txq_params,
26 + .get_channel = ieee80211_get_oper_channel,
27 .set_channel = ieee80211_set_channel,
28 .suspend = ieee80211_suspend,
29 .resume = ieee80211_resume,