From patchwork Tue Sep 6 15:30:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manoharan, Rajkumar" X-Patchwork-Id: 1126612 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p86FTmec019960 for ; Tue, 6 Sep 2011 15:29:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754970Ab1IFP3f (ORCPT ); Tue, 6 Sep 2011 11:29:35 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:26194 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754876Ab1IFP3f (ORCPT ); Tue, 6 Sep 2011 11:29:35 -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=1315322975; x=1346858975; 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=20v2=201/2]=20ath9k: =20Take=20the=20samples=20in=20unassociated=20state|Date: =20Tue,=206=20Sep=202011=2021:00:06=20+0530|Message-ID: =20<1315323007-1853-1-git-send-email-rmanohar@qca.qualcom m.com>|MIME-Version:=201.0; bh=I/EMKL89wpaG1xmdkpJSGmOalPvN2B5p5fDdplU+uKg=; b=W4fbj7m127l8kHHUcq+mVAQ72EwPUGXUq1x7rvU6WQmtsuDAGDFar/tf 8+aoIYxpcC3dPjZHrg5yb8tg19GUCf8dcaaIm6q4vSwfHItJid1fQYXwt 76i9K8pYly02u1+9wcHulf3Sn8pLiSqA+ylCTP275bVLXQf11IbgHdlZg s=; X-IronPort-AV: E=McAfee;i="5400,1158,6460"; a="115653642" Received: from ironmsg02-l.qualcomm.com ([172.30.48.16]) by wolverine02.qualcomm.com with ESMTP; 06 Sep 2011 08:29:34 -0700 X-IronPort-AV: E=Sophos;i="4.68,338,1312182000"; d="scan'208";a="118561234" Received: from nasanexhub04.qualcomm.com (HELO nasanexhub04.na.qualcomm.com) ([129.46.134.222]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/RC4-MD5; 06 Sep 2011 08:29:34 -0700 Received: from NASJOEXHC01.na.qualcomm.com (10.234.56.15) by nasanexhub04.na.qualcomm.com (129.46.134.222) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 6 Sep 2011 08:29:34 -0700 Received: from qcamail1.atheros.com (10.12.7.11) by qcamail1.atheros.com (10.234.56.15) with Microsoft SMTP Server (TLS) id 14.1.323.3; Tue, 6 Sep 2011 08:29:32 -0700 Received: by qcamail1.atheros.com (sSMTP sendmail emulation); Tue, 06 Sep 2011 21:00:07 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH v2 1/2] ath9k: Take the samples in unassociated state Date: Tue, 6 Sep 2011 21:00:06 +0530 Message-ID: <1315323007-1853-1-git-send-email-rmanohar@qca.qualcomm.com> X-Mailer: git-send-email 1.7.6.1 MIME-Version: 1.0 X-Originating-IP: [10.12.7.11] 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 (demeter1.kernel.org [140.211.167.41]); Tue, 06 Sep 2011 15:29:48 +0000 (UTC) Currently the samples debugfs which maintains the snapshorts of mac/bb only on associated state. Hence to cover issues on idle state, the samples are taken whenever the driver is ready. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath9k/debug.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 727e8de..bafb7b7 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -1373,6 +1373,9 @@ static int open_file_bb_mac_samps(struct inode *inode, struct file *file) u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask; u8 nread; + if (sc->sc_flags & SC_OP_INVALID) + return -EAGAIN; + buf = vmalloc(size); if (!buf) return -ENOMEM; @@ -1381,6 +1384,8 @@ static int open_file_bb_mac_samps(struct inode *inode, struct file *file) vfree(buf); return -ENOMEM; } + /* Account the current state too */ + ath9k_debug_samp_bb_mac(sc); spin_lock_bh(&sc->debug.samp_lock); memcpy(bb_mac_samp, sc->debug.bb_mac_samp,