diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index c1511b14b23..42db0fc8b92 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
@@ -2155,6 +2155,13 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2155 | goto set_ch_out; | 2155 | goto set_ch_out; |
2156 | } | 2156 | } |
2157 | 2157 | ||
2158 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC && | ||
2159 | !iwl_legacy_is_channel_ibss(ch_info)) { | ||
2160 | IWL_DEBUG_MAC80211(priv, "leave - not IBSS channel\n"); | ||
2161 | ret = -EINVAL; | ||
2162 | goto set_ch_out; | ||
2163 | } | ||
2164 | |||
2158 | spin_lock_irqsave(&priv->lock, flags); | 2165 | spin_lock_irqsave(&priv->lock, flags); |
2159 | 2166 | ||
2160 | for_each_context(priv, ctx) { | 2167 | for_each_context(priv, ctx) { |