On Tue, May 12, 2015 at 11:30:40AM +0000, DHANAPAL, GNANACHANDRAN (G.) wrote:
> Casting correct Endianness for __le16 variable used in assignment and
> condition check.
> 
> Signed-off-by: Gnanachandran Dhanapal <gdhan...@visteon.com>
> ---
>       v2:Since previous version of the patch had build error.This
> version has no build warnings and error.
> ---
>  drivers/staging/rtl8192e/rtllib_softmac.c |   14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c 
> b/drivers/staging/rtl8192e/rtllib_softmac.c
> index 98afd3b..b708dce 100644
> --- a/drivers/staging/rtl8192e/rtllib_softmac.c
> +++ b/drivers/staging/rtl8192e/rtllib_softmac.c
> @@ -1263,7 +1263,7 @@ inline struct sk_buff *rtllib_association_req(struct 
> rtllib_network *beacon,
>               skb_put(skb, sizeof(struct rtllib_assoc_request_frame) + 2);
>  
>  
> -     hdr->header.frame_ctl = RTLLIB_STYPE_ASSOC_REQ;
> +     hdr->header.frame_ctl =   cpu_to_le16(RTLLIB_STYPE_ASSOC_REQ);

Extra spaces after the '=' character.

>       hdr->header.duration_id = cpu_to_le16(37);
>       memcpy(hdr->header.addr1, beacon->bssid, ETH_ALEN);
>       memcpy(hdr->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
> @@ -2233,9 +2233,9 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device 
> *ieee, struct sk_buff *skb,
>       u8 *ies;
>       struct rtllib_assoc_response_frame *assoc_resp;
>       struct rtllib_hdr_3addr *header = (struct rtllib_hdr_3addr *) skb->data;
> -
> +     u16 fc = le16_to_cpu(header->frame_ctl);

You need a blank line here.

And how about naming 'fc' to 'frame_ctl' as that's what it is and makes
more sense and is easier to read.

thanks,

greg k-h
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to