Return-path: Received: from mail-gw0-f46.google.com ([74.125.83.46]:48018 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753684Ab0LACTP (ORCPT ); Tue, 30 Nov 2010 21:19:15 -0500 Received: by gwj20 with SMTP id 20so3132165gwj.19 for ; Tue, 30 Nov 2010 18:19:14 -0800 (PST) From: Javier Cardona To: "John W. Linville" Cc: Javier Cardona , Steve Derosier , devel@lists.open80211s.org, linux-wireless@vger.kernel.org, Jiri Slaby , Nick Kossifidis , "Luis R. Rodriguez" , Bob Copeland Subject: [PATCH 2/3] ath5k: Prevent mesh interfaces from being counted as ad-hoc Date: Tue, 30 Nov 2010 18:18:38 -0800 Message-Id: <1291169919-3867-3-git-send-email-javier@cozybit.com> In-Reply-To: <1291169919-3867-1-git-send-email-javier@cozybit.com> References: <1291169919-3867-1-git-send-email-javier@cozybit.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: This results in an erroneus num_adhoc_vifs count, as the this counter was incremented but not decremented for mesh interfaces. --- drivers/net/wireless/ath/ath5k/base.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 73c7118..44f3050 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2847,7 +2847,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw, sc->bslot[avf->bslot] = vif; if (avf->opmode == NL80211_IFTYPE_AP) sc->num_ap_vifs++; - else + else if (avf->opmode == NL80211_IFTYPE_ADHOC) sc->num_adhoc_vifs++; } -- 1.7.1