diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-07-21 12:25:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-26 15:09:03 -0400 |
commit | 1ab36d68e37faa431d99a07cbfb477a48879934e (patch) | |
tree | e460e4970e0b4bb36a9a4c7fa47a001b6450728a /drivers/net/wireless/wl12xx | |
parent | da22f795cefb7c9f8a7bc6f22b1c16f1ff15a392 (diff) |
wl1251: fix sparse-generated warnings
CHECK drivers/net/wireless/wl12xx/wl1251_tx.c
drivers/net/wireless/wl12xx/wl1251_tx.c:118:32: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:118:32: expected unsigned short [unsigned] [usertype] frag_threshold
drivers/net/wireless/wl12xx/wl1251_tx.c:118:32: got restricted __le16 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_tx.c:164:24: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:164:24: expected unsigned short [unsigned] [usertype] length
drivers/net/wireless/wl12xx/wl1251_tx.c:164:24: got restricted __le16 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_tx.c:166:22: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:166:22: expected unsigned short [unsigned] [usertype] rate
drivers/net/wireless/wl12xx/wl1251_tx.c:166:22: got restricted __le16 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_tx.c:167:29: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:167:29: expected unsigned int [unsigned] [usertype] expiry_time
drivers/net/wireless/wl12xx/wl1251_tx.c:167:29: got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_tx.c:200:43: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:200:43: expected restricted __le16 [usertype] fc
drivers/net/wireless/wl12xx/wl1251_tx.c:200:43: got unsigned short [unsigned] [assigned] [usertype] fc
CHECK drivers/net/wireless/wl12xx/wl1251_cmd.c
drivers/net/wireless/wl12xx/wl1251_cmd.c:428:39: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:428:39: expected unsigned int [unsigned] [usertype] rx_config_options
drivers/net/wireless/wl12xx/wl1251_cmd.c:428:39: got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_cmd.c:429:39: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:429:39: expected unsigned int [unsigned] [usertype] rx_filter_options
drivers/net/wireless/wl12xx/wl1251_cmd.c:429:39: got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_cmd.c:435:29: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:435:29: expected unsigned short [unsigned] [usertype] tx_rate
drivers/net/wireless/wl12xx/wl1251_cmd.c:435:29: got restricted __le16 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_cmd.c:439:47: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:439:47: expected unsigned int [unsigned] [usertype] min_duration
drivers/net/wireless/wl12xx/wl1251_cmd.c:439:47: got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_cmd.c:441:47: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:441:47: expected unsigned int [unsigned] [usertype] max_duration
drivers/net/wireless/wl12xx/wl1251_cmd.c:441:47: got restricted __le32 [usertype] <noident>
CHECK drivers/net/wireless/wl12xx/wl1251_boot.c
drivers/net/wireless/wl12xx/wl1251_boot.c:228:22: warning: symbol 'interrupt' shadows an earlier one
/home/linville/git/wireless-next-2.6/arch/x86/include/asm/hw_irq.h:132:13: originally declared here
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_boot.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_cmd.h | 12 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_tx.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_tx.h | 8 |
4 files changed, 20 insertions, 18 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_boot.c b/drivers/net/wireless/wl12xx/wl1251_boot.c index 2545123931e..65e0416be5b 100644 --- a/drivers/net/wireless/wl12xx/wl1251_boot.c +++ b/drivers/net/wireless/wl12xx/wl1251_boot.c | |||
@@ -225,7 +225,7 @@ static void wl1251_boot_set_ecpu_ctrl(struct wl1251 *wl, u32 flag) | |||
225 | int wl1251_boot_run_firmware(struct wl1251 *wl) | 225 | int wl1251_boot_run_firmware(struct wl1251 *wl) |
226 | { | 226 | { |
227 | int loop, ret; | 227 | int loop, ret; |
228 | u32 chip_id, interrupt; | 228 | u32 chip_id, acx_intr; |
229 | 229 | ||
230 | wl1251_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT); | 230 | wl1251_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT); |
231 | 231 | ||
@@ -242,15 +242,15 @@ int wl1251_boot_run_firmware(struct wl1251 *wl) | |||
242 | loop = 0; | 242 | loop = 0; |
243 | while (loop++ < INIT_LOOP) { | 243 | while (loop++ < INIT_LOOP) { |
244 | udelay(INIT_LOOP_DELAY); | 244 | udelay(INIT_LOOP_DELAY); |
245 | interrupt = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR); | 245 | acx_intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR); |
246 | 246 | ||
247 | if (interrupt == 0xffffffff) { | 247 | if (acx_intr == 0xffffffff) { |
248 | wl1251_error("error reading hardware complete " | 248 | wl1251_error("error reading hardware complete " |
249 | "init indication"); | 249 | "init indication"); |
250 | return -EIO; | 250 | return -EIO; |
251 | } | 251 | } |
252 | /* check that ACX_INTR_INIT_COMPLETE is enabled */ | 252 | /* check that ACX_INTR_INIT_COMPLETE is enabled */ |
253 | else if (interrupt & WL1251_ACX_INTR_INIT_COMPLETE) { | 253 | else if (acx_intr & WL1251_ACX_INTR_INIT_COMPLETE) { |
254 | wl1251_reg_write32(wl, ACX_REG_INTERRUPT_ACK, | 254 | wl1251_reg_write32(wl, ACX_REG_INTERRUPT_ACK, |
255 | WL1251_ACX_INTR_INIT_COMPLETE); | 255 | WL1251_ACX_INTR_INIT_COMPLETE); |
256 | break; | 256 | break; |
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.h b/drivers/net/wireless/wl12xx/wl1251_cmd.h index 4ad67cae94d..ca1cb24d663 100644 --- a/drivers/net/wireless/wl12xx/wl1251_cmd.h +++ b/drivers/net/wireless/wl12xx/wl1251_cmd.h | |||
@@ -175,8 +175,8 @@ struct cmd_read_write_memory { | |||
175 | #define WL1251_SCAN_NUM_PROBES 3 | 175 | #define WL1251_SCAN_NUM_PROBES 3 |
176 | 176 | ||
177 | struct wl1251_scan_parameters { | 177 | struct wl1251_scan_parameters { |
178 | u32 rx_config_options; | 178 | __le32 rx_config_options; |
179 | u32 rx_filter_options; | 179 | __le32 rx_filter_options; |
180 | 180 | ||
181 | /* | 181 | /* |
182 | * Scan options: | 182 | * Scan options: |
@@ -186,7 +186,7 @@ struct wl1251_scan_parameters { | |||
186 | * bit 2: voice mode, 0 for normal scan. | 186 | * bit 2: voice mode, 0 for normal scan. |
187 | * bit 3: scan priority, 1 for high priority. | 187 | * bit 3: scan priority, 1 for high priority. |
188 | */ | 188 | */ |
189 | u16 scan_options; | 189 | __le16 scan_options; |
190 | 190 | ||
191 | /* Number of channels to scan */ | 191 | /* Number of channels to scan */ |
192 | u8 num_channels; | 192 | u8 num_channels; |
@@ -195,7 +195,7 @@ struct wl1251_scan_parameters { | |||
195 | u8 num_probe_requests; | 195 | u8 num_probe_requests; |
196 | 196 | ||
197 | /* Rate and modulation for probe requests */ | 197 | /* Rate and modulation for probe requests */ |
198 | u16 tx_rate; | 198 | __le16 tx_rate; |
199 | 199 | ||
200 | u8 tid_trigger; | 200 | u8 tid_trigger; |
201 | u8 ssid_len; | 201 | u8 ssid_len; |
@@ -204,8 +204,8 @@ struct wl1251_scan_parameters { | |||
204 | } __attribute__ ((packed)); | 204 | } __attribute__ ((packed)); |
205 | 205 | ||
206 | struct wl1251_scan_ch_parameters { | 206 | struct wl1251_scan_ch_parameters { |
207 | u32 min_duration; /* in TU */ | 207 | __le32 min_duration; /* in TU */ |
208 | u32 max_duration; /* in TU */ | 208 | __le32 max_duration; /* in TU */ |
209 | u32 bssid_lsb; | 209 | u32 bssid_lsb; |
210 | u16 bssid_msb; | 210 | u16 bssid_msb; |
211 | 211 | ||
diff --git a/drivers/net/wireless/wl12xx/wl1251_tx.c b/drivers/net/wireless/wl12xx/wl1251_tx.c index c8223185efd..a38ec199187 100644 --- a/drivers/net/wireless/wl12xx/wl1251_tx.c +++ b/drivers/net/wireless/wl12xx/wl1251_tx.c | |||
@@ -117,7 +117,7 @@ static void wl1251_tx_frag_block_num(struct tx_double_buffer_desc *tx_hdr) | |||
117 | frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD; | 117 | frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD; |
118 | tx_hdr->frag_threshold = cpu_to_le16(frag_threshold); | 118 | tx_hdr->frag_threshold = cpu_to_le16(frag_threshold); |
119 | 119 | ||
120 | payload_len = tx_hdr->length + MAX_MSDU_SECURITY_LENGTH; | 120 | payload_len = le16_to_cpu(tx_hdr->length) + MAX_MSDU_SECURITY_LENGTH; |
121 | 121 | ||
122 | if (payload_len > frag_threshold) { | 122 | if (payload_len > frag_threshold) { |
123 | mem_blocks_per_frag = | 123 | mem_blocks_per_frag = |
@@ -191,11 +191,13 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb, | |||
191 | if (control->control.hw_key && | 191 | if (control->control.hw_key && |
192 | control->control.hw_key->alg == ALG_TKIP) { | 192 | control->control.hw_key->alg == ALG_TKIP) { |
193 | int hdrlen; | 193 | int hdrlen; |
194 | u16 fc; | 194 | __le16 fc; |
195 | u16 length; | ||
195 | u8 *pos; | 196 | u8 *pos; |
196 | 197 | ||
197 | fc = *(u16 *)(skb->data + sizeof(*tx_hdr)); | 198 | fc = *(__le16 *)(skb->data + sizeof(*tx_hdr)); |
198 | tx_hdr->length += WL1251_TKIP_IV_SPACE; | 199 | length = le16_to_cpu(tx_hdr->length) + WL1251_TKIP_IV_SPACE; |
200 | tx_hdr->length = cpu_to_le16(length); | ||
199 | 201 | ||
200 | hdrlen = ieee80211_hdrlen(fc); | 202 | hdrlen = ieee80211_hdrlen(fc); |
201 | 203 | ||
diff --git a/drivers/net/wireless/wl12xx/wl1251_tx.h b/drivers/net/wireless/wl12xx/wl1251_tx.h index 55856c6bb97..dff127f4fa8 100644 --- a/drivers/net/wireless/wl12xx/wl1251_tx.h +++ b/drivers/net/wireless/wl12xx/wl1251_tx.h | |||
@@ -114,7 +114,7 @@ struct tx_control { | |||
114 | 114 | ||
115 | struct tx_double_buffer_desc { | 115 | struct tx_double_buffer_desc { |
116 | /* Length of payload, including headers. */ | 116 | /* Length of payload, including headers. */ |
117 | u16 length; | 117 | __le16 length; |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * A bit mask that specifies the initial rate to be used | 120 | * A bit mask that specifies the initial rate to be used |
@@ -133,10 +133,10 @@ struct tx_double_buffer_desc { | |||
133 | * 0x0800 - 48Mbits | 133 | * 0x0800 - 48Mbits |
134 | * 0x1000 - 54Mbits | 134 | * 0x1000 - 54Mbits |
135 | */ | 135 | */ |
136 | u16 rate; | 136 | __le16 rate; |
137 | 137 | ||
138 | /* Time in us that a packet can spend in the target */ | 138 | /* Time in us that a packet can spend in the target */ |
139 | u32 expiry_time; | 139 | __le32 expiry_time; |
140 | 140 | ||
141 | /* index of the TX queue used for this packet */ | 141 | /* index of the TX queue used for this packet */ |
142 | u8 xmit_queue; | 142 | u8 xmit_queue; |
@@ -150,7 +150,7 @@ struct tx_double_buffer_desc { | |||
150 | * The FW should cut the packet into fragments | 150 | * The FW should cut the packet into fragments |
151 | * of this size. | 151 | * of this size. |
152 | */ | 152 | */ |
153 | u16 frag_threshold; | 153 | __le16 frag_threshold; |
154 | 154 | ||
155 | /* Numbers of HW queue blocks to be allocated */ | 155 | /* Numbers of HW queue blocks to be allocated */ |
156 | u8 num_mem_blocks; | 156 | u8 num_mem_blocks; |