diff options
author | Pavel Roskin <proski@gnu.org> | 2011-07-15 19:06:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-18 14:29:43 -0400 |
commit | 21ec489d007b1873f86a379946938854b47df930 (patch) | |
tree | 4c066d4af64295235e179b7779a175a733485fb4 /drivers/net | |
parent | 6c2c1ed8643b5c3bc331e3f61b3530d771abbdbe (diff) |
ath9k: use ath_opmode_to_string()
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 22d3a26e684d..d1eb89611ff7 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, | |||
749 | char *buf; | 749 | char *buf; |
750 | unsigned int len = 0, size = 8000; | 750 | unsigned int len = 0, size = 8000; |
751 | ssize_t retval = 0; | 751 | ssize_t retval = 0; |
752 | const char *tmp; | ||
753 | unsigned int reg; | 752 | unsigned int reg; |
754 | struct ath9k_vif_iter_data iter_data; | 753 | struct ath9k_vif_iter_data iter_data; |
755 | 754 | ||
@@ -759,31 +758,14 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf, | |||
759 | if (buf == NULL) | 758 | if (buf == NULL) |
760 | return -ENOMEM; | 759 | return -ENOMEM; |
761 | 760 | ||
762 | switch (sc->sc_ah->opmode) { | ||
763 | case NL80211_IFTYPE_ADHOC: | ||
764 | tmp = "ADHOC"; | ||
765 | break; | ||
766 | case NL80211_IFTYPE_MESH_POINT: | ||
767 | tmp = "MESH"; | ||
768 | break; | ||
769 | case NL80211_IFTYPE_AP: | ||
770 | tmp = "AP"; | ||
771 | break; | ||
772 | case NL80211_IFTYPE_STATION: | ||
773 | tmp = "STATION"; | ||
774 | break; | ||
775 | default: | ||
776 | tmp = "???"; | ||
777 | break; | ||
778 | } | ||
779 | |||
780 | ath9k_ps_wakeup(sc); | 761 | ath9k_ps_wakeup(sc); |
781 | len += snprintf(buf + len, size - len, | 762 | len += snprintf(buf + len, size - len, |
782 | "curbssid: %pM\n" | 763 | "curbssid: %pM\n" |
783 | "OP-Mode: %s(%i)\n" | 764 | "OP-Mode: %s(%i)\n" |
784 | "Beacon-Timer-Register: 0x%x\n", | 765 | "Beacon-Timer-Register: 0x%x\n", |
785 | common->curbssid, | 766 | common->curbssid, |
786 | tmp, (int)(sc->sc_ah->opmode), | 767 | ath_opmode_to_string(sc->sc_ah->opmode), |
768 | (int)(sc->sc_ah->opmode), | ||
787 | REG_READ(ah, AR_BEACON_PERIOD)); | 769 | REG_READ(ah, AR_BEACON_PERIOD)); |
788 | 770 | ||
789 | reg = REG_READ(ah, AR_TIMER_MODE); | 771 | reg = REG_READ(ah, AR_TIMER_MODE); |