From patchwork Thu Jul 7 18:03:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manoharan, Rajkumar" X-Patchwork-Id: 953722 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p67I3gM0011558 for ; Thu, 7 Jul 2011 18:03:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752715Ab1GGSDl (ORCPT ); Thu, 7 Jul 2011 14:03:41 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:20808 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752093Ab1GGSDk (ORCPT ); Thu, 7 Jul 2011 14:03:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=rmanohar@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1310061820; x=1341597820; h=from:to:cc:subject:date:message-id:mime-version; z=From:=20Rajkumar=20Manoharan=20|To:=20|CC:=20,=20Rajkumar=20Manoharan=0D=0A=09|Subject:=20[PATCH]=20ath9k_htc:=20do =20not=20configure=20filter=20before=20driver=20is=20star ted|Date:=20Thu,=207=20Jul=202011=2023:33:38=20+0530 |Message-ID:=20<1310061819-7260-1-git-send-email-rmanohar @qca.qualcomm.com>|MIME-Version:=201.0; bh=fPTWbOOU9hiblMzxjyDcus/afHLEV1Bq1hAUtTJtHX8=; b=dORedmFF0bmB1nsRej1ZY10/Cp6xrnFKC4Nax0x1gudktfYhzU5fh2px 8Z7t8VYcS90DN4oeORFYzs7zBkiurTFZFvGHGqk/U4DvcA9fhArxR2J2b RfH31UlQSWpygEdWUmctGH13uEeaMBsY8PjNk4O74vFvrzmspChcwtQ+u 0=; X-IronPort-AV: E=McAfee;i="5400,1158,6400"; a="102396482" Received: from ironmsg04-r.qualcomm.com ([172.30.46.18]) by wolverine01.qualcomm.com with ESMTP; 07 Jul 2011 11:03:39 -0700 X-IronPort-AV: E=Sophos;i="4.65,493,1304319600"; d="scan'208";a="82266542" Received: from nasanexhub02.na.qualcomm.com ([10.46.143.120]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-MD5; 07 Jul 2011 11:03:39 -0700 Received: from NASJOEXHC01.na.qualcomm.com (10.234.56.15) by nasanexhub02.na.qualcomm.com (10.46.143.120) with Microsoft SMTP Server (TLS) id 8.3.83.0; Thu, 7 Jul 2011 11:03:39 -0700 Received: from qcamail1.atheros.com (10.12.4.48) by qcamail1.atheros.com (10.234.56.15) with Microsoft SMTP Server (TLS) id 14.1.323.0; Thu, 7 Jul 2011 11:03:37 -0700 Received: by qcamail1.atheros.com (sSMTP sendmail emulation); Thu, 07 Jul 2011 23:33:40 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH] ath9k_htc: do not configure filter before driver is started Date: Thu, 7 Jul 2011 23:33:38 +0530 Message-ID: <1310061819-7260-1-git-send-email-rmanohar@qca.qualcomm.com> X-Mailer: git-send-email 1.7.6 MIME-Version: 1.0 X-Originating-IP: [10.12.4.48] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 07 Jul 2011 18:03:43 +0000 (UTC) Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 7b77968..7212acb 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -1294,11 +1294,16 @@ static void ath9k_htc_configure_filter(struct ieee80211_hw *hw, u32 rfilt; mutex_lock(&priv->mutex); - ath9k_htc_ps_wakeup(priv); - changed_flags &= SUPPORTED_FILTERS; *total_flags &= SUPPORTED_FILTERS; + if (priv->op_flags & OP_INVALID) { + ath_dbg(ath9k_hw_common(priv->ah), ATH_DBG_ANY, + "Unable to configure filter on invalid state\n"); + return; + } + ath9k_htc_ps_wakeup(priv); + priv->rxfilter = *total_flags; rfilt = ath9k_htc_calcrxfilter(priv); ath9k_hw_setrxfilter(priv->ah, rfilt);