Skip to contentSkip to conversation

ath10k: Fix mpdu spacing to 8us

PATCH New Sujith Manoharan 2 participants 5 messages Apr 29, 2013 – May 2, 2013 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Fix mpdu spacing to 8us

From: Sujith Manoharan <[email protected]>

The FW doesn't fill the mpdu density field in the HT capabilities received in the service_ready event and the host driver ends up advertising 0 in its capabilities.

Fix this by hard-coding the spacing time to 8us.

---
 drivers/net/wireless/ath/ath10k/mac.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +1 -10
index 0dfeae8..d31fa1c 100644
@@ -2534,6 +2534,7 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar)
 
 	ht_cap.ht_supported = 1;
 	ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
+	ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_8;
 	ht_cap.cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
 	ht_cap.cap |= IEEE80211_HT_CAP_DSSSCCK40;
 	ht_cap.cap |= WLAN_HT_CAP_SM_PS_STATIC << IEEE80211_HT_CAP_SM_PS_SHIFT;
@@ -2574,16 +2575,6 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar)
 	if (ar->ht_cap_info & WMI_HT_CAP_L_SIG_TXOP_PROT)
 		ht_cap.cap |= IEEE80211_HT_CAP_LSIG_TXOP_PROT;
 
-	if (ar->ht_cap_info & WMI_HT_CAP_MPDU_DENSITY) {
-		u32 density;
-
-		density   = ar->ht_cap_info;
-		density  &= WMI_HT_CAP_MPDU_DENSITY;
-		density >>= WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT;
-
-		ht_cap.ampdu_density = density;
-	}
-
 	/* max AMSDU is implicitly taken from vht_cap_info */
 	if (ar->vht_cap_info & WMI_VHT_CAP_MAX_MPDU_LEN_MASK)
 		ht_cap.cap |= IEEE80211_HT_CAP_MAX_AMSDU;
Signature · 1 line
1.8.2.2
#1 lore raw

PATCH 1/1 ath10k: Fix TXOP handling

From: Sujith Manoharan <[email protected]>

The channel time duration programmed in the HW is in absolute microseconds, while mac80211 gives the txop in units of 32 microseconds. Handle this properly.

---
 drivers/net/wireless/ath/ath10k/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/mac.c +1 -1
index d31fa1c..bd91b15 100644
@@ -2188,7 +2188,7 @@ static int ath10k_conf_tx(struct ieee80211_hw *hw,
 	p->cwmin = params->cw_min;
 	p->cwmax = params->cw_max;
 	p->aifs = params->aifs;
-	p->txop = params->txop;
+	p->txop = params->txop * 32;
 	/* FIXME: can we pass the params->uapsd to the FW? */
 	/* FIXME: FW accepts wmm params per hw, not per vif */
 
Signature · 1 line
1.8.2.2
#2 lore raw

PATCH 1/1 ath10k: Fix TXOP handling

Quoted 16 lines · Sujith Manoharan

From: Sujith Manoharan <[email protected]>

The channel time duration programmed in the HW is in absolute microseconds, while mac80211 gives the txop in units of 32 microseconds. Handle this properly.

---
 drivers/net/wireless/ath/ath10k/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/mac.c +0 -0
index d31fa1c..bd91b15 100644

drivers/net/wireless/ath/ath10k/mac.c static int ath10k_conf_tx(struct ieee80211_hw *hw, · line 2191

Quoted 5 lines
drivers/net/wireless/ath/ath10k/mac.c +1 -1
@@ -2188,7 +2188,7 @@ static int ath10k_conf_tx(struct ieee80211_hw *hw,
 	p->cwmin = params->cw_min;
 	p->cwmax = params->cw_max;
 	p->aifs = params->aifs;
-	p->txop = params->txop;
+	p->txop = params->txop * 32;

Please add a comment.

Signature · 1 line
Kalle Valo
#3 lore raw

PATCH 1/1 ath10k: Fix TXOP handling

Quoted 1 line · Kalle Valo

Please add a comment.

[PATCH v2] ath10k: Fix TXOP handling

The channel time duration programmed in the HW is in absolute microseconds, while mac80211 gives the txop in units of 32 microseconds. Handle this properly.

---
 drivers/net/wireless/ath/ath10k/mac.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/mac.c +8 -1
index d31fa1c..05102f8 100644
@@ -2188,7 +2188,14 @@ static int ath10k_conf_tx(struct ieee80211_hw *hw,
 	p->cwmin = params->cw_min;
 	p->cwmax = params->cw_max;
 	p->aifs = params->aifs;
-	p->txop = params->txop;
+
+	/*
+	 * The channel time duration programmed in the HW is in absolute
+	 * microseconds, while mac80211 gives the txop in units of
+	 * 32 microseconds.
+	 */
+	p->txop = params->txop * 32;
+
 	/* FIXME: can we pass the params->uapsd to the FW? */
 	/* FIXME: FW accepts wmm params per hw, not per vif */
 
Signature · 1 line
1.8.2.2
Applied
#4 lore raw

PATCH 1/1 ath10k: Fix TXOP handling

Quoted 4 lines · Sujith Manoharan
Quoted 1 line · Kalle Valo

Please add a comment.

[PATCH v2] ath10k: Fix TXOP handling

I had to edit these out manually. This kind of comments should be after '--' so that git-am can rip them out manually.

Quoted 5 lines

The channel time duration programmed in the HW is in absolute microseconds, while mac80211 gives the txop in units of 32 microseconds. Handle this properly.

Thanks, applied.

Signature · 1 line
Kalle Valo