rt2800: correct AUTO_RSP_CFG
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 18 Nov 2016 09:43:57 +0000 (10:43 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 23 Nov 2016 15:38:50 +0000 (17:38 +0200)
Initialize AUTO_RSP_CFG register to similar value as vendor driver does.

Do not set BAC_ACK_POLICY based on short preamble setting, those are
unrelated.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2800lib.c

index fcee95d7726492c77c456904ddccaca553b0c236..e81319dbe7fd543d73da85f28ffd4369c576bd89 100644 (file)
@@ -1691,8 +1691,6 @@ void rt2800_config_erp(struct rt2x00_dev *rt2x00dev, struct rt2x00lib_erp *erp,
 
        if (changed & BSS_CHANGED_ERP_PREAMBLE) {
                rt2800_register_read(rt2x00dev, AUTO_RSP_CFG, &reg);
-               rt2x00_set_field32(&reg, AUTO_RSP_CFG_BAC_ACK_POLICY,
-                                  !!erp->short_preamble);
                rt2x00_set_field32(&reg, AUTO_RSP_CFG_AR_PREAMBLE,
                                   !!erp->short_preamble);
                rt2800_register_write(rt2x00dev, AUTO_RSP_CFG, reg);
@@ -4735,9 +4733,9 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
        rt2800_register_read(rt2x00dev, AUTO_RSP_CFG, &reg);
        rt2x00_set_field32(&reg, AUTO_RSP_CFG_AUTORESPONDER, 1);
        rt2x00_set_field32(&reg, AUTO_RSP_CFG_BAC_ACK_POLICY, 1);
-       rt2x00_set_field32(&reg, AUTO_RSP_CFG_CTS_40_MMODE, 0);
+       rt2x00_set_field32(&reg, AUTO_RSP_CFG_CTS_40_MMODE, 1);
        rt2x00_set_field32(&reg, AUTO_RSP_CFG_CTS_40_MREF, 0);
-       rt2x00_set_field32(&reg, AUTO_RSP_CFG_AR_PREAMBLE, 1);
+       rt2x00_set_field32(&reg, AUTO_RSP_CFG_AR_PREAMBLE, 0);
        rt2x00_set_field32(&reg, AUTO_RSP_CFG_DUAL_CTS_EN, 0);
        rt2x00_set_field32(&reg, AUTO_RSP_CFG_ACK_CTS_PSM_BIT, 0);
        rt2800_register_write(rt2x00dev, AUTO_RSP_CFG, reg);