aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-01-16 11:08:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:38 -0500
commit6642fe6f5d033128086c8b64737780454e53625e (patch)
tree9c226ee8dc1c7534f9c8ee5d79a274d60f305e48
parent9aed3cc124343d92be6697e9af3928bdfe8eb03e (diff)
ath9k: rateCodeToIndex is not used, remove it
Calculation of rate indices from ratecode is done in recv.c in a straightforward manner for both HT and legacy rates. This variable is not needed anymore. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath9k/rc.c13
-rw-r--r--drivers/net/wireless/ath9k/rc.h1
2 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c
index 0686a7c9ced4..182884a1cde4 100644
--- a/drivers/net/wireless/ath9k/rc.c
+++ b/drivers/net/wireless/ath9k/rc.c
@@ -19,7 +19,6 @@
19 19
20static struct ath_rate_table ar5416_11na_ratetable = { 20static struct ath_rate_table ar5416_11na_ratetable = {
21 42, 21 42,
22 {0},
23 { 22 {
24 { VALID, VALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ 23 { VALID, VALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */
25 5400, 0x0b, 0x00, 12, 24 5400, 0x0b, 0x00, 12,
@@ -158,7 +157,6 @@ static struct ath_rate_table ar5416_11na_ratetable = {
158 157
159static struct ath_rate_table ar5416_11ng_ratetable = { 158static struct ath_rate_table ar5416_11ng_ratetable = {
160 46, 159 46,
161 {0},
162 { 160 {
163 { VALID_ALL, VALID_ALL, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ 161 { VALID_ALL, VALID_ALL, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */
164 900, 0x1b, 0x00, 2, 162 900, 0x1b, 0x00, 2,
@@ -306,7 +304,6 @@ static struct ath_rate_table ar5416_11ng_ratetable = {
306 304
307static struct ath_rate_table ar5416_11a_ratetable = { 305static struct ath_rate_table ar5416_11a_ratetable = {
308 8, 306 8,
309 {0},
310 { 307 {
311 { VALID, VALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ 308 { VALID, VALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */
312 5400, 0x0b, 0x00, (0x80|12), 309 5400, 0x0b, 0x00, (0x80|12),
@@ -340,7 +337,6 @@ static struct ath_rate_table ar5416_11a_ratetable = {
340 337
341static struct ath_rate_table ar5416_11g_ratetable = { 338static struct ath_rate_table ar5416_11g_ratetable = {
342 12, 339 12,
343 {0},
344 { 340 {
345 { VALID, VALID, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ 341 { VALID, VALID, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */
346 900, 0x1b, 0x00, 2, 342 900, 0x1b, 0x00, 2,
@@ -386,7 +382,6 @@ static struct ath_rate_table ar5416_11g_ratetable = {
386 382
387static struct ath_rate_table ar5416_11b_ratetable = { 383static struct ath_rate_table ar5416_11b_ratetable = {
388 4, 384 4,
389 {0},
390 { 385 {
391 { VALID, VALID, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ 386 { VALID, VALID, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */
392 900, 0x1b, 0x00, (0x80|2), 387 900, 0x1b, 0x00, (0x80|2),
@@ -1607,16 +1602,8 @@ static void ath_setup_rate_table(struct ath_softc *sc,
1607{ 1602{
1608 int i; 1603 int i;
1609 1604
1610 for (i = 0; i < 256; i++)
1611 rate_table->rateCodeToIndex[i] = (u8)-1;
1612
1613 for (i = 0; i < rate_table->rate_cnt; i++) { 1605 for (i = 0; i < rate_table->rate_cnt; i++) {
1614 u8 code = rate_table->info[i].ratecode;
1615 u8 cix = rate_table->info[i].ctrl_rate; 1606 u8 cix = rate_table->info[i].ctrl_rate;
1616 u8 sh = rate_table->info[i].short_preamble;
1617
1618 rate_table->rateCodeToIndex[code] = i;
1619 rate_table->rateCodeToIndex[code | sh] = i;
1620 1607
1621 rate_table->info[i].lpAckDuration = 1608 rate_table->info[i].lpAckDuration =
1622 ath9k_hw_computetxtime(sc->sc_ah, rate_table, 1609 ath9k_hw_computetxtime(sc->sc_ah, rate_table,
diff --git a/drivers/net/wireless/ath9k/rc.h b/drivers/net/wireless/ath9k/rc.h
index 97c60d12e8aa..a987cb9e74e2 100644
--- a/drivers/net/wireless/ath9k/rc.h
+++ b/drivers/net/wireless/ath9k/rc.h
@@ -90,7 +90,6 @@ struct ath_softc;
90 */ 90 */
91struct ath_rate_table { 91struct ath_rate_table {
92 int rate_cnt; 92 int rate_cnt;
93 u8 rateCodeToIndex[256];
94 struct { 93 struct {
95 int valid; 94 int valid;
96 int valid_single_stream; 95 int valid_single_stream;