Skip to contentSkip to conversation

rsi: Adding support for 5GHz

PATCH New Jahnavi Meher 1 participant 1 message Jun 16, 2014 Redpine wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 14/16 rsi: Adding support for 5GHz

Adding support for 5GHz.

---
 drivers/net/wireless/rsi/rsi_91x_mac80211.c |   17 +++--
 drivers/net/wireless/rsi/rsi_91x_mgmt.c     |   81 +++++++++++++++++++++++++--
 drivers/net/wireless/rsi/rsi_mgmt.h         |    1 +
 3 files changed, 87 insertions(+), 12 deletions(-)
drivers/net/wireless/rsi/rsi_91x_mac80211.c +10 -7
index 45bdb99..4700714 100644
@@ -723,17 +723,17 @@ static int rsi_mac80211_set_rate_mask(struct ieee80211_hw *hw,
 {
 	struct rsi_hw *adapter = hw->priv;
 	struct rsi_common *common = adapter->priv;
+	enum ieee80211_band band = hw->conf.chandef.chan->band;
 
 	mutex_lock(&common->mutex);
+	common->fixedrate_mask[band] = 0;
 
-	common->fixedrate_mask[IEEE80211_BAND_2GHZ] = 0;
-
-	if (mask->control[IEEE80211_BAND_2GHZ].legacy == 0xfff) {
-		common->fixedrate_mask[IEEE80211_BAND_2GHZ] =
-			(mask->control[IEEE80211_BAND_2GHZ].ht_mcs[0] << 12);
+	if (mask->control[band].legacy == 0xfff) {
+		common->fixedrate_mask[band] =
+			(mask->control[band].ht_mcs[0] << 12);
 	} else {
-		common->fixedrate_mask[IEEE80211_BAND_2GHZ] =
-			mask->control[IEEE80211_BAND_2GHZ].legacy;
+		common->fixedrate_mask[band] =
+			mask->control[band].legacy;
 	}
 	mutex_unlock(&common->mutex);
 
@@ -980,6 +980,7 @@ int rsi_mac80211_attach(struct rsi_common *common)
 
 	hw->max_tx_aggregation_subframes = 6;
 	rsi_register_rates_channels(adapter, IEEE80211_BAND_2GHZ);
+	rsi_register_rates_channels(adapter, IEEE80211_BAND_5GHZ);
 	hw->rate_control_algorithm = "AARF";
 
 	SET_IEEE80211_PERM_ADDR(hw, common->mac_addr);
@@ -997,6 +998,8 @@ int rsi_mac80211_attach(struct rsi_common *common)
 	wiphy->available_antennas_tx = 1;
 	wiphy->bands[IEEE80211_BAND_2GHZ] =
 		&adapter->sbands[IEEE80211_BAND_2GHZ];
+	wiphy->bands[IEEE80211_BAND_5GHZ] =
+		&adapter->sbands[IEEE80211_BAND_5GHZ];
 
 	status = ieee80211_register_hw(hw);
 	if (status)
drivers/net/wireless/rsi/rsi_91x_mgmt.c +76 -5

101 lines not on this page · raw message

drivers/net/wireless/rsi/rsi_mgmt.h +1 -0
index 8bff664..f10d6c6 100644
@@ -304,4 +304,5 @@ void rsi_core_qos_processor(struct rsi_common *common);
 void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb);
 int rsi_send_mgmt_pkt(struct rsi_common *common, struct sk_buff *skb);
 int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb);
+int rsi_band_check(struct rsi_common *common);
 #endif
Signature · 1 line
1.7.1