* [PATCH] Bluetooth: trivial: Fix endian conversion mode
@ 2012-03-09 14:18 Andrei Emeltchenko
2012-03-09 17:10 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2012-03-09 14:18 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
In L2CAP we use le16 format so change direction of conversion
from le16_to_cpu to cpu_to_le16.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
net/bluetooth/l2cap_core.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index cf0b166..eb72f5a 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2413,9 +2413,9 @@ done:
chan->remote_mps = size;
rfc.retrans_timeout =
- le16_to_cpu(L2CAP_DEFAULT_RETRANS_TO);
+ cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO);
rfc.monitor_timeout =
- le16_to_cpu(L2CAP_DEFAULT_MONITOR_TO);
+ cpu_to_le16(L2CAP_DEFAULT_MONITOR_TO);
set_bit(CONF_MODE_DONE, &chan->conf_state);
--
1.7.9
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: trivial: Fix endian conversion mode
2012-03-09 14:18 [PATCH] Bluetooth: trivial: Fix endian conversion mode Andrei Emeltchenko
@ 2012-03-09 17:10 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2012-03-09 17:10 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
> In L2CAP we use le16 format so change direction of conversion
> from le16_to_cpu to cpu_to_le16.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> net/bluetooth/l2cap_core.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index cf0b166..eb72f5a 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -2413,9 +2413,9 @@ done:
> chan->remote_mps = size;
>
> rfc.retrans_timeout =
> - le16_to_cpu(L2CAP_DEFAULT_RETRANS_TO);
> + cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO);
> rfc.monitor_timeout =
> - le16_to_cpu(L2CAP_DEFAULT_MONITOR_TO);
> + cpu_to_le16(L2CAP_DEFAULT_MONITOR_TO);
and here we should also use the __constant version.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-09 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 14:18 [PATCH] Bluetooth: trivial: Fix endian conversion mode Andrei Emeltchenko
2012-03-09 17:10 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox