All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: Make mult-byte entities in dhcp header be big endian
@ 2021-08-21 15:14 Larry Finger
  2021-08-21 17:19   ` Phillip Potter
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2021-08-21 15:14 UTC (permalink / raw)
  To: gregkh; +Cc: phil, linux-staging, linux-kernel, Larry Finger

The 16- and 32-bit quantities in the dhcp message definition must be
big endian.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
This patch will set up all the reset of the endian warnings,

Larry
---

 drivers/staging/r8188eu/core/rtw_br_ext.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c
index ee52f28a1e56..62a672243696 100644
--- a/drivers/staging/r8188eu/core/rtw_br_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
@@ -640,16 +640,16 @@ struct dhcpMessage {
 	u_int8_t hlen;
 	u_int8_t hops;
 	u_int32_t xid;
-	u_int16_t secs;
-	u_int16_t flags;
-	u_int32_t ciaddr;
-	u_int32_t yiaddr;
-	u_int32_t siaddr;
-	u_int32_t giaddr;
+	__be16 secs;
+	__be16 flags;
+	__be32 ciaddr;
+	__be32 yiaddr;
+	__be32 siaddr;
+	__be32 giaddr;
 	u_int8_t chaddr[16];
 	u_int8_t sname[64];
 	u_int8_t file[128];
-	u_int32_t cookie;
+	__be32 cookie;
 	u_int8_t options[308]; /* 312 - cookie */
 };
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: r8188eu: Make mult-byte entities in dhcp header be big endian
  2021-08-21 15:14 [PATCH] staging: r8188eu: Make mult-byte entities in dhcp header be big endian Larry Finger
@ 2021-08-21 17:19   ` Phillip Potter
  0 siblings, 0 replies; 3+ messages in thread
From: Phillip Potter @ 2021-08-21 17:19 UTC (permalink / raw)
  To: Larry Finger; +Cc: Greg KH, linux-staging, Linux Kernel Mailing List

On Sat, 21 Aug 2021 at 16:15, Larry Finger <Larry.Finger@lwfinger.net> wrote:
>
> The 16- and 32-bit quantities in the dhcp message definition must be
> big endian.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> This patch will set up all the reset of the endian warnings,
>
> Larry
> ---
>
>  drivers/staging/r8188eu/core/rtw_br_ext.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c
> index ee52f28a1e56..62a672243696 100644
> --- a/drivers/staging/r8188eu/core/rtw_br_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
> @@ -640,16 +640,16 @@ struct dhcpMessage {
>         u_int8_t hlen;
>         u_int8_t hops;
>         u_int32_t xid;
> -       u_int16_t secs;
> -       u_int16_t flags;
> -       u_int32_t ciaddr;
> -       u_int32_t yiaddr;
> -       u_int32_t siaddr;
> -       u_int32_t giaddr;
> +       __be16 secs;
> +       __be16 flags;
> +       __be32 ciaddr;
> +       __be32 yiaddr;
> +       __be32 siaddr;
> +       __be32 giaddr;
>         u_int8_t chaddr[16];
>         u_int8_t sname[64];
>         u_int8_t file[128];
> -       u_int32_t cookie;
> +       __be32 cookie;
>         u_int8_t options[308]; /* 312 - cookie */
>  };
>
> --
> 2.32.0
>

Nice, thanks.

Acked-by: Phillip Potter <phil@philpotter.co.uk>

Regards,
Phil

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: r8188eu: Make mult-byte entities in dhcp header be big endian
@ 2021-08-21 17:19   ` Phillip Potter
  0 siblings, 0 replies; 3+ messages in thread
From: Phillip Potter @ 2021-08-21 17:19 UTC (permalink / raw)
  To: Larry Finger; +Cc: Greg KH, linux-staging, Linux Kernel Mailing List

On Sat, 21 Aug 2021 at 16:15, Larry Finger <Larry.Finger@lwfinger.net> wrote:
>
> The 16- and 32-bit quantities in the dhcp message definition must be
> big endian.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> This patch will set up all the reset of the endian warnings,
>
> Larry
> ---
>
>  drivers/staging/r8188eu/core/rtw_br_ext.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c
> index ee52f28a1e56..62a672243696 100644
> --- a/drivers/staging/r8188eu/core/rtw_br_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
> @@ -640,16 +640,16 @@ struct dhcpMessage {
>         u_int8_t hlen;
>         u_int8_t hops;
>         u_int32_t xid;
> -       u_int16_t secs;
> -       u_int16_t flags;
> -       u_int32_t ciaddr;
> -       u_int32_t yiaddr;
> -       u_int32_t siaddr;
> -       u_int32_t giaddr;
> +       __be16 secs;
> +       __be16 flags;
> +       __be32 ciaddr;
> +       __be32 yiaddr;
> +       __be32 siaddr;
> +       __be32 giaddr;
>         u_int8_t chaddr[16];
>         u_int8_t sname[64];
>         u_int8_t file[128];
> -       u_int32_t cookie;
> +       __be32 cookie;
>         u_int8_t options[308]; /* 312 - cookie */
>  };
>
> --
> 2.32.0
>

Nice, thanks.

Acked-by: Phillip Potter <phil@philpotter.co.uk>

Regards,
Phil

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-21 17:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 15:14 [PATCH] staging: r8188eu: Make mult-byte entities in dhcp header be big endian Larry Finger
2021-08-21 17:19 ` Phillip Potter
2021-08-21 17:19   ` Phillip Potter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.