diff mbox series

[1/2] ath10k: add default value for num_peers in WMI TLV init

Message ID 20180913144506.8272-1-erik.stromdahl@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] ath10k: add default value for num_peers in WMI TLV init | expand

Commit Message

Erik Stromdahl Sept. 13, 2018, 2:45 p.m. UTC
The hw_params value will only be used if it was explicitly set in the
global hw_params array.

This makes it possible to have the num_peers member unset.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
 drivers/net/wireless/ath/ath10k/wmi-tlv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Kalle Valo Oct. 1, 2018, 1:55 p.m. UTC | #1
Erik Stromdahl <erik.stromdahl@gmail.com> wrote:

> The hw_params value will only be used if it was explicitly set in the
> global hw_params array.
> 
> This makes it possible to have the num_peers member unset.
> 
> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

2 patches applied to ath-next branch of ath.git, thanks.

8e8374db3424 ath10k: add default value for num_peers in WMI TLV init
08fafd646d63 ath10k: remove num_peers in hw_params for most targets
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 2640bc389f1d..e8e4ec5443e7 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -1569,7 +1569,10 @@  static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar)
 
 	cfg->num_vdevs = __cpu_to_le32(TARGET_TLV_NUM_VDEVS);
 
-	cfg->num_peers = __cpu_to_le32(ar->hw_params.num_peers);
+	if (ar->hw_params.num_peers)
+		cfg->num_peers = __cpu_to_le32(ar->hw_params.num_peers);
+	else
+		cfg->num_peers = __cpu_to_le32(TARGET_TLV_NUM_PEERS);
 	cfg->ast_skid_limit = __cpu_to_le32(ar->hw_params.ast_skid_limit);
 	cfg->num_wds_entries = __cpu_to_le32(ar->hw_params.num_wds_entries);