wifi: ath11k: fix ath11k_mac_op_remain_on_channel() stack usage
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 26 Sep 2023 04:29:04 +0000 (07:29 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 28 Sep 2023 15:15:06 +0000 (18:15 +0300)
commit4fd15bb705d3faa7e6adab2daba2e3af80d9b6bd
tree0834f30f5e3d7cbfbe5783bfff0178a6ce2df2e5
parented823fd113b769bf38ca6d0c2e5a588f778b5127
wifi: ath11k: fix ath11k_mac_op_remain_on_channel() stack usage

When compiling with clang 16.0.6, I've noticed the following:

drivers/net/wireless/ath/ath11k/mac.c:8903:12: warning: stack frame
size (1032) exceeds limit (1024) in 'ath11k_mac_op_remain_on_channel'
[-Wframe-larger-than]
static int ath11k_mac_op_remain_on_channel(struct ieee80211_hw *hw,
           ^
68/1032 (6.59%) spills, 964/1032 (93.41%) variables

So switch to kzalloc()'ed instance of 'struct scan_req_params' like
it's done in 'ath11k_mac_op_hw_scan()'. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230926042906.13725-1-dmantipov@yandex.ru
drivers/net/wireless/ath/ath11k/mac.c