Re: [PATCH v3] Staging: rtl8192e: Casting correct Endianness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 02, 2015 at 03:59:32PM +0000, DHANAPAL, GNANACHANDRAN (G.) wrote:
> From: Gnanachandran Dhanapal <gdhanapa@xxxxxxxxxxx>
> 
> Casting correct Endianness for __le16 variable used in assignment and
> condition check
> 
> Signed-off-by: Gnanachandran Dhanapal <gdhanapa@xxxxxxxxxxx>
> ---
> v3: Greg review comments addressed
> 
> ---
>  drivers/staging/rtl8192e/rtllib_softmac.c |   14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
> index 9dce121..a842170 100644
> --- a/drivers/staging/rtl8192e/rtllib_softmac.c
> +++ b/drivers/staging/rtl8192e/rtllib_softmac.c
> @@ -1265,7 +1265,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);
>  	hdr->header.duration_id = cpu_to_le16(37);
>  	ether_addr_copy(hdr->header.addr1, beacon->bssid);
>  	ether_addr_copy(hdr->header.addr2, ieee->dev->dev_addr);
> @@ -2244,8 +2244,10 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
>  	struct rtllib_assoc_response_frame *assoc_resp;
>  	struct rtllib_hdr_3addr *header = (struct rtllib_hdr_3addr *) skb->data;
>  
> +	u16 frame_ctl = le16_to_cpu(header->frame_ctl);
> +

Why the blank line before this variable definition?

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux