Skip to content

Commit

Permalink
samples: wifi: Fix stack sizes
Browse files Browse the repository at this point in the history
Increase the stack sizes in Wi-Fi smaples to fix
stack overflow crashes.

Signed-off-by: Triveni Danda <[email protected]>
  • Loading branch information
D-Triveni authored and rlubos committed Oct 17, 2024
1 parent f4360c0 commit ecc5f57
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion samples/wifi/monitor/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ CONFIG_NET_L2_ETHERNET=y

CONFIG_NET_SOCKETS_POLL_MAX=10
# Memories
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096

Expand Down
2 changes: 1 addition & 1 deletion samples/wifi/promiscuous/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_SOCKETS_POLL_MAX=10

# Memories
CONFIG_MAIN_STACK_SIZE=4300
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096

Expand Down
2 changes: 1 addition & 1 deletion samples/wifi/raw_tx_packet/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CONFIG_NET_CONFIG_INIT_TIMEOUT=0
CONFIG_NET_SOCKETS_POLL_MAX=10

# Memories
CONFIG_MAIN_STACK_SIZE=4300
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096

Expand Down
2 changes: 1 addition & 1 deletion samples/wifi/scan/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONFIG_NET_OFFLOAD=y
CONFIG_INIT_STACKS=y

# Memories
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=5200

# Debugging
CONFIG_STACK_SENTINEL=y
Expand Down
4 changes: 2 additions & 2 deletions samples/wifi/shell/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_SHELL=y

# Memories
CONFIG_MAIN_STACK_SIZE=4200
CONFIG_SHELL_STACK_SIZE=4700
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_SHELL_STACK_SIZE=5200

CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096
Expand Down
2 changes: 1 addition & 1 deletion samples/wifi/softap/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ CONFIG_NET_CONFIG_INIT_TIMEOUT=0
CONFIG_NET_SOCKETS_POLL_MAX=10

# Memories
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096
CONFIG_SOFTAP_SAMPLE_START_WIFI_THREAD_STACK_SIZE=4300
Expand Down
4 changes: 2 additions & 2 deletions samples/wifi/sta/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ CONFIG_NET_CONFIG_INIT_TIMEOUT=0
CONFIG_NET_SOCKETS_POLL_MAX=10

# Memories
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096
CONFIG_STA_SAMPLE_START_WIFI_THREAD_STACK_SIZE=4300
CONFIG_STA_SAMPLE_START_WIFI_THREAD_STACK_SIZE=5200

# Debugging
CONFIG_STACK_SENTINEL=y
Expand Down
4 changes: 2 additions & 2 deletions samples/wifi/throughput/overlay-high-performance.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ CONFIG_NRF70_MAX_TX_TOKENS=12
CONFIG_ZVFS_OPEN_MAX=20
CONFIG_NET_SOCKETS_POLL_MAX=20
# Sockets: select + poll take up more stack
CONFIG_MAIN_STACK_SIZE=4600
CONFIG_SHELL_STACK_SIZE=4600
CONFIG_MAIN_STACK_SIZE=4200
CONFIG_SHELL_STACK_SIZE=4700
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
4 changes: 2 additions & 2 deletions samples/wifi/throughput/overlay-iot-devices.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ CONFIG_NRF70_MAX_TX_TOKENS=5
CONFIG_ZVFS_OPEN_MAX=20
CONFIG_NET_SOCKETS_POLL_MAX=20
# Sockets: select + poll take up more stack
CONFIG_MAIN_STACK_SIZE=4600
CONFIG_SHELL_STACK_SIZE=4600
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_SHELL_STACK_SIZE=5200
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
4 changes: 2 additions & 2 deletions samples/wifi/throughput/overlay-memory-optimized.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ CONFIG_NRF70_MAX_TX_TOKENS=5
CONFIG_ZVFS_OPEN_MAX=20
CONFIG_NET_SOCKETS_POLL_MAX=20
# Sockets: select + poll take up more stack
CONFIG_MAIN_STACK_SIZE=4600
CONFIG_SHELL_STACK_SIZE=4600
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_SHELL_STACK_SIZE=5200
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
4 changes: 2 additions & 2 deletions samples/wifi/throughput/overlay-rx-prio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ CONFIG_NRF70_MAX_TX_TOKENS=5
CONFIG_ZVFS_OPEN_MAX=20
CONFIG_NET_SOCKETS_POLL_MAX=20
# Sockets: select + poll take up more stack
CONFIG_MAIN_STACK_SIZE=4600
CONFIG_SHELL_STACK_SIZE=4600
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_SHELL_STACK_SIZE=5200
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
4 changes: 2 additions & 2 deletions samples/wifi/throughput/overlay-tx-prio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ CONFIG_NRF70_MAX_TX_TOKENS=12
CONFIG_ZVFS_OPEN_MAX=20
CONFIG_NET_SOCKETS_POLL_MAX=20
# Sockets: select + poll take up more stack
CONFIG_MAIN_STACK_SIZE=4600
CONFIG_SHELL_STACK_SIZE=4600
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_SHELL_STACK_SIZE=5200
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
2 changes: 1 addition & 1 deletion samples/wifi/twt/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CONFIG_NET_CONFIG_INIT_TIMEOUT=0
CONFIG_NET_SOCKETS_POLL_MAX=10

# Memories
CONFIG_MAIN_STACK_SIZE=4300
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096

Expand Down

0 comments on commit ecc5f57

Please sign in to comment.