aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-05-06 02:20:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 15:15:05 -0400
commit4f0fc7c39f2a224b939f22d4dca552b266319525 (patch)
tree4dcea1285bdfe15a9a22e88097a3e8e7c9b57b8d
parent7c5a189dc6a43def594fedc7cd8f6886596b65de (diff)
ath9k: make private driver rate tables const
On x86 this allows us to do the following small savings: shave off 23 % off of the module's data, and shave off 6 % off of the module's text. We save 456 bytes, for those counting. $ size ath9k.ko text data bss dec hex filename 250794 3628 1600 256022 3e816 ath9k.ko $ size ath9k-old.ko text data bss dec hex filename 239114 15308 1600 256022 3e816 ath9k-old.ko $ du -b ath9k.ko 4034244 ath9k.ko $ du -b ath9k-old.ko 4033788 ath9k-old.ko Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h4
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h3
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c61
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c8
7 files changed, 43 insertions, 39 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 90b6314a8169..10ffc9442859 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -576,8 +576,8 @@ struct ath_softc {
576 struct ath_tx tx; 576 struct ath_tx tx;
577 struct ath_beacon beacon; 577 struct ath_beacon beacon;
578 struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX]; 578 struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX];
579 struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX]; 579 const struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX];
580 struct ath_rate_table *cur_rate_table; 580 const struct ath_rate_table *cur_rate_table;
581 struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; 581 struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
582 582
583 struct ath_led radio_led; 583 struct ath_led radio_led;
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index c17b8382e328..3a7154beeae1 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -63,7 +63,7 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,
63 struct ath_hw *ah = sc->sc_ah; 63 struct ath_hw *ah = sc->sc_ah;
64 struct ath_desc *ds; 64 struct ath_desc *ds;
65 struct ath9k_11n_rate_series series[4]; 65 struct ath9k_11n_rate_series series[4];
66 struct ath_rate_table *rt; 66 const struct ath_rate_table *rt;
67 int flags, antenna, ctsrate = 0, ctsduration = 0; 67 int flags, antenna, ctsrate = 0, ctsduration = 0;
68 u8 rate; 68 u8 rate;
69 69
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 02f40154e831..041c0f518ac7 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -168,7 +168,7 @@ bool ath9k_get_channel_edges(struct ath_hw *ah,
168} 168}
169 169
170u16 ath9k_hw_computetxtime(struct ath_hw *ah, 170u16 ath9k_hw_computetxtime(struct ath_hw *ah,
171 struct ath_rate_table *rates, 171 const struct ath_rate_table *rates,
172 u32 frameLen, u16 rateix, 172 u32 frameLen, u16 rateix,
173 bool shortPreamble) 173 bool shortPreamble)
174{ 174{
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index ab3412672e36..ddb24c47ebcf 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -580,7 +580,8 @@ bool ath9k_hw_setantennaswitch(struct ath_hw *ah,
580bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout); 580bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout);
581u32 ath9k_hw_reverse_bits(u32 val, u32 n); 581u32 ath9k_hw_reverse_bits(u32 val, u32 n);
582bool ath9k_get_channel_edges(struct ath_hw *ah, u16 flags, u16 *low, u16 *high); 582bool ath9k_get_channel_edges(struct ath_hw *ah, u16 flags, u16 *low, u16 *high);
583u16 ath9k_hw_computetxtime(struct ath_hw *ah, struct ath_rate_table *rates, 583u16 ath9k_hw_computetxtime(struct ath_hw *ah,
584 const struct ath_rate_table *rates,
584 u32 frameLen, u16 rateix, bool shortPreamble); 585 u32 frameLen, u16 rateix, bool shortPreamble);
585void ath9k_hw_get_channel_centers(struct ath_hw *ah, 586void ath9k_hw_get_channel_centers(struct ath_hw *ah,
586 struct ath9k_channel *chan, 587 struct ath9k_channel *chan,
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index d3dc8e2c77b2..bbbfdcde2727 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -189,7 +189,7 @@ static u8 parse_mpdudensity(u8 mpdudensity)
189 189
190static void ath_setup_rates(struct ath_softc *sc, enum ieee80211_band band) 190static void ath_setup_rates(struct ath_softc *sc, enum ieee80211_band band)
191{ 191{
192 struct ath_rate_table *rate_table = NULL; 192 const struct ath_rate_table *rate_table = NULL;
193 struct ieee80211_supported_band *sband; 193 struct ieee80211_supported_band *sband;
194 struct ieee80211_rate *rate; 194 struct ieee80211_rate *rate;
195 int i, maxrates; 195 int i, maxrates;
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index e526dbce57d1..ba06e78b2f50 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -17,7 +17,7 @@
17 17
18#include "ath9k.h" 18#include "ath9k.h"
19 19
20static struct ath_rate_table ar5416_11na_ratetable = { 20static const struct ath_rate_table ar5416_11na_ratetable = {
21 42, 21 42,
22 { 22 {
23 { VALID, VALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ 23 { VALID, VALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */
@@ -155,7 +155,7 @@ static struct ath_rate_table ar5416_11na_ratetable = {
155/* 4ms frame limit not used for NG mode. The values filled 155/* 4ms frame limit not used for NG mode. The values filled
156 * for HT are the 64K max aggregate limit */ 156 * for HT are the 64K max aggregate limit */
157 157
158static struct ath_rate_table ar5416_11ng_ratetable = { 158static const struct ath_rate_table ar5416_11ng_ratetable = {
159 46, 159 46,
160 { 160 {
161 { VALID_ALL, VALID_ALL, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ 161 { VALID_ALL, VALID_ALL, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */
@@ -302,7 +302,7 @@ static struct ath_rate_table ar5416_11ng_ratetable = {
302 WLAN_RC_HT_FLAG, /* Phy rates allowed initially */ 302 WLAN_RC_HT_FLAG, /* Phy rates allowed initially */
303}; 303};
304 304
305static struct ath_rate_table ar5416_11a_ratetable = { 305static const struct ath_rate_table ar5416_11a_ratetable = {
306 8, 306 8,
307 { 307 {
308 { VALID, VALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ 308 { VALID, VALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */
@@ -335,7 +335,7 @@ static struct ath_rate_table ar5416_11a_ratetable = {
335 0, /* Phy rates allowed initially */ 335 0, /* Phy rates allowed initially */
336}; 336};
337 337
338static struct ath_rate_table ar5416_11g_ratetable = { 338static const struct ath_rate_table ar5416_11g_ratetable = {
339 12, 339 12,
340 { 340 {
341 { VALID, VALID, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ 341 { VALID, VALID, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */
@@ -380,7 +380,7 @@ static struct ath_rate_table ar5416_11g_ratetable = {
380 0, /* Phy rates allowed initially */ 380 0, /* Phy rates allowed initially */
381}; 381};
382 382
383static struct ath_rate_table ar5416_11b_ratetable = { 383static const struct ath_rate_table ar5416_11b_ratetable = {
384 4, 384 4,
385 { 385 {
386 { VALID, VALID, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ 386 { VALID, VALID, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */
@@ -420,7 +420,7 @@ static inline int8_t median(int8_t a, int8_t b, int8_t c)
420 } 420 }
421} 421}
422 422
423static void ath_rc_sort_validrates(struct ath_rate_table *rate_table, 423static void ath_rc_sort_validrates(const struct ath_rate_table *rate_table,
424 struct ath_rate_priv *ath_rc_priv) 424 struct ath_rate_priv *ath_rc_priv)
425{ 425{
426 u8 i, j, idx, idx_next; 426 u8 i, j, idx, idx_next;
@@ -461,10 +461,11 @@ static inline int ath_rc_isvalid_txmask(struct ath_rate_priv *ath_rc_priv,
461 return ath_rc_priv->valid_rate_index[index]; 461 return ath_rc_priv->valid_rate_index[index];
462} 462}
463 463
464static inline int ath_rc_get_nextvalid_txrate(struct ath_rate_table *rate_table, 464static inline
465 struct ath_rate_priv *ath_rc_priv, 465int ath_rc_get_nextvalid_txrate(const struct ath_rate_table *rate_table,
466 u8 cur_valid_txrate, 466 struct ath_rate_priv *ath_rc_priv,
467 u8 *next_idx) 467 u8 cur_valid_txrate,
468 u8 *next_idx)
468{ 469{
469 u8 i; 470 u8 i;
470 471
@@ -500,7 +501,7 @@ static int ath_rc_valid_phyrate(u32 phy, u32 capflag, int ignore_cw)
500} 501}
501 502
502static inline int 503static inline int
503ath_rc_get_nextlowervalid_txrate(struct ath_rate_table *rate_table, 504ath_rc_get_nextlowervalid_txrate(const struct ath_rate_table *rate_table,
504 struct ath_rate_priv *ath_rc_priv, 505 struct ath_rate_priv *ath_rc_priv,
505 u8 cur_valid_txrate, u8 *next_idx) 506 u8 cur_valid_txrate, u8 *next_idx)
506{ 507{
@@ -517,7 +518,7 @@ ath_rc_get_nextlowervalid_txrate(struct ath_rate_table *rate_table,
517} 518}
518 519
519static u8 ath_rc_init_validrates(struct ath_rate_priv *ath_rc_priv, 520static u8 ath_rc_init_validrates(struct ath_rate_priv *ath_rc_priv,
520 struct ath_rate_table *rate_table, 521 const struct ath_rate_table *rate_table,
521 u32 capflag) 522 u32 capflag)
522{ 523{
523 u8 i, hi = 0; 524 u8 i, hi = 0;
@@ -547,7 +548,7 @@ static u8 ath_rc_init_validrates(struct ath_rate_priv *ath_rc_priv,
547} 548}
548 549
549static u8 ath_rc_setvalid_rates(struct ath_rate_priv *ath_rc_priv, 550static u8 ath_rc_setvalid_rates(struct ath_rate_priv *ath_rc_priv,
550 struct ath_rate_table *rate_table, 551 const struct ath_rate_table *rate_table,
551 struct ath_rateset *rateset, 552 struct ath_rateset *rateset,
552 u32 capflag) 553 u32 capflag)
553{ 554{
@@ -592,7 +593,7 @@ static u8 ath_rc_setvalid_rates(struct ath_rate_priv *ath_rc_priv,
592} 593}
593 594
594static u8 ath_rc_setvalid_htrates(struct ath_rate_priv *ath_rc_priv, 595static u8 ath_rc_setvalid_htrates(struct ath_rate_priv *ath_rc_priv,
595 struct ath_rate_table *rate_table, 596 const struct ath_rate_table *rate_table,
596 u8 *mcs_set, u32 capflag) 597 u8 *mcs_set, u32 capflag)
597{ 598{
598 struct ath_rateset *rateset = (struct ath_rateset *)mcs_set; 599 struct ath_rateset *rateset = (struct ath_rateset *)mcs_set;
@@ -630,7 +631,7 @@ static u8 ath_rc_setvalid_htrates(struct ath_rate_priv *ath_rc_priv,
630 631
631static u8 ath_rc_ratefind_ht(struct ath_softc *sc, 632static u8 ath_rc_ratefind_ht(struct ath_softc *sc,
632 struct ath_rate_priv *ath_rc_priv, 633 struct ath_rate_priv *ath_rc_priv,
633 struct ath_rate_table *rate_table, 634 const struct ath_rate_table *rate_table,
634 int *is_probing) 635 int *is_probing)
635{ 636{
636 u32 dt, best_thruput, this_thruput, now_msec; 637 u32 dt, best_thruput, this_thruput, now_msec;
@@ -748,7 +749,7 @@ static u8 ath_rc_ratefind_ht(struct ath_softc *sc,
748 return rate; 749 return rate;
749} 750}
750 751
751static void ath_rc_rate_set_series(struct ath_rate_table *rate_table, 752static void ath_rc_rate_set_series(const struct ath_rate_table *rate_table,
752 struct ieee80211_tx_rate *rate, 753 struct ieee80211_tx_rate *rate,
753 struct ieee80211_tx_rate_control *txrc, 754 struct ieee80211_tx_rate_control *txrc,
754 u8 tries, u8 rix, int rtsctsenable) 755 u8 tries, u8 rix, int rtsctsenable)
@@ -769,7 +770,7 @@ static void ath_rc_rate_set_series(struct ath_rate_table *rate_table,
769} 770}
770 771
771static void ath_rc_rate_set_rtscts(struct ath_softc *sc, 772static void ath_rc_rate_set_rtscts(struct ath_softc *sc,
772 struct ath_rate_table *rate_table, 773 const struct ath_rate_table *rate_table,
773 struct ieee80211_tx_info *tx_info) 774 struct ieee80211_tx_info *tx_info)
774{ 775{
775 struct ieee80211_tx_rate *rates = tx_info->control.rates; 776 struct ieee80211_tx_rate *rates = tx_info->control.rates;
@@ -807,7 +808,7 @@ static void ath_rc_rate_set_rtscts(struct ath_softc *sc,
807 808
808static u8 ath_rc_rate_getidx(struct ath_softc *sc, 809static u8 ath_rc_rate_getidx(struct ath_softc *sc,
809 struct ath_rate_priv *ath_rc_priv, 810 struct ath_rate_priv *ath_rc_priv,
810 struct ath_rate_table *rate_table, 811 const struct ath_rate_table *rate_table,
811 u8 rix, u16 stepdown, 812 u8 rix, u16 stepdown,
812 u16 min_rate) 813 u16 min_rate)
813{ 814{
@@ -838,7 +839,7 @@ static void ath_rc_ratefind(struct ath_softc *sc,
838 struct ath_rate_priv *ath_rc_priv, 839 struct ath_rate_priv *ath_rc_priv,
839 struct ieee80211_tx_rate_control *txrc) 840 struct ieee80211_tx_rate_control *txrc)
840{ 841{
841 struct ath_rate_table *rate_table; 842 const struct ath_rate_table *rate_table;
842 struct sk_buff *skb = txrc->skb; 843 struct sk_buff *skb = txrc->skb;
843 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 844 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
844 struct ieee80211_tx_rate *rates = tx_info->control.rates; 845 struct ieee80211_tx_rate *rates = tx_info->control.rates;
@@ -937,7 +938,7 @@ static void ath_rc_ratefind(struct ath_softc *sc,
937} 938}
938 939
939static bool ath_rc_update_per(struct ath_softc *sc, 940static bool ath_rc_update_per(struct ath_softc *sc,
940 struct ath_rate_table *rate_table, 941 const struct ath_rate_table *rate_table,
941 struct ath_rate_priv *ath_rc_priv, 942 struct ath_rate_priv *ath_rc_priv,
942 struct ath_tx_info_priv *tx_info_priv, 943 struct ath_tx_info_priv *tx_info_priv,
943 int tx_rate, int xretries, int retries, 944 int tx_rate, int xretries, int retries,
@@ -1142,7 +1143,7 @@ static void ath_rc_update_ht(struct ath_softc *sc,
1142 int rate; 1143 int rate;
1143 u8 last_per; 1144 u8 last_per;
1144 bool state_change = false; 1145 bool state_change = false;
1145 struct ath_rate_table *rate_table = sc->cur_rate_table; 1146 const struct ath_rate_table *rate_table = sc->cur_rate_table;
1146 int size = ath_rc_priv->rate_table_size; 1147 int size = ath_rc_priv->rate_table_size;
1147 1148
1148 if ((tx_rate < 0) || (tx_rate > rate_table->rate_cnt)) 1149 if ((tx_rate < 0) || (tx_rate > rate_table->rate_cnt))
@@ -1276,7 +1277,7 @@ static void ath_rc_update_ht(struct ath_softc *sc,
1276#undef CHK_RSSI 1277#undef CHK_RSSI
1277} 1278}
1278 1279
1279static int ath_rc_get_rateindex(struct ath_rate_table *rate_table, 1280static int ath_rc_get_rateindex(const struct ath_rate_table *rate_table,
1280 struct ieee80211_tx_rate *rate) 1281 struct ieee80211_tx_rate *rate)
1281{ 1282{
1282 int rix; 1283 int rix;
@@ -1300,7 +1301,7 @@ static void ath_rc_tx_status(struct ath_softc *sc,
1300 int final_ts_idx, int xretries, int long_retry) 1301 int final_ts_idx, int xretries, int long_retry)
1301{ 1302{
1302 struct ath_tx_info_priv *tx_info_priv = ATH_TX_INFO_PRIV(tx_info); 1303 struct ath_tx_info_priv *tx_info_priv = ATH_TX_INFO_PRIV(tx_info);
1303 struct ath_rate_table *rate_table; 1304 const struct ath_rate_table *rate_table;
1304 struct ieee80211_tx_rate *rates = tx_info->status.rates; 1305 struct ieee80211_tx_rate *rates = tx_info->status.rates;
1305 u8 flags; 1306 u8 flags;
1306 u32 i = 0, rix; 1307 u32 i = 0, rix;
@@ -1354,9 +1355,11 @@ static void ath_rc_tx_status(struct ath_softc *sc,
1354 xretries, long_retry); 1355 xretries, long_retry);
1355} 1356}
1356 1357
1357static struct ath_rate_table *ath_choose_rate_table(struct ath_softc *sc, 1358static const
1358 enum ieee80211_band band, 1359struct ath_rate_table *ath_choose_rate_table(struct ath_softc *sc,
1359 bool is_ht, bool is_cw_40) 1360 enum ieee80211_band band,
1361 bool is_ht,
1362 bool is_cw_40)
1360{ 1363{
1361 int mode = 0; 1364 int mode = 0;
1362 1365
@@ -1390,7 +1393,7 @@ static void ath_rc_init(struct ath_softc *sc,
1390 struct ath_rate_priv *ath_rc_priv, 1393 struct ath_rate_priv *ath_rc_priv,
1391 struct ieee80211_supported_band *sband, 1394 struct ieee80211_supported_band *sband,
1392 struct ieee80211_sta *sta, 1395 struct ieee80211_sta *sta,
1393 struct ath_rate_table *rate_table) 1396 const struct ath_rate_table *rate_table)
1394{ 1397{
1395 struct ath_rateset *rateset = &ath_rc_priv->neg_rates; 1398 struct ath_rateset *rateset = &ath_rc_priv->neg_rates;
1396 u8 *ht_mcs = (u8 *)&ath_rc_priv->neg_ht_rates; 1399 u8 *ht_mcs = (u8 *)&ath_rc_priv->neg_ht_rates;
@@ -1587,7 +1590,7 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband,
1587{ 1590{
1588 struct ath_softc *sc = priv; 1591 struct ath_softc *sc = priv;
1589 struct ath_rate_priv *ath_rc_priv = priv_sta; 1592 struct ath_rate_priv *ath_rc_priv = priv_sta;
1590 struct ath_rate_table *rate_table = NULL; 1593 const struct ath_rate_table *rate_table = NULL;
1591 bool is_cw40, is_sgi40; 1594 bool is_cw40, is_sgi40;
1592 int i, j = 0; 1595 int i, j = 0;
1593 1596
@@ -1636,7 +1639,7 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
1636{ 1639{
1637 struct ath_softc *sc = priv; 1640 struct ath_softc *sc = priv;
1638 struct ath_rate_priv *ath_rc_priv = priv_sta; 1641 struct ath_rate_priv *ath_rc_priv = priv_sta;
1639 struct ath_rate_table *rate_table = NULL; 1642 const struct ath_rate_table *rate_table = NULL;
1640 bool oper_cw40 = false, oper_sgi40; 1643 bool oper_cw40 = false, oper_sgi40;
1641 bool local_cw40 = (ath_rc_priv->ht_cap & WLAN_RC_40_FLAG) ? 1644 bool local_cw40 = (ath_rc_priv->ht_cap & WLAN_RC_40_FLAG) ?
1642 true : false; 1645 true : false;
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 501493ffc3a7..41c42824a5ca 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -434,7 +434,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
434static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf, 434static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
435 struct ath_atx_tid *tid) 435 struct ath_atx_tid *tid)
436{ 436{
437 struct ath_rate_table *rate_table = sc->cur_rate_table; 437 const struct ath_rate_table *rate_table = sc->cur_rate_table;
438 struct sk_buff *skb; 438 struct sk_buff *skb;
439 struct ieee80211_tx_info *tx_info; 439 struct ieee80211_tx_info *tx_info;
440 struct ieee80211_tx_rate *rates; 440 struct ieee80211_tx_rate *rates;
@@ -497,7 +497,7 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
497static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid, 497static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
498 struct ath_buf *bf, u16 frmlen) 498 struct ath_buf *bf, u16 frmlen)
499{ 499{
500 struct ath_rate_table *rt = sc->cur_rate_table; 500 const struct ath_rate_table *rt = sc->cur_rate_table;
501 struct sk_buff *skb = bf->bf_mpdu; 501 struct sk_buff *skb = bf->bf_mpdu;
502 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 502 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
503 u32 nsymbits, nsymbols, mpdudensity; 503 u32 nsymbits, nsymbols, mpdudensity;
@@ -1407,7 +1407,7 @@ static int setup_tx_flags(struct ath_softc *sc, struct sk_buff *skb,
1407static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf, 1407static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf,
1408 int width, int half_gi, bool shortPreamble) 1408 int width, int half_gi, bool shortPreamble)
1409{ 1409{
1410 struct ath_rate_table *rate_table = sc->cur_rate_table; 1410 const struct ath_rate_table *rate_table = sc->cur_rate_table;
1411 u32 nbits, nsymbits, duration, nsymbols; 1411 u32 nbits, nsymbits, duration, nsymbols;
1412 u8 rc; 1412 u8 rc;
1413 int streams, pktlen; 1413 int streams, pktlen;
@@ -1439,7 +1439,7 @@ static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf,
1439 1439
1440static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf) 1440static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
1441{ 1441{
1442 struct ath_rate_table *rt = sc->cur_rate_table; 1442 const struct ath_rate_table *rt = sc->cur_rate_table;
1443 struct ath9k_11n_rate_series series[4]; 1443 struct ath9k_11n_rate_series series[4];
1444 struct sk_buff *skb; 1444 struct sk_buff *skb;
1445 struct ieee80211_tx_info *tx_info; 1445 struct ieee80211_tx_info *tx_info;