|
@@ -5771,10 +5771,15 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
|
|
|
|
|
|
/* useless if AP is not running */
|
|
/* useless if AP is not running */
|
|
if (!wdev->beacon_interval)
|
|
if (!wdev->beacon_interval)
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -ENOTCONN;
|
|
break;
|
|
break;
|
|
case NL80211_IFTYPE_ADHOC:
|
|
case NL80211_IFTYPE_ADHOC:
|
|
|
|
+ if (!wdev->ssid_len)
|
|
|
|
+ return -ENOTCONN;
|
|
|
|
+ break;
|
|
case NL80211_IFTYPE_MESH_POINT:
|
|
case NL80211_IFTYPE_MESH_POINT:
|
|
|
|
+ if (!wdev->mesh_id_len)
|
|
|
|
+ return -ENOTCONN;
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|