From patchwork Fri Jul 15 23:06:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Roskin X-Patchwork-Id: 980912 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 p6FN6o94025624 for ; Fri, 15 Jul 2011 23:06:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753865Ab1GOXGs (ORCPT ); Fri, 15 Jul 2011 19:06:48 -0400 Received: from c60.cesmail.net ([216.154.195.49]:1673 "EHLO c60.cesmail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753564Ab1GOXGs (ORCPT ); Fri, 15 Jul 2011 19:06:48 -0400 Received: from unknown (HELO smtprelay1.cesmail.net) ([192.168.1.111]) by c60.cesmail.net with ESMTP; 15 Jul 2011 19:06:47 -0400 Received: from mj.roinet.com (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay1.cesmail.net (Postfix) with ESMTPSA id 694F134C8A; Fri, 15 Jul 2011 19:10:43 -0400 (EDT) Subject: [PATCH 4/4] ath9k: use ath_opmode_to_string() To: ath9k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org, "John W. Linville" From: Pavel Roskin Date: Fri, 15 Jul 2011 19:06:46 -0400 Message-ID: <20110715230646.4461.64616.stgit@mj.roinet.com> In-Reply-To: <20110715230627.4461.85730.stgit@mj.roinet.com> References: <20110715230627.4461.85730.stgit@mj.roinet.com> User-Agent: StGit/0.15-111-g507b MIME-Version: 1.0 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]); Fri, 15 Jul 2011 23:06:50 +0000 (UTC) Signed-off-by: Pavel Roskin --- drivers/net/wireless/ath/ath9k/debug.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 22d3a26..d1eb896 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -749,7 +749,6 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf, char *buf; unsigned int len = 0, size = 8000; ssize_t retval = 0; - const char *tmp; unsigned int reg; struct ath9k_vif_iter_data iter_data; @@ -759,31 +758,14 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf, if (buf == NULL) return -ENOMEM; - switch (sc->sc_ah->opmode) { - case NL80211_IFTYPE_ADHOC: - tmp = "ADHOC"; - break; - case NL80211_IFTYPE_MESH_POINT: - tmp = "MESH"; - break; - case NL80211_IFTYPE_AP: - tmp = "AP"; - break; - case NL80211_IFTYPE_STATION: - tmp = "STATION"; - break; - default: - tmp = "???"; - break; - } - ath9k_ps_wakeup(sc); len += snprintf(buf + len, size - len, "curbssid: %pM\n" "OP-Mode: %s(%i)\n" "Beacon-Timer-Register: 0x%x\n", common->curbssid, - tmp, (int)(sc->sc_ah->opmode), + ath_opmode_to_string(sc->sc_ah->opmode), + (int)(sc->sc_ah->opmode), REG_READ(ah, AR_BEACON_PERIOD)); reg = REG_READ(ah, AR_TIMER_MODE);