diff --git a/components/mlme/core/inc/wlan_mlme_main.h b/components/mlme/core/inc/wlan_mlme_main.h index 1ce8f567bb..462d799a2c 100644 --- a/components/mlme/core/inc/wlan_mlme_main.h +++ b/components/mlme/core/inc/wlan_mlme_main.h @@ -370,12 +370,12 @@ struct ft_context { }; /** - * struct connect_chan_info - store channel info at the time of association - * @ch_width_orig: channel width at the time of initial connection + * struct assoc_channel_info - store channel info at the time of association + * @assoc_ch_width: channel width at the time of initial connection * @sec_2g_freq: secondary 2 GHz freq */ -struct connect_chan_info { - enum phy_ch_width ch_width_orig; +struct assoc_channel_info { + enum phy_ch_width assoc_ch_width; qdf_freq_t sec_2g_freq; }; @@ -398,7 +398,7 @@ struct connect_chan_info { * @ese_tspec_info: ese tspec info * @ext_cap_ie: Ext CAP IE * @assoc_btm_cap: BSS transition management cap used in (re)assoc req - * @chan_info_orig: store channel info at the time of association + * @assoc_chan_info: store channel info at the time of association */ struct mlme_connect_info { uint8_t timing_meas_cap; @@ -424,7 +424,7 @@ struct mlme_connect_info { #endif uint8_t ext_cap_ie[DOT11F_IE_EXTCAP_MAX_LEN + 2]; bool assoc_btm_cap; - struct connect_chan_info chan_info_orig; + struct assoc_channel_info assoc_chan_info; }; /** struct wait_for_key_timer - wait for key timer object diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 699f0cfdc4..41061b3c83 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -95,7 +95,7 @@ mlme_fill_freq_in_scan_start_request(struct wlan_objmgr_vdev *vdev, operation_chan_freq = wlan_get_operation_chan_freq(vdev); associated_ch_width = - mlme_priv->connect_info.chan_info_orig.ch_width_orig; + mlme_priv->connect_info.assoc_chan_info.assoc_ch_width; if (associated_ch_width == CH_WIDTH_INVALID) { mlme_debug("vdev %d : Invalid associated ch width for freq %d", req->scan_req.vdev_id, operation_chan_freq); @@ -119,7 +119,7 @@ mlme_fill_freq_in_scan_start_request(struct wlan_objmgr_vdev *vdev, if (wlan_reg_is_24ghz_ch_freq(operation_chan_freq) && associated_ch_width == CH_WIDTH_40MHZ) { sec_2g_freq = - mlme_priv->connect_info.chan_info_orig.sec_2g_freq; + mlme_priv->connect_info.assoc_chan_info.sec_2g_freq; if (!sec_2g_freq) { mlme_debug("vdev %d : Invalid sec 2g freq for freq: %d", req->scan_req.vdev_id, operation_chan_freq); @@ -380,24 +380,27 @@ mlme_update_freq_in_scan_start_req(struct wlan_objmgr_vdev *vdev, uint8_t num_chan; qdf_freq_t op_freq; enum scan_phy_mode phymode = SCAN_PHY_MODE_UNKNOWN; + uint8_t vdev_id; + vdev_id = vdev->vdev_objmgr.vdev_id; op_freq = wlan_get_operation_chan_freq(vdev); + mlme_debug("vdev %d : fill ch list for op_freq:%d, assoc_ch_width: %d", + vdev_id, op_freq, associated_ch_width); + if (associated_ch_width == CH_WIDTH_320MHZ) { range = wlan_reg_get_bonded_chan_entry(op_freq, associated_ch_width, 0); if (!range) { mlme_debug("vdev %d : range is null for freq %d", - req->scan_req.vdev_id, - op_freq); + vdev_id, op_freq); return QDF_STATUS_E_FAILURE; } phymode = mlme_get_scan_phy_mode(); if (phymode == SCAN_PHY_MODE_UNKNOWN) { mlme_debug("vdev %d : invalid scan phymode for freq %d", - req->scan_req.vdev_id, - op_freq); + vdev_id, op_freq); return QDF_STATUS_E_FAILURE; } num_chan = req->scan_req.chan_list.num_chan; @@ -409,12 +412,10 @@ mlme_update_freq_in_scan_start_req(struct wlan_objmgr_vdev *vdev, num_chan += 1; req->scan_req.chan_list.num_chan = num_chan; } else { - phymode = wlan_scan_get_scan_phy_mode(vdev, op_freq, - req->scan_req.vdev_id); + phymode = wlan_scan_get_scan_phy_mode(vdev, op_freq, vdev_id); if (phymode == SCAN_PHY_MODE_UNKNOWN) { mlme_debug("vdev %d : invalid scan phymode for freq %d", - req->scan_req.vdev_id, - op_freq); + vdev_id, op_freq); return QDF_STATUS_E_FAILURE; } @@ -433,21 +434,21 @@ mlme_update_freq_in_scan_start_req(struct wlan_objmgr_vdev *vdev, * band scan req for mlo connection * @vdev: vdev common object * @req: pointer to scan request - * @associated_ch_width: channel width at the time of initial connection * * Return: QDF_STATUS */ static QDF_STATUS mlme_fill_freq_in_mlo_wide_band_scan_start_req(struct wlan_objmgr_vdev *vdev, - struct scan_start_request *req, - enum phy_ch_width associated_ch_width) + struct scan_start_request *req) { struct wlan_mlo_dev_context *mlo_dev_ctx; struct wlan_mlo_sta *sta_ctx = NULL; - struct wlan_channel *chan; uint8_t i; QDF_STATUS status; struct wlan_objmgr_vdev *mlo_vdev; + struct mlme_legacy_priv *mlme_priv; + enum phy_ch_width associated_ch_width = CH_WIDTH_INVALID; + struct assoc_channel_info *assoc_chan_info; mlo_dev_ctx = vdev->mlo_dev_ctx; if (!mlo_dev_ctx) { @@ -465,14 +466,22 @@ mlme_fill_freq_in_mlo_wide_band_scan_start_req(struct wlan_objmgr_vdev *vdev, if (!mlo_dev_ctx->wlan_vdev_list[i]) continue; if (qdf_test_bit(i, sta_ctx->wlan_connected_links)) { - chan = wlan_vdev_get_active_channel(vdev); - if (!chan) { - mlme_err("vdev %d :failed to get freq info", - req->scan_req.vdev_id); + mlo_vdev = mlo_dev_ctx->wlan_vdev_list[i]; + mlme_priv = wlan_vdev_mlme_get_ext_hdl(mlo_vdev); + if (!mlme_priv) { + mlme_legacy_err("vdev legacy priv obj is NULL"); + return QDF_STATUS_E_FAILURE; + } + + assoc_chan_info = + &mlme_priv->connect_info.assoc_chan_info; + associated_ch_width = assoc_chan_info->assoc_ch_width; + if (associated_ch_width == CH_WIDTH_INVALID) { + mlme_debug("vdev %d :Invalid assoc ch_width", + req->scan_req.vdev_id); return QDF_STATUS_E_FAILURE; } - mlo_vdev = mlo_dev_ctx->wlan_vdev_list[i]; status = mlme_update_freq_in_scan_start_req(mlo_vdev, req, associated_ch_width); if (QDF_IS_STATUS_ERROR(status)) @@ -487,8 +496,7 @@ mlme_fill_freq_in_mlo_wide_band_scan_start_req(struct wlan_objmgr_vdev *vdev, #else static inline QDF_STATUS mlme_fill_freq_in_mlo_wide_band_scan_start_req(struct wlan_objmgr_vdev *vdev, - struct scan_start_request *req, - enum phy_ch_width associated_ch_width) + struct scan_start_request *req) { return QDF_STATUS_E_FAILURE; } @@ -514,29 +522,32 @@ mlme_fill_freq_in_wide_scan_start_request(struct wlan_objmgr_vdev *vdev, if (!mlme_priv) return QDF_STATUS_E_FAILURE; + req->scan_req.chan_list.num_chan = 0; + + if (wlan_vdev_mlme_is_mlo_vdev(vdev)) { + status = mlme_fill_freq_in_mlo_wide_band_scan_start_req(vdev, + req); + if (QDF_IS_STATUS_ERROR(status)) + return QDF_STATUS_E_FAILURE; + goto update_param; + } + associated_ch_width = - mlme_priv->connect_info.chan_info_orig.ch_width_orig; + mlme_priv->connect_info.assoc_chan_info.assoc_ch_width; if (associated_ch_width == CH_WIDTH_INVALID) { mlme_debug("vdev %d :Invalid associated ch_width", req->scan_req.vdev_id); return QDF_STATUS_E_FAILURE; } - req->scan_req.chan_list.num_chan = 0; - - if (wlan_vdev_mlme_is_mlo_vdev(vdev)) { - status = mlme_fill_freq_in_mlo_wide_band_scan_start_req(vdev, - req, associated_ch_width); - if (QDF_IS_STATUS_ERROR(status)) - return QDF_STATUS_E_FAILURE; - goto update_param; - } - status = mlme_update_freq_in_scan_start_req(vdev, req, associated_ch_width); if (QDF_IS_STATUS_ERROR(status)) return QDF_STATUS_E_FAILURE; + mlme_debug("vdev %d :trigger wide band scan, num freq %d", + req->scan_req.vdev_id, req->scan_req.chan_list.num_chan); + update_param: req->scan_req.dwell_time_passive = MLME_GET_CHAN_STATS_WIDE_BAND_PASSIVE_SCAN_TIME; @@ -711,8 +722,9 @@ QDF_STATUS mlme_init_connect_chan_info_config(struct vdev_mlme_obj *vdev_mlme) return QDF_STATUS_E_FAILURE; } - mlme_priv->connect_info.chan_info_orig.ch_width_orig = CH_WIDTH_INVALID; - mlme_priv->connect_info.chan_info_orig.sec_2g_freq = 0; + mlme_priv->connect_info.assoc_chan_info.assoc_ch_width = + CH_WIDTH_INVALID; + mlme_priv->connect_info.assoc_chan_info.sec_2g_freq = 0; return QDF_STATUS_SUCCESS; } diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 433f3ecdc9..14cb0e3126 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -6886,7 +6886,7 @@ wlan_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc, } associated_ch_width = - mlme_priv->connect_info.chan_info_orig.ch_width_orig; + mlme_priv->connect_info.assoc_chan_info.assoc_ch_width; if (associated_ch_width == CH_WIDTH_INVALID || ch_width > associated_ch_width) { mlme_debug("vdev %d: Invalid new chwidth:%d, assoc ch_width:%d", diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h index a8118bee97..042cda8b8e 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h @@ -741,13 +741,15 @@ static inline QDF_STATUS wlan_cm_host_roam_start(struct scheduler_msg *msg) * wlan_cm_get_associated_ch_info() - get associated channel info * @psoc: psoc pointer * @vdev_id: vdev id - * @chan_info: channel info to get + * @scanned_ch_width: channel width as per scan response + * @assoc_chan_info: channel info to get * * Return: none */ void wlan_cm_get_associated_ch_info(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, - struct connect_chan_info *chan_info); + enum phy_ch_width scanned_ch_width, + struct assoc_channel_info *assoc_chan_info); #ifdef WLAN_FEATURE_ROAM_OFFLOAD /** diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h index aad0553dba..a3d8f5a242 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h @@ -125,9 +125,11 @@ ucfg_cm_update_session_assoc_ie(struct wlan_objmgr_psoc *psoc, static inline void ucfg_cm_get_associated_ch_info(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, - struct connect_chan_info *chan_info) + enum phy_ch_width scanned_ch_width, + struct assoc_channel_info *assoc_chan_info) { - wlan_cm_get_associated_ch_info(psoc, vdev_id, chan_info); + wlan_cm_get_associated_ch_info(psoc, vdev_id, scanned_ch_width, + assoc_chan_info); } #ifdef WLAN_FEATURE_ROAM_OFFLOAD diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c index 44e2ec6fe6..a52e4f345e 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c @@ -133,7 +133,7 @@ cm_update_associated_ch_info(struct wlan_objmgr_vdev *vdev, bool is_update) { struct mlme_legacy_priv *mlme_priv; struct wlan_channel *des_chan; - struct connect_chan_info *chan_info_orig; + struct assoc_channel_info *assoc_chan_info; enum phy_ch_width ch_width; QDF_STATUS status; @@ -141,9 +141,9 @@ cm_update_associated_ch_info(struct wlan_objmgr_vdev *vdev, bool is_update) if (!mlme_priv) return; - chan_info_orig = &mlme_priv->connect_info.chan_info_orig; + assoc_chan_info = &mlme_priv->connect_info.assoc_chan_info; if (!is_update) { - chan_info_orig->ch_width_orig = CH_WIDTH_INVALID; + assoc_chan_info->assoc_ch_width = CH_WIDTH_INVALID; return; } @@ -160,23 +160,23 @@ cm_update_associated_ch_info(struct wlan_objmgr_vdev *vdev, bool is_update) */ status = wlan_mlme_get_sta_ch_width(vdev, &ch_width); if (QDF_IS_STATUS_ERROR(status)) - chan_info_orig->ch_width_orig = des_chan->ch_width; + assoc_chan_info->assoc_ch_width = des_chan->ch_width; else - chan_info_orig->ch_width_orig = ch_width; + assoc_chan_info->assoc_ch_width = ch_width; if (WLAN_REG_IS_24GHZ_CH_FREQ(des_chan->ch_freq) && des_chan->ch_width == CH_WIDTH_40MHZ) { if (des_chan->ch_cfreq1 == des_chan->ch_freq + BW_10_MHZ) - chan_info_orig->sec_2g_freq = + assoc_chan_info->sec_2g_freq = des_chan->ch_freq + BW_20_MHZ; if (des_chan->ch_cfreq1 == des_chan->ch_freq - BW_10_MHZ) - chan_info_orig->sec_2g_freq = + assoc_chan_info->sec_2g_freq = des_chan->ch_freq - BW_20_MHZ; } mlme_debug("ch width :%d, ch_freq:%d, ch_cfreq1:%d, sec_2g_freq:%d", - chan_info_orig->ch_width_orig, des_chan->ch_freq, - des_chan->ch_cfreq1, chan_info_orig->sec_2g_freq); + assoc_chan_info->assoc_ch_width, des_chan->ch_freq, + des_chan->ch_cfreq1, assoc_chan_info->sec_2g_freq); } char *cm_roam_get_requestor_string(enum wlan_cm_rso_control_requestor requestor) @@ -2156,35 +2156,114 @@ QDF_STATUS wlan_cm_update_fils_ft(struct wlan_objmgr_psoc *psoc, } #endif +#ifdef WLAN_FEATURE_11BE_MLO +static void +wlan_cm_get_mlo_associated_ch_info(struct wlan_objmgr_vdev *vdev, + enum phy_ch_width scanned_ch_width, + struct assoc_channel_info *assoc_chan_info) +{ + struct mlme_legacy_priv *mlme_priv; + struct wlan_channel *des_chan; + struct wlan_mlo_dev_context *mlo_dev_ctx; + struct wlan_mlo_sta *sta_ctx = NULL; + uint8_t i; + struct wlan_objmgr_vdev *mlo_vdev; + struct assoc_channel_info *temp_assoc_chan_info; + + mlo_dev_ctx = vdev->mlo_dev_ctx; + if (!mlo_dev_ctx) { + mlme_err("vdev %d :mlo_dev_ctx is NULL", + vdev->vdev_objmgr.vdev_id); + return; + } + + sta_ctx = mlo_dev_ctx->sta_ctx; + if (!sta_ctx) { + mlme_err("vdev %d :mlo_dev_ctx is NULL", + vdev->vdev_objmgr.vdev_id); + return; + } + + for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) { + if (!mlo_dev_ctx->wlan_vdev_list[i]) + continue; + if (qdf_test_bit(i, sta_ctx->wlan_connected_links)) { + mlo_vdev = mlo_dev_ctx->wlan_vdev_list[i]; + des_chan = wlan_vdev_mlme_get_des_chan(mlo_vdev); + if (!des_chan) { + mlme_debug("NULL des_chan"); + return; + } + + if (des_chan->ch_width == scanned_ch_width) { + mlme_priv = + wlan_vdev_mlme_get_ext_hdl(mlo_vdev); + if (!mlme_priv) { + mlme_legacy_err("mlme_priv is NULL"); + return; + } + temp_assoc_chan_info = + &mlme_priv->connect_info.assoc_chan_info; + assoc_chan_info->sec_2g_freq = + temp_assoc_chan_info->sec_2g_freq; + mlme_debug("vdev %d: assoc sec_2g_freq:%d", + mlo_vdev->vdev_objmgr.vdev_id, + assoc_chan_info->sec_2g_freq); + break; + } + } + } +} +#else +static void +wlan_cm_get_mlo_associated_ch_info(struct wlan_objmgr_vdev *vdev, + enum phy_ch_width ch_width, + struct assoc_channel_info *chan_info) +{ +} +#endif + void wlan_cm_get_associated_ch_info(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, - struct connect_chan_info *chan_info) + enum phy_ch_width scanned_ch_width, + struct assoc_channel_info *assoc_chan_info) { struct wlan_objmgr_vdev *vdev; struct mlme_legacy_priv *mlme_priv; - chan_info->ch_width_orig = CH_WIDTH_INVALID; - chan_info->sec_2g_freq = 0; + assoc_chan_info->assoc_ch_width = CH_WIDTH_INVALID; + assoc_chan_info->sec_2g_freq = 0; vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id, WLAN_MLME_NB_ID); - if (!vdev) { - mlme_err("vdev%d: vdev object is NULL", vdev_id); + mlme_legacy_err("vdev %d: vdev not found", vdev_id); return; } - mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); - if (!mlme_priv) + if (wlan_vdev_mlme_is_mlo_vdev(vdev)) { + mlme_debug("vdev %d: get assoc chan info for mlo connection", + vdev_id); + wlan_cm_get_mlo_associated_ch_info(vdev, scanned_ch_width, + assoc_chan_info); goto release; + } - chan_info->ch_width_orig = - mlme_priv->connect_info.chan_info_orig.ch_width_orig; - chan_info->sec_2g_freq = - mlme_priv->connect_info.chan_info_orig.sec_2g_freq; + mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); + if (!mlme_priv) { + mlme_legacy_err("mlme_priv is NULL"); + goto release; + } + + assoc_chan_info->assoc_ch_width = + mlme_priv->connect_info.assoc_chan_info.assoc_ch_width; + assoc_chan_info->sec_2g_freq = + mlme_priv->connect_info.assoc_chan_info.sec_2g_freq; mlme_debug("vdev %d: associated_ch_width:%d, sec_2g_freq:%d", vdev_id, - chan_info->ch_width_orig, chan_info->sec_2g_freq); + assoc_chan_info->assoc_ch_width, + assoc_chan_info->sec_2g_freq); + release: wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID); } diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 4fe5df064c..52f8589f20 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -26450,6 +26450,39 @@ static int wlan_hdd_cfg80211_nan_change_conf(struct wiphy *wiphy, } #endif +/** + * wlan_hdd_get_ch_width_from_chan_info - get ch_width as per num channel + * present in scan event + * @info: struct scan_chan_info + * + * Return: phy_ch_width. + */ +static enum phy_ch_width +wlan_hdd_get_ch_width_from_chan_info(struct scan_chan_info *info) +{ + enum phy_ch_width scanned_ch_width; + + switch (info->subband_info.num_chan) { + case 1: + scanned_ch_width = CH_WIDTH_20MHZ; + break; + case 2: + scanned_ch_width = CH_WIDTH_40MHZ; + break; + case 4: + scanned_ch_width = CH_WIDTH_80MHZ; + break; + case 8: + scanned_ch_width = CH_WIDTH_160MHZ; + break; + default: + scanned_ch_width = CH_WIDTH_INVALID; + break; + } + + return scanned_ch_width; +} + /** * wlan_hdd_fill_subband_scan_info - Fill subband channel info * @hdd_ctx: hdd context @@ -26465,25 +26498,27 @@ static void wlan_hdd_fill_subband_scan_info(struct hdd_context *hdd_ctx, struct scan_chan_info *chan) { uint8_t idx, info_index, freq_info_num; - enum phy_ch_width ch_width; + enum phy_ch_width scanned_ch_width; const struct bonded_channel_freq *range = NULL; qdf_freq_t start_freq, end_freq, sec_2g_freq; uint8_t vdev_id = info->subband_info.vdev_id; - struct connect_chan_info chan_info_orig; + struct assoc_channel_info assoc_chan_info; - ucfg_cm_get_associated_ch_info(hdd_ctx->psoc, vdev_id, &chan_info_orig); - ch_width = chan_info_orig.ch_width_orig; - if (ch_width == CH_WIDTH_INVALID) { - hdd_debug("vdev %d: Invalid ch width", vdev_id); + scanned_ch_width = wlan_hdd_get_ch_width_from_chan_info(info); + if (scanned_ch_width == CH_WIDTH_INVALID) { + hdd_debug("vdev %d: Invalid scanned_ch_width", vdev_id); return; } - if (ch_width == CH_WIDTH_20MHZ) { + if (scanned_ch_width == CH_WIDTH_20MHZ) { start_freq = info->freq; end_freq = info->freq; } else if (wlan_reg_is_24ghz_ch_freq(info->freq) && - ch_width == CH_WIDTH_40MHZ) { - sec_2g_freq = chan_info_orig.sec_2g_freq; + scanned_ch_width == CH_WIDTH_40MHZ) { + ucfg_cm_get_associated_ch_info(hdd_ctx->psoc, vdev_id, + scanned_ch_width, + &assoc_chan_info); + sec_2g_freq = assoc_chan_info.sec_2g_freq; if (!sec_2g_freq) { mlme_debug("vdev %d : Invalid sec 2g freq for freq:%d", info->subband_info.vdev_id, info->freq); @@ -26492,7 +26527,7 @@ static void wlan_hdd_fill_subband_scan_info(struct hdd_context *hdd_ctx, hdd_debug("vdev %d :assoc freq %d sec_2g_freq:%d, bw %d", info->subband_info.vdev_id, info->freq, - sec_2g_freq, ch_width); + sec_2g_freq, scanned_ch_width); if (info->freq > sec_2g_freq) { start_freq = sec_2g_freq; end_freq = info->freq; @@ -26501,10 +26536,11 @@ static void wlan_hdd_fill_subband_scan_info(struct hdd_context *hdd_ctx, end_freq = sec_2g_freq; } } else { - range = wlan_reg_get_bonded_chan_entry(info->freq, ch_width, 0); + range = wlan_reg_get_bonded_chan_entry(info->freq, + scanned_ch_width, 0); if (!range) { hdd_err("vdev %d: bonded_chan_array is NULL for freq %d, ch_width %d", - vdev_id, info->freq, ch_width); + vdev_id, info->freq, scanned_ch_width); return; } start_freq = range->start_freq; @@ -26515,7 +26551,7 @@ static void wlan_hdd_fill_subband_scan_info(struct hdd_context *hdd_ctx, info_index = 0; hdd_debug("vdev %d: freq :%d bw %d, range [%d-%d], num_freq:%d", - vdev_id, info->freq, ch_width, start_freq, + vdev_id, info->freq, scanned_ch_width, start_freq, end_freq, freq_info_num); for (idx = 0; idx < NUM_CHANNELS; idx++) { diff --git a/core/hdd/src/wlan_hdd_cm_disconnect.c b/core/hdd/src/wlan_hdd_cm_disconnect.c index 0f8ea8c6f7..13e4ed94bb 100644 --- a/core/hdd/src/wlan_hdd_cm_disconnect.c +++ b/core/hdd/src/wlan_hdd_cm_disconnect.c @@ -506,7 +506,7 @@ static void hdd_cm_restore_ch_width(struct wlan_objmgr_vdev *vdev, struct wlan_channel *des_chan; int ret; uint8_t vdev_id = wlan_vdev_get_id(vdev); - enum phy_ch_width ch_width_orig; + enum phy_ch_width assoc_ch_width; mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); if (!mlme_priv) @@ -516,9 +516,9 @@ static void hdd_cm_restore_ch_width(struct wlan_objmgr_vdev *vdev, if (!des_chan) return; - ch_width_orig = mlme_priv->connect_info.chan_info_orig.ch_width_orig; + assoc_ch_width = mlme_priv->connect_info.assoc_chan_info.assoc_ch_width; if (!ucfg_mlme_is_chwidth_with_notify_supported(hdd_ctx->psoc) || - ch_width_orig == CH_WIDTH_INVALID) + assoc_ch_width == CH_WIDTH_INVALID) return; cm_update_associated_ch_info(vdev, false);