diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 079fc49e3975..6b001e445718 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1759,11 +1759,17 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 pid, u32 seq, int flags, | |||
1759 | (cfg80211_rdev_list_generation << 2))) | 1759 | (cfg80211_rdev_list_generation << 2))) |
1760 | goto nla_put_failure; | 1760 | goto nla_put_failure; |
1761 | 1761 | ||
1762 | if (rdev->monitor_channel) { | 1762 | if (rdev->ops->get_channel) { |
1763 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, | 1763 | struct ieee80211_channel *chan; |
1764 | rdev->monitor_channel->center_freq) || | 1764 | enum nl80211_channel_type channel_type; |
1765 | nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, | 1765 | |
1766 | rdev->monitor_channel_type)) | 1766 | chan = rdev->ops->get_channel(&rdev->wiphy, wdev, |
1767 | &channel_type); | ||
1768 | if (chan && | ||
1769 | (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, | ||
1770 | chan->center_freq) || | ||
1771 | nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, | ||
1772 | channel_type))) | ||
1767 | goto nla_put_failure; | 1773 | goto nla_put_failure; |
1768 | } | 1774 | } |
1769 | 1775 | ||