Skip to content

Commit c1601e9

Browse files
[SL-TEMP] Revert "[SL-UP] Enabling the sockets for 917SoC (#462)" (#568)
1 parent 790aac0 commit c1601e9

18 files changed

+21
-1748
lines changed

src/include/platform/CHIPDeviceEvent.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,6 @@ enum PublicEventTypes
257257
kSecureSessionEstablished,
258258

259259
/**
260-
* Signals that socket select operation to be started.
261-
*/
262-
kSocketSelectStart,
263-
264-
/**
265260
* Signals that factory reset has started.
266261
*/
267262
kFactoryReset,
@@ -458,16 +453,6 @@ struct ChipDeviceEvent final
458453
ConnectivityChange Result;
459454
} ViaThread;
460455
} ServiceConnectivityChange;
461-
#if CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
462-
// TODO: check why linux is failing due to fd_set
463-
struct
464-
{
465-
int FD;
466-
fd_set ReadSet;
467-
fd_set WriteSet;
468-
fd_set ErrorSet;
469-
} SocketSelectStart;
470-
#endif // CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
471456
struct
472457
{
473458
ConnectivityChange Result;

src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void GenericPlatformManagerImpl_FreeRTOS<ImplClass>::_RunEventLoop(void)
206206

207207
// Call into the system layer to dispatch the callback functions for all timers
208208
// that have expired.
209-
err = static_cast<System::LayerImpl &>(DeviceLayer::SystemLayer()).HandlePlatformTimer();
209+
err = static_cast<System::LayerImplFreeRTOS &>(DeviceLayer::SystemLayer()).HandlePlatformTimer();
210210
if (err != CHIP_NO_ERROR)
211211
{
212212
ChipLogError(DeviceLayer, "Error handling CHIP timers: %" CHIP_ERROR_FORMAT, err.Format());

src/inet/IPAddress.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@
6161
#endif
6262
#endif // CHIP_SYSTEM_CONFIG_USE_OPENTHREAD_ENDPOINT
6363

64-
#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS || CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
64+
#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS
6565
#include <net/if.h>
6666
#include <netinet/in.h>
6767
#include <sys/socket.h>
68-
#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS || CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
68+
#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS
6969

7070
#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS
7171
#include "ZephyrSocket.h" // nogncheck

src/inet/UDPEndPointImplSockets.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
#include <lib/support/SafeInt.h>
3131
#include <lib/support/logging/CHIPLogging.h>
3232

33-
#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS || CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
33+
#if CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS
3434
#if HAVE_SYS_SOCKET_H
3535
#include <sys/socket.h>
3636
#endif // HAVE_SYS_SOCKET_H
3737
#include <net/if.h>
3838
#include <netinet/in.h>
3939
#include <sys/ioctl.h>
40-
#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS || CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
40+
#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_SOCKETS
4141

4242
#if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS || CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS
4343
#include "ZephyrSocket.h" // nogncheck

src/lib/core/CHIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@
129129
#error "Please assert exactly one of CHIP_CONFIG_MEMORY_MGMT_PLATFORM or CHIP_CONFIG_MEMORY_MGMT_MALLOC."
130130
#endif // ((CHIP_CONFIG_MEMORY_MGMT_PLATFORM + CHIP_CONFIG_MEMORY_MGMT_MALLOC) != 1)
131131

132-
#if !(CHIP_CONFIG_MEMORY_MGMT_MALLOC || CHIP_CONFIG_MEMORY_MGMT_PLATFORM) && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
133-
#error "!(CHIP_CONFIG_MEMORY_MGMT_MALLOC || CHIP_CONFIG_MEMORY_MGMT_PLATFORM) but getifaddrs() uses malloc()"
132+
#if !CHIP_CONFIG_MEMORY_MGMT_MALLOC && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
133+
#error "!CHIP_CONFIG_MEMORY_MGMT_MALLOC but getifaddrs() uses malloc()"
134134
#endif
135135

136136
/**

src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,11 @@
2424
#include <platform/internal/BLEManager.h>
2525
#include <platform/silabs/NetworkCommissioningWiFiDriver.h>
2626

27-
#if CHIP_SYSTEM_CONFIG_USE_LWIP
2827
#include <lwip/dns.h>
2928
#include <lwip/ip_addr.h>
3029
#include <lwip/nd6.h>
3130
#include <lwip/netif.h>
32-
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP
3331

34-
#if CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
35-
#include <system/SystemLayerImpl.h>
36-
extern "C" {
37-
#include "sl_si91x_socket.h"
38-
}
39-
#endif // CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
4032
#include <platform/internal/GenericConnectivityManagerImpl_UDP.ipp>
4133

4234
#if INET_CONFIG_ENABLE_TCP_ENDPOINT
@@ -61,23 +53,6 @@ namespace DeviceLayer {
6153

6254
ConnectivityManagerImpl ConnectivityManagerImpl::sInstance;
6355

64-
#if CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
65-
namespace {
66-
static void sl_wifi_async_select_cb(fd_set * readfds, fd_set * writefds, fd_set * errorfds, long int timeout)
67-
{
68-
// Schedule work to handle the events
69-
// This is a workaround for the fact that sl_si91x_select() is not thread-safe
70-
// and cannot be called from the event loop context.
71-
DeviceLayer::SystemLayer().ScheduleWork(
72-
[](chip::System::Layer * aLayer, void * aAppState) {
73-
auto & systemSocketLayer = static_cast<chip::System::LayerImplFreeRTOSSockets &>(*aLayer);
74-
systemSocketLayer.HandleEvents();
75-
},
76-
nullptr);
77-
}
78-
} // namespace
79-
#endif // CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
80-
8156
CHIP_ERROR ConnectivityManagerImpl::_Init()
8257
{
8358
CHIP_ERROR err;
@@ -105,20 +80,6 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event)
10580
{
10681
// Forward the event to the generic base classes as needed.
10782
// Handle Wfx wifi events...
108-
#if CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
109-
if (event->Type == DeviceEventType::kSocketSelectStart)
110-
{
111-
// Call sl_si91x_select() to start the select operation
112-
// and pass the callback function to be called when the select operation is complete.
113-
int result = sl_si91x_select(event->SocketSelectStart.FD, const_cast<fd_set *>(&event->SocketSelectStart.ReadSet),
114-
const_cast<fd_set *>(&event->SocketSelectStart.WriteSet),
115-
const_cast<fd_set *>(&event->SocketSelectStart.ErrorSet), nullptr, sl_wifi_async_select_cb);
116-
if (result < 0)
117-
{
118-
ChipLogError(DeviceLayer, "sl_si91x_select() failed: %d", result);
119-
}
120-
}
121-
#endif // CHIP_SYSTEM_CONFIG_USE_FREERTOS_SOCKETS
12283
if (event->Type == DeviceEventType::kWFXSystemEvent)
12384
{
12485

src/platform/silabs/DiagnosticDataProviderImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface **
259259
ifp->IPv6Addresses = app::DataModel::List<ByteSpan>(ifp->Ipv6AddressSpans, ipv6AddressesCount);
260260

261261
*netifpp = ifp;
262-
#else // CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_SOCKETS
262+
#else
263263
NetworkInterface * head = NULL;
264264
for (Inet::InterfaceIterator interfaceIterator; interfaceIterator.HasCurrent(); interfaceIterator.Next())
265265
{

src/platform/silabs/rs911x/rsi_ble_config.h

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -288,35 +288,22 @@ extern "C" {
288288
#endif
289289

290290
#ifdef SLI_SI917
291-
// Define common feature bits
292-
#define SL_COMMON_FEATURE_BITS (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_CLK | FRONT_END_SWITCH_CTRL)
293-
// Define WPA3-specific feature bits
294-
#define SL_WPA3_FEATURE_BITS (SL_COMMON_FEATURE_BITS | SL_SI91X_EXT_FEAT_IEEE_80211W)
295-
// Define RAM level based on the MCU interface
296-
#if SLI_SI91X_MCU_INTERFACE
297-
#define SL_RAM_LEVEL SL_SI91X_RAM_LEVEL_NWP_BASIC_MCU_ADV
298-
#else // for NCP
299-
#define SL_RAM_LEVEL SL_SI91X_RAM_LEVEL_NWP_ALL_MCU_ZERO
300-
#endif // SLI_SI91X_MCU_INTERFACE
301-
// Define the custom feature bit map
302-
#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION
303-
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (SL_WPA3_FEATURE_BITS | SL_RAM_LEVEL)
291+
#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION // Adding Support for WPA3 transition
292+
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \
293+
(SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_CLK | SL_SI91X_RAM_LEVEL_NWP_BASIC_MCU_ADV | FRONT_END_SWITCH_CTRL | \
294+
SL_SI91X_EXT_FEAT_IEEE_80211W)
304295
#else
305-
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (SL_COMMON_FEATURE_BITS | SL_RAM_LEVEL)
306-
#endif // WIFI_ENABLE_SECURITY_WPA3_TRANSITION
296+
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \
297+
(SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_CLK | SL_SI91X_RAM_LEVEL_NWP_BASIC_MCU_ADV | FRONT_END_SWITCH_CTRL)
298+
#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */
307299
#else // EXP_BOARD
308300
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(2))
309301
#endif /* SLI_SI917 */
310302

311303
#define RSI_EXT_TCPIP_FEATURE_BITMAP 0
312304
#define RSI_BT_FEATURE_BITMAP (SL_SI91X_BT_RF_TYPE | SL_SI91X_ENABLE_BLE_PROTOCOL)
313305
#define RSI_CONFIG_FEATURE_BITMAP 0
314-
#if SLI_SI91X_OFFLOAD_NETWORK_STACK
315-
//! TCP IP BYPASS feature checks
316-
#define RSI_TCP_IP_BYPASS RSI_DISABLE
317-
#else
318-
#define RSI_TCP_IP_BYPASS RSI_ENABLE
319-
#endif // SLI_SI91X_LWIP_HOSTED_NETWORK_STACK
306+
#define RSI_TCP_IP_BYPASS RSI_ENABLE //! TCP IP BYPASS feature checks
320307
#else
321308
#define RSI_BLE_MAX_NBR_MASTERS (1)
322309
#define RSI_HAND_SHAKE_TYPE GPIO_BASED

src/platform/silabs/wifi/DnssdImpl.cpp

Lines changed: 0 additions & 175 deletions
This file was deleted.

0 commit comments

Comments
 (0)