1 --- a/net/wireless/core.h
2 +++ b/net/wireless/core.h
3 @@ -76,6 +76,7 @@ struct cfg80211_registered_device {
6 struct ieee80211_channel *channel;
7 + enum nl80211_channel_type channel_type;
9 /* must be last because of the way we do wiphy_priv(),
10 * and it should at least be aligned to NETDEV_ALIGN */
11 --- a/net/wireless/chan.c
12 +++ b/net/wireless/chan.c
13 @@ -97,6 +97,7 @@ int rdev_set_freq(struct cfg80211_regist
17 + rdev->channel_type = channel_type;
21 --- a/net/wireless/nl80211.c
22 +++ b/net/wireless/nl80211.c
23 @@ -887,6 +887,11 @@ static int nl80211_send_iface(struct sk_
24 NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
25 NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, dev->name);
26 NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, dev->ieee80211_ptr->iftype);
27 + if (rdev->channel) {
28 + NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, rdev->channel->center_freq);
29 + NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, rdev->channel_type);
33 NLA_PUT_U32(msg, NL80211_ATTR_GENERATION,
34 rdev->devlist_generation ^