瀏覽代碼

ath10k: fix ldpc param for fixed rate

ldpc is not configured for fixed rates. This blocks auto rate vs fixed
rate performance comparison. Since firmware is considering ldpc vdev
param for fixed rate selection, it has to be configured to enable ldpc
for fixed rates.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Rajkumar Manoharan 10 年之前
父節點
當前提交
bd4a41e6de
共有 1 個文件被更改,包括 11 次插入2 次删除
  1. 11 2
      drivers/net/wireless/ath/ath10k/mac.c

+ 11 - 2
drivers/net/wireless/ath/ath10k/mac.c

@@ -5957,7 +5957,7 @@ ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar,
 }
 }
 
 
 static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif,
 static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif,
-					    u8 rate, u8 nss, u8 sgi)
+					    u8 rate, u8 nss, u8 sgi, u8 ldpc)
 {
 {
 	struct ath10k *ar = arvif->ar;
 	struct ath10k *ar = arvif->ar;
 	u32 vdev_param;
 	u32 vdev_param;
@@ -5990,6 +5990,13 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif,
 		return ret;
 		return ret;
 	}
 	}
 
 
+	vdev_param = ar->wmi.vdev_param->ldpc;
+	ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, ldpc);
+	if (ret) {
+		ath10k_warn(ar, "failed to set ldpc param %d: %d\n", ldpc, ret);
+		return ret;
+	}
+
 	return 0;
 	return 0;
 }
 }
 
 
@@ -6053,6 +6060,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 	u8 rate;
 	u8 rate;
 	u8 nss;
 	u8 nss;
 	u8 sgi;
 	u8 sgi;
+	u8 ldpc;
 	int single_nss;
 	int single_nss;
 	int ret;
 	int ret;
 
 
@@ -6062,6 +6070,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 	band = def.chan->band;
 	band = def.chan->band;
 	ht_mcs_mask = mask->control[band].ht_mcs;
 	ht_mcs_mask = mask->control[band].ht_mcs;
 	vht_mcs_mask = mask->control[band].vht_mcs;
 	vht_mcs_mask = mask->control[band].vht_mcs;
+	ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC);
 
 
 	sgi = mask->control[band].gi;
 	sgi = mask->control[band].gi;
 	if (sgi == NL80211_TXRATE_FORCE_LGI)
 	if (sgi == NL80211_TXRATE_FORCE_LGI)
@@ -6100,7 +6109,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 
 
 	mutex_lock(&ar->conf_mutex);
 	mutex_lock(&ar->conf_mutex);
 
 
-	ret = ath10k_mac_set_fixed_rate_params(arvif, rate, nss, sgi);
+	ret = ath10k_mac_set_fixed_rate_params(arvif, rate, nss, sgi, ldpc);
 	if (ret) {
 	if (ret) {
 		ath10k_warn(ar, "failed to set fixed rate params on vdev %i: %d\n",
 		ath10k_warn(ar, "failed to set fixed rate params on vdev %i: %d\n",
 			    arvif->vdev_id, ret);
 			    arvif->vdev_id, ret);