Skip to contentSkip to conversation

ar9170: support HT receive and channel config

PATCH New Johannes Berg 1 participant 1 message Apr 20, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/ath/ar9170/ar9170.h |   15 ++++++++
 drivers/net/wireless/ath/ar9170/main.c   |   54 ++++++++++++++++++++++++++-----
 2 files changed, 61 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ar9170/ar9170.h +15 -0
@@ -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,
drivers/net/wireless/ath/ar9170/main.c +46 -8

89 lines not on this page · raw message