diff options
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r-- | net/wireless/chan.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index d355f67d0cdd..2f876b9ee344 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c | |||
@@ -105,7 +105,7 @@ cfg80211_get_chan_state(struct wireless_dev *wdev, | |||
105 | 105 | ||
106 | ASSERT_WDEV_LOCK(wdev); | 106 | ASSERT_WDEV_LOCK(wdev); |
107 | 107 | ||
108 | if (!netif_running(wdev->netdev)) | 108 | if (wdev->netdev && !netif_running(wdev->netdev)) |
109 | return; | 109 | return; |
110 | 110 | ||
111 | switch (wdev->iftype) { | 111 | switch (wdev->iftype) { |
@@ -143,6 +143,11 @@ cfg80211_get_chan_state(struct wireless_dev *wdev, | |||
143 | case NL80211_IFTYPE_WDS: | 143 | case NL80211_IFTYPE_WDS: |
144 | /* these interface types don't really have a channel */ | 144 | /* these interface types don't really have a channel */ |
145 | return; | 145 | return; |
146 | case NL80211_IFTYPE_P2P_DEVICE: | ||
147 | if (wdev->wiphy->features & | ||
148 | NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL) | ||
149 | *chanmode = CHAN_MODE_EXCLUSIVE; | ||
150 | return; | ||
146 | case NL80211_IFTYPE_UNSPECIFIED: | 151 | case NL80211_IFTYPE_UNSPECIFIED: |
147 | case NUM_NL80211_IFTYPES: | 152 | case NUM_NL80211_IFTYPES: |
148 | WARN_ON(1); | 153 | WARN_ON(1); |