From 707b1227642d6dfa5262bb1e1a06d7f0e2ed11ab Mon Sep 17 00:00:00 2001 From: Debasis Das Date: Tue, 10 Dec 2019 12:21:42 +0530 Subject: [PATCH] qcacmn: Optimize vdev host-fw handshake sequence Send beacon_tx_rate_code in the vdev_start command. Change-Id: I53ebdbc8dc4be4dad42eaad9188a231c5d9fb618 --- umac/mlme/include/wlan_vdev_mlme.h | 6 +++++- umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c | 2 +- umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.h | 11 +++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/umac/mlme/include/wlan_vdev_mlme.h b/umac/mlme/include/wlan_vdev_mlme.h index ee940bd084..5bf922d9c9 100644 --- a/umac/mlme/include/wlan_vdev_mlme.h +++ b/umac/mlme/include/wlan_vdev_mlme.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -273,6 +273,7 @@ struct vdev_mlme_inactivity_params { * @max_rate: max bandwidth rate * @tx_mgmt_rate: Tx Mgmt rate * @bcn_tx_rate: beacon Tx rate + * @bcn_tx_rate_code: beacon Tx rate code * @type: Type of ratemask configuration * @lower32: Lower 32 bits in the 1st 64-bit value * @higher32: Higher 32 bits in the 1st 64-bit value @@ -286,6 +287,9 @@ struct vdev_mlme_rate_info { uint32_t max_rate; uint32_t tx_mgmt_rate; uint32_t bcn_tx_rate; +#ifdef WLAN_BCN_RATECODE_ENABLE + uint32_t bcn_tx_rate_code; +#endif uint8_t type; uint32_t lower32; uint32_t higher32; diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c b/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c index bd79556d78..5895796140 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c +++ b/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c @@ -168,7 +168,7 @@ static QDF_STATUS vdev_mgr_start_param_update( param->channel.maxregpower = mlme_obj->mgmt.generic.maxregpower; param->channel.antennamax = mlme_obj->mgmt.generic.antennamax; param->channel.reg_class_id = mlme_obj->mgmt.generic.reg_class_id; - param->bcn_tx_rate_code = mlme_obj->mgmt.rate_info.bcn_tx_rate; + param->bcn_tx_rate_code = vdev_mgr_fetch_ratecode(mlme_obj); param->ldpc_rx_enabled = mlme_obj->proto.generic.ldpc; if (mlme_obj->mgmt.generic.type == WLAN_VDEV_MLME_TYPE_AP) { param->hidden_ssid = mlme_obj->mgmt.ap.hidden_ssid; diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.h b/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.h index 5837ff0414..f6461213ab 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.h +++ b/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.h @@ -239,4 +239,15 @@ QDF_STATUS vdev_mgr_multiple_restart_send( */ QDF_STATUS vdev_mgr_peer_delete_all_send(struct vdev_mlme_obj *mlme_obj); +#ifdef WLAN_BCN_RATECODE_ENABLE +static inline uint32_t vdev_mgr_fetch_ratecode(struct vdev_mlme_obj *mlme_obj) +{ + return mlme_obj->mgmt.rate_info.bcn_tx_rate_code; +} +#else +static inline uint32_t vdev_mgr_fetch_ratecode(struct vdev_mlme_obj *mlme_obj) +{ + return mlme_obj->mgmt.rate_info.bcn_tx_rate; +} +#endif #endif /* __VDEV_MGR_OPS_H__ */