linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] ath9k: deny new interface addtion on IBSS mode
@ 2011-04-04 17:26 Rajkumar Manoharan
  2011-04-04 17:26 ` [PATCH 2/5] ath9k: Cleanup ath_vif struct Rajkumar Manoharan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rajkumar Manoharan @ 2011-04-04 17:26 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Rajkumar Manoharan

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: Rajkumar Manoharan <rmanoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6a41302..67b0eea 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1483,8 +1483,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;
-- 
1.7.4.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-04 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 17:26 [PATCH 1/5] ath9k: deny new interface addtion on IBSS mode Rajkumar Manoharan
2011-04-04 17:26 ` [PATCH 2/5] ath9k: Cleanup ath_vif struct Rajkumar Manoharan
2011-04-04 17:26 ` [PATCH 3/5] ath9k: Handle BSSID/AID for multiple interfaces Rajkumar Manoharan
2011-04-04 17:26 ` [PATCH 4/5] ath9k: configure beacons based on hw opmode Rajkumar Manoharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).