Skip to content

Commit 01d8d0a

Browse files
McuxCIBotsupriyainamdar-21
authored andcommitted
Pull request #43: Add files for release/2.16.100_minor_rfp_gh_review from CI Generation
Merge in MCUCORE/mcux-sdk-wifi-nxp from release/2.16.100_minor_rfp_gh_review to release/2.16.100_minor_rfp_gh
1 parent 738269c commit 01d8d0a

File tree

87 files changed

+3489
-1845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+3489
-1845
lines changed

cli/cli.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
static void uart_task(osa_task_param_t arg);
4747

4848
#if CONFIG_UART_INTERACTIVE
49-
static OSA_TASK_DEFINE(uart_task, PRIORITY_RTOS_TO_OSA(3), 1, CONFIG_UART_STACK_SIZE, 0);
49+
static OSA_TASK_DEFINE(uart_task, WLAN_TASK_PRI_HIGH, 1, CONFIG_UART_STACK_SIZE, 0);
5050
#else
5151
#if CONFIG_NCP
52-
static OSA_TASK_DEFINE(uart_task, PRIORITY_RTOS_TO_OSA(1), 1, CONFIG_UART_STACK_SIZE, 0);
52+
static OSA_TASK_DEFINE(uart_task, WLAN_TASK_PRI_LOW, 1, CONFIG_UART_STACK_SIZE, 0);
5353
#else
54-
static OSA_TASK_DEFINE(uart_task, PRIORITY_RTOS_TO_OSA(0), 1, CONFIG_UART_STACK_SIZE, 0);
54+
static OSA_TASK_DEFINE(uart_task, WLAN_TASK_PRI_IDLE, 1, CONFIG_UART_STACK_SIZE, 0);
5555
#endif
5656
#endif
5757
#endif
@@ -75,9 +75,9 @@ static void cli_task(osa_task_param_t arg);
7575

7676
/* OSA_TASKS: name, priority, instances, stackSz, useFloat */
7777
#if CONFIG_UART_INTERACTIVE
78-
static OSA_TASK_DEFINE(cli_task, PRIORITY_RTOS_TO_OSA(3), 1, CONFIG_CLI_STACK_SIZE, 0);
78+
static OSA_TASK_DEFINE(cli_task, WLAN_TASK_PRI_HIGH, 1, CONFIG_CLI_STACK_SIZE, 0);
7979
#else
80-
static OSA_TASK_DEFINE(cli_task, PRIORITY_RTOS_TO_OSA(1), 1, CONFIG_CLI_STACK_SIZE, 0);
80+
static OSA_TASK_DEFINE(cli_task, WLAN_TASK_PRI_LOW, 1, CONFIG_CLI_STACK_SIZE, 0);
8181
#endif
8282

8383
OSA_TASK_HANDLE_DEFINE(cli_task_Handle);

dhcpd/dhcp-server-main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static bool dhcpd_running;
2727
void dhcpd_task(osa_task_param_t arg);
2828

2929
/* OSA_TASKS: name, priority, instances, stackSz, useFloat */
30-
static OSA_TASK_DEFINE(dhcpd_task, OSA_PRIORITY_NORMAL, 1, CONFIG_DHCP_SERVER_STACK_SIZE, 0);
30+
static OSA_TASK_DEFINE(dhcpd_task, WLAN_TASK_PRI_HIGH, 1, CONFIG_DHCP_SERVER_STACK_SIZE, 0);
3131

3232
OSA_TASK_HANDLE_DEFINE(dhcpd_task_Handle);
3333

dhcpd/dns-server.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,15 @@ void dhcp_enable_dns_server(char **domain_names)
222222
{
223223
dnss.count_qnames++;
224224
}
225+
#if !CONFIG_MEM_POOLS
225226
dnss.list_qnames = OSA_MemoryAllocate(dnss.count_qnames * sizeof(struct dns_qname));
227+
#else
228+
/*TODO:This function is not called from anywhere .
229+
* Please make sure to assign correct memory pool
230+
* whenever this function will be used. */
226231

