diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2008-08-07 01:24:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-07 09:49:44 -0400 |
commit | 86b89eed9aca2a4a335b9c1bf7380f9183db431f (patch) | |
tree | de9861a36de404fc74d8d7fbb87bd66e73891de4 /drivers/net/wireless/ath9k/rc.c | |
parent | 3b95978ddadbab594aad6280bfa660a49948af86 (diff) |
ath9k: Revamp wireless mode usage
Use a single enum for managing modes, store supported modes by
the HW in a bitmask.
Register legacy rates with mac80211 only at init.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/rc.c')
-rw-r--r-- | drivers/net/wireless/ath9k/rc.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c index d3132009d94d..73c460ad355f 100644 --- a/drivers/net/wireless/ath9k/rc.c +++ b/drivers/net/wireless/ath9k/rc.c | |||
@@ -484,37 +484,37 @@ static void ar5416_attach_ratetables(struct ath_rate_softc *sc) | |||
484 | /* | 484 | /* |
485 | * Attach rate tables. | 485 | * Attach rate tables. |
486 | */ | 486 | */ |
487 | sc->hw_rate_table[WIRELESS_MODE_11b] = &ar5416_11b_ratetable; | 487 | sc->hw_rate_table[ATH9K_MODE_11B] = &ar5416_11b_ratetable; |
488 | sc->hw_rate_table[WIRELESS_MODE_11a] = &ar5416_11a_ratetable; | 488 | sc->hw_rate_table[ATH9K_MODE_11A] = &ar5416_11a_ratetable; |
489 | sc->hw_rate_table[WIRELESS_MODE_11g] = &ar5416_11g_ratetable; | 489 | sc->hw_rate_table[ATH9K_MODE_11G] = &ar5416_11g_ratetable; |
490 | 490 | ||
491 | sc->hw_rate_table[WIRELESS_MODE_11NA_HT20] = &ar5416_11na_ratetable; | 491 | sc->hw_rate_table[ATH9K_MODE_11NA_HT20] = &ar5416_11na_ratetable; |
492 | sc->hw_rate_table[WIRELESS_MODE_11NG_HT20] = &ar5416_11ng_ratetable; | 492 | sc->hw_rate_table[ATH9K_MODE_11NG_HT20] = &ar5416_11ng_ratetable; |
493 | sc->hw_rate_table[WIRELESS_MODE_11NA_HT40PLUS] = | 493 | sc->hw_rate_table[ATH9K_MODE_11NA_HT40PLUS] = |
494 | &ar5416_11na_ratetable; | 494 | &ar5416_11na_ratetable; |
495 | sc->hw_rate_table[WIRELESS_MODE_11NA_HT40MINUS] = | 495 | sc->hw_rate_table[ATH9K_MODE_11NA_HT40MINUS] = |
496 | &ar5416_11na_ratetable; | 496 | &ar5416_11na_ratetable; |
497 | sc->hw_rate_table[WIRELESS_MODE_11NG_HT40PLUS] = | 497 | sc->hw_rate_table[ATH9K_MODE_11NG_HT40PLUS] = |
498 | &ar5416_11ng_ratetable; | 498 | &ar5416_11ng_ratetable; |
499 | sc->hw_rate_table[WIRELESS_MODE_11NG_HT40MINUS] = | 499 | sc->hw_rate_table[ATH9K_MODE_11NG_HT40MINUS] = |
500 | &ar5416_11ng_ratetable; | 500 | &ar5416_11ng_ratetable; |
501 | } | 501 | } |
502 | 502 | ||
503 | static void ar5416_setquarter_ratetable(struct ath_rate_softc *sc) | 503 | static void ar5416_setquarter_ratetable(struct ath_rate_softc *sc) |
504 | { | 504 | { |
505 | sc->hw_rate_table[WIRELESS_MODE_11a] = &ar5416_11a_ratetable_Quarter; | 505 | sc->hw_rate_table[ATH9K_MODE_11A] = &ar5416_11a_ratetable_Quarter; |
506 | return; | 506 | return; |
507 | } | 507 | } |
508 | 508 | ||
509 | static void ar5416_sethalf_ratetable(struct ath_rate_softc *sc) | 509 | static void ar5416_sethalf_ratetable(struct ath_rate_softc *sc) |
510 | { | 510 | { |
511 | sc->hw_rate_table[WIRELESS_MODE_11a] = &ar5416_11a_ratetable_Half; | 511 | sc->hw_rate_table[ATH9K_MODE_11A] = &ar5416_11a_ratetable_Half; |
512 | return; | 512 | return; |
513 | } | 513 | } |
514 | 514 | ||
515 | static void ar5416_setfull_ratetable(struct ath_rate_softc *sc) | 515 | static void ar5416_setfull_ratetable(struct ath_rate_softc *sc) |
516 | { | 516 | { |
517 | sc->hw_rate_table[WIRELESS_MODE_11a] = &ar5416_11a_ratetable; | 517 | sc->hw_rate_table[ATH9K_MODE_11A] = &ar5416_11a_ratetable; |
518 | return; | 518 | return; |
519 | } | 519 | } |
520 | 520 | ||
@@ -1123,9 +1123,9 @@ static void ath_rc_ratefind(struct ath_softc *sc, | |||
1123 | * So, set fourth rate in series to be same as third one for | 1123 | * So, set fourth rate in series to be same as third one for |
1124 | * above conditions. | 1124 | * above conditions. |
1125 | */ | 1125 | */ |
1126 | if ((sc->sc_curmode == WIRELESS_MODE_11NG_HT20) || | 1126 | if ((sc->sc_curmode == ATH9K_MODE_11NG_HT20) || |
1127 | (sc->sc_curmode == WIRELESS_MODE_11NG_HT40PLUS) || | 1127 | (sc->sc_curmode == ATH9K_MODE_11NG_HT40PLUS) || |
1128 | (sc->sc_curmode == WIRELESS_MODE_11NG_HT40MINUS)) { | 1128 | (sc->sc_curmode == ATH9K_MODE_11NG_HT40MINUS)) { |
1129 | u8 dot11rate = rate_table->info[rix].dot11rate; | 1129 | u8 dot11rate = rate_table->info[rix].dot11rate; |
1130 | u8 phy = rate_table->info[rix].phy; | 1130 | u8 phy = rate_table->info[rix].phy; |
1131 | if (i == 4 && | 1131 | if (i == 4 && |