diff mbox

[v3,00/12] ath9k_hw: complete support for AR9271

Message ID 20100316003856.GL8069@bombadil.infradead.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Luis Chamberlain March 16, 2010, 12:38 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 3b4c636..e501599 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1438,6 +1438,14 @@  static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
 		ath9k_htc_beacon_config(priv, vif, bss_conf);
 	}
 
+	if (changed & BSS_CHANGED_ERP_SLOT) {
+		if (bss_conf->use_short_slot)
+			ah->slottime = 9;
+		else
+			ah->slottime = 20;
+		ath9k_hw_init_global_settings(ah);
+	}
+
 	if (changed & BSS_CHANGED_BEACON)
 		ath9k_htc_beacon_update(priv, vif);
 
@@ -1567,6 +1575,18 @@  static int ath9k_htc_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
 	return 0;
 }
 
+static void ath9k_htc_set_coverage_class(struct ieee80211_hw *hw,
+					 u8 coverage_class)
+{
+	struct ath9k_htc_priv *priv = hw->priv;
+	struct ath_hw *ah = priv->ah;
+
+	mutex_lock(&priv->mutex);
+	ah->coverage_class = coverage_class;
+	ath9k_hw_init_global_settings(ah);
+	mutex_unlock(&priv->mutex);
+}
+
 struct ieee80211_ops ath9k_htc_ops = {
 	.tx                 = ath9k_htc_tx,
 	.start              = ath9k_htc_start,
@@ -1587,4 +1607,5 @@  struct ieee80211_ops ath9k_htc_ops = {
 	.sw_scan_complete   = ath9k_htc_sw_scan_complete,
 	.set_rts_threshold  = ath9k_htc_set_rts_threshold,
 	.rfkill_poll        = ath9k_htc_rfkill_poll_state,
+	.set_coverage_class = ath9k_htc_set_coverage_class,
 };