wl1271: fix a bunch of sparse warnings
authorLuciano Coelho <luciano.coelho@nokia.com>
Wed, 28 Apr 2010 06:50:02 +0000 (09:50 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 28 Apr 2010 20:50:27 +0000 (16:50 -0400)
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>
drivers/net/wireless/wl12xx/wl1271_acx.c
drivers/net/wireless/wl12xx/wl1271_boot.c
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_conf.h

index 1a6b2ec1db5899b19c8a299b68dd591236c661d4..4ed4036d6b68b153d23e8eb50d4426a9f3987605 100644 (file)
@@ -589,7 +589,7 @@ int wl1271_acx_sg_cfg(struct wl1271 *wl)
 
        /* BT-WLAN coext parameters */
        for (i = 0; i < CONF_SG_PARAMS_MAX; i++)
-               param->params[i] = c->params[i];
+               param->params[i] = cpu_to_le32(c->params[i]);
        param->param_idx = CONF_SG_PARAMS_ALL;
 
        ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
index f16d15bd56430ffca5d1bdda6d20d68dc3b35788..7e797157783eb19611b3c9e96148714aa61fd560 100644 (file)
@@ -350,7 +350,7 @@ static int wl1271_boot_soft_reset(struct wl1271 *wl)
 static int wl1271_boot_run_firmware(struct wl1271 *wl)
 {
        int loop, ret;
-       u32 chip_id, interrupt;
+       u32 chip_id, intr;
 
        wl1271_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT);
 
@@ -367,15 +367,15 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
        loop = 0;
        while (loop++ < INIT_LOOP) {
                udelay(INIT_LOOP_DELAY);
-               interrupt = wl1271_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
+               intr = wl1271_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
 
-               if (interrupt == 0xffffffff) {
+               if (intr == 0xffffffff) {
                        wl1271_error("error reading hardware complete "
                                     "init indication");
                        return -EIO;
                }
                /* check that ACX_INTR_INIT_COMPLETE is enabled */
-               else if (interrupt & WL1271_ACX_INTR_INIT_COMPLETE) {
+               else if (intr & WL1271_ACX_INTR_INIT_COMPLETE) {
                        wl1271_write32(wl, ACX_REG_INTERRUPT_ACK,
                                       WL1271_ACX_INTR_INIT_COMPLETE);
                        break;
index 564526d812797c9287261077bab7e3556d0e7a73..4292f8dc2a80eda0668156909e030cbc98e51216 100644 (file)
@@ -317,7 +317,7 @@ int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type)
        join->rx_config_options = cpu_to_le32(wl->rx_config);
        join->rx_filter_options = cpu_to_le32(wl->rx_filter);
        join->bss_type = bss_type;
-       join->basic_rate_set = wl->basic_rate_set;
+       join->basic_rate_set = cpu_to_le32(wl->basic_rate_set);
 
        if (wl->band == IEEE80211_BAND_5GHZ)
                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,
        params->params.scan_options = cpu_to_le16(scan_options);
 
        params->params.num_probe_requests = probe_requests;
-       params->params.tx_rate = rate;
+       params->params.tx_rate = cpu_to_le32(rate);
        params->params.tid_trigger = 0;
        params->params.scan_tag = WL1271_SCAN_DEFAULT_TAG;
 
index c44307c4bcf8ca8c62c6ba18934a84f487a57a9b..d046d044b5bd8a640acb99bfcc08259e2654b1f6 100644 (file)
@@ -401,7 +401,7 @@ enum {
 };
 
 struct conf_sg_settings {
-       __le32 params[CONF_SG_PARAMS_MAX];
+       u32 params[CONF_SG_PARAMS_MAX];
        u8 state;
 };