diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-03-07 10:26:41 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:36 -0400 |
commit | 2c91108c55477334f6854a587ec6e9111d8f1407 (patch) | |
tree | cea98b7ea31c0e37508fec8513b4a299409fa556 /drivers/net/wireless/ath5k/attach.c | |
parent | 77dcb6a9526b1e0d159a9300e512c7271bff3163 (diff) |
ath5k: constify stuff
Make some structures const to place them in .rodata, since we won't
change them.
Most important parts of objdump -h:
- 0 .text 00011170
+ 0 .text 00011140
- 5 .rodata 0000828e
+ 5 .rodata 0000895e
- 13 .data 00000560
+ 13 .data 00000110
- 14 .devinit.data 00000260
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/attach.c')
-rw-r--r-- | drivers/net/wireless/ath5k/attach.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath5k/attach.c b/drivers/net/wireless/ath5k/attach.c index 05bc5cb44e8..656cb9dc833 100644 --- a/drivers/net/wireless/ath5k/attach.c +++ b/drivers/net/wireless/ath5k/attach.c @@ -34,14 +34,14 @@ static int ath5k_hw_post(struct ath5k_hw *ah) { - int i, c; - u16 cur_reg; - u16 regs[2] = {AR5K_STA_ID0, AR5K_PHY(8)}; - u32 var_pattern; - u32 static_pattern[4] = { + static const u32 static_pattern[4] = { 0x55555555, 0xaaaaaaaa, 0x66666666, 0x99999999 }; + static const u16 regs[2] = { AR5K_STA_ID0, AR5K_PHY(8) }; + int i, c; + u16 cur_reg; + u32 var_pattern; u32 init_val; u32 cur_val; @@ -106,7 +106,6 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) { struct ath5k_hw *ah; struct pci_dev *pdev = sc->pdev; - u8 mac[ETH_ALEN] = {}; int ret; u32 srev; @@ -312,7 +311,7 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) } /* MAC address is cleared until add_interface */ - ath5k_hw_set_lladdr(ah, mac); + ath5k_hw_set_lladdr(ah, (u8[ETH_ALEN]){}); /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */ memset(ah->ah_bssid, 0xff, ETH_ALEN); |