aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ar9170/ar9170.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-04-20 18:27:04 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:57:17 -0400
commit9e52b0623c6eb49c3f23a326c1fb97bdecc49ba1 (patch)
tree465bc1673865d114dc011ddd410f3c242f23b076 /drivers/net/wireless/ath/ar9170/ar9170.h
parent314bd7503b1e96841931311f28a8925dab66ed83 (diff)
ar9170: support HT receive and channel config
This patch adds support for configuring HT40 channels and receiving HT40 to ar9170. Receiving aggregation doesn't seem to work right now, so it's not enabled. Same goes for TX aggregation, but that probably needs even more work. With this, I can receive roughly 33 Mbits/sec. The HT capabilities are a little odd, I tried following otus here -- in particular having SGI_40 but not SGI_20 is a little weird but afaict that's what otus does. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ar9170/ar9170.h')
-rw-r--r--drivers/net/wireless/ath/ar9170/ar9170.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ar9170/ar9170.h b/drivers/net/wireless/ath/ar9170/ar9170.h
index 2522a190fdf..b6a1bff67ca 100644
--- a/drivers/net/wireless/ath/ar9170/ar9170.h
+++ b/drivers/net/wireless/ath/ar9170/ar9170.h
@@ -60,6 +60,21 @@ enum ar9170_bw {
__AR9170_NUM_BW,
};
+static inline enum ar9170_bw nl80211_to_ar9170(enum nl80211_channel_type type)
+{
+ switch (type) {
+ case NL80211_CHAN_NO_HT:
+ case NL80211_CHAN_HT20:
+ return AR9170_BW_20;
+ case NL80211_CHAN_HT40MINUS:
+ return AR9170_BW_40_BELOW;
+ case NL80211_CHAN_HT40PLUS:
+ return AR9170_BW_40_ABOVE;
+ default:
+ BUG();
+ }
+}
+
enum ar9170_rf_init_mode {
AR9170_RFI_NONE,
AR9170_RFI_WARM,