|
@@ -1479,8 +1479,9 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if ((vif->type == NL80211_IFTYPE_ADHOC) &&
|
|
|
|
- sc->nvifs > 0) {
|
|
|
|
|
|
+ if ((ah->opmode == NL80211_IFTYPE_ADHOC) ||
|
|
|
|
+ ((vif->type == NL80211_IFTYPE_ADHOC) &&
|
|
|
|
+ sc->nvifs > 0)) {
|
|
ath_err(common, "Cannot create ADHOC interface when other"
|
|
ath_err(common, "Cannot create ADHOC interface when other"
|
|
" interfaces already exist.\n");
|
|
" interfaces already exist.\n");
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|