net: sockets: Get socket offload to build after net logging overhaul.

Also, defines one LOG_MODULE_NAME for the simplelink WiFi driver, and
uses the same name for all files in this driver (module).

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
This commit is contained in:
Gil Pitney 2018-10-05 14:37:37 -07:00 committed by Jukka Rissanen
commit c2cdbbafd7
6 changed files with 34 additions and 11 deletions

View file

@ -4,10 +4,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#define LOG_MODULE_NAME wifi_simplelink #include "simplelink_log.h"
#define LOG_LEVEL CONFIG_WIFI_LOG_LEVEL
#include <logging/log.h>
LOG_MODULE_REGISTER(LOG_MODULE_NAME); LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr.h> #include <zephyr.h>

View file

@ -0,0 +1,23 @@
/**
* Copyright (c) 2018 Linaro Limited.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_LOG_H_
#define ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_LOG_H_
#ifdef __cplusplus
extern "C" {
#endif
#define LOG_MODULE_NAME wifi_simplelink
#define LOG_LEVEL CONFIG_WIFI_LOG_LEVEL
#include <logging/log.h>
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_LOG_H_ */

View file

@ -4,6 +4,9 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include "simplelink_log.h"
LOG_MODULE_DECLARE(LOG_MODULE_NAME);
#include <zephyr.h> #include <zephyr.h>
/* Define sockaddr, etc, before simplelink.h */ /* Define sockaddr, etc, before simplelink.h */
#include <net/socket_offload.h> #include <net/socket_offload.h>

View file

@ -5,14 +5,12 @@
* *
*/ */
#define LOG_MODULE_NAME wifi_simplelink_support
#define LOG_LEVEL CONFIG_WIFI_LOG_LEVEL
#include <logging/log.h>
LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "simplelink_log.h"
LOG_MODULE_DECLARE(LOG_MODULE_NAME);
#include <zephyr.h> #include <zephyr.h>
#include <stdint.h> #include <stdint.h>

View file

@ -19,5 +19,4 @@ CONFIG_NET_CONFIG_PEER_IPV4_ADDR=""
CONFIG_NET_LOG=y CONFIG_NET_LOG=y
CONFIG_WIFI_LOG_LEVEL_DBG=y CONFIG_WIFI_LOG_LEVEL_DBG=y
CONFIG_DEBUG=y CONFIG_DEBUG=y
#CONFIG_SYS_LOG=y
#CONFIG_ASSERT=y #CONFIG_ASSERT=y

View file

@ -4,6 +4,9 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#define LOG_MODULE_NAME net_socket_offload
#define NET_LOG_LEVEL CONFIG_NET_SOCKETS_LOG_LEVEL
#include <net/socket_offload.h> #include <net/socket_offload.h>
/* Only one provider may register socket operations upon boot. */ /* Only one provider may register socket operations upon boot. */