qcacld-3.0: Process get cu_req for 2 GHz band connection

Process GET_CU_FOR_EACH_SUB_BW request from the upper
layer in case DUT is connected with a channel width
of 40 MHz and the connected frequency is in the 2 GHz
band.

Change-Id: Idc748f83af72baed946340c61d5c6a0bba1baf00
CRs-Fixed: 3506871
This commit is contained in:
abhinav kumar
2023-05-29 17:47:57 +05:30
committed by Rahul Choudhary
parent e563cf7379
commit 966ceefe89
11 changed files with 158 additions and 46 deletions

View File

@@ -369,6 +369,16 @@ struct ft_context {
#endif
};
/**
* struct connect_chan_info - store channel info at the time of association
* @ch_width_orig: 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;
qdf_freq_t sec_2g_freq;
};
/**
* struct mlme_connect_info - mlme connect information
* @timing_meas_cap: Timing meas cap
@@ -388,7 +398,7 @@ struct ft_context {
* @ese_tspec_info: ese tspec info
* @ext_cap_ie: Ext CAP IE
* @assoc_btm_cap: BSS transition management cap used in (re)assoc req
* @ch_width_orig: channel width at the time of initial connection
* @chan_info_orig: store channel info at the time of association
*/
struct mlme_connect_info {
uint8_t timing_meas_cap;
@@ -414,7 +424,7 @@ struct mlme_connect_info {
#endif
uint8_t ext_cap_ie[DOT11F_IE_EXTCAP_MAX_LEN + 2];
bool assoc_btm_cap;
enum phy_ch_width ch_width_orig;
struct connect_chan_info chan_info_orig;
};
/** struct wait_for_key_timer - wait for key timer object
@@ -854,6 +864,15 @@ struct del_bss_resp {
*/
QDF_STATUS mlme_init_rate_config(struct vdev_mlme_obj *vdev_mlme);
/**
* mlme_init_connect_chan_info_config() - initialize channel info for a
* connection
* @vdev_mlme: pointer to vdev mlme object
*
* Return: Success or Failure status
*/
QDF_STATUS mlme_init_connect_chan_info_config(struct vdev_mlme_obj *vdev_mlme);
/**
* mlme_get_peer_mic_len() - get mic hdr len and mic length for peer
* @psoc: psoc

View File

@@ -85,7 +85,7 @@ mlme_fill_freq_in_scan_start_request(struct wlan_objmgr_vdev *vdev,
enum phy_ch_width associated_ch_width;
uint8_t i;
struct chan_list *scan_chan_list;
uint16_t first_freq, operation_chan_freq;
qdf_freq_t first_freq, operation_chan_freq, sec_2g_freq;
char *chan_buff = NULL;
uint32_t buff_len, buff_num = 0, chan_count = 0;
@@ -94,7 +94,8 @@ mlme_fill_freq_in_scan_start_request(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_FAILURE;
operation_chan_freq = wlan_get_operation_chan_freq(vdev);
associated_ch_width = mlme_priv->connect_info.ch_width_orig;
associated_ch_width =
mlme_priv->connect_info.chan_info_orig.ch_width_orig;
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);
@@ -115,6 +116,30 @@ mlme_fill_freq_in_scan_start_request(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_SUCCESS;
}
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;
if (!sec_2g_freq) {
mlme_debug("vdev %d : Invalid sec 2g freq for freq: %d",
req->scan_req.vdev_id, operation_chan_freq);
return QDF_STATUS_E_FAILURE;
}
if (operation_chan_freq > sec_2g_freq) {
req->scan_req.chan_list.chan[0].freq = sec_2g_freq;
req->scan_req.chan_list.chan[1].freq =
operation_chan_freq;
} else {
req->scan_req.chan_list.chan[0].freq =
operation_chan_freq;
req->scan_req.chan_list.chan[1].freq = sec_2g_freq;
}
req->scan_req.chan_list.num_chan = 2;
return QDF_STATUS_SUCCESS;
}
range = wlan_reg_get_bonded_chan_entry(operation_chan_freq,
associated_ch_width, 0);
if (!range) {
@@ -489,7 +514,8 @@ mlme_fill_freq_in_wide_scan_start_request(struct wlan_objmgr_vdev *vdev,
if (!mlme_priv)
return QDF_STATUS_E_FAILURE;
associated_ch_width = mlme_priv->connect_info.ch_width_orig;
associated_ch_width =
mlme_priv->connect_info.chan_info_orig.ch_width_orig;
if (associated_ch_width == CH_WIDTH_INVALID) {
mlme_debug("vdev %d :Invalid associated ch_width",
req->scan_req.vdev_id);
@@ -675,6 +701,22 @@ QDF_STATUS mlme_init_rate_config(struct vdev_mlme_obj *vdev_mlme)
return QDF_STATUS_SUCCESS;
}
QDF_STATUS mlme_init_connect_chan_info_config(struct vdev_mlme_obj *vdev_mlme)
{
struct mlme_legacy_priv *mlme_priv;
mlme_priv = vdev_mlme->ext_vdev_ptr;
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
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;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS mlme_get_peer_mic_len(struct wlan_objmgr_psoc *psoc, uint8_t pdev_id,
uint8_t *peer_mac, uint8_t *mic_len,
uint8_t *mic_hdr_len)

View File

@@ -1401,6 +1401,7 @@ QDF_STATUS vdevmgr_mlme_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme)
return QDF_STATUS_E_NOMEM;
mlme_init_rate_config(vdev_mlme);
mlme_init_connect_chan_info_config(vdev_mlme);
mlme_cm_alloc_roam_stats_info(vdev_mlme);
vdev_mlme->ext_vdev_ptr->connect_info.fils_con_info = NULL;
mlme_init_wait_for_key_timer(vdev_mlme->vdev,