From f2c3099c2bfa2c9c3170e858f8991ce491082aff Mon Sep 17 00:00:00 2001 From: hqu Date: Tue, 14 May 2019 20:17:28 +0800 Subject: [PATCH] qcacld-3.0: Fix wrong MBSSID information for VDEV UP command VDEV UP command doesn't include right MBSSID information, it will cause data stall issue and so on. Fix is to provide right MBSSID information with VDEV UP command. Change-Id: I0201722c14dee1b01b8dacc7e3095301fb02fd3a CRs-Fixed: 2434405 --- .../core/inc/wlan_mlme_vdev_mgr_interface.h | 21 +++++++++++ .../core/src/wlan_mlme_vdev_mgr_interface.c | 35 +++++++++++++++++++ core/mac/src/pe/lim/lim_assoc_utils.c | 21 +++++++++++ core/wma/src/wma_utils.c | 8 +++++ 4 files changed, 85 insertions(+) diff --git a/components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h b/components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h index 8d8897a6eced..89c93e5117cf 100644 --- a/components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h +++ b/components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h @@ -147,6 +147,27 @@ bool mlme_get_cac_required(struct wlan_objmgr_vdev *vdev); QDF_STATUS mlme_set_cac_required(struct wlan_objmgr_vdev *vdev, bool val); +/** + * mlme_set_mbssid_info() - save mbssid info + * @vdev: vdev pointer + * @mbssid_info: mbssid info + * + * Return: QDF_STATUS + */ +QDF_STATUS +mlme_set_mbssid_info(struct wlan_objmgr_vdev *vdev, + struct scan_mbssid_info *mbssid_info); + +/** + * mlme_get_mbssid_info() - get mbssid info + * @vdev: vdev pointer + * @mbss_11ax: mbss 11ax info + * + * Return: None + */ +void mlme_get_mbssid_info(struct wlan_objmgr_vdev *vdev, + struct vdev_mlme_mbss_11ax *mbss_11ax); + /** * mlme_is_vdev_in_beaconning_mode() - check if vdev is beaconing mode * @vdev_opmode: vdev opmode diff --git a/components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c b/components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c index 307d50d7ccfa..abf23a1776d9 100644 --- a/components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c +++ b/components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c @@ -752,6 +752,41 @@ bool mlme_get_cac_required(struct wlan_objmgr_vdev *vdev) return mlme_priv->cac_required_for_new_channel; } +QDF_STATUS mlme_set_mbssid_info(struct wlan_objmgr_vdev *vdev, + struct scan_mbssid_info *mbssid_info) +{ + struct vdev_mlme_obj *vdev_mlme; + struct vdev_mlme_mbss_11ax *mbss_11ax; + + vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev); + if (!vdev_mlme) { + mlme_legacy_err("vdev component object is NULL"); + return QDF_STATUS_E_FAILURE; + } + + mbss_11ax = &vdev_mlme->mgmt.mbss_11ax; + mbss_11ax->profile_idx = mbssid_info->profile_num; + mbss_11ax->profile_num = mbssid_info->profile_count; + qdf_mem_copy(mbss_11ax->trans_bssid, + mbssid_info->trans_bssid, QDF_MAC_ADDR_SIZE); + + return QDF_STATUS_SUCCESS; +} + +void mlme_get_mbssid_info(struct wlan_objmgr_vdev *vdev, + struct vdev_mlme_mbss_11ax *mbss_11ax) +{ + struct vdev_mlme_obj *vdev_mlme; + + vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev); + if (!vdev_mlme) { + mlme_legacy_err("vdev component object is NULL"); + return; + } + + mbss_11ax = &vdev_mlme->mgmt.mbss_11ax; +} + /** * vdevmgr_mlme_ext_hdl_create () - Create mlme legacy priv object * @vdev_mlme: vdev mlme object diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 7af987a2e9e3..e4fed92f94c1 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2698,6 +2698,25 @@ lim_del_sta(struct mac_context *mac, return retCode; } +/** + * lim_set_mbssid_info() - Save mbssid info + * @pe_session: pe session entry + * + * Return: None + */ +#ifdef CONFIG_VDEV_SM +static void lim_set_mbssid_info(struct pe_session *pe_session) +{ + struct scan_mbssid_info *mbssid_info; + + mbssid_info = &pe_session->pLimJoinReq->bssDescription.mbssid_info; + mlme_set_mbssid_info(pe_session->vdev, mbssid_info); +} +#else +static void lim_set_mbssid_info(struct pe_session *pe_session) +{ +} +#endif /** * lim_add_sta_self() @@ -2776,6 +2795,8 @@ lim_add_sta_self(struct mac_context *mac, uint16_t staIdx, uint8_t updateSta, &pe_session->pLimJoinReq->bssDescription.mbssid_info, sizeof(struct scan_mbssid_info)); + lim_set_mbssid_info(pe_session); + pAddStaParams->shortPreambleSupported = mac->mlme_cfg->ht_caps.short_preamble; diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index a6d35f80c000..ef46c64e8295 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -4872,6 +4872,7 @@ QDF_STATUS wma_sta_vdev_up_send(struct vdev_mlme_obj *vdev_mlme, tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA); QDF_STATUS status; struct wma_txrx_node *iface; + struct vdev_mlme_mbss_11ax mbss_11ax = {0}; if (!wma) { WMA_LOGE("%s wma handle is NULL", __func__); @@ -4882,6 +4883,13 @@ QDF_STATUS wma_sta_vdev_up_send(struct vdev_mlme_obj *vdev_mlme, iface = &wma->interfaces[vdev_id]; param.assoc_id = iface->aid; + mlme_get_mbssid_info(vdev_mlme->vdev, &mbss_11ax); + param.profile_idx = mbss_11ax.profile_idx; + param.profile_num = mbss_11ax.profile_num; + qdf_mem_copy(param.trans_bssid, + mbss_11ax.trans_bssid, + QDF_MAC_ADDR_SIZE); + status = wma_send_vdev_up_to_fw(wma, ¶m, iface->bssid); if (QDF_IS_STATUS_ERROR(status)) {