aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/attach.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-03-07 04:26:41 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-03-16 18:09:36 -0400
commit2c91108c55477334f6854a587ec6e9111d8f1407 (patch)
treecea98b7ea31c0e37508fec8513b4a299409fa556 /drivers/net/wireless/ath5k/attach.c
parent77dcb6a9526b1e0d159a9300e512c7271bff3163 (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.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath5k/attach.c b/drivers/net/wireless/ath5k/attach.c
index 05bc5cb44e88..656cb9dc833b 100644
--- a/drivers/net/wireless/ath5k/attach.c
+++ b/drivers/net/wireless/ath5k/attach.c
@@ -34,14 +34,14 @@
34static int ath5k_hw_post(struct ath5k_hw *ah) 34static int ath5k_hw_post(struct ath5k_hw *ah)
35{ 35{
36 36
37 int i, c; 37 static const u32 static_pattern[4] = {
38 u16 cur_reg;
39 u16 regs[2] = {AR5K_STA_ID0, AR5K_PHY(8)};
40 u32 var_pattern;
41 u32 static_pattern[4] = {
42 0x55555555, 0xaaaaaaaa, 38 0x55555555, 0xaaaaaaaa,
43 0x66666666, 0x99999999 39 0x66666666, 0x99999999
44 }; 40 };
41 static const u16 regs[2] = { AR5K_STA_ID0, AR5K_PHY(8) };
42 int i, c;
43 u16 cur_reg;
44 u32 var_pattern;
45 u32 init_val; 45 u32 init_val;
46 u32 cur_val; 46 u32 cur_val;
47 47
@@ -106,7 +106,6 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
106{ 106{
107 struct ath5k_hw *ah; 107 struct ath5k_hw *ah;
108 struct pci_dev *pdev = sc->pdev; 108 struct pci_dev *pdev = sc->pdev;
109 u8 mac[ETH_ALEN] = {};
110 int ret; 109 int ret;
111 u32 srev; 110 u32 srev;
112 111
@@ -312,7 +311,7 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
312 } 311 }
313 312
314 /* MAC address is cleared until add_interface */ 313 /* MAC address is cleared until add_interface */
315 ath5k_hw_set_lladdr(ah, mac); 314 ath5k_hw_set_lladdr(ah, (u8[ETH_ALEN]){});
316 315
317 /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */ 316 /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */
318 memset(ah->ah_bssid, 0xff, ETH_ALEN); 317 memset(ah->ah_bssid, 0xff, ETH_ALEN);