ece552c644
Switch to `NET_SOCKET_REGISTER` mechanism over the offloaded API registration. Including the following fixes from the review: * The fd returned by the socket accept call needs to be finalized, similar to how it is done for socket creation. * sl_RecvFrom() in TI SimpleLink Host driver does not support NULL pointers for 'from' address and address length, and sl_SendTo() does not ignore the destination address when in connection mode, so passing NULL would cause a failure. These issues have been reported to TI (CC3X20SDK-1970, CC3X20SDK-1971). Let's use sl_Recv and sl_Send to implement recvfrom/sendto in the case of NULL addresses. * simplelink_poll() should not process negative file descriptors in the fds array after sl_Selecti() returns. A negative fd value indicates that the entry is invalid and should be ignored. Signed-off-by: Vincent Wan <vincent.wan@linaro.org> Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
21 lines
450 B
C
21 lines
450 B
C
/**
|
|
* Copyright (c) 2018 Linaro Limited.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SOCKETS_H_
|
|
#define ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SOCKETS_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
extern const struct socket_dns_offload simplelink_dns_ops;
|
|
extern void simplelink_sockets_init(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SOCKETS_H_ */
|