diff options
author | Luciano Coelho <luciano.coelho@nokia.com> | 2010-04-28 02:50:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-28 16:50:27 -0400 |
commit | 23a7a51c5a35b30aa3edcc31a6a57b01c523b4cd (patch) | |
tree | 5f75758db2203ab0f957a737687200c40c23a205 | |
parent | 82429d32ca3bae9d67faa32ffbc989be2e63094f (diff) |
wl1271: fix a bunch of sparse warnings
A couple of sparse warnings in some rate settings (missing cpu_to_le32) were
fixed. Changed the conf_sg_settings struct from le to native endianess. The
values are converted to le when copying them to the acx command instead.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_acx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_boot.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_conf.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c index 1a6b2ec1db58..4ed4036d6b68 100644 --- a/drivers/net/wireless/wl12xx/wl1271_acx.c +++ b/drivers/net/wireless/wl12xx/wl1271_acx.c | |||
@@ -589,7 +589,7 @@ int wl1271_acx_sg_cfg(struct wl1271 *wl) | |||
589 | 589 | ||
590 | /* BT-WLAN coext parameters */ | 590 | /* BT-WLAN coext parameters */ |
591 | for (i = 0; i < CONF_SG_PARAMS_MAX; i++) | 591 | for (i = 0; i < CONF_SG_PARAMS_MAX; i++) |
592 | param->params[i] = c->params[i]; | 592 | param->params[i] = cpu_to_le32(c->params[i]); |
593 | param->param_idx = CONF_SG_PARAMS_ALL; | 593 | param->param_idx = CONF_SG_PARAMS_ALL; |
594 | 594 | ||
595 | ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param)); | 595 | ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param)); |
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c index f16d15bd5643..7e797157783e 100644 --- a/drivers/net/wireless/wl12xx/wl1271_boot.c +++ b/drivers/net/wireless/wl12xx/wl1271_boot.c | |||
@@ -350,7 +350,7 @@ static int wl1271_boot_soft_reset(struct wl1271 *wl) | |||
350 | static int wl1271_boot_run_firmware(struct wl1271 *wl) | 350 | static int wl1271_boot_run_firmware(struct wl1271 *wl) |
351 | { | 351 | { |
352 | int loop, ret; | 352 | int loop, ret; |
353 | u32 chip_id, interrupt; | 353 | u32 chip_id, intr; |
354 | 354 | ||
355 | wl1271_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT); | 355 | wl1271_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT); |
356 | 356 | ||
@@ -367,15 +367,15 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl) | |||
367 | loop = 0; | 367 | loop = 0; |
368 | while (loop++ < INIT_LOOP) { | 368 | while (loop++ < INIT_LOOP) { |
369 | udelay(INIT_LOOP_DELAY); | 369 | udelay(INIT_LOOP_DELAY); |
370 | interrupt = wl1271_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR); | 370 | intr = wl1271_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR); |
371 | 371 | ||
372 | if (interrupt == 0xffffffff) { | 372 | if (intr == 0xffffffff) { |
373 | wl1271_error("error reading hardware complete " | 373 | wl1271_error("error reading hardware complete " |
374 | "init indication"); | 374 | "init indication"); |
375 | return -EIO; | 375 | return -EIO; |
376 | } | 376 | } |
377 | /* check that ACX_INTR_INIT_COMPLETE is enabled */ | 377 | /* check that ACX_INTR_INIT_COMPLETE is enabled */ |
378 | else if (interrupt & WL1271_ACX_INTR_INIT_COMPLETE) { | 378 | else if (intr & WL1271_ACX_INTR_INIT_COMPLETE) { |
379 | wl1271_write32(wl, ACX_REG_INTERRUPT_ACK, | 379 | wl1271_write32(wl, ACX_REG_INTERRUPT_ACK, |
380 | WL1271_ACX_INTR_INIT_COMPLETE); | 380 | WL1271_ACX_INTR_INIT_COMPLETE); |
381 | break; | 381 | break; |
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 564526d81279..4292f8dc2a80 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -317,7 +317,7 @@ int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type) | |||
317 | join->rx_config_options = cpu_to_le32(wl->rx_config); | 317 | join->rx_config_options = cpu_to_le32(wl->rx_config); |
318 | join->rx_filter_options = cpu_to_le32(wl->rx_filter); | 318 | join->rx_filter_options = cpu_to_le32(wl->rx_filter); |
319 | join->bss_type = bss_type; | 319 | join->bss_type = bss_type; |
320 | join->basic_rate_set = wl->basic_rate_set; | 320 | join->basic_rate_set = cpu_to_le32(wl->basic_rate_set); |
321 | 321 | ||
322 | if (wl->band == IEEE80211_BAND_5GHZ) | 322 | if (wl->band == IEEE80211_BAND_5GHZ) |
323 | join->bss_type |= WL1271_JOIN_CMD_BSS_TYPE_5GHZ; | 323 | join->bss_type |= WL1271_JOIN_CMD_BSS_TYPE_5GHZ; |
@@ -614,7 +614,7 @@ int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len, | |||
614 | params->params.scan_options = cpu_to_le16(scan_options); | 614 | params->params.scan_options = cpu_to_le16(scan_options); |
615 | 615 | ||
616 | params->params.num_probe_requests = probe_requests; | 616 | params->params.num_probe_requests = probe_requests; |
617 | params->params.tx_rate = rate; | 617 | params->params.tx_rate = cpu_to_le32(rate); |
618 | params->params.tid_trigger = 0; | 618 | params->params.tid_trigger = 0; |
619 | params->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; | 619 | params->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; |
620 | 620 | ||
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h index c44307c4bcf8..d046d044b5bd 100644 --- a/drivers/net/wireless/wl12xx/wl1271_conf.h +++ b/drivers/net/wireless/wl12xx/wl1271_conf.h | |||
@@ -401,7 +401,7 @@ enum { | |||
401 | }; | 401 | }; |
402 | 402 | ||
403 | struct conf_sg_settings { | 403 | struct conf_sg_settings { |
404 | __le32 params[CONF_SG_PARAMS_MAX]; | 404 | u32 params[CONF_SG_PARAMS_MAX]; |
405 | u8 state; | 405 | u8 state; |
406 | }; | 406 | }; |
407 | 407 | ||