提交 59575d1c 编写于 作者: R Rajkumar Manoharan 提交者: John W. Linville

ath9k: deny new interface addtion on IBSS mode

The present check denies the IBSS interface addtion if we
already have any other vifs. But it fails to deny interface
addition if IBSS was already present.
Signed-off-by: NRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 1e5f52de
......@@ -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"
" interfaces already exist.\n");
ret = -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册