Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59575d1c authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville
Browse files

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: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1e5f52de
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;