Skip to content

Commit

Permalink
driver: wifi: simplelink: Fix socket offload after s_addr cleanup
Browse files Browse the repository at this point in the history
The commit 8592501
("net: Remove s_addr/s6_addr defines from in_addr/in6_addr")

did a (welcomed) removal of a #define s_addr for which the SimpleLink
SDK was checking, breaking the socket_offload driver build.

This patch fixes the driver to work with this new, better
s_addr symbol definition.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
  • Loading branch information
Gil Pitney authored and galak committed Oct 4, 2018
1 parent 18af4c6 commit be64964
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/wifi/simplelink/simplelink_sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static SlSockAddr_t *translate_z_to_sl_addrs(const struct sockaddr *addr,
*sl_addrlen = sizeof(SlSockAddrIn_t);
sl_addr_in->sin_family = AF_INET;
sl_addr_in->sin_port = z_sockaddr_in->sin_port;
sl_addr_in->sin_addr.S_un.S_addr =
sl_addr_in->sin_addr.s_addr =
z_sockaddr_in->sin_addr.s_addr;

sl_addr = (SlSockAddr_t *)sl_addr_in;
Expand Down Expand Up @@ -114,7 +114,7 @@ static void translate_sl_to_z_addr(SlSockAddr_t *sl_addr,
z_sockaddr_in->sin_family = AF_INET;
z_sockaddr_in->sin_port = sl_addr_in->sin_port;
z_sockaddr_in->sin_addr.s_addr =
sl_addr_in->sin_addr.S_un.S_addr;
sl_addr_in->sin_addr.s_addr;
*addrlen = sizeof(struct sockaddr_in);
} else {
*addrlen = sl_addrlen;
Expand Down

0 comments on commit be64964

Please sign in to comment.