aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanoharan@atheros.com>2011-04-04 13:26:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-07 15:34:15 -0400
commit59575d1c717815d62f1b5aeac74e5e60a1b27428 (patch)
treee2a0a7e3237f74f639807bc61e57155913ddb989
parent1e5f52de216a32986a5c3cbc358dbb2620a03047 (diff)
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: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c5
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 3c5de73dcb4..88073f4c2b6 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1479,8 +1479,9 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1479 } 1479 }
1480 } 1480 }
1481 1481
1482 if ((vif->type == NL80211_IFTYPE_ADHOC) && 1482 if ((ah->opmode == NL80211_IFTYPE_ADHOC) ||
1483 sc->nvifs > 0) { 1483 ((vif->type == NL80211_IFTYPE_ADHOC) &&
1484 sc->nvifs > 0)) {
1484 ath_err(common, "Cannot create ADHOC interface when other" 1485 ath_err(common, "Cannot create ADHOC interface when other"
1485 " interfaces already exist.\n"); 1486 " interfaces already exist.\n");
1486 ret = -EINVAL; 1487 ret = -EINVAL;