summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/phy.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-04-16 01:38:32 +0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-16 23:43:23 +0400
commit7152451aa12558ab032f319a119ceb928396b905 (patch)
tree0b84c7516d4264bc9f57f5a88aa67c0d74abc03b /drivers/net/wireless/ath/ath9k/phy.h
parentda6f1d7f5f46d71f85d69a6521a16b83ad00e7e3 (diff)
downloadlinux-7152451aa12558ab032f319a119ceb928396b905.tar.xz
ath9k_hw: add common channel select helpers for ar900[23]
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/phy.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/phy.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/phy.h b/drivers/net/wireless/ath/ath9k/phy.h
index b90815205a14..7d397fd7bd18 100644
--- a/drivers/net/wireless/ath/ath9k/phy.h
+++ b/drivers/net/wireless/ath/ath9k/phy.h
@@ -17,6 +17,10 @@
#ifndef PHY_H
#define PHY_H
+#define CHANSEL_DIV 15
+#define CHANSEL_2G(_freq) (((_freq) * 0x10000) / CHANSEL_DIV)
+#define CHANSEL_5G(_freq) (((_freq) * 0x8000) / CHANSEL_DIV)
+
#define AR_PHY_BASE 0x9800
#define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2))