diff --git a/umac/mlme/include/wlan_vdev_mlme.h b/umac/mlme/include/wlan_vdev_mlme.h index ee940bd084ea..5bf922d9c99e 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 bd79556d785d..58957961400d 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 5837ff041402..f6461213aba5 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__ */