text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
/** * Copyright (c) 2018 Linaro * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT inventek_eswifi #include "eswifi_log.h" LOG_MODULE_DECLARE(LOG_MODULE_NAME); #include <zephyr/kernel.h> #include <zephyr/device.h> #include <string.h> #include <errno.h> #include <zephyr/drivers/gpio.h> #include <zeph...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/** * Copyright (c) 2018 Linaro * Copyright (c) 2020 ATL Electronics * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT inventek_eswifi_uart #include "eswifi_log.h" LOG_MODULE_DECLARE(LOG_MODULE_NAME); #include <zephyr/kernel.h> #include <zephyr/device.h> #include <string.h> #include...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/** * Copyright (c) 2018 Linaro * * SPDX-License-Identifier: Apache-2.0 */ #if defined(CONFIG_WIFI_ESWIFI_BUS_UART) #define DT_DRV_COMPAT inventek_eswifi_uart #else #define DT_DRV_COMPAT inventek_eswifi #endif #define _POSIX_C_SOURCE 200809L #include "eswifi_log.h" LOG_MODULE_REGISTER(LOG_MODULE_NA...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_WIFI_ESWIFI_ESWIFI_LOG_H_ #define LOG_MODULE_NAME wifi_eswifi #define LOG_LEVEL CONFIG_WIFI_LOG_LEVEL #include <zephyr/logging/log.h> #endif /* ZEPHYR_DRIVERS_WIFI_ESWIFI_ESWIFI_LOG_H_ */ <|fim_prefix|>/** * Copyright (c) 2020 Linumiz * * SPDX-Lice<|fim_middle|>nse-Identifier: Apache-2.0 */ #ifnd...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>t->context = NULL; } done: eswifi_unlock(eswifi); return ret; } static int eswifi_off_get(net_sa_family_t family, enum net_sock_type type, enum net_ip_protocol ip_proto, struct net_context **context) { struct eswifi_dev *eswifi = eswifi_by_iface_idx((*context)->iface); struct eswifi_o...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/** * Copyright (c) 2018 Linaro * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_WIFI_ESWIFI_ESWIFI_OFFLOAD_H_ #define ZEPHYR_DRIVERS_WIFI_ESWIFI_ESWIFI_OFFLOAD_H_ #include <zephyr/net/net_offload.h> #include "eswifi.h" #define ESWIFI_OFFLOAD_MAX_SOCKETS 4 enum eswifi_transport_ty...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/** * Copyright (c) 2020 Linaro * * SPDX-L<|fim_suffix|>t struct shell *sh, size_t argc, char **argv) { int i; size_t len = 0; if (eswifi == NULL) { shell_print(sh, "no eswifi device registered"); return -ENOEXEC; } if (argc < 2) { shell_help(sh); return -ENOEXEC; } eswifi_lo...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_listen(struct eswifi_dev *eswifi, struct eswifi_off_socket *socket, int backlog) { int err; __select_socket(eswifi, socket->index); /* Set backlog */ snprintk(eswifi->buf, sizeof(eswifi->buf), "P8=%d\r", backlog); err = eswifi_at_cmd(eswifi, eswifi->buf); if (err < 0) { LOG_ERR("Unable to start...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2019 Linumiz * * SPDX-License-Identifier: Apache-2.0 */ #include "eswifi_log.h" LOG_MODULE_DECLARE(LOG_MODULE_NAME); #include <zephyr/kernel.h> #include <zephyr/device.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <zephyr/net/socket_off...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or * an affiliate of Cypress Semiconductor Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include "airoc_whd_hal_common.h" #include "airoc_wifi.h" #include <zephyr/kernel.h> #include <zephyr/drivers/gpio.h> #include <zephyr/...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or * an affiliate of Cypress Semiconductor Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include <whd.h> #include <zephyr/device.h> /** Defines the amount of stack memory available for the wifi thread. */ #if ...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or * an affiliate of Cypress Semiconductor Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include "airoc_wifi.h" #include "airoc_whd_hal_common.h" #include <bus_protocols/whd_bus_sdio_protocol.h> #include <bus_protocols/whd_...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>buf = rx; rx_buf[1].len = rx_length; } ret = spi_transceive_dt(spi_obj, &tx_set, &rx_set); if (ret) { LOG_ERR("spi_transceive FAIL %d\n", ret); whd_ret = WHD_WLAN_SDIO_ERROR; } #if defined(SPI_DATA_IRQ_SHARED) ret = whd_bus_spi_irq_enable(whd_driver, true); if (ret) { LOG_ERR("whd_bus_spi_...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or * an affiliate of Cypress Semiconductor Corporation * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief AIROC Wi-Fi driver. */ #include <zephyr/logging/log.h> #include <zephyr/net/conn_mgr/connectivity_wifi_mgmt.h> #include ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>CONFIG_AIROC_WIFI_BUS_SPI) const struct spi_dt_spec bus_spi; #endif }; struct airoc_wifi_config { const union airoc_wifi_bus bus_dev; struct gpio_dt_spec wifi_reg_on_gpio; struct gpio_dt_spec wifi_host_wake_gpio; struct gpio_dt_spec wifi_dev_wake_gpio; #if defined(CONFIG_AIROC_WIFI_BUS_SPI) struct ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or * an aff<|fim_suffix|>types.h, which is usually required by this file, but not available */ /* here unless we pull in board-specific headers from the upstream driver. */ #define CYBSP_SDIO_INTERFACE (0) #define CYBSP_SPI_...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief Header containing Coexistence APIs. */ #ifndef __COEX_H__ #define __COEX_H__ #include <stdbool.h> /* Indicates WLAN frequency band of operation */ enum nrf_wifi_pta_wlan_op_band { NRF_WIFI_P...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>hanism: Indicates recommended powersave mechanism for Wi-Fi's downlink. * @wifi_window_duration: Indicates duration of Wi-Fi priority window. * @sr_window_duration: Indicates duration of SR priority window. * * Message from CD to CM to allocate Periodic Priority Windows. */ struct coex_allocate_ppw ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_zep; void *rpu_ctx; #ifdef CONFIG_NRF70_RADIO_TEST struct rpu_conf_params conf_params; bool rf_test_run; unsigned char rf_test; #else /* CONFIG_NRF70_RADIO_TEST */ struct nrf_wifi_vif_ctx_zep vif_ctx_zep[MAX_NUM_VIFS]; #ifdef CONFIG_NRF70_UTIL struct rpu_conf_params conf_params; #endif /* CONFIG_NR...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief Header contain<|fim_suffix|>t_pkt *pkt); void nrf_wifi_if_rx_frm(void *os_vif_ctx, void *frm); #if defined(CONFIG_NRF70_RAW_DATA_RX) || defined(CONFIG_NRF70_PROMISC_DATA_RX) void nrf_wifi_if...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief Header containing WiFi management operation implementations * for the Zephyr OS. */ #ifndef __ZEPHYR_WIFI_MGMT_H__ #define __ZEPHYR_WIFI_MGMT_H__ #include <math.h> #include <zephyr/device.h> ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>FIG_WIFI_MGMT_RAW_SCAN_RESULTS */ #endif /* __ZEPHYR_DISP_SCAN_H__ */ <|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief Header containing display scan specific declarations for the * Zephyr OS layer of the Wi-Fi driver. */ #ifnd...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief Header containing WPA supplicant interface specific declarations for * the Zephyr OS layer of the Wi-Fi driver. */ #ifndef __ZEPHYR_WPA_SUPP_IF_H__ #define __ZEPHYR_WPA_SUPP_IF_H__ #define R...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief File containing internal structures for the offloaded raw TX feature in the driver. */ #include "offload_raw_tx/fmac_structs<|fim_suffix|>pi.h" struct nrf_wifi_ctx_zep { void *drv_priv_zep; ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>f_raw_tx_drv_priv.lock, key); return ret; } int nrf70_off_raw_tx_stop(void) { int ret = -1; enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL; k_spinlock_key_t key; key = k_spin_lock(&off_raw_tx_drv_priv.lock); if (!off_raw_tx_drv_priv.rpu_ctx_zep.rpu_ctx) { LOG_ERR("%s: FMAC device context i...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>= { 0x00000028, 0x00000000, 0x001e1023, 0x00000000, 0x00000000, 0x00000000, 0x00000021, 0x000002ca, 0x00000055, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }; int nrf_wifi_coex_config_non_pta(bool separate_antennas, bool is_sr_protocol_ble) { enum nrf_wifi_stat...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2025 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /* @file * @brief NRF Wi-Fi debug shell module */ #include <stdlib.h> #include <zephyr/shell/shell.h> #include "host_rpu_umac_if.h" #include "fmac_main.h" extern struct nrf_wifi_drv_priv_zep rpu_drv_priv_zep; struct nrf_...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_results2 = nrf_wifi_wpa_supp_scan_results_get, .deauthenticate = nrf_wifi_wpa_supp_deauthenticate, .authenticate = nrf_wifi_wpa_supp_authenticate, .associate = nrf_wifi_wpa_supp_associate, .set_supp_port = nrf_wifi_wpa_set_supp_port, .set_key = nrf_wifi_wpa_supp_set_key, .signal_poll = nrf_wifi_wpa...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief File containing FW load functions for Zephyr. */ #i<|fim_suffix|>_); return status; } /* Load the FW patches to the RPU */ status = nrf_wifi_fmac_fw_load(rpu_ctx, &fw_info); if (status !...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ts.host, &sys_dev_ctx->host_stats, sizeof(sys_dev_ctx->host_stats)); zstats->pkts.tx = stats.host.total_tx_pkts; zstats->pkts.rx = stats.host.total_rx_pkts; zstats->errors.tx = stats.host.total_tx_drop_pkts; zstats->errors.rx = stats.host.total_rx_drop_pkts + stats.fw.umac.interfa...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /* @file * @brief NRF Wi-Fi debug shell module */ #include <stdlib.h> #include <zephyr/shell/shell.h> SHELL_SUBCMD_SET_CRE<|fim_suffix|>F70 specific commands", NULL); <|fim_middle|>ATE(nrf70_commands, (nrf7...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> int ret = -1; if (!dev || !channel) { LOG_ERR("%s: illegal input parameters", __func__); return ret; } vif_ctx_zep = dev->data; if (!vif_ctx_zep) { LOG_ERR("%s: vif_ctx_zep is NULL", __func__); return ret; } rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; if (!rpu_ctx_zep) { LOG_ERR("%s: rpu_...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief File containing display scan specific definitions for the * Zephyr OS layer of the Wi-Fi driver. */ #include <stdlib.h> #include <zephyr/kernel.h> #include <zephyr/logging/log.h> #include "u...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>mac->cmd_evnt_dbg_params.cmd_auth, umac->cmd_evnt_dbg_params.cmd_assoc, umac->cmd_evnt_dbg_params.cmd_deauth, umac->cmd_evnt_dbg_params.cmd_register_frame, umac->cmd_evnt_dbg_params.cmd_frame, umac->cmd_evnt_dbg_params.cmd_del_key, umac->cmd_evnt_dbg_params.cmd_new_key,...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /* @file * @brief nRF Wi-Fi radio-test mode shell module */ #include <zephyr/kernel.h> #include <stdio.h> #include <stdlib.h> #include <zephyr/shell/shell.h> #include <zephyr/init.h> #include <ctype.h> #inc...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ /** * @brief File containing WPA supplicant interface specific definitions for the * Zephyr OS layer of the Wi-Fi driver. */ #include <stdlib.h> #include <zephyr/device.h> #include <zephyr/logging/log.h> ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_WIFI_NXP_WIFI_DRV_H_ */ <|fim_prefix|>/** * Copyright 2023-2024 NXP * SPDX-License-Identifier: Apache-2.0 * * @file nxp_wifi_drv.h * Shim layer between wifi driver connection manager and zephyr * Wi-Fi L2 layer */ #ifndef ZEPHYR_DRIVERS_WIFI_NXP_WIFI_DRV_H_ #define ZEPHYR_DRIVERS_WIFI_NXP_WIFI_DR...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> * * \rerurn A pointer to STA interface netif structure * */ struct netif *net_get_sta_interface(void); #ifdef CONFIG_NXP_WIFI_SOFTAP_SUPPORT /* Get uAP interface netif structure pointer * * \rerurn A pointer to uAP interface netif structure * */ struct netif *net_get_uap_interface(void); #endif ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>TE_FORMAT_LG && datarate->tx_data_rate < 12) { /* Legacy rates (in bps) */ /* Need to feed Zephyr L2 Wi-Fi with rate value in unit of Mbps*/ status->current_phy_tx_rate = lg_rate[datarate->tx_data_rate]; } else if (datarate->tx_rate_format <= 3) { /* HT, VHT, HE rates (in bps) */...
fim
zephyrproject-rtos/zephyr
c
/** * Copyright 2026 NXP * SPDX-License-Identifier: Apache-2.0 * * @file nxp_wifi_net.c * This file provides network porting code * Wi-Fi L2 layer */ #include "wifi.h" #include <osa.h> #include <nxp_wifi_net.h> #ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT #include "supp_events.h" #endif #ifdef CONFIG_DNS_RESOLVER #incl...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ands (Use help)", nxp_wifi_shell_cmd, 2, CONFIG_SHELL_ARGC_MAX); <|fim_prefix|>/** * Copyright 2023-2024 NXP * SPDX-License-Identifier: Apache-2.0 * * @file nxp_wifi_shell.c * Wi-Fi driver shell adapter layer */ #include <zephyr/kernel.h> #include <zephyr/shell/shell.h> #include "nxp_wifi...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/** * Copyright (c) 2018 Texas Instruments, Incorporated * * SPDX-License-Identifier: Apache-2.0 */ #include "simplelink_log.h" LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include <zephyr/kernel.h> #include <zephyr/device.h> #include <zephyr/net/net_if.h> #include <zephyr/net/wifi_mgmt.h> #include <zephy...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>dif /* ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_LOG_H_ */ <|fim_prefix|>/** * 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<|fim_middle|>_H_ #define LOG_MOD...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>sockopt(void *obj, int level, int optname, void *optval, net_socklen_t *optlen) { int sd = OBJ_TO_SD(obj); int retval; if (IS_ENABLED(CONFIG_NET_SOCKETS_SOCKOPT_TLS) && level == ZSOCK_SOL_TLS) { /* Handle Zephyr's SOL_TLS secure socket options: */ switch (optname) { case ZSOCK_TLS_SEC_TAG_L...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>f __cplusplus } #endif #endif /* ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SOCKETS_H_ */ <|fim_prefix|>/** * 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_SO...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2018, Texas Instruments Incorporated * * SPDX-License-Identifier: Apache-2.0 * */ #include <stdlib.h> #include <string.h> #include "simplelink_log.h" LOG_MODULE_DECLARE(LOG_MODULE_NAME); #include <zephyr/kernel.h> #include <stdint.h> #include <ti/drivers/net/wifi/simplelink.h> ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2018, Texas Instruments Incorporated * * SPDX-License-Identifier: Apache-2.0 * */ #ifndef ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SUPPORT_H_ #define ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SUPPORT_H_ #include <zephyr/net/wifi_mg<|fim_suffix|>nk_socket_create(int family, int t...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>el; uint8_t channel; uint16_t freq; *num_channels = sdk_reg->channel_info[0].no_of_channels; if (*num_channels > MAX_24GHZ_CHANNELS) { return -EOVERFLOW; } for (int idx = 0; idx < *num_channels; idx++) { channel = first_channel + idx; freq = 2407 + channel * 5; if (freq > 2472) { freq ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ct_req_params *new_params); #endif <|fim_prefix|>/* * Copyright (c) 2024 Silicon Laboratories Inc. * SPDX-License-Identifier: Apache-2.0 */ #ifnde<|fim_middle|>f SIWX91X_WIFI_H #define SIWX91X_WIFI_H #include <zephyr/net/wifi_mgmt.h> #include "sl_si91x_types.h" struct siwx91x_config { const struct...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> wifi_connect_req_params *params) { sl_wifi_interface_t interface = sl_wifi_get_default_interface(); struct siwx91x_dev *sidev = dev->data; sl_wifi_ap_configuration_t siwx91x_ap_cfg = { .credential_id = SL_NET_DEFAULT_WIFI_AP_CREDENTIAL_ID, .keepalive_type = SL_SI91X_AP_NULL_BASED_KEEP_A...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>rams); int siwx91x_ap_sta_disconnect(const struct device *dev, struct net_if *iface, const uint8_t *mac_addr); unsigned int siwx91x_on_ap_sta_connect(sl_wifi_event_t event, unsigned int status, void *data, uint32_t data_length, void *arg); unsigned int siwx91x_on_ap_sta_disco...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 Antmicro * Copyright (c) 2024-2025 Silicon Laboratories Inc. * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/sys/util.h> #include <zephyr/net/wifi_mgmt.h> #include <zephyr/logging/log.h> #include <siwx91x_nwp.h> #include "siwx91x_wifi.h" #include "siwx91x_wifi_ps.h" ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>l_status_t status_code, void *data, uint32_t data_length, void *arg); #endif <|fim_prefix|>/* * Copyright (c) 2024 Silicon Laboratories Inc. * SPDX-License-Identifier: Apache-2.0 */ #ifndef SIWX91X_WIFI_PS_H #define SIWX91X_WIFI_PS_H #include "sl_wifi_types.h" struct device; struct siwx91x_dev...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>se { sl_scan_config.type = SL_WIFI_SCAN_TYPE_PASSIVE; ret = siwx91x_configure_scan_dwell_time(SL_WIFI_SCAN_TYPE_PASSIVE, z_scan_config->dwell_time_active, z_scan_config->dwell_time_passive, NULL); } if (ret) { LOG_ERR("Failed to configure timeout"); return -EINVAL; ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Silicon Laboratories Inc. * SPDX-License-Identifier: Apache-2.0 */ #ifndef SIWX91X_W<|fim_suffix|> struct wifi_scan_params *params, scan_result_cb_t cb); unsigned int siwx91x_on_scan(sl_wifi_event_t event, unsigned int status, void *data, uint32_t data_length, void...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 Antmicro * Copyright (c) 2024-2025 Silicon Laboratories Inc. * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/net/net_offload.h> #include <zephyr/logging/log.h> #include <assert.h> #include "siwx91x_wifi.h" #include "siwx91x_wifi_socket.h" #include "sl_status.h" #inc...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2023 Antmicro * Copyright (c) 2024 Silicon Laboratories Inc. * SPDX-License-Identifier: Apache-2.0 */ #ifndef SIWX91X_WIFI_SOCKET_H #define SIWX91X_WIFI_SOCKET_H #include <zephyr/net/net_if.h> #include <zephyr/net/offloaded_netdev.h> #include <assert.h> struct siwx91x_dev; #ifdef CONFIG_WIFI_S...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ak; case WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL: /* Use WPA2/WPA3 security as the device supports both */ wifi_config.security = SL_WIFI_WPA3_TRANSITION; break; /* Zephyr WiFi shell doesn't specify how to pass credential for these * key managements. */ case WIFI_SECURITY_TYPE_WEP: /* SL_WIFI_WE...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>91x_on_join(sl_wifi_event_t event, unsigned int status, void *data, uint32_t data_length, void *arg); #endif <|fim_prefix|>/* * Copyright (c) 2024 Silicon Laboratories Inc. * SPDX-License-Identifier: Apache-2.<|fim_middle|>0 */ #ifndef SIWX91X_WIFI_STA_H #define SIWX91X_WIFI_STA_H #include "s...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_TCP_SOCK: return "Exceeded the maximum number of TCP sockets." "A maximum number of TCP sockets opened simultaneously" " is defined through TCP_SOCK_MAX. It is not permitted" " to exceed that number at socket creation." " Identifies that @ref socket operation failed."; case SOCK_ERR_MAX_UD...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/** * Copyright (c) 2017 IpTronix * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_CONFIG_H_ #define ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_CONFIG_H_ /* --------------------------------- ---------- PIN settings --------- ---------------------...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>pio_cb, chip_isr, BIT(winc1500_config.irq_gpio.pin)); (void)gpio_add_callback(winc1500_config.irq_gpio.port, &winc1500.gpio_cb); } void nm_bsp_interrupt_ctrl(uint8_t enable) { gpio_pin_interrupt_configure_dt(&winc1500_config.irq_gpio, enable ? GPIO_INT_EDGE_TO_ACTIVE : GPIO_INT_DISABLE);...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> struct gpio_dt_spec chip_en_gpio; struct gpio_dt_spec irq_gpio; struct gpio_dt_spec reset_gpio; }; struct winc1500_device { struct gpio_callback gpio_cb; }; extern struct winc1500_device winc1500; extern const struct winc1500_cfg winc1500_config; #endif /* ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC15...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>mSpiRw *param = (tstrNmSpiRw *)parameter; ret = spi_rw(param->pu8InBuf, param->pu8OutBuf, param->u16Sz); } break; #endif default: ret = -1; M2M_ERR("ERROR:invalid ioctl cmd\n"); break; } return ret; } int8_t nm_bus_deinit(void) { return M2M_SUCCESS; } int8_t nm_bus_reinit(void *config) {...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2026 NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT nxp_llwu #include <zephyr/init.h> #include <zephyr/devicetree.h> #include <zephyr/kernel.h> #include <zephyr/spinlock.h> #include <zephyr/irq.h> #include <zephyr/pm/device.h> #include <zephyr/logging/log.h> #incl...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright 2025-2026 NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT nxp_wuc_wuu #include <zephyr/init.h> #include <zephyr/devicetree.h> #include <zephyr/kernel.h> #include <zephyr/irq.h> #include <zephyr/pm/device.h> #include <zephyr/logging/log.h> #include <fsl_wuu.h> #include <zephyr/...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2025 TOKITA Hiroshi * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/sys/util.h> #include <zephyr/xen/dmop.h> #include <zephyr/arch/arm64/hypercall.h> int dmop_create_ioreq_server(domid_t domid, uint8_t handle_bufioreq, ioservid_t *id) { struct xen_dm_op_buf bufs[1] = {0};...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>mpool_size, .domain = domid, .u.paging_mempool.size = size, }; return do_domctl(&domctl); } #endif int xen_domctl_max_mem(int domid, uint64_t max_memkb) { xen_domctl_t domctl = { .cmd = XEN_DOMCTL_max_mem, .domain = domid, .u.max_mem.max_memkb = max_memkb, }; return do_domctl(&domctl); }...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 EPAM Systems * * SPDX-License-Identifier: Apache-2.0 */ #<|fim_suffix|>e <zephyr/xen/dom0/sysctl.h> #include <zephyr/xen/generic.h> #include <zephyr/xen/public/xen.h> static int do_sysctl(xen_sysctl_t *sysctl) { sysctl->interface_version = CONFIG_XEN_SYSCTL_INTERFACE_VERSION...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2021-2025 EPAM Systems * Copyright (c) 2022 Arm Limited (or its affiliates). All rights reserved. * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/arch/arm64/hypercall.h> #include <zephyr/xen/public/xen.h> #include <zephyr/xen/public/event_channel.h> #include <zephyr/xe...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> status = -status; if (status < 0 || (uint16_t) status >= ARRAY_SIZE(gnttab_error_msgs)) { return "bad status"; } else { return gnttab_error_msgs[status]; } } /* Picked from Linux implementation */ #define LEGACY_MAX_GNT_FRAMES_SUPPORTED 4 static unsigned long gnttab_get_max_frames(void) { int ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> xen_hvm_param xhv; xhv.domid = domid; xhv.index = idx; ret = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); if (ret < 0) { return ret; } *value = xhv.value; return ret; } <|fim_prefix|>/* * Copyright (c) 2021 EPAM Systems * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/arch/arm64/...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>e_list) { struct xen_mem_acquire_resource acquire_res = { .domid = domid, .type = type, .id = id, .pad = 0, .frame = frame, .nr_frames = *nr_frames, }; int ret; set_xen_guest_handle(acquire_res.frame_list, frame_list); ret = HYPERVISOR_memory_op(XENMEM_acquire_resource, &acquire_res); ...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2026 EPAM Systems * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/device.h> #include <zephyr/devicetree.h> #include <zephyr/logging/log.h> #include <zephyr/arch/arch_interface.h> #include <zephyr/sys/mem_blocks.h> #include <zephyr/xen/generic.h> LOG_MODULE_REGISTER(xen_regions); #d...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>rsion(char *extra, int len) { if (!extra || len < XEN_EXTRAVERSION_LEN) { return -EINVAL; } memset(extra, 0, len); return HYPERVISOR_xen_version(XENVER_extraversion, extra); } <|fim_prefix|>/* * Copyright (c) 2025 EPAM Systems * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/arch/ar...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* SPDX-License-Identifier: Apache-2.0 */ /* * Copyright 2018 Broadcom. */ #ifndef VALKYRIE_IRQ_H #define VALKYRIE_IRQ_H #define SPI_RESERVED7_7 239 #define<|fim_suffix|>e SSIM2_AFBC_IRQ 49 #define SSIM2_IRQ 48 #define PCIE1_INB_PERSTB_EVENT 47 #define PCIE0_INB_PERSTB_EVENT 46 #define PCIE1_P...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Linaro Limited * Copyright (c) 2021 ATL Electronics * SPDX-License-Identifier: Apache-2.0 */ #ifndef PINCTRL_CYPRESS_PSOC6_H_ #define PINCTRL_CYPRESS_PSOC6_H_ #include <zephyr/dt-bindings/dt-util.h> /** * Functions are defined using HSIOM SEL */ #define HSIOM_SEL_gpio ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024, Cypress Semiconductor * SPDX<|fim_suffix|>e CLK_SOURCE_PILO <|fim_middle|>-License-Identifier: Apache-2.0 */ #define CLK_SOURCE_IHO #defin<|endoftext|>
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>PDX-License-Identifier: Apache-2.0 */ #define CLK_SOURCE_IMO <|fim_prefix|>/*<|fim_middle|> * Copyright (c) 2024, Cypress Semiconductor * S<|endoftext|>
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>AG, * or an affiliate of Infineon Technologies AG. All rights reserved.</text> * * SPDX-License-Identifier: Apache-2.0 */ #define CLK_SOURCE_IHO 0U #define CLK_SOURCE_PILO 0x113U <|fim_prefix|>/* * SPDX-FileCopyrightText: <text>Copyright (<|fim_middle|>c) 2026 Infineon Technologies <|endoftext|>
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>DTS_COMMON_FREQ_H_ #define ZEPHYR_DTS_COMMON_FREQ_H_ #define DT_FREQ_K(x) ((x) * 1000) #define DT_FREQ_M(x) (DT_FREQ_K(x) * 1000) #endif /* ZEPHYR_DTS_COMMON_FREQ_H_ */ <|fim_prefix|>/* * Copyri<|fim_middle|>ght (c) 2021 Linaro Limited * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_<|end...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2018 Linaro Limited * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DTS_COMMON_MEM_H_ #define ZEPHYR_DTS_COMMON_MEM_H_ #define DT_SIZE_K(x) ((x) * 1024) #define DT_SIZE_M(x) (DT_SIZE_K(x) * 1024) #define DT_SIZE_G(x) (DT_SIZE_M(x) * 1024) /* concatenate the values of the arguments in...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_INCLUDE_DRIVERS_ACPI_H_ #define ZEPHYR_INCLUDE_DRIVERS_ACPI_H_ #include <acpica/source/include/acpi.h> #include <zephyr/drivers/pcie/pcie.h> #define ACPI_RES_INVALID ACPI_RESOURCE_TYPE_MAX #define AC...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_ARCH_X86_INCLUDE_ACPI_OSAL_H_ #define ZEPHYR_ARCH_X86_INCLUDE_ACPI_OSAL_H_ #if defined(CONFIG_X86 || CONFIG_X86_64) #incl<|fim_suffix|>cpi_osal.h> #else #error "Currently only x86 Architecture support...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>n this partition. * * NOTE: placeholder char variable is defined here to prevent build errors * if a partition is defined but nothing ever placed in it. * * @param name Name of the k_mem_partition to declare */ #define K_APPMEM_PARTITION_DEFINE(name) \ extern char Z_APP_START(name)[]; \ extern cha...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 Linaro Limited * Copyright (c) 2018-2020 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_INCLUDE_APP_MEMORY_MEM_DOMAIN_H_ #define ZEPHYR_INCLUDE_APP_MEMORY_MEM_DOMAIN_H_ #include <stdint.h> #include <stddef.h> #include <zephyr/sys/dlist.h> #includ...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2019 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_APP_MEMORY_PARTITIONS_H #define ZEPHYR_APP_MEMORY_PARTITIONS_H #ifdef CONFIG_USERSPACE #include <zephyr/kernel.h> /* For struct k_mem_partition */ #if defined(CONFIG_MBEDTLS) extern struct k_mem_partition k_mbedtl...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2021 Synopsys. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_INCLUDE_ARCH_ARC_ADDR_TYPES_H_ #define ZE<|fim_suffix|>ed, have same size and aligning. */ #ifdef __CCAC__ typedef unsigned long paddr_t; typedef void *vaddr_t; #else #include <zephyr/arch/common/addr_types.h...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>MEM_PARTITION_P_RO_U_RO (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR) #define K_MEM_PARTITION_P_RO_U_NA (AUX_MPU_ATTR_KR) /* Execution-allowed attributes */ #define K_MEM_PARTITION_P_RWX_U_RWX (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_UR | \ AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR | \ AUX_MPU_ATTR_KE | AUX_MPU_ATTR_UE...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2014-2016 Wind Ri<|fim_suffix|>h> #include <zephyr/arch/arc/v2/aux_regs.h> static ALWAYS_INLINE _cpu_t *arch_curr_cpu(void) { #ifdef CONFIG_SMP uint32_t core; core = z_arc_v2_core_id(); return &_kernel.cpus[core]; #else return &_kernel.cpus[0]; #endif /* CONFIG_SMP */ } static...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* SPDX-License-Identifier: Apache-2.0 */ /* * Copyright (C) 2021 Synopsys, Inc. (www.synopsys.com) * * Author: Vineet Gupta <vgupta@synopsys.com> * * ALU/Memory instructions pseudo-mnemonics for ARCv2 and ARC32 ISA */ .irp cc,,.hi,.nz .<|fim_suffix|>o CMPR op1, op2 cmp \op1, \op2 .endm <|fim_m...
fim
zephyrproject-rtos/zephyr
c
/* SPDX-License-Identifier: Apache-2.0 */ /* * Copyright (C) 2021 Synopsys, Inc. (www.synopsys.com) * * ALU/Memory instructions pseudo-mnemonics for ARCv2 and ARC32 ISA */ .macro MOVR, d, s mov\&$suffix d, s .endm .macro LDR, d, s, off .if $narg == 2 ld\&$suffix d, [s] .else ld\&$suffix d, [s, off] .en...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>, \op2 .endm <|fim_prefix|>/* SPDX-License-Identifier: Apache-2.0 */ /* * Copyright (C) 2021 Synopsys, Inc. (www.synopsys.com) * * Author: Vineet Gupta <vgupta@synopsys.com> * * pseudo-mnemonics for ALU/Memory instructions for ARC64 ISA */ .irp cc,,.hi,.nz .macro MOVR\cc d, s movl\cc \d, \s ....
fim
zephyrproject-rtos/zephyr
c
/* SPDX-License-Identifier: Apache-2.0 */ /* * Copyright (C) 2022 Synopsys, Inc. (www.synopsys.com) * * ALU/Memory instructions pseudo-mnemonics for ARC64 ISA */ .macro MOVR, d, s movl\&$suffix d, s .endm .macro LDR, d, s, off .if $narg == 2 ldl\&$suffix d, [s] .else ldl\&$suffix d, [s, off] .endif .en...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>nal * code in a standalone file with Kconfig based #ifdef'ry here. During the * build process, the "C" preprocessor runs through this file, leaving * just the final variant include in code fed to compiler/assembler. */ #ifndef __ASM_ARC_ASM_H #define __ASM_ARC_ASM_H 1 #ifdef _ASMLANGUAGE #...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 Synopsys. * * SPDX-License-Identifier: Apache-2.0 */ /** * @file * @brief ARC Cluster registers and accessors */ #ifndef ZEPHYR_INCLUDE_ARCH_ARC_CLUSTER_H_ #define ZEPHYR_INCLUDE_ARCH_ARC_CLUSTER_H_ #include <zephyr/arch/arc/v2/aux_regs.h> #include <zephyr/sys/util_macro....
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2021 Synopsys. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_INCLUDE_ARCH_ARC_SYS_IO_COMMON_H_ #define ZEPHYR_INCLUDE_ARCH_ARC_SYS_IO_COMMON_H_ #ifndef _ASMLANGUAGE #include <zephyr/toolchain.h> #include <zephyr/sys/sys_io.h> #include <zephyr/arch/arc/v2/aux_regs.h> ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>("r6") = call_id; compiler_barrier(); __asm__ volatile( "trap_s %[trap_s_id]\n" : "=r"(ret) : [trap_s_id] "i" (_TRAP_S_CALL_SYSTEM_CALL), "r" (ret), "r" (r6)); return ret; } static inline bool arch_is_user_context(void) { uint32_t status; compiler_barrier(); __asm__ volatile(...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2017 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ /** * @file * @brief Per-arch thread definition * * This file contains definitions for * * struct _thread_arch * struct _callee_saved * * necessary to instantiate instances of struct k_thread. */ #ifndef ZEPHYR_INCLUD...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Synopsys. * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_INCLUDE_ARCH_ARC_TOOL_COMPAT_H_ #define ZEPHYR_INCLUDE_ARCH_ARC_TOOL_COMPAT_H_ #ifdef _ASMLANGUAGE /* * GNU toolchain and MWDT (Metware) toolchain ha...
fim
zephyrproject-rtos/zephyr
c