From 33989948e31b984495f324149eb8ef56068545ca Mon Sep 17 00:00:00 2001 From: Amruta Kulkarni Date: Tue, 7 Feb 2023 13:24:48 -0800 Subject: [PATCH] qcacld-3.0: Correct camelcase in roam data structure Componentized code should be adhering to the coding standard. However struct roam_offload_synch_ind has a large number of camelcase members. To fix this replace camel case members with snake_case. Change-Id: If866379d8f01cc0e932ea391d586575de4af9163 CRs-Fixed: 3383579 --- .../core/src/wlan_cm_roam_fw_sync.c | 12 ++--- .../core/src/wlan_cm_roam_offload_event.c | 6 +-- .../inc/wlan_cm_roam_public_struct.h | 45 ++++++++-------- components/wmi/src/wmi_unified_roam_tlv.c | 52 +++++++++---------- core/mac/src/pe/lim/lim_api.c | 36 ++++++------- 5 files changed, 76 insertions(+), 75 deletions(-) diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c index 776b46e14e..12de3a2bba 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c @@ -289,11 +289,11 @@ cm_populate_connect_ies(struct roam_offload_synch_ind *roam_synch_data, connect_ies = &rsp->connect_rsp.connect_ies; /* Beacon/Probe Rsp frame */ - if (roam_synch_data->beaconProbeRespLength) { + if (roam_synch_data->beacon_probe_resp_length) { connect_ies->bcn_probe_rsp.len = - roam_synch_data->beaconProbeRespLength; + roam_synch_data->beacon_probe_resp_length; bcn_probe_rsp_ptr = (uint8_t *)roam_synch_data + - roam_synch_data->beaconProbeRespOffset; + roam_synch_data->beacon_probe_resp_offset; connect_ies->bcn_probe_rsp.ptr = qdf_mem_malloc(connect_ies->bcn_probe_rsp.len); @@ -320,13 +320,13 @@ cm_populate_connect_ies(struct roam_offload_synch_ind *roam_synch_data, } /* ReAssoc Rsp IE data */ - if (roam_synch_data->reassocRespLength > + if (roam_synch_data->reassoc_resp_length > sizeof(struct wlan_frame_hdr)) { connect_ies->assoc_rsp.len = - roam_synch_data->reassocRespLength - + roam_synch_data->reassoc_resp_length - sizeof(struct wlan_frame_hdr); reassoc_rsp_ptr = (uint8_t *)roam_synch_data + - roam_synch_data->reassocRespOffset + + roam_synch_data->reassoc_resp_offset + sizeof(struct wlan_frame_hdr); connect_ies->assoc_rsp.ptr = qdf_mem_malloc(connect_ies->assoc_rsp.len); diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c index 1c5070ccee..8a2d7da49c 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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 @@ -530,7 +530,7 @@ QDF_STATUS cm_roam_sync_event_handler_cb(struct wlan_objmgr_vdev *vdev, mlme_err("LFR3: MLO: Invalid link Beacon Length"); goto err; } - } else if (sync_ind->beaconProbeRespLength > + } else if (sync_ind->beacon_probe_resp_length > (QDF_IEEE80211_3ADDR_HDR_LEN + MAC_B_PR_SSID_OFFSET)) { /* * When STA roams to an MLO AP, non-assoc link might be superior @@ -549,7 +549,7 @@ QDF_STATUS cm_roam_sync_event_handler_cb(struct wlan_objmgr_vdev *vdev, ie_len = MAX_MGMT_MPDU_LEN - (QDF_IEEE80211_3ADDR_HDR_LEN + MAC_B_PR_SSID_OFFSET); else - ie_len = sync_ind->beaconProbeRespLength - + ie_len = sync_ind->beacon_probe_resp_length - (QDF_IEEE80211_3ADDR_HDR_LEN + MAC_B_PR_SSID_OFFSET); } else { diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h index 5a10998886..6a7b63ebbc 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h @@ -359,9 +359,9 @@ struct wlan_chan_list { qdf_freq_t freq_list[CFG_VALID_CHANNEL_LIST_LEN]; }; -/* - * roam_fail_params: different types of params to set or get roam fail states - * for the vdev +/** + * enum roam_fail_params: different types of params to set or get + * roam fail states for the vdev * @ROAM_TRIGGER_REASON: Roam trigger reason(enum WMI_ROAM_TRIGGER_REASON_ID) * @ROAM_INVOKE_FAIL_REASON: One of WMI_ROAM_FAIL_REASON_ID for roam failure * in case of forced roam @@ -483,7 +483,8 @@ struct roam_synch_frame_ind { uint8_t vdev_id; }; -/* struct owe_transition_mode_info - structure containing owe transition mode +/** + * struct owe_transition_mode_info - structure containing owe transition mode * element info * @is_owe_transition_conn: Current connection is in owe transition mode or not * @ssid: ssid @@ -1900,7 +1901,7 @@ enum roam_rt_stats_params { ROAM_RT_STATS_SUSPEND_MODE_ENABLE, }; -/* +/** * struct wlan_roam_mlo_config - Roam MLO config parameters * @vdev_id: VDEV id * @partner_link_addr: Assigned link address which can be used as self @@ -2351,7 +2352,7 @@ struct roam_denylist_timeout { enum dlm_reject_ap_source source; }; -/* +/** * struct roam_denylist_event - Denylist event entries destination structure * @vdev_id: vdev id * @num_entries: total entries sent over the event @@ -2363,7 +2364,7 @@ struct roam_denylist_event { struct roam_denylist_timeout roam_denylist[]; }; -/* +/** * enum cm_vdev_disconnect_reason - Roam disconnect reason * @CM_DISCONNECT_REASON_CSA_SA_QUERY_TIMEOUT: Disconnect due to SA query * timeout after moving to new channel due to CSA in OCV enabled case. @@ -2375,7 +2376,7 @@ enum cm_vdev_disconnect_reason { CM_DISCONNECT_REASON_MOVE_TO_CELLULAR, }; -/* +/** * struct vdev_disconnect_event_data - Roam disconnect event data * @vdev_id: vdev id * @psoc: psoc object @@ -2482,7 +2483,7 @@ struct roam_stats_event { struct roam_event_rt_info roam_event_param; }; -/* +/** * struct auth_offload_event - offload data carried by roam event * @vdev_id: vdev id * @ap_bssid: SAE authentication offload AP MAC Address @@ -2496,7 +2497,7 @@ struct auth_offload_event { uint32_t akm; }; -/* +/** * struct roam_pmkid_req_event - Pmkid event with entries destination structure * @vdev_id: VDEV id * @psoc: psoc object @@ -2725,7 +2726,7 @@ struct cm_hw_mode_trans_ind { /* If link is disabled, during roam sync */ #define CM_ROAM_LINK_FLAG_DISABLE 0x1 -/* +/** * struct ml_setup_link_param - MLO setup link param * @vdev_id: vdev id of the link * @link_id: link id of the link @@ -2741,7 +2742,7 @@ struct ml_setup_link_param { struct qdf_mac_addr link_addr; }; -/* +/** * struct ml_key_material_param - MLO key material param * @link_id: key is for which link, when link_id is 0xf, * means the key is used for all links, like PTK @@ -2759,18 +2760,18 @@ struct ml_key_material_param { }; struct roam_offload_synch_ind { - uint16_t beaconProbeRespOffset; - uint16_t beaconProbeRespLength; - uint16_t reassocRespOffset; - uint16_t reassocRespLength; + uint16_t beacon_probe_resp_offset; + uint16_t beacon_probe_resp_length; + uint16_t reassoc_resp_offset; + uint16_t reassoc_resp_length; uint16_t reassoc_req_offset; uint16_t reassoc_req_length; - uint8_t isBeacon; + uint8_t is_beacon; uint8_t roamed_vdev_id; struct qdf_mac_addr bssid; struct wlan_ssid ssid; struct qdf_mac_addr self_mac; - int8_t txMgmtPower; + int8_t tx_mgmt_power; uint32_t auth_status; uint8_t rssi; uint8_t roam_reason; @@ -2816,11 +2817,11 @@ struct roam_offload_synch_ind { #endif }; -/* +/** * struct roam_scan_candidate_frame Roam candidate scan entry - * vdev_id : vdev id - * frame_len : Length of the beacon/probe rsp frame - * frame : Pointer to the frame + * @vdev_id : vdev id + * @frame_length : Length of the beacon/probe rsp frame + * @frame : Pointer to the frame */ struct roam_scan_candidate_frame { uint8_t vdev_id; diff --git a/components/wmi/src/wmi_unified_roam_tlv.c b/components/wmi/src/wmi_unified_roam_tlv.c index 10ccadb2d7..017b08223d 100644 --- a/components/wmi/src/wmi_unified_roam_tlv.c +++ b/components/wmi/src/wmi_unified_roam_tlv.c @@ -2105,15 +2105,15 @@ wmi_fill_data_synch_frame_event(struct rso_config *rso_cfg, uint8_t *reassoc_req_ptr; /* Beacon/Probe Rsp data */ - roam_sync_ind->beaconProbeRespOffset = + roam_sync_ind->beacon_probe_resp_offset = sizeof(struct roam_offload_synch_ind); bcn_probersp_ptr = (uint8_t *)roam_sync_ind + - roam_sync_ind->beaconProbeRespOffset; - roam_sync_ind->beaconProbeRespLength = + roam_sync_ind->beacon_probe_resp_offset; + roam_sync_ind->beacon_probe_resp_length = rso_cfg->roam_sync_frame_ind.bcn_probe_rsp_len; qdf_mem_copy(bcn_probersp_ptr, rso_cfg->roam_sync_frame_ind.bcn_probe_rsp, - roam_sync_ind->beaconProbeRespLength); + roam_sync_ind->beacon_probe_resp_length); qdf_mem_free(rso_cfg->roam_sync_frame_ind.bcn_probe_rsp); rso_cfg->roam_sync_frame_ind.bcn_probe_rsp = NULL; @@ -2121,7 +2121,7 @@ wmi_fill_data_synch_frame_event(struct rso_config *rso_cfg, if (rso_cfg->roam_sync_frame_ind.link_bcn_probe_rsp) { roam_sync_ind->link_beacon_probe_resp_offset = sizeof(struct roam_offload_synch_ind) + - roam_sync_ind->beaconProbeRespLength; + roam_sync_ind->beacon_probe_resp_length; roam_sync_ind->link_beacon_probe_resp_length = rso_cfg->roam_sync_frame_ind.link_bcn_probe_rsp_len; roam_sync_ind->is_link_beacon = @@ -2136,26 +2136,26 @@ wmi_fill_data_synch_frame_event(struct rso_config *rso_cfg, } /* ReAssoc Rsp data */ - roam_sync_ind->reassocRespOffset = + roam_sync_ind->reassoc_resp_offset = sizeof(struct roam_offload_synch_ind) + - roam_sync_ind->beaconProbeRespLength + + roam_sync_ind->beacon_probe_resp_length + roam_sync_ind->link_beacon_probe_resp_length; - roam_sync_ind->reassocRespLength = + roam_sync_ind->reassoc_resp_length = rso_cfg->roam_sync_frame_ind.reassoc_rsp_len; reassoc_rsp_ptr = (uint8_t *)roam_sync_ind + - roam_sync_ind->reassocRespOffset; + roam_sync_ind->reassoc_resp_offset; qdf_mem_copy(reassoc_rsp_ptr, rso_cfg->roam_sync_frame_ind.reassoc_rsp, - roam_sync_ind->reassocRespLength); + roam_sync_ind->reassoc_resp_length); qdf_mem_free(rso_cfg->roam_sync_frame_ind.reassoc_rsp); rso_cfg->roam_sync_frame_ind.reassoc_rsp = NULL; /* ReAssoc Req data */ roam_sync_ind->reassoc_req_offset = sizeof(struct roam_offload_synch_ind) + - roam_sync_ind->beaconProbeRespLength + + roam_sync_ind->beacon_probe_resp_length + roam_sync_ind->link_beacon_probe_resp_length + - roam_sync_ind->reassocRespLength; + roam_sync_ind->reassoc_resp_length; roam_sync_ind->reassoc_req_length = rso_cfg->roam_sync_frame_ind.reassoc_req_len; reassoc_req_ptr = (uint8_t *)roam_sync_ind + @@ -2192,34 +2192,34 @@ wmi_fill_data_synch_event(struct roam_offload_synch_ind *roam_sync_ind, synch_event = param_buf->fixed_param; /* Beacon/Probe Rsp data */ - roam_sync_ind->beaconProbeRespOffset = + roam_sync_ind->beacon_probe_resp_offset = sizeof(struct roam_offload_synch_ind); bcn_probersp_ptr = (uint8_t *)roam_sync_ind + - roam_sync_ind->beaconProbeRespOffset; - roam_sync_ind->beaconProbeRespLength = + roam_sync_ind->beacon_probe_resp_offset; + roam_sync_ind->beacon_probe_resp_length = synch_event->bcn_probe_rsp_len; qdf_mem_copy(bcn_probersp_ptr, param_buf->bcn_probe_rsp_frame, - roam_sync_ind->beaconProbeRespLength); + roam_sync_ind->beacon_probe_resp_length); /* * Firmware doesn't support link beacon/Probe Rsp data in roam sync * event. It's always sent in sync_frame event */ /* ReAssoc Rsp data */ - roam_sync_ind->reassocRespOffset = + roam_sync_ind->reassoc_resp_offset = sizeof(struct roam_offload_synch_ind) + - roam_sync_ind->beaconProbeRespLength; - roam_sync_ind->reassocRespLength = synch_event->reassoc_rsp_len; + roam_sync_ind->beacon_probe_resp_length; + roam_sync_ind->reassoc_resp_length = synch_event->reassoc_rsp_len; reassoc_rsp_ptr = (uint8_t *)roam_sync_ind + - roam_sync_ind->reassocRespOffset; + roam_sync_ind->reassoc_resp_offset; qdf_mem_copy(reassoc_rsp_ptr, param_buf->reassoc_rsp_frame, - roam_sync_ind->reassocRespLength); + roam_sync_ind->reassoc_resp_length); /* ReAssoc Req data */ roam_sync_ind->reassoc_req_offset = sizeof(struct roam_offload_synch_ind) + - roam_sync_ind->beaconProbeRespLength + - roam_sync_ind->reassocRespLength; + roam_sync_ind->beacon_probe_resp_length + + roam_sync_ind->reassoc_resp_length; roam_sync_ind->reassoc_req_length = synch_event->reassoc_req_len; reassoc_req_ptr = (uint8_t *)roam_sync_ind + roam_sync_ind->reassoc_req_offset; @@ -2324,16 +2324,16 @@ wmi_fill_roam_sync_buffer(wmi_unified_t wmi_handle, roam_sync_ind->auth_status = synch_event->auth_status; roam_sync_ind->roam_reason = synch_event->roam_reason; roam_sync_ind->rssi = synch_event->rssi; - roam_sync_ind->isBeacon = synch_event->is_beacon; + roam_sync_ind->is_beacon = synch_event->is_beacon; WMI_MAC_ADDR_TO_CHAR_ARRAY(&synch_event->bssid, roam_sync_ind->bssid.bytes); - wmi_debug("roamedVdevId %d authStatus %d roamReason %d rssi %d isBeacon %d", + wmi_debug("roamed_vdev_id %d auth_status %d roam_reason %d rssi %d is_beacon %d", roam_sync_ind->roamed_vdev_id, roam_sync_ind->auth_status, roam_sync_ind->roam_reason, roam_sync_ind->rssi, - roam_sync_ind->isBeacon); + roam_sync_ind->is_beacon); cdp_update_roaming_peer_in_vdev(soc, synch_event->vdev_id, roam_sync_ind->bssid.bytes, diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 019cbddd07..38a7988b5f 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -1965,7 +1965,7 @@ lim_roam_gen_mbssid_beacon(struct mac_context *mac, ie_offset = SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET; bcn_prb_ptr = (uint8_t *)roam_ind + - roam_ind->beaconProbeRespOffset; + roam_ind->beacon_probe_resp_offset; rx_param.chan_freq = roam_ind->chan_freq; rx_param.pdev_id = wlan_objmgr_pdev_get_pdev_id(mac->pdev); @@ -1976,7 +1976,7 @@ lim_roam_gen_mbssid_beacon(struct mac_context *mac, rx_param.rssi_ctl[i] = WLAN_INVALID_PER_CHAIN_RSSI; scan_list = util_scan_unpack_beacon_frame(mac->pdev, bcn_prb_ptr, - roam_ind->beaconProbeRespLength, + roam_ind->beacon_probe_resp_length, MGMT_SUBTYPE_BEACON, &rx_param); if (!scan_list) { pe_err("failed to parse"); @@ -2022,7 +2022,7 @@ lim_roam_gen_mbssid_beacon(struct mac_context *mac, goto error; } - if (roam_ind->isBeacon) { + if (roam_ind->is_beacon) { offset = SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET; length = nontx_bcn_prbrsp_len - SIR_MAC_HDR_LEN_3A; if (sir_parse_beacon_ie(mac, parsed_frm, @@ -2030,7 +2030,7 @@ lim_roam_gen_mbssid_beacon(struct mac_context *mac, length) != QDF_STATUS_SUCCESS || !parsed_frm->ssidPresent) { pe_err("Parse error Beacon, length: %d", - roam_ind->beaconProbeRespLength); + roam_ind->beacon_probe_resp_length); status = QDF_STATUS_E_FAILURE; goto error; } @@ -2043,7 +2043,7 @@ lim_roam_gen_mbssid_beacon(struct mac_context *mac, parsed_frm) != QDF_STATUS_SUCCESS || !parsed_frm->ssidPresent) { pe_err("Parse error ProbeResponse, length: %d", - roam_ind->beaconProbeRespLength); + roam_ind->beacon_probe_resp_length); status = QDF_STATUS_E_FAILURE; goto error; } @@ -2100,14 +2100,14 @@ lim_roam_gen_beacon_descr(struct mac_context *mac, sizeof(tSirMacAddr)); } - is_beacon = is_mlo_link ? roam_ind->is_link_beacon : roam_ind->isBeacon; + is_beacon = is_mlo_link ? roam_ind->is_link_beacon : roam_ind->is_beacon; if ((!is_multi_link_roam(roam_ind)) && (qdf_mem_cmp(bssid->bytes, &mac_hdr->bssId, QDF_MAC_ADDR_SIZE) != 0)) { pe_debug("LFR3:MBSSID Beacon/Prb Rsp: %d bssid " QDF_MAC_ADDR_FMT, - roam_ind->isBeacon, + roam_ind->is_beacon, QDF_MAC_ADDR_REF(mac_hdr->bssId)); /* * Its a MBSSID non-tx BSS roaming scenario. @@ -2218,8 +2218,8 @@ lim_roam_fill_bss_descr(struct mac_context *mac, is_mlo_link = true; } else { bcn_proberesp_ptr = (uint8_t *)roam_synch_ind_ptr + - roam_synch_ind_ptr->beaconProbeRespOffset; - bcn_proberesp_len = roam_synch_ind_ptr->beaconProbeRespLength; + roam_synch_ind_ptr->beacon_probe_resp_offset; + bcn_proberesp_len = roam_synch_ind_ptr->beacon_probe_resp_length; } mac_hdr = (tpSirMacMgmtHdr)bcn_proberesp_ptr; @@ -2244,7 +2244,7 @@ lim_roam_fill_bss_descr(struct mac_context *mac, pe_debug("LFR3:Beacon/Prb Rsp: %d bssid " QDF_MAC_ADDR_FMT " beacon " QDF_MAC_ADDR_FMT, is_mlo_link ? roam_synch_ind_ptr->is_link_beacon : - roam_synch_ind_ptr->isBeacon, + roam_synch_ind_ptr->is_beacon, QDF_MAC_ADDR_REF(bssid.bytes), QDF_MAC_ADDR_REF(mac_hdr->bssId)); @@ -2281,7 +2281,7 @@ lim_roam_fill_bss_descr(struct mac_context *mac, bss_desc_ptr->fProbeRsp = !(is_mlo_link ? roam_synch_ind_ptr->is_link_beacon : - roam_synch_ind_ptr->isBeacon); + roam_synch_ind_ptr->is_beacon); bss_desc_ptr->rssi = roam_synch_ind_ptr->rssi; /* Copy Timestamp */ bss_desc_ptr->scansystimensec = qdf_get_monotonic_boottime_ns(); @@ -2589,9 +2589,9 @@ lim_fill_roamed_peer_twt_caps(struct mac_context *mac_ctx, if (!reassoc_rsp) return; - len = roam_synch->reassocRespLength - sizeof(tSirMacMgmtHdr); + len = roam_synch->reassoc_resp_length - sizeof(tSirMacMgmtHdr); reassoc_body = (uint8_t *)roam_synch + sizeof(tSirMacMgmtHdr) + - roam_synch->reassocRespOffset; + roam_synch->reassoc_resp_offset; status = dot11f_unpack_re_assoc_response(mac_ctx, reassoc_body, len, reassoc_rsp, false); @@ -2992,19 +2992,19 @@ pe_roam_synch_callback(struct mac_context *mac_ctx, curr_sta_ds->is_key_installed = true; reassoc_resp = (uint8_t *)roam_sync_ind_ptr + - roam_sync_ind_ptr->reassocRespOffset; + roam_sync_ind_ptr->reassoc_resp_offset; if (wlan_vdev_mlme_get_is_mlo_link(mac_ctx->psoc, vdev_id)) { status = lim_gen_link_specific_assoc_rsp(mac_ctx, ft_session_ptr, reassoc_resp, - roam_sync_ind_ptr->reassocRespLength); + roam_sync_ind_ptr->reassoc_resp_length); if (QDF_IS_STATUS_ERROR(status)) return status; } else lim_process_assoc_rsp_frame(mac_ctx, reassoc_resp, - roam_sync_ind_ptr->reassocRespLength - SIR_MAC_HDR_LEN_3A, + roam_sync_ind_ptr->reassoc_resp_length - SIR_MAC_HDR_LEN_3A, LIM_REASSOC, ft_session_ptr); lim_check_ft_initial_im_association(roam_sync_ind_ptr, ft_session_ptr); @@ -3975,9 +3975,9 @@ lim_gen_link_probe_rsp_roam(struct mac_context *mac_ctx, pe_debug("Firmware sent link beacon also. No need to generate a new one from assoc bcn/prb rsp"); return QDF_STATUS_SUCCESS; } - frame_len = roam_sync_ind->beaconProbeRespLength; + frame_len = roam_sync_ind->beacon_probe_resp_length; frame = (uint8_t *)roam_sync_ind + - roam_sync_ind->beaconProbeRespOffset; + roam_sync_ind->beacon_probe_resp_offset; frame = (uint8_t *)(frame + sizeof(*hdr)); frame_len -= sizeof(*hdr);