qcacld-3.0: STA handle beacon puncture update

1. When handle STA CSA, find only puncture bitmap changed, primary freq and
bandwidth not changed, still continue CSA.

2. When Updated beacon has no eht op info, need look up he/vht op to get
channel info.

Change-Id: Ib5270a1245e0dd9ba095c63f2bea959dd9ddac44
CRs-Fixed: 3499067
Bu işleme şunda yer alıyor:
Jianmin Zhu
2023-05-15 00:01:23 +08:00
işlemeyi yapan: Madan Koyyalamudi
ebeveyn 934aa6c4ee
işleme 8fee440021
3 değiştirilmiş dosya ile 86 ekleme ve 34 silme

Dosyayı Görüntüle

@@ -246,7 +246,7 @@ lim_get_update_eht_bw_puncture_allow(struct pe_session *session,
}
void lim_process_beacon_eht_op(struct pe_session *session,
tDot11fIEeht_op *eht_op)
struct sSirProbeRespBeacon *bcn_ptr)
{
uint16_t ori_punc = 0;
enum phy_ch_width ori_bw = CH_WIDTH_INVALID;
@@ -258,11 +258,19 @@ void lim_process_beacon_eht_op(struct pe_session *session,
struct wlan_objmgr_vdev *vdev;
struct wlan_channel *des_chan;
struct csa_offload_params *csa_param;
uint8_t ccfs0;
uint8_t ccfs1;
tDot11fIEeht_op *eht_op;
tDot11fIEhe_op *he_op;
uint8_t ch_width;
if (!session || !eht_op || !session->mac_ctx || !session->vdev) {
if (!bcn_ptr || !session || !session->mac_ctx || !session->vdev) {
pe_err("invalid input parameters");
return;
}
eht_op = &bcn_ptr->eht_op;
he_op = &bcn_ptr->he_op;
mac_ctx = session->mac_ctx;
vdev = session->vdev;
@@ -295,34 +303,57 @@ void lim_process_beacon_eht_op(struct pe_session *session,
if (eht_op->eht_op_information_present) {
ori_bw = wlan_mlme_convert_eht_op_bw_to_phy_ch_width(
eht_op->channel_width);
status = lim_get_update_eht_bw_puncture_allow(session, ori_bw,
&new_bw,
&update_allow);
if (QDF_IS_STATUS_ERROR(status))
ccfs0 = eht_op->ccfs0;
ccfs1 = eht_op->ccfs1;
} else if (he_op->vht_oper_present) {
ch_width = he_op->vht_oper.info.chan_width;
ori_bw = wlan_mlme_convert_eht_op_bw_to_phy_ch_width(ch_width);
ccfs0 = he_op->vht_oper.info.center_freq_seg0;
ccfs1 = he_op->vht_oper.info.center_freq_seg1;
} else if (he_op->oper_info_6g_present) {
ch_width = he_op->oper_info_6g.info.ch_width;
ori_bw = wlan_mlme_convert_eht_op_bw_to_phy_ch_width(ch_width);
ccfs0 = he_op->oper_info_6g.info.center_freq_seg0;
ccfs1 = he_op->oper_info_6g.info.center_freq_seg1;
} else if (bcn_ptr->VHTOperation.present) {
ch_width = bcn_ptr->VHTOperation.chanWidth;
ori_bw = wlan_mlme_convert_eht_op_bw_to_phy_ch_width(ch_width);
ccfs0 = bcn_ptr->VHTOperation.chan_center_freq_seg0;
ccfs1 = bcn_ptr->VHTOperation.chan_center_freq_seg1;
} else {
pe_err("Invalid operation");
return;
}
status = lim_get_update_eht_bw_puncture_allow(session, ori_bw,
&new_bw,
&update_allow);
if (QDF_IS_STATUS_ERROR(status))
return;
if (update_allow) {
wlan_cm_sta_update_bw_puncture(vdev, session->bssId,
ori_punc, ori_bw,
ccfs0,
ccfs1,
new_bw);
} else {
csa_param = qdf_mem_malloc(sizeof(*csa_param));
if (!csa_param) {
pe_err("csa_param allocation fails");
return;
if (update_allow) {
wlan_cm_sta_update_bw_puncture(vdev, session->bssId,
ori_punc, ori_bw,
eht_op->ccfs0,
eht_op->ccfs1,
new_bw);
} else {
csa_param = qdf_mem_malloc(sizeof(*csa_param));
if (!csa_param) {
pe_err("csa_param allocation fails");
return;
}
des_chan = wlan_vdev_mlme_get_des_chan(vdev);
csa_param->channel = des_chan->ch_ieee;
csa_param->csa_chan_freq = des_chan->ch_freq;
csa_param->new_ch_width = ori_bw;
csa_param->new_punct_bitmap = ori_punc;
csa_param->new_ch_freq_seg1 = eht_op->ccfs0;
csa_param->new_ch_freq_seg2 = eht_op->ccfs1;
qdf_copy_macaddr(&csa_param->bssid,
(struct qdf_mac_addr *)session->bssId);
lim_handle_sta_csa_param(session->mac_ctx, csa_param);
}
des_chan = wlan_vdev_mlme_get_des_chan(vdev);
csa_param->channel = des_chan->ch_ieee;
csa_param->csa_chan_freq = des_chan->ch_freq;
csa_param->new_ch_width = ori_bw;
csa_param->new_punct_bitmap = ori_punc;
csa_param->new_ch_freq_seg1 = ccfs0;
csa_param->new_ch_freq_seg2 = ccfs1;
qdf_copy_macaddr(&csa_param->bssid,
(struct qdf_mac_addr *)session->bssId);
lim_handle_sta_csa_param(session->mac_ctx, csa_param);
}
}
@@ -346,7 +377,7 @@ void lim_process_beacon_eht(struct mac_context *mac_ctx,
if (!des_chan || !IS_WLAN_PHYMODE_EHT(des_chan->ch_phymode))
return;
lim_process_beacon_eht_op(session, &bcn_ptr->eht_op);
lim_process_beacon_eht_op(session, bcn_ptr);
if (mlo_is_mld_sta(vdev))
/* handle beacon IE for 802.11be mlo case */

Dosyayı Görüntüle

@@ -1817,6 +1817,20 @@ static void lim_set_chan_sw_puncture(tLimChannelSwitchInfo *lim_ch_switch,
{
lim_ch_switch->puncture_bitmap = ch_param->reg_punc_bitmap;
}
/**
* lim_is_puncture_same() - Check whether puncture changed
* @lim_ch_switch: pointer to tLimChannelSwitchInfo
* @session: pe session
*
* Return: bool, true: puncture changed
*/
static bool lim_is_puncture_same(tLimChannelSwitchInfo *lim_ch_switch,
struct pe_session *session)
{
return lim_ch_switch->puncture_bitmap == session->puncture_bitmap;
}
#else
static void lim_set_csa_chan_param_11be(struct pe_session *session,
struct csa_offload_params *csa_param,
@@ -1828,6 +1842,12 @@ static void lim_set_chan_sw_puncture(tLimChannelSwitchInfo *lim_ch_switch,
struct ch_params *ch_param)
{
}
static bool lim_is_puncture_same(tLimChannelSwitchInfo *lim_ch_switch,
struct pe_session *session)
{
return true;
}
#endif
void lim_handle_sta_csa_param(struct mac_context *mac_ctx,
@@ -2129,8 +2149,9 @@ void lim_handle_sta_csa_param(struct mac_context *mac_ctx,
lim_ch_switch->sec_ch_offset);
if (session_entry->curr_op_freq == csa_params->csa_chan_freq &&
session_entry->ch_width == lim_ch_switch->ch_width) {
pe_debug("Ignore CSA, no change in ch and bw");
session_entry->ch_width == lim_ch_switch->ch_width &&
lim_is_puncture_same(lim_ch_switch, session_entry)) {
pe_debug("Ignore CSA, no change in ch, bw and puncture");
goto err;
}

Dosyayı Görüntüle

@@ -454,12 +454,12 @@ void lim_process_beacon_eht(struct mac_context *mac_ctx,
/**
* lim_process_beacon_eht_op() - process beacon 11be eht op IE
* @session: pe session
* @eht_op: pointer to eht op IE
* @bcn_ptr: pointer to bcn ptr
*
* Return none
*/
void lim_process_beacon_eht_op(struct pe_session *session,
tDot11fIEeht_op *eht_op);
struct sSirProbeRespBeacon *bcn_ptr);
#else
static inline
void lim_process_beacon_eht(struct mac_context *mac_ctx,
@@ -470,7 +470,7 @@ void lim_process_beacon_eht(struct mac_context *mac_ctx,
static inline
void lim_process_beacon_eht_op(struct pe_session *session,
tDot11fIEeht_op *eht_op)
struct sSirProbeRespBeacon *bcn_ptr)
{
}
#endif