232+
dnss.list_qnames = OSA_MemoryPoolAllocate(buf_1280_MemoryPool);
233+
#endif
227234
for (i = 0; i < dnss.count_qnames; i++)
228235
{
229236
(void)memset(dnss.list_qnames[i].qname, 0, sizeof(struct dns_qname));
@@ -301,7 +308,11 @@ void dns_free_allocations(void)
301308
if (dnss.list_qnames != NULL)
302309
{
303310
dnss.count_qnames = 0;
311+
#if !CONFIG_MEM_POOLS
304312
OSA_MemoryFree(dnss.list_qnames);
313+
#else
314+
OSA_MemoryPoolFree(buf_1280_MemoryPool, dnss.list_qnames);
315+
#endif
305316
dnss.list_qnames = NULL;
306317
}
307318
if (dnss.dnssock != -1)

incl/cli.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
/*
2-
* Copyright 2008-2022 NXP
3-
*
4-
* SPDX-License-Identifier: BSD-3-Clause
2+
* Copyright 2008-2022, 2024 NXP
3+
* SPDX-License-Identifier: BSD-3-Clause
54
*
65
*/
76

8-
/*! \file cli.h
9-
* \brief CLI module
10-
*
11-
* \section cli_usage Usage
12-
* The CLI module lets you register commands with the CLI interface. Modules
13-
* that wish to register the commands should initialize the struct cli_command
14-
* structure and pass this to cli_register_command(). These commands will then
15-
* be available on the CLI.
7+
/*!\file cli.h
8+
*\brief This file provides CLI interfaces to register commands in CLI mode.
169
*
10+
* Modules that wish to register the commands should initialize the struct cli_command
11+
* structure and pass it to cli_register_command(). These commands will then
12+
* be available on the CLI.
1713
*/
1814

1915
#ifndef __CLI_H__

incl/cli_utils.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
/** @file cli_utils.h
2-
*
3-
* @brief CLI Utils
4-
*
5-
* Copyright 2008-2020 NXP
6-
*
7-
* SPDX-License-Identifier: BSD-3-Clause
8-
*
1+
/* Copyright 2008-2020, 2024 NXP
2+
* SPDX-License-Identifier: BSD-3-Clause
3+
*/
4+
/*!\file cli_utils.h
5+
*\brief This file provides Wi-Fi console utility interfaces.
96
*/
107

118
#ifndef __CLI_UTILS_H__

incl/dhcp-server.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
2-
* Copyright 2008-2022 NXP
2+
* Copyright 2008-2022, 2024 NXP
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
66
*/
77

8-
/*! \file dhcp-server.h
9-
* \brief DHCP server
8+
/*!\file dhcp-server.h
9+
*\brief The file provides DHCP server configuration interfaces.
1010
*
1111
* The DHCP Server is required in the provisioning mode of the application to
1212
* assign IP Address to Wireless Clients that connect to the WM.
@@ -119,7 +119,7 @@ int dhcp_server_start(void *intrfc_handle);
119119
*
120120
* However, application can also start dns server without any domain names
121121
* specified to solve following issue.
122-
* Some of the client devices do not show WiFi signal strength symbol when
122+
* Some of the client devices do not show Wi-Fi signal strength symbol when
123123
* connected to micro-AP in open mode, if dns queries are not resolved.
124124
* With dns server support enabled, dns server responds with ERROR_REFUSED
125125
* indicating that the DNS server refuses to provide whatever data client is

incl/iperf.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
/** @file iperf.h
2-
*
3-
* @brief This file provides the support for network utility iperf
1+
/*!\file iperf.h
2+
*\brief This file provides support for iperf console commands.
43
*/
54
/*
6-
* Copyright 2008-2020 NXP
5+
* Copyright 2008-2020, 2024 NXP
76
*
87
* SPDX-License-Identifier: BSD-3-Clause
98
*

incl/nxp_wifi.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
/*
2-
* Copyright 2023 NXP
1+
/* Copyright 2023-2024 NXP
32
*
43
* SPDX-License-Identifier: BSD-3-Clause
54
*
65
*/
6+
/*!\file nxp_wifi.h
7+
*\brief This file provides macros mapping between zephyr Kconfig and Wi-Fi driver.
8+
*/
79

810
#ifndef __NXP_WIFI_H__
911
#define __NXP_WIFI_H__
@@ -323,6 +325,10 @@ extern "C" {
323325
#define CONFIG_WIFI_CLOCKSYNC CONFIG_NXP_WIFI_CLOCKSYNC
324326
#endif
325327

328+
#if CONFIG_NXP_WIFI_RTS_THRESHOLD
329+
#define CONFIG_WIFI_RTS_THRESHOLD 1
330+
#endif
331+
326332
#if CONFIG_NXP_WIFI_UAP_WORKAROUND_STICKY_TIM
327333
#define CONFIG_UAP_WORKAROUND_STICKY_TIM CONFIG_NXP_WIFI_UAP_WORKAROUND_STICKY_TIM
328334
#endif

incl/port/net/hooks/lwip_default_hooks.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
/** @file lwip_default_hooks.h
2-
*
3-
* @brief This file provides lwip porting code
4-
*
5-
* Copyright 2008-2023 NXP
1+
/*
2+
* Copyright 2008-2024 NXP
63
*
74
* SPDX-License-Identifier: BSD-3-Clause
85
*/
6+
7+
/*!\file lwip_default_hooks.h
8+
*\brief This file provides interfaces for lwip hook.
9+
*/
10+
911
#ifndef _LWIP_DEFAULT_HOOKS_H_
1012
#define _LWIP_DEFAULT_HOOKS_H_
1113
#include <osa.h>
@@ -15,6 +17,11 @@
1517
#include "lwip/tcp.h"
1618
#include "lwip/pbuf.h"
1719

20+
/**To find the valid net
21+
*\param[in] src the source ipv4 address
22+
*\param[in] dest the destination ipv4 address
23+
*\return the match net if find, otherwise return NULL.
24+
*/
1825
struct netif *lwip_hook_ip4_route_src(const ip4_addr_t *src, const ip4_addr_t *dest);
1926

2027
#define LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(p, hdr, pcb, opts) lwip_hook_tcp_out_add_tcpopts(p, hdr, pcb, opts)

incl/port/net/wm_net.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
/*
22
* Copyright (c) 2016 Intel Corporation.
3-
* Copyright 2008-2023 NXP
3+
* Copyright 2008-2024 NXP
44
*
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8-
/*! \file wm_net.h
9-
* \brief Network Abstraction Layer
8+
/*!\file wm_net.h
9+
*\brief This file provides interface for network abstraction layer.
1010
*
1111
* This provides the calls related to the network layer.
12-
*
13-
*
1412
*/
1513

1614
#ifndef _WM_NET_H_
@@ -538,14 +536,13 @@ int net_wlan_deinit(void);
538536

539537
/** Get STA interface netif structure pointer
540538
*
541-
* \rerurn A pointer to STA interface netif structure
542-
*
539+
* \return A pointer to STA interface netif structure
543540
*/
544541
struct netif *net_get_sta_interface(void);
545542

546543
/** Get uAP interface netif structure pointer
547544
*
548-
* \rerurn A pointer to uAP interface netif structure
545+
* \return A pointer to uAP interface netif structure
549546
*
550547
*/
551548
struct netif *net_get_uap_interface(void);
@@ -756,10 +753,10 @@ int net_get_if_ip_addr(uint32_t *ip, void *intrfc_handle);
756753
* net_get_sta_handle(), net_get_uap_handle() to get
757754
* interface handle.
758755
*
759-
* \param[in] mask Subnet Mask pointer
756+
* \param[in] mask Subnet Mask pointer
760757
* \param[in] intrfc_handle interface
761758
*
762-
* \return WM_SUCCESS on success or error code.
759+
* \return WM_SUCCESS on success otherwise error code.
763760
*/
764761
int net_get_if_ip_mask(uint32_t *nm, void *intrfc_handle);
765762

incl/port/osa/mem_pool.h

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
/*
2-
* Copyright 2023 NXP
2+
* Copyright 2023-2024 NXP
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
66
*/
7+
/*!\file mem_pool.h
8+
*\brief This file provides OSA memory pool interfaces for Wi-Fi driver static memory operation.
9+
*/
710

811
#ifndef MEM_POOL_H_
912
#define MEM_POOL_H_
@@ -59,39 +62,35 @@ typedef TX_BLOCK_POOL MemPool_t;
5962

6063
#endif
6164

62-
/**
63-
* Create a MemoryPool
64-
*
65-
* @param ItemSize How big is an allocation.
66-
* @param PreallocatedMemory Pointer to the preallocated memory
67-
* you are dedicating to this pool.
68-
* @param PreallocatedMemorySize How big is the buffer you are
69-
* passing in.
70-
* @param Alignment Power of 2 value denoting on which address boundary the
71-
* memory will be aligned to. Must be at least sizeof(unsigned char *).
72-
* @return A Handle to the pool, or NULL on failure.
65+
/** Create a MemoryPool
66+
*\param[in,out] MemPool the created memory pool.
67+
*\param[in] ItemSize How big is an allocation.
68+
*\param[in] PreallocatedMemory Pointer to the preallocated memory
69+
* you are dedicating to this pool.
70+
*\param[in] PreallocatedMemorySize How big is the buffer you are
71+
* passing in.
72+
*\param[in] Alignment Power of 2 value denoting on which address boundary the
73+
* memory will be aligned to. Must be at least sizeof(unsigned char *).
74+
*\return A Handle to the pool, or NULL on failure.
7375
*/
7476
MemoryPool_t OSA_MemoryPoolCreate(
7577
MemPool_t *MemPool, int ItemSize, void *PreallocatedMemory, int PreallocatedMemorySize, int Alignment);
7678

77-
/**
78-
* Get a memory buffer from the pool.
79-
*
80-
* Note that this can block, and cannnot be used from ISR context.
79+
/**Get a memory buffer from the pool.
80+
* Note that this can block, and cannnot be used from ISR context.
8181
*
82-
* @param pool A handle to a MemoryPool.
83-
* @return A pointer or NULL on failure.
82+
*\param[in] pool A handle to a MemoryPool.
83+
*\return A pointer or NULL on failure.
8484
*/
8585
void *OSA_MemoryPoolAllocate(MemoryPool_t pool);
8686

87-
/**
88-
* Return a memory buffer to the pool.
87+
/**free a memory buffer to the pool.
8988
*
90-
* @note This can block, and cannnot be used from ISR context.
91-
* @note There is no check that the memory passed in is valid.
89+
* note This can block, and cannnot be used from ISR context.
90+
* note There is no check that the memory passed in is valid.
9291
*
93-
* @param pool A handle to a MemoryPool.
94-
* @param memory memory obtained from OSA_MemoryPoolAllocate().
92+
*\param[in] pool A handle to a MemoryPool.
93+
*\param[in] memory memory obtained from OSA_MemoryPoolAllocate().
9594
*/
9695
void OSA_MemoryPoolFree(MemoryPool_t pool, void *memory);
9796

incl/port/osa/mem_pool_config.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
/*
2-
* Copyright 2023 NXP
1+
/* Copyright 2023-2024 NXP
32
*
43
* SPDX-License-Identifier: BSD-3-Clause
54
*
65
*/
6+
/*!\file mem_pool_config.h
7+
*\brief This file declares interface for memeory pool.
8+
*/
79

810
#ifndef _MEM_POOL_CONFIG_H_
911
#define _MEM_POOL_CONFIG_H_

incl/port/osa/osa.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
66
*/
7+
/*!\file osa.h
8+
*\brief This file contains OSA wrapper declarations for timer, read/write lock and idle hook.
9+
*/
10+
711

812
#ifndef _OSA_H_
913
#define _OSA_H_

incl/port/osa/slist.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/****************************************************************************
2-
*
3-
* Copyright (c) 2023, Michael Becker (michael.f.becker@gmail.com)
4-
*
5-
* This file is part of the FreeRTOS Add-ons project.
6-
*
1+
/* Copyright (c) 2023, Michael Becker (michael.f.becker@gmail.com)
2+
* Copyright 2023-2024 NXP
73
* Source Code:
84
* https://github.com/michaelbecker/freertos-addons
95
*
@@ -36,12 +32,9 @@
3632
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
3733
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3834
*
39-
***************************************************************************/
40-
/*
41-
* Copyright 2023 NXP
42-
*
43-
* SPDX-License-Identifier: BSD-3-Clause
44-
*
35+
*/
36+
/*!\file slist.h
37+
*\brief This file is a part of the FreeRTOS Add-ons project.
4538
*/
4639

4740
#ifndef SLIST_H_

0 commit comments

Comments
 (0)