iwlegacy: fix rate control regression
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 4 Jun 2013 12:19:10 +0000 (14:19 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Jun 2013 18:24:22 +0000 (14:24 -0400)
Since driver does not use control.rates[0].count, we have never set that
variable. But currently, after rate control API rewrite, this is required
by mac80211. Otherwise legacy rates control does not work and we transmit
always at 1Mbit/s on pre 11n networks.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/3945-rs.c
drivers/net/wireless/iwlegacy/4965-rs.c

index c9f197d9ca1eecddf8d6f651c4f8598950986502..fe31590a51b2d81b41b40b2f862c96c5b2e10980 100644 (file)
@@ -816,6 +816,7 @@ out:
                rs_sta->last_txrate_idx = idx;
                info->control.rates[0].idx = rs_sta->last_txrate_idx;
        }
+       info->control.rates[0].count = 1;
 
        D_RATE("leave: %d\n", idx);
 }
index 1fc0b227e120d5d74054be24356f07ef2852824f..ed3c42a63a4369678f2764049f0b7e257f535fb4 100644 (file)
@@ -2268,7 +2268,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
                info->control.rates[0].flags = 0;
        }
        info->control.rates[0].idx = rate_idx;
-
+       info->control.rates[0].count = 1;
 }
 
 static void *