diff mbox

[6/9] rt2800: fallback from mcs8 to mcs7

Message ID 1483707918-31480-7-git-send-email-sgruszka@redhat.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Stanislaw Gruszka Jan. 6, 2017, 1:05 p.m. UTC
If we do not fallback to lower rate, we are unable to calculate
correctly number of retries in TX status code.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Felix Fietkau Jan. 12, 2017, 11:10 a.m. UTC | #1
On 2017-01-06 14:05, Stanislaw Gruszka wrote:
> If we do not fallback to lower rate, we are unable to calculate
> correctly number of retries in TX status code.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
I think falling back from the lowest dual-stream to the highest
single-stream rate is a really bad idea.
Instead you should get rid of the assumption that fallback rates are
ordered by their MCS index.

- Felix
Stanislaw Gruszka Jan. 13, 2017, 9:09 a.m. UTC | #2
On Thu, Jan 12, 2017 at 12:10:48PM +0100, Felix Fietkau wrote:
> On 2017-01-06 14:05, Stanislaw Gruszka wrote:
> > If we do not fallback to lower rate, we are unable to calculate
> > correctly number of retries in TX status code.
> > 
> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> I think falling back from the lowest dual-stream to the highest
> single-stream rate is a really bad idea.

Ok, Kalle please drop this patch.

> Instead you should get rid of the assumption that fallback rates are
> ordered by their MCS index.

I think I will stay with the current code. With decreased retry
limit setting in other patch, problem is mitigated. For newer
chips there is retry count TX_STA_FIFO_EXT register, so I'll look
into that.

Thanks
Stanislaw
Kalle Valo Jan. 13, 2017, 10:11 a.m. UTC | #3
Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> If we do not fallback to lower rate, we are unable to calculate
> correctly number of retries in TX status code.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Dropping per Stanislaw's request

Patch set to Changes Requested.
diff mbox

Patch

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 1f4a120..6cac311 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -4968,7 +4968,7 @@  static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
 	rt2800_register_write(rt2x00dev, HT_FBK_CFG0, reg);
 
 	rt2800_register_read(rt2x00dev, HT_FBK_CFG1, &reg);
-	rt2x00_set_field32(&reg, HT_FBK_CFG1_HTMCS8FBK, 8);
+	rt2x00_set_field32(&reg, HT_FBK_CFG1_HTMCS8FBK, 7);
 	rt2x00_set_field32(&reg, HT_FBK_CFG1_HTMCS9FBK, 8);
 	rt2x00_set_field32(&reg, HT_FBK_CFG1_HTMCS10FBK, 9);
 	rt2x00_set_field32(&reg, HT_FBK_CFG1_HTMCS11FBK, 10);