Re: [PATCH] Bluetooth: mgmt: Add missing endian conversion

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

 



Hi Andrei,

> Add missing endian conversion for page scan interval and window.
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
> ---
>  net/bluetooth/mgmt.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 97b5b6c..06d2eaf 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -2523,13 +2523,18 @@ static int set_fast_connectable(struct sock *sk, struct hci_dev *hdev,
>  
>  	if (cp->val) {
>  		type = PAGE_SCAN_TYPE_INTERLACED;
> -		acp.interval = 0x0024;	/* 22.5 msec page scan interval */
> +
> +		/* 22.5 msec page scan interval */
> +		acp.interval = cpu_to_le16(0x0024);
>  	} else {
>  		type = PAGE_SCAN_TYPE_STANDARD;	/* default */
> -		acp.interval = 0x0800;	/* default 1.28 sec page scan */
> +
> +		/* default 1.28 sec page scan */
> +		acp.interval = cpu_to_le16(0x0800);
>  	}
>  
> -	acp.window = 0x0012;	/* default 11.25 msec page scan window */
> +	/* default 11.25 msec page scan window */
> +	acp.window = cpu_to_le16(0x0012);

please use __constant_cpu_to_le16.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux