lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1394096112.26326.1.camel@dubbel>
Date:	Thu, 06 Mar 2014 10:55:12 +0200
From:	Luca Coelho <luca@...lho.fi>
To:	Surendra Patil <surendra.tux@...il.com>
Cc:	linville@...driver.com, pavel@....cz, pali.rohar@...il.com,
	david.gnedt@...izone.at, linux-wireless@...r.kernel.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Drivers:net:wireless:ti:wl1251: Fixed Sparse invalid
 assignment warning

On Tue, 2014-03-04 at 00:18 -0800, Surendra Patil wrote:
> Sparse warns about invalid assignment in
> drivers/net/wireless/ti/wl1251/cmd.c:451:42: warning: invalid assignment: |=
> drivers/net/wireless/ti/wl1251/cmd.c:451:42:    left side has type restricted __le16
> drivers/net/wireless/ti/wl1251/cmd.c:451:42:    right side has type int
> Hence type converted right side to __le16.
> 
> Signed-off-by: Surendra Patil <surendra.tux@...il.com>
> ---
>  drivers/net/wireless/ti/wl1251/cmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ti/wl1251/cmd.c b/drivers/net/wireless/ti/wl1251/cmd.c
> index 223649b..bf1fa18 100644
> --- a/drivers/net/wireless/ti/wl1251/cmd.c
> +++ b/drivers/net/wireless/ti/wl1251/cmd.c
> @@ -448,7 +448,7 @@ int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,
>  	 * Note: This bug may be caused by the fw's DTIM handling.
>  	 */
>  	if (is_zero_ether_addr(wl->bssid))
> -		cmd->params.scan_options |= WL1251_SCAN_OPT_PRIORITY_HIGH;
> +		cmd->params.scan_options |= cpu_to_le16(WL1251_SCAN_OPT_PRIORITY_HIGH);
>  	cmd->params.num_channels = n_channels;
>  	cmd->params.num_probe_requests = n_probes;
>  	cmd->params.tx_rate = cpu_to_le16(1 << 1); /* 2 Mbps */

AFAIR wl1251 is not really endianess-safe.  I think there are lots of
other places where endianess macros should be added.

Nothing wrong with this patch, I'm just saying that while at it, maybe
someone could take care of all the endianess issues with wl1251? ;)

--
Luca.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