All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: fix ldpc param for fixed rate
@ 2015-09-16  7:49 ` Rajkumar Manoharan
  0 siblings, 0 replies; 8+ messages in thread
From: Rajkumar Manoharan @ 2015-09-16  7:49 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan

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>
---
 drivers/net/wireless/ath/ath10k/mac.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 80fe43fa..b347b60 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5936,7 +5936,7 @@ ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar,
 }
 
 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;
 	u32 vdev_param;
@@ -5969,6 +5969,13 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif,
 		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;
 }
 
@@ -6032,6 +6039,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 	u8 rate;
 	u8 nss;
 	u8 sgi;
+	u8 ldpc;
 	int single_nss;
 	int ret;
 
@@ -6041,6 +6049,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 	band = def.chan->band;
 	ht_mcs_mask = mask->control[band].ht_mcs;
 	vht_mcs_mask = mask->control[band].vht_mcs;
+	ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC);
 
 	sgi = mask->control[band].gi;
 	if (sgi == NL80211_TXRATE_FORCE_LGI)
@@ -6079,7 +6088,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 
 	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) {
 		ath10k_warn(ar, "failed to set fixed rate params on vdev %i: %d\n",
 			    arvif->vdev_id, ret);
-- 
2.5.2


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] ath10k: fix ldpc param for fixed rate
@ 2015-09-16  7:49 ` Rajkumar Manoharan
  0 siblings, 0 replies; 8+ messages in thread
From: Rajkumar Manoharan @ 2015-09-16  7:49 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan

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>
---
 drivers/net/wireless/ath/ath10k/mac.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 80fe43fa..b347b60 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5936,7 +5936,7 @@ ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar,
 }
 
 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;
 	u32 vdev_param;
@@ -5969,6 +5969,13 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif,
 		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;
 }
 
@@ -6032,6 +6039,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 	u8 rate;
 	u8 nss;
 	u8 sgi;
+	u8 ldpc;
 	int single_nss;
 	int ret;
 
@@ -6041,6 +6049,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 	band = def.chan->band;
 	ht_mcs_mask = mask->control[band].ht_mcs;
 	vht_mcs_mask = mask->control[band].vht_mcs;
+	ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC);
 
 	sgi = mask->control[band].gi;
 	if (sgi == NL80211_TXRATE_FORCE_LGI)
@@ -6079,7 +6088,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 
 	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) {
 		ath10k_warn(ar, "failed to set fixed rate params on vdev %i: %d\n",
 			    arvif->vdev_id, ret);
-- 
2.5.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: fix ldpc param for fixed rate
  2015-09-16  7:49 ` Rajkumar Manoharan
@ 2015-09-21  7:05   ` Michal Kazior
  -1 siblings, 0 replies; 8+ messages in thread
From: Michal Kazior @ 2015-09-21  7:05 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linux-wireless, ath10k@lists.infradead.org

On 16 September 2015 at 09:49, Rajkumar Manoharan
<rmanohar@qti.qualcomm.com> wrote:
> 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>
> ---
[...]
> @@ -6041,6 +6049,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
>         band = def.chan->band;
>         ht_mcs_mask = mask->control[band].ht_mcs;
>         vht_mcs_mask = mask->control[band].vht_mcs;
> +       ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC);

Is still really correct? LDPC must be supported on the Rx side of
destination stations hence I would assume you need to check whether
all stations associated are LDPC capable before enabling it (e.g. via
ieee80211_iterate_stations_atomic).


Michał

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: fix ldpc param for fixed rate
@ 2015-09-21  7:05   ` Michal Kazior
  0 siblings, 0 replies; 8+ messages in thread
From: Michal Kazior @ 2015-09-21  7:05 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: ath10k@lists.infradead.org, linux-wireless

On 16 September 2015 at 09:49, Rajkumar Manoharan
<rmanohar@qti.qualcomm.com> wrote:
> 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>
> ---
[...]
> @@ -6041,6 +6049,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
>         band = def.chan->band;
>         ht_mcs_mask = mask->control[band].ht_mcs;
>         vht_mcs_mask = mask->control[band].vht_mcs;
> +       ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC);

Is still really correct? LDPC must be supported on the Rx side of
destination stations hence I would assume you need to check whether
all stations associated are LDPC capable before enabling it (e.g. via
ieee80211_iterate_stations_atomic).


Michał

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: fix ldpc param for fixed rate
  2015-09-21  7:05   ` Michal Kazior
@ 2015-09-21  7:23     ` Rajkumar Manoharan
  -1 siblings, 0 replies; 8+ messages in thread
From: Rajkumar Manoharan @ 2015-09-21  7:23 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k@lists.infradead.org

On Mon, Sep 21, 2015 at 09:05:54AM +0200, Michal Kazior wrote:
> On 16 September 2015 at 09:49, Rajkumar Manoharan
> <rmanohar@qti.qualcomm.com> wrote:
> > 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>
> > ---
> [...]
> > @@ -6041,6 +6049,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
> >         band = def.chan->band;
> >         ht_mcs_mask = mask->control[band].ht_mcs;
> >         vht_mcs_mask = mask->control[band].vht_mcs;
> > +       ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC);
> 
> Is still really correct? LDPC must be supported on the Rx side of
> destination stations hence I would assume you need to check whether
> all stations associated are LDPC capable before enabling it (e.g. via
> ieee80211_iterate_stations_atomic).
>
I already check with firmware on this regard. Below is the clarification
got from fw team. So no need to go through sta_iter.

"3) how does fixed rate work for non-LDPC clients (ex. legacy clients),
if LDPC support is enabled for the given vdev?
The rates are selected by ANDng the vdev_rates and client rates. If client does not
support LDPC and LDPC is enabled in vdev then, LDPC will not be used."

-Rajkumar

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: fix ldpc param for fixed rate
@ 2015-09-21  7:23     ` Rajkumar Manoharan
  0 siblings, 0 replies; 8+ messages in thread
From: Rajkumar Manoharan @ 2015-09-21  7:23 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k@lists.infradead.org, linux-wireless

On Mon, Sep 21, 2015 at 09:05:54AM +0200, Michal Kazior wrote:
> On 16 September 2015 at 09:49, Rajkumar Manoharan
> <rmanohar@qti.qualcomm.com> wrote:
> > 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>
> > ---
> [...]
> > @@ -6041,6 +6049,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
> >         band = def.chan->band;
> >         ht_mcs_mask = mask->control[band].ht_mcs;
> >         vht_mcs_mask = mask->control[band].vht_mcs;
> > +       ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC);
> 
> Is still really correct? LDPC must be supported on the Rx side of
> destination stations hence I would assume you need to check whether
> all stations associated are LDPC capable before enabling it (e.g. via
> ieee80211_iterate_stations_atomic).
>
I already check with firmware on this regard. Below is the clarification
got from fw team. So no need to go through sta_iter.

"3) how does fixed rate work for non-LDPC clients (ex. legacy clients),
if LDPC support is enabled for the given vdev?
The rates are selected by ANDng the vdev_rates and client rates. If client does not
support LDPC and LDPC is enabled in vdev then, LDPC will not be used."

-Rajkumar

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: fix ldpc param for fixed rate
  2015-09-16  7:49 ` Rajkumar Manoharan
@ 2015-09-27 12:55   ` Kalle Valo
  -1 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2015-09-27 12:55 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linux-wireless, ath10k

Rajkumar Manoharan <rmanohar@qti.qualcomm.com> writes:

> 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>

Thanks, applied.

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: fix ldpc param for fixed rate
@ 2015-09-27 12:55   ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2015-09-27 12:55 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: ath10k, linux-wireless

Rajkumar Manoharan <rmanohar@qti.qualcomm.com> writes:

> 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>

Thanks, applied.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-27 12:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16  7:49 [PATCH] ath10k: fix ldpc param for fixed rate Rajkumar Manoharan
2015-09-16  7:49 ` Rajkumar Manoharan
2015-09-21  7:05 ` Michal Kazior
2015-09-21  7:05   ` Michal Kazior
2015-09-21  7:23   ` Rajkumar Manoharan
2015-09-21  7:23     ` Rajkumar Manoharan
2015-09-27 12:55 ` Kalle Valo
2015-09-27 12:55   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.