qcacld-3.0: Support roam sync indication in CM

Add change to support roam synch indication
in connection manager.

Change-Id: I06b23ae085a5a86caf4fe04fe5929b86d8d5c543
CRs-Fixed: 2901858
这个提交包含在:
Amruta Kulkarni
2021-03-17 11:29:17 -07:00
提交者 snandini
父节点 1195e8d28a
当前提交 15ac4a4e5a
修改 29 个文件,包含 1307 行新增241 行删除

查看文件

@@ -1104,16 +1104,6 @@ struct policy_mgr_hw_mode_params {
enum policy_mgr_conc_next_action action_type; enum policy_mgr_conc_next_action action_type;
}; };
/**
* struct policy_mgr_vdev_mac_map - vdev id-mac id map
* @vdev_id: VDEV id
* @mac_id: MAC id
*/
struct policy_mgr_vdev_mac_map {
uint32_t vdev_id;
uint32_t mac_id;
};
/** /**
* struct policy_mgr_dual_mac_config - Dual MAC configuration * struct policy_mgr_dual_mac_config - Dual MAC configuration
* @scan_config: Scan configuration * @scan_config: Scan configuration

查看文件

@@ -94,6 +94,25 @@ target_if_cm_roam_send_roam_invoke_cmd(struct wlan_objmgr_vdev *vdev,
return wmi_unified_roam_invoke_cmd(wmi_handle, req); return wmi_unified_roam_invoke_cmd(wmi_handle, req);
} }
/**
* target_if_cm_roam_send_roam_sync_complete - Send roam sync complete to wmi.
* @vdev: VDEV object pointer
*
* Return: QDF_STATUS
*/
static QDF_STATUS
target_if_cm_roam_send_roam_sync_complete(struct wlan_objmgr_vdev *vdev)
{
wmi_unified_t wmi_handle;
wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev);
if (!wmi_handle)
return QDF_STATUS_E_FAILURE;
return wmi_unified_roam_synch_complete_cmd(wmi_handle,
wlan_vdev_get_id(vdev));
}
#endif #endif
static void static void
@@ -102,6 +121,7 @@ target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
tx_ops->send_vdev_set_pcl_cmd = target_if_cm_roam_send_vdev_set_pcl_cmd; tx_ops->send_vdev_set_pcl_cmd = target_if_cm_roam_send_vdev_set_pcl_cmd;
#ifdef FEATURE_CM_ENABLE #ifdef FEATURE_CM_ENABLE
tx_ops->send_roam_invoke_cmd = target_if_cm_roam_send_roam_invoke_cmd; tx_ops->send_roam_invoke_cmd = target_if_cm_roam_send_roam_invoke_cmd;
tx_ops->send_roam_sync_complete_cmd = target_if_cm_roam_send_roam_sync_complete;
#endif #endif
} }
#else #else

查看文件

@@ -26,16 +26,745 @@
#include "wlan_objmgr_pdev_obj.h" #include "wlan_objmgr_pdev_obj.h"
#include "wlan_objmgr_vdev_obj.h" #include "wlan_objmgr_vdev_obj.h"
#include "wlan_cm_roam_i.h" #include "wlan_cm_roam_i.h"
#include "wlan_blm_api.h"
#include "wlan_cm_roam_public_struct.h"
#include "wlan_utility.h"
#include "wlan_scan_api.h"
#include "wlan_crypto_global_api.h"
#include "wlan_cm_tgt_if_tx_api.h"
#include "wlan_cm_vdev_api.h"
#include "wlan_p2p_api.h"
#include "wlan_tdls_api.h"
#include "wlan_mlme_vdev_mgr_interface.h"
#include "wlan_pkt_capture_ucfg_api.h"
#include "cds_utils.h"
#ifdef FEATURE_CM_ENABLE #ifdef FEATURE_CM_ENABLE
QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id) #include "connection_mgr/core/src/wlan_cm_roam.h"
#include "connection_mgr/core/src/wlan_cm_main.h"
#include "connection_mgr/core/src/wlan_cm_sm.h"
QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint8_t *event, uint32_t event_data_len)
{ {
return QDF_STATUS_SUCCESS; QDF_STATUS status;
struct wlan_objmgr_vdev *vdev;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_MLME_SB_ID);
if (!vdev) {
mlme_err("vdev object is NULL");
return QDF_STATUS_E_NULL_VALUE;
}
status = cm_sm_deliver_event(vdev, WLAN_CM_SM_EV_ROAM_SYNC,
event_data_len, event);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_err("EV ROAM SYNC REQ not handled");
cm_fw_roam_abort_req(psoc, vdev_id);
cm_roam_stop_req(psoc, vdev_id, REASON_ROAM_SYNCH_FAILED);
}
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_SB_ID);
return status;
} }
QDF_STATUS QDF_STATUS
cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id) cm_fw_send_vdev_roam_event(struct cnx_mgr *cm_ctx, uint16_t data_len,
void *data)
{
QDF_STATUS status;
wlan_cm_id cm_id;
struct wlan_objmgr_psoc *psoc;
struct cm_roam_req *roam_req = NULL;
roam_req = cm_get_first_roam_command(cm_ctx->vdev);
if (!roam_req) {
mlme_err("Failed to find roam req from list");
cm_id = CM_ID_INVALID;
status = QDF_STATUS_E_FAILURE;
goto error;
}
cm_id = roam_req->cm_id;
psoc = wlan_vdev_get_psoc(cm_ctx->vdev);
if (!psoc) {
mlme_err(CM_PREFIX_FMT "Failed to find psoc",
CM_PREFIX_REF(roam_req->req.vdev_id,
roam_req->cm_id));
status = QDF_STATUS_E_FAILURE;
goto error;
}
status = wlan_vdev_mlme_sm_deliver_evt(cm_ctx->vdev,
WLAN_VDEV_SM_EV_ROAM,
data_len,
data);
if (QDF_IS_STATUS_ERROR(status))
cm_roam_stop_req(psoc, roam_req->req.vdev_id,
REASON_ROAM_SYNCH_FAILED);
error:
if (QDF_IS_STATUS_ERROR(status))
cm_abort_fw_roam(cm_ctx, cm_id);
return status;
}
QDF_STATUS
cm_fw_roam_sync_start_ind(struct wlan_objmgr_vdev *vdev,
struct roam_offload_synch_ind *roam_synch_data)
{
QDF_STATUS status;
struct wlan_objmgr_pdev *pdev;
struct qdf_mac_addr connected_bssid;
uint8_t vdev_id;
pdev = wlan_vdev_get_pdev(vdev);
vdev_id = wlan_vdev_get_id(vdev);
/*
* Get old bssid as, new AP is not updated yet and do cleanup
* for old bssid.
*/
wlan_mlme_get_bssid_vdev_id(pdev, vdev_id,
&connected_bssid);
/* Update the BLM that the previous profile has disconnected */
wlan_blm_update_bssid_connect_params(pdev,
connected_bssid,
BLM_AP_DISCONNECTED);
if (IS_ROAM_REASON_STA_KICKOUT(roam_synch_data->roam_reason)) {
struct reject_ap_info ap_info;
ap_info.bssid = connected_bssid;
ap_info.reject_ap_type = DRIVER_AVOID_TYPE;
ap_info.reject_reason = REASON_STA_KICKOUT;
ap_info.source = ADDED_BY_DRIVER;
wlan_blm_add_bssid_to_reject_list(pdev, &ap_info);
}
cm_update_scan_mlme_on_roam(vdev, &connected_bssid,
SCAN_ENTRY_CON_STATE_NONE);
status = wlan_cm_roam_state_change(pdev, vdev_id,
WLAN_ROAM_SYNCH_IN_PROG,
REASON_ROAM_HANDOFF_DONE);
mlme_cm_osif_roam_sync_ind(vdev);
return status;
}
void
cm_update_scan_mlme_on_roam(struct wlan_objmgr_vdev *vdev,
struct qdf_mac_addr *connected_bssid,
enum scan_entry_connection_state state)
{
struct wlan_objmgr_pdev *pdev;
struct bss_info bss_info;
struct mlme_info mlme;
struct wlan_channel *chan;
QDF_STATUS status;
pdev = wlan_vdev_get_pdev(vdev);
if (!pdev) {
mlme_err("failed to find pdev");
return;
}
chan = wlan_vdev_get_active_channel(vdev);
if (!chan) {
mlme_err("failed to get active channel");
return;
}
status = wlan_vdev_mlme_get_ssid(vdev, bss_info.ssid.ssid,
&bss_info.ssid.length);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_err("failed to get ssid");
return;
}
mlme.assoc_state = state;
qdf_copy_macaddr(&bss_info.bssid, connected_bssid);
bss_info.freq = chan->ch_freq;
wlan_scan_update_mlme_by_bssinfo(pdev, &bss_info, &mlme);
}
#ifdef WLAN_FEATURE_FILS_SK
static QDF_STATUS
cm_fill_fils_ie(struct wlan_connect_rsp_ies *connect_ies,
struct roam_offload_synch_ind *roam_synch_data)
{
struct fils_connect_rsp_params *fils_ie;
if (!roam_synch_data->hlp_data_len)
return QDF_STATUS_SUCCESS;
connect_ies->fils_ie = qdf_mem_malloc(sizeof(*fils_ie));
if (!connect_ies->fils_ie)
return QDF_STATUS_E_NOMEM;
fils_ie = connect_ies->fils_ie;
cds_copy_hlp_info(&roam_synch_data->dst_mac,
&roam_synch_data->src_mac,
roam_synch_data->hlp_data_len,
roam_synch_data->hlp_data,
&fils_ie->dst_mac,
&fils_ie->src_mac,
&fils_ie->hlp_data_len,
fils_ie->hlp_data);
fils_ie->fils_seq_num = roam_synch_data->next_erp_seq_num;
return QDF_STATUS_SUCCESS;
}
#else
static inline QDF_STATUS
cm_fill_fils_ie(struct wlan_connect_rsp_ies *connect_ies,
struct roam_offload_synch_ind *roam_synch_data)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#endif #endif
static QDF_STATUS
cm_populate_connect_ies(struct roam_offload_synch_ind *roam_synch_data,
struct cm_vdev_join_rsp *rsp)
{
struct wlan_connect_rsp_ies *connect_ies;
uint8_t *bcn_probe_rsp_ptr;
uint8_t *reassoc_rsp_ptr;
uint8_t *reassoc_req_ptr;
connect_ies = &rsp->connect_rsp.connect_ies;
/* Beacon/Probe Rsp frame */
if (roam_synch_data->beaconProbeRespLength) {
connect_ies->bcn_probe_rsp.len =
roam_synch_data->beaconProbeRespLength;
bcn_probe_rsp_ptr = (uint8_t *)roam_synch_data +
roam_synch_data->beaconProbeRespOffset;
connect_ies->bcn_probe_rsp.ptr =
qdf_mem_malloc(connect_ies->bcn_probe_rsp.len);
if (!connect_ies->bcn_probe_rsp.ptr)
return QDF_STATUS_E_NOMEM;
qdf_mem_copy(connect_ies->bcn_probe_rsp.ptr, bcn_probe_rsp_ptr,
connect_ies->bcn_probe_rsp.len);
}
/* ReAssoc Rsp IE data */
if (roam_synch_data->reassocRespLength >
sizeof(struct wlan_frame_hdr)) {
connect_ies->assoc_rsp.len =
roam_synch_data->reassocRespLength -
sizeof(struct wlan_frame_hdr);
reassoc_rsp_ptr = (uint8_t *)roam_synch_data +
roam_synch_data->reassocRespOffset +
sizeof(struct wlan_frame_hdr);
connect_ies->assoc_rsp.ptr =
qdf_mem_malloc(connect_ies->assoc_rsp.len);
if (!connect_ies->assoc_rsp.ptr)
return QDF_STATUS_E_NOMEM;
qdf_mem_copy(connect_ies->assoc_rsp.ptr, reassoc_rsp_ptr,
connect_ies->assoc_rsp.len);
}
/* ReAssoc Req IE data */
if (roam_synch_data->reassoc_req_length >
sizeof(struct wlan_frame_hdr)) {
connect_ies->assoc_req.len =
roam_synch_data->reassoc_req_length -
sizeof(struct wlan_frame_hdr);
reassoc_req_ptr = (uint8_t *)roam_synch_data +
roam_synch_data->reassoc_req_offset +
sizeof(struct wlan_frame_hdr);
connect_ies->assoc_req.ptr =
qdf_mem_malloc(connect_ies->assoc_req.len);
if (!connect_ies->assoc_req.ptr)
return QDF_STATUS_E_NOMEM;
qdf_mem_copy(connect_ies->assoc_req.ptr, reassoc_req_ptr,
connect_ies->assoc_req.len);
}
rsp->connect_rsp.is_ft = roam_synch_data->is_ft_im_roam;
cm_fill_fils_ie(connect_ies, roam_synch_data);
return QDF_STATUS_SUCCESS;
}
#ifdef FEATURE_WLAN_ESE
static QDF_STATUS
cm_copy_tspec_ie(struct cm_vdev_join_rsp *rsp,
struct roam_offload_synch_ind *roam_synch_data)
{
if (roam_synch_data->tspec_len) {
rsp->tspec_ie.len = roam_synch_data->tspec_len;
rsp->tspec_ie.ptr =
qdf_mem_malloc(rsp->tspec_ie.len);
if (!rsp->tspec_ie.ptr)
return QDF_STATUS_E_NOMEM;
qdf_mem_copy(rsp->tspec_ie.ptr,
roam_synch_data->ric_tspec_data +
roam_synch_data->ric_data_len,
rsp->tspec_ie.len);
}
return QDF_STATUS_SUCCESS;
}
#else
static inline QDF_STATUS
cm_copy_tspec_ie(struct cm_vdev_join_rsp *rsp,
struct roam_offload_synch_ind *roam_synch_data)
{
return QDF_STATUS_SUCCESS;
}
#endif
static QDF_STATUS
cm_fill_roam_info(struct roam_offload_synch_ind *roam_synch_data,
struct cm_vdev_join_rsp *rsp, wlan_cm_id cm_id)
{
struct wlan_roam_sync_info *roaming_info;
QDF_STATUS status = QDF_STATUS_SUCCESS;
rsp->connect_rsp.roaming_info = qdf_mem_malloc(sizeof(*roaming_info));
if (!rsp->connect_rsp.roaming_info)
return QDF_STATUS_E_NOMEM;
rsp->connect_rsp.vdev_id = roam_synch_data->roamed_vdev_id;
qdf_copy_macaddr(&rsp->connect_rsp.bssid, &roam_synch_data->bssid);
rsp->connect_rsp.is_reassoc = true;
rsp->connect_rsp.connect_status = QDF_STATUS_SUCCESS;
rsp->connect_rsp.cm_id = cm_id;
rsp->connect_rsp.freq = roam_synch_data->chan_freq;
rsp->nss = roam_synch_data->nss;
if (roam_synch_data->ric_data_len) {
rsp->ric_resp_ie.len = roam_synch_data->ric_data_len;
rsp->ric_resp_ie.ptr =
qdf_mem_malloc(rsp->ric_resp_ie.len);
if (!rsp->ric_resp_ie.ptr)
return QDF_STATUS_E_NOMEM;
qdf_mem_copy(rsp->ric_resp_ie.ptr,
roam_synch_data->ric_tspec_data,
rsp->ric_resp_ie.len);
}
cm_copy_tspec_ie(rsp, roam_synch_data);
status = cm_populate_connect_ies(roam_synch_data, rsp);
if (QDF_IS_STATUS_ERROR(status))
return status;
roaming_info = rsp->connect_rsp.roaming_info;
roaming_info->auth_status = roam_synch_data->auth_status;
roaming_info->kck_len = roam_synch_data->kck_len;
if (roaming_info->kck_len)
qdf_mem_copy(roaming_info->kck, roam_synch_data->kck,
roam_synch_data->kck_len);
roaming_info->kek_len = roam_synch_data->kek_len;
if (roaming_info->kek_len)
qdf_mem_copy(roaming_info->kek, roam_synch_data->kek,
roam_synch_data->kek_len);
qdf_mem_copy(roaming_info->replay_ctr, roam_synch_data->replay_ctr,
REPLAY_CTR_LEN);
roaming_info->roam_reason =
roam_synch_data->roam_reason & ROAM_REASON_MASK;
roaming_info->subnet_change_status =
CM_GET_SUBNET_STATUS(roaming_info->roam_reason);
roaming_info->pmk_len = roam_synch_data->pmk_len;
if (roaming_info->pmk_len)
qdf_mem_copy(roaming_info->pmk, roam_synch_data->pmk,
roaming_info->pmk_len);
qdf_mem_copy(roaming_info->pmkid, roam_synch_data->pmkid,
PMKID_LEN);
roaming_info->update_erp_next_seq_num =
roam_synch_data->update_erp_next_seq_num;
roaming_info->next_erp_seq_num = roam_synch_data->next_erp_seq_num;
return status;
}
static QDF_STATUS cm_process_roam_keys(struct wlan_objmgr_vdev *vdev,
struct cm_vdev_join_rsp *rsp,
wlan_cm_id cm_id)
{
struct wlan_objmgr_psoc *psoc;
struct wlan_objmgr_pdev *pdev;
struct wlan_roam_sync_info *roaming_info;
uint8_t vdev_id = wlan_vdev_get_id(vdev);
struct cm_roam_values_copy config;
uint8_t mdie_present;
struct wlan_mlme_psoc_ext_obj *mlme_obj;
QDF_STATUS status = QDF_STATUS_SUCCESS;
int32_t akm;
pdev = wlan_vdev_get_pdev(vdev);
if (!pdev) {
mlme_err(CM_PREFIX_FMT "Failed to find pdev",
CM_PREFIX_REF(vdev_id, cm_id));
status = QDF_STATUS_E_FAILURE;
goto end;
}
psoc = wlan_pdev_get_psoc(pdev);
if (!psoc) {
mlme_err(CM_PREFIX_FMT "Failed to find psoc",
CM_PREFIX_REF(vdev_id, cm_id));
status = QDF_STATUS_E_FAILURE;
goto end;
}
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj) {
mlme_err(CM_PREFIX_FMT "Failed to mlme psoc obj",
CM_PREFIX_REF(vdev_id, cm_id));
status = QDF_STATUS_E_FAILURE;
goto end;
}
roaming_info = rsp->connect_rsp.roaming_info;
akm = wlan_crypto_get_param(vdev,
WLAN_CRYPTO_PARAM_KEY_MGMT);
/*
* Encryption keys for new connection are obtained as follows:
* auth_status = CSR_ROAM_AUTH_STATUS_AUTHENTICATED
* Open - No keys required.
* Static WEP - Firmware copies keys from old AP to new AP.
* Fast roaming authentications e.g. PSK, FT, CCKM - firmware
* supplicant obtains them through 4-way handshake.
*
* auth_status = CSR_ROAM_AUTH_STATUS_CONNECTED
* All other authentications - Host supplicant performs EAPOL
* with AP after this point and sends new keys to the driver.
* Driver starts wait_for_key timer for that purpose.
* Allow cm_lookup_pmkid_using_bssid() if akm is SAE/OWE since
* SAE/OWE roaming uses hybrid model and eapol is offloaded to
* supplicant unlike in WPA2 802.1x case, after 8 way handshake
* the __wlan_hdd_cfg80211_keymgmt_set_key ->sme_roam_set_psk_pmk()
* will get called after roam synch complete to update the
* session->psk_pmk, but in SAE/OWE roaming this sequence is not
* present and set_pmksa will come before roam synch indication &
* eapol. So the session->psk_pmk will be stale in PMKSA cached
* SAE/OWE roaming case.
*/
if (roaming_info->auth_status == ROAM_AUTH_STATUS_AUTHENTICATED ||
QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE) ||
QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_OWE)) {
struct wlan_crypto_pmksa *pmkid_cache;
cm_csr_set_ss_none(vdev_id);
/*
* If authStatus is AUTHENTICATED, then we have done successful
* 4 way handshake in FW using the cached PMKID.
* However, the session->psk_pmk has the PMK of the older AP
* as set_key is not received from supplicant.
* When any RSO command is sent for the current AP, the older
* AP's PMK is sent to the FW which leads to incorrect PMK and
* leads to 4 way handshake failure when roaming happens to
* this AP again.
* Check if a PMK cache exists for the roamed AP and update
* it into the session pmk.
*/
pmkid_cache = qdf_mem_malloc(sizeof(*pmkid_cache));
if (!pmkid_cache) {
status = QDF_STATUS_E_NOMEM;
mlme_err(CM_PREFIX_FMT "Mem alloc failed",
CM_PREFIX_REF(vdev_id, cm_id));
goto end;
}
wlan_vdev_get_bss_peer_mac(vdev, &pmkid_cache->bssid);
mlme_debug(CM_PREFIX_FMT "Trying to find PMKID for "
QDF_MAC_ADDR_FMT " AKM Type:%d",
CM_PREFIX_REF(vdev_id, cm_id),
QDF_MAC_ADDR_REF(pmkid_cache->bssid.bytes), akm);
wlan_cm_roam_cfg_get_value(psoc, vdev_id,
MOBILITY_DOMAIN, &config);
mdie_present = config.bool_value;
if (cm_lookup_pmkid_using_bssid(psoc,
vdev_id,
pmkid_cache)) {
wlan_cm_set_psk_pmk(pdev, vdev_id,
pmkid_cache->pmk,
pmkid_cache->pmk_len);
mlme_debug(CM_PREFIX_FMT "pmkid found for "
QDF_MAC_ADDR_FMT " len %d",
CM_PREFIX_REF(vdev_id, cm_id),
QDF_MAC_ADDR_REF(pmkid_cache->bssid.bytes),
pmkid_cache->pmk_len);
} else {
mlme_debug(CM_PREFIX_FMT "PMKID Not found in cache for "
QDF_MAC_ADDR_FMT,
CM_PREFIX_REF(vdev_id, cm_id),
QDF_MAC_ADDR_REF(pmkid_cache->bssid.bytes));
/*
* In FT roam when the CSR lookup fails then the PMK
* details from the roam sync indication will be
* updated to Session/PMK cache. This will result in
* having multiple PMK cache entries for the same MDID,
* So do not add the PMKSA cache entry in all the
* FT-Roam cases.
*/
if (!cm_is_auth_type_11r(mlme_obj, vdev,
mdie_present) &&
roaming_info->pmk_len) {
qdf_mem_zero(pmkid_cache, sizeof(*pmkid_cache));
wlan_cm_set_psk_pmk(pdev, vdev_id,
roaming_info->pmk,
roaming_info->pmk_len);
wlan_vdev_get_bss_peer_mac(vdev,
&pmkid_cache->bssid);
qdf_mem_copy(pmkid_cache->pmkid,
roaming_info->pmkid, PMKID_LEN);
qdf_mem_copy(pmkid_cache->pmk,
roaming_info->pmk,
roaming_info->pmk_len);
pmkid_cache->pmk_len = roaming_info->pmk_len;
wlan_crypto_set_del_pmksa(vdev, pmkid_cache,
true);
}
}
qdf_mem_zero(pmkid_cache, sizeof(*pmkid_cache));
qdf_mem_free(pmkid_cache);
} else {
cm_update_wait_for_key_timer(vdev, vdev_id,
WAIT_FOR_KEY_TIMEOUT_PERIOD);
}
end:
return status;
}
static void
cm_update_scan_db_on_roam_success(struct wlan_objmgr_vdev *vdev,
struct wlan_cm_connect_resp *resp,
struct roam_offload_synch_ind *roam_synch_data,
wlan_cm_id cm_id)
{
struct cnx_mgr *cm_ctx;
cm_ctx = cm_get_cm_ctx(vdev);
if (!cm_ctx)
return;
cm_inform_bcn_probe(cm_ctx,
resp->connect_ies.bcn_probe_rsp.ptr,
resp->connect_ies.bcn_probe_rsp.len,
resp->freq,
roam_synch_data->rssi,
cm_id);
cm_update_scan_mlme_on_roam(vdev, &resp->bssid,
SCAN_ENTRY_CON_STATE_ASSOC);
}
QDF_STATUS
cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
struct roam_offload_synch_ind *roam_synch_data)
{
QDF_STATUS status;
struct wlan_objmgr_vdev *vdev;
struct cnx_mgr *cm_ctx;
struct cm_roam_req *roam_req = NULL;
struct cm_vdev_join_rsp *rsp = NULL;
wlan_cm_id cm_id;
struct wlan_objmgr_pdev *pdev;
struct wlan_cm_connect_resp *connect_rsp;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_MLME_SB_ID);
if (!vdev) {
mlme_err("vdev object is NULL");
return QDF_STATUS_E_NULL_VALUE;
}
pdev = wlan_vdev_get_pdev(vdev);
if (!pdev) {
status = QDF_STATUS_E_FAILURE;
goto rel_ref;
}
cm_ctx = cm_get_cm_ctx(vdev);
if (!cm_ctx) {
status = QDF_STATUS_E_FAILURE;
goto rel_ref;
}
roam_req = cm_get_first_roam_command(vdev);
if (!roam_req) {
mlme_err("Failed to find roam req from list");
cm_id = CM_ID_INVALID;
status = QDF_STATUS_E_FAILURE;
goto error;
}
cm_id = roam_req->cm_id;
rsp = qdf_mem_malloc(sizeof(struct cm_vdev_join_rsp));
if (!rsp) {
status = QDF_STATUS_E_NOMEM;
goto error;
}
status = cm_fill_roam_info(roam_synch_data, rsp, cm_id);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_err(CM_PREFIX_FMT " fail to prepare rsp",
CM_PREFIX_REF(vdev_id, cm_id));
goto error;
}
connect_rsp = &rsp->connect_rsp;
cm_update_scan_db_on_roam_success(vdev, connect_rsp,
roam_synch_data, cm_id);
cm_csr_roam_sync_rsp(vdev, rsp);
cm_process_roam_keys(vdev, rsp, cm_id);
mlme_cm_osif_connect_complete(vdev, connect_rsp);
cm_if_mgr_inform_connect_complete(cm_ctx->vdev,
connect_rsp->connect_status);
cm_inform_blm_connect_complete(cm_ctx->vdev, connect_rsp);
cm_connect_info(vdev, true, &connect_rsp->bssid, &connect_rsp->ssid,
connect_rsp->freq);
wlan_tdls_notify_sta_connect(vdev_id,
mlme_get_tdls_chan_switch_prohibited(vdev),
mlme_get_tdls_prohibited(vdev), vdev);
wlan_p2p_status_connect(vdev);
if (!cm_csr_is_ss_wait_for_key(vdev_id)) {
mlme_debug(CM_PREFIX_FMT "WLAN link up with AP = "
QDF_MAC_ADDR_FMT,
CM_PREFIX_REF(vdev_id, cm_id),
QDF_MAC_ADDR_REF(connect_rsp->bssid.bytes));
cm_roam_start_init_on_connect(pdev, vdev_id);
}
wlan_cm_tgt_send_roam_sync_complete_cmd(psoc, vdev_id);
status = cm_sm_deliver_event_sync(cm_ctx, WLAN_CM_SM_EV_ROAM_DONE,
sizeof(*roam_synch_data),
roam_synch_data);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_err(CM_PREFIX_FMT " fail to post WLAN_CM_SM_EV_ROAM_DONE",
CM_PREFIX_REF(vdev_id, cm_id));
goto error;
}
mlme_cm_osif_roam_complete(vdev);
mlme_debug(CM_PREFIX_FMT, CM_PREFIX_REF(vdev_id, cm_id));
cm_remove_cmd(cm_ctx, &cm_id);
status = QDF_STATUS_SUCCESS;
error:
if (rsp)
wlan_cm_free_connect_rsp(rsp);
if (QDF_IS_STATUS_ERROR(status)) {
cm_roam_stop_req(psoc, vdev_id, REASON_ROAM_SYNCH_FAILED);
cm_abort_fw_roam(cm_ctx, cm_id);
}
rel_ref:
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_SB_ID);
return status;
}
QDF_STATUS cm_fw_roam_complete(struct cnx_mgr *cm_ctx, void *data)
{
struct roam_offload_synch_ind *roam_synch_data;
struct wlan_objmgr_pdev *pdev;
struct wlan_objmgr_psoc *psoc;
QDF_STATUS status = QDF_STATUS_SUCCESS;
uint8_t vdev_id;
roam_synch_data = (struct roam_offload_synch_ind *)data;
vdev_id = wlan_vdev_get_id(cm_ctx->vdev);
pdev = wlan_vdev_get_pdev(cm_ctx->vdev);
if (!pdev) {
mlme_err("Failed to find pdev");
status = QDF_STATUS_E_FAILURE;
goto end;
}
psoc = wlan_pdev_get_psoc(pdev);
if (!pdev) {
mlme_err("Failed to find psoc");
status = QDF_STATUS_E_FAILURE;
goto end;
}
/* Handle one race condition that if candidate is already
*selected & FW has gone ahead with roaming or about to go
* ahead when set_band comes, it will be complicated for FW
* to stop the current roaming. Instead, host will check the
* roam sync to make sure the new AP is not on disable freq
* or disconnect the AP.
*/
if (wlan_reg_is_disable_for_freq(pdev, roam_synch_data->chan_freq)) {
cm_disconnect(psoc, vdev_id, CM_ROAM_DISCONNECT,
REASON_OPER_CHANNEL_BAND_CHANGE, NULL);
status = QDF_STATUS_E_FAILURE;
goto end;
}
/*
* Following operations need to be done once roam sync
* completion is sent to FW, hence called here:
* 1) Firmware has already updated DBS policy. Update connection
* table in the host driver.
* 2) Force SCC switch if needed
*/
/* first update connection info from wma interface */
policy_mgr_update_connection_info(psoc, vdev_id);
/* then update remaining parameters from roam sync ctx */
policy_mgr_hw_mode_transition_cb(
roam_synch_data->hw_mode_trans_ind.old_hw_mode_index,
roam_synch_data->hw_mode_trans_ind.new_hw_mode_index,
roam_synch_data->hw_mode_trans_ind.num_vdev_mac_entries,
roam_synch_data->hw_mode_trans_ind.vdev_mac_map,
psoc);
cm_check_and_set_sae_single_pmk_cap(psoc, vdev_id);
if (ucfg_pkt_capture_get_pktcap_mode(psoc))
ucfg_pkt_capture_record_channel(cm_ctx->vdev);
if (WLAN_REG_IS_5GHZ_CH_FREQ(roam_synch_data->chan_freq)) {
wlan_cm_set_disable_hi_rssi(pdev,
vdev_id, true);
mlme_debug("Disabling HI_RSSI, AP freq=%d rssi %d",
roam_synch_data->chan_freq, roam_synch_data->rssi);
} else {
wlan_cm_set_disable_hi_rssi(pdev,
vdev_id, false);
}
if (roam_synch_data->auth_status == ROAM_AUTH_STATUS_AUTHENTICATED)
wlan_cm_roam_state_change(pdev, vdev_id,
WLAN_ROAM_RSO_ENABLED,
REASON_CONNECT);
else
/*
* STA is just in associated state here, RSO
* enable will be sent once EAP & EAPOL will be done by
* user-space and after set key response
* is received.
*/
wlan_cm_roam_state_change(pdev, vdev_id,
WLAN_ROAM_INIT,
REASON_CONNECT);
end:
return status;
}
#endif // FEATURE_CM_ENABLE

查看文件

@@ -25,13 +25,13 @@
#ifndef _WLAN_CM_ROAM_I_H_ #ifndef _WLAN_CM_ROAM_I_H_
#define _WLAN_CM_ROAM_I_H_ #define _WLAN_CM_ROAM_I_H_
#ifdef FEATURE_CM_ENABLE
#include "qdf_types.h" #include "qdf_types.h"
#include "wlan_objmgr_psoc_obj.h" #include "wlan_objmgr_psoc_obj.h"
#include "wlan_objmgr_pdev_obj.h" #include "wlan_objmgr_pdev_obj.h"
#include "wlan_objmgr_vdev_obj.h" #include "wlan_objmgr_vdev_obj.h"
#include "connection_mgr/core/src/wlan_cm_main.h" #include "connection_mgr/core/src/wlan_cm_main.h"
#include "wlan_cm_roam_public_struct.h"
#ifdef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
/** /**
* cm_add_fw_roam_dummy_ser_cb() - Add dummy blocking command * cm_add_fw_roam_dummy_ser_cb() - Add dummy blocking command
@@ -71,22 +71,66 @@ QDF_STATUS cm_fw_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
* Return: QDF_STATUS * Return: QDF_STATUS
*/ */
QDF_STATUS cm_fw_roam_abort_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); QDF_STATUS cm_fw_roam_abort_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
/**
* cm_update_scan_mlme_on_roam() - update the scan mlme info
* on roam sync ind
* @vdev: Object manager vdev
* @connected_bssid: Bssid addr
* @state: scan entry state
*
* Return: void
*/
void
cm_update_scan_mlme_on_roam(struct wlan_objmgr_vdev *vdev,
struct qdf_mac_addr *connected_bssid,
enum scan_entry_connection_state state);
/**
* cm_abort_fw_roam() - abort fw roaming
*
* @cm_ctx: Connection mgr context
* @cm_id: CM command id
*
* Return: qdf status
*/
QDF_STATUS cm_abort_fw_roam(struct cnx_mgr *cm_ctx,
wlan_cm_id cm_id);
/** /**
* cm_fw_roam_sync_req() - Post roam sync to CM SM * cm_fw_roam_sync_req() - Post roam sync to CM SM
* @psoc: psoc pointer * @psoc: psoc pointer
* @vdev_id: vdev id * @vdev_id: vdev id
* @event: Vdev mgr event
* @event_data_len: data size
* *
* This function posts roam sync event change to connection manager * This function posts roam sync event change to connection manager
* state machine * state machine
* *
* Return: QDF_STATUS * Return: QDF_STATUS
*/ */
QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint8_t *event, uint32_t event_data_len);
/**
* cm_fw_roam_sync_start_ind() - Handle roam sync req
* @vdev: Vdev objmgr
* @roam_synch_data: Roam sync data ptr
*
* This function handles roam sync event to connection manager
* state machine
*
* Return: QDF_STATUS
*/
QDF_STATUS
cm_fw_roam_sync_start_ind(struct wlan_objmgr_vdev *vdev,
struct roam_offload_synch_ind *roam_synch_data);
/** /**
* cm_fw_roam_sync_propagation() - Post roam sync propagation to CM SM * cm_fw_roam_sync_propagation() - Post roam sync propagation to CM SM
* @psoc: psoc pointer * @psoc: psoc pointer
* @vdev_id: vdev id * @vdev_id: vdev id
* @roam_synch_data: Roam sync data ptr
* *
* This function posts roam sync propagation event change to connection manager * This function posts roam sync propagation event change to connection manager
* state machine * state machine
@@ -94,7 +138,8 @@ QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
* Return: QDF_STATUS * Return: QDF_STATUS
*/ */
QDF_STATUS QDF_STATUS
cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
struct roam_offload_synch_ind *roam_synch_data);
#endif /*WLAN_FEATURE_ROAM_OFFLOAD */ #endif /*WLAN_FEATURE_ROAM_OFFLOAD */
#endif /*FEATURE_CM_ENABLE */ #endif /* FEATURE_CM_ENABLE */
#endif /* _WLAN_CM_ROAM_I_H_ */ #endif /* _WLAN_CM_ROAM_I_H_ */

查看文件

@@ -3413,7 +3413,7 @@ cm_roam_switch_to_roam_sync(struct wlan_objmgr_pdev *pdev,
*/ */
case WLAN_ROAMING_IN_PROG: case WLAN_ROAMING_IN_PROG:
#ifdef FEATURE_CM_ENABLE #ifdef FEATURE_CM_ENABLE
if (!cm_is_vdevid_connected(pdev, vdev_id)) if (!cm_is_vdevid_active(pdev, vdev_id))
#else #else
if (!wlan_cm_is_sta_connected(vdev_id)) if (!wlan_cm_is_sta_connected(vdev_id))
#endif #endif

查看文件

@@ -38,21 +38,6 @@
#include "connection_mgr/core/src/wlan_cm_main_api.h" #include "connection_mgr/core/src/wlan_cm_main_api.h"
#define FW_ROAM_SYNC_TIMEOUT 7000 #define FW_ROAM_SYNC_TIMEOUT 7000
static QDF_STATUS cm_abort_fw_roam(struct cnx_mgr *cm_ctx,
wlan_cm_id cm_id)
{
QDF_STATUS status;
status = cm_sm_deliver_event(cm_ctx->vdev,
WLAN_CM_SM_EV_ROAM_ABORT,
sizeof(wlan_cm_id), &cm_id);
if (QDF_IS_STATUS_ERROR(status))
cm_remove_cmd(cm_ctx, &cm_id);
return status;
}
static QDF_STATUS static QDF_STATUS
cm_fw_roam_ser_cb(struct wlan_serialization_command *cmd, cm_fw_roam_ser_cb(struct wlan_serialization_command *cmd,
enum wlan_serialization_cb_reason reason) enum wlan_serialization_cb_reason reason)
@@ -99,6 +84,21 @@ cm_fw_roam_ser_cb(struct wlan_serialization_command *cmd,
return status; return status;
} }
QDF_STATUS cm_abort_fw_roam(struct cnx_mgr *cm_ctx,
wlan_cm_id cm_id)
{
QDF_STATUS status;
status = cm_sm_deliver_event(cm_ctx->vdev,
WLAN_CM_SM_EV_ROAM_ABORT,
sizeof(wlan_cm_id), &cm_id);
if (QDF_IS_STATUS_ERROR(status))
cm_remove_cmd(cm_ctx, &cm_id);
return status;
}
QDF_STATUS QDF_STATUS
cm_add_fw_roam_dummy_ser_cb(struct wlan_objmgr_pdev *pdev, cm_add_fw_roam_dummy_ser_cb(struct wlan_objmgr_pdev *pdev,
struct cnx_mgr *cm_ctx, struct cnx_mgr *cm_ctx,
@@ -140,7 +140,6 @@ cm_add_fw_roam_dummy_ser_cb(struct wlan_objmgr_pdev *pdev,
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }

查看文件

@@ -338,6 +338,22 @@ QDF_STATUS
cm_send_bss_peer_create_req(struct wlan_objmgr_vdev *vdev, cm_send_bss_peer_create_req(struct wlan_objmgr_vdev *vdev,
struct qdf_mac_addr *peer_mac); struct qdf_mac_addr *peer_mac);
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
/**
* cm_csr_roam_sync_rsp() - Connection manager ext roam sync resp indication
* @vdev: VDEV object
* @rsp: Connection vdev response
*
* This API is to update legacy struct and should be removed once
* CSR is cleaned up fully. No new params should be added to CSR, use
* vdev/pdev/psoc instead.
*
* Return: QDF_STATUS
*/
QDF_STATUS cm_csr_roam_sync_rsp(struct wlan_objmgr_vdev *vdev,
struct cm_vdev_join_rsp *rsp);
#endif
/** /**
* cm_csr_connect_rsp() - Connection manager ext connect resp indication * cm_csr_connect_rsp() - Connection manager ext connect resp indication
* @vdev: VDEV object * @vdev: VDEV object
@@ -388,6 +404,14 @@ cm_csr_connect_done_ind(struct wlan_objmgr_vdev *vdev,
*/ */
bool cm_is_vdevid_connected(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id); bool cm_is_vdevid_connected(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
/**
* cm_is_vdevid_active() - check if vdev_id is in conneted/roaming state
* @vdev: vdev pointer
*
* Return: bool
*/
bool cm_is_vdevid_active(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
/** /**
* cm_disconnect_start_ind() - Connection manager ext disconnect start * cm_disconnect_start_ind() - Connection manager ext disconnect start
* indication * indication

查看文件

@@ -1342,6 +1342,18 @@ static void cm_free_tspec_ie(struct cm_vdev_join_rsp *rsp)
{} {}
#endif #endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
static void cm_free_roaming_info(struct wlan_cm_connect_resp *connect_rsp)
{
qdf_mem_free(connect_rsp->roaming_info);
connect_rsp->roaming_info = NULL;
}
#else
static inline void
cm_free_roaming_info(struct wlan_cm_connect_resp *connect_rsp)
{}
#endif
void wlan_cm_free_connect_rsp(struct cm_vdev_join_rsp *rsp) void wlan_cm_free_connect_rsp(struct cm_vdev_join_rsp *rsp)
{ {
struct wlan_connect_rsp_ies *connect_ie = struct wlan_connect_rsp_ies *connect_ie =
@@ -1353,6 +1365,7 @@ void wlan_cm_free_connect_rsp(struct cm_vdev_join_rsp *rsp)
cm_free_fils_ie(connect_ie); cm_free_fils_ie(connect_ie);
cm_free_tspec_ie(rsp); cm_free_tspec_ie(rsp);
qdf_mem_free(rsp->ric_resp_ie.ptr); qdf_mem_free(rsp->ric_resp_ie.ptr);
cm_free_roaming_info(&rsp->connect_rsp);
qdf_mem_zero(rsp, sizeof(*rsp)); qdf_mem_zero(rsp, sizeof(*rsp));
qdf_mem_free(rsp); qdf_mem_free(rsp);
} }
@@ -1379,4 +1392,28 @@ bool cm_is_vdevid_connected(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
return connected; return connected;
} }
bool cm_is_vdevid_active(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
{
struct wlan_objmgr_vdev *vdev;
bool active;
enum QDF_OPMODE opmode;
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
WLAN_MLME_CM_ID);
if (!vdev) {
mlme_err("vdev %d: vdev not found", vdev_id);
return false;
}
opmode = wlan_vdev_mlme_get_opmode(vdev);
if (opmode != QDF_STA_MODE && opmode != QDF_P2P_CLIENT_MODE) {
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
return false;
}
active = cm_is_vdev_active(vdev);
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
return active;
}
#endif #endif

查看文件

@@ -115,6 +115,12 @@
#define MAX_FTIE_SIZE 384 #define MAX_FTIE_SIZE 384
#define ESE_MAX_TSPEC_IES 4 #define ESE_MAX_TSPEC_IES 4
/*
* To get 4 LSB of roam reason of roam_synch_data
* received from firmware
*/
#define ROAM_REASON_MASK 0x0F
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
#define ROAM_SCAN_PSK_SIZE 48 #define ROAM_SCAN_PSK_SIZE 48
#define ROAM_R0KH_ID_MAX_LEN 48 #define ROAM_R0KH_ID_MAX_LEN 48
@@ -1689,6 +1695,7 @@ struct wlan_cm_roam_tx_ops {
#ifdef FEATURE_CM_ENABLE #ifdef FEATURE_CM_ENABLE
QDF_STATUS (*send_roam_invoke_cmd)(struct wlan_objmgr_vdev *vdev, QDF_STATUS (*send_roam_invoke_cmd)(struct wlan_objmgr_vdev *vdev,
struct roam_invoke_req *req); struct roam_invoke_req *req);
QDF_STATUS (*send_roam_sync_complete_cmd)(struct wlan_objmgr_vdev *vdev);
#endif #endif
}; };
@@ -1740,4 +1747,83 @@ struct cm_roam_values_copy {
bool bool_value; bool bool_value;
struct rso_chan_info chan_info; struct rso_chan_info chan_info;
}; };
#ifdef FEATURE_LFR_SUBNET_DETECTION
/* bit-4 and bit-5 indicate the subnet status */
#define CM_GET_SUBNET_STATUS(roam_reason) (((roam_reason) & 0x30) >> 4)
#else
#define CM_GET_SUBNET_STATUS(roam_reason) (0)
#endif
/* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */
#define MAX_VDEV_SUPPORTED 4
/**
* struct policy_mgr_vdev_mac_map - vdev id-mac id map
* @vdev_id: VDEV id
* @mac_id: MAC id
*/
struct policy_mgr_vdev_mac_map {
uint32_t vdev_id;
uint32_t mac_id;
};
/**
* struct cm_hw_mode_trans_ind - HW mode transition indication
* @old_hw_mode_index: Index of old HW mode
* @new_hw_mode_index: Index of new HW mode
* @num_vdev_mac_entries: Number of vdev-mac id entries
* @vdev_mac_map: vdev id-mac id map
*/
struct cm_hw_mode_trans_ind {
uint32_t old_hw_mode_index;
uint32_t new_hw_mode_index;
uint32_t num_vdev_mac_entries;
struct policy_mgr_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED];
};
struct roam_offload_synch_ind {
uint16_t beaconProbeRespOffset;
uint16_t beaconProbeRespLength;
uint16_t reassocRespOffset;
uint16_t reassocRespLength;
uint16_t reassoc_req_offset;
uint16_t reassoc_req_length;
uint8_t isBeacon;
uint8_t roamed_vdev_id;
struct qdf_mac_addr bssid;
struct qdf_mac_addr self_mac;
int8_t txMgmtPower;
uint32_t auth_status;
uint8_t rssi;
uint8_t roam_reason;
uint32_t chan_freq;
uint8_t kck[MAX_KCK_LEN];
uint8_t kck_len;
uint32_t kek_len;
uint8_t kek[MAX_KEK_LENGTH];
uint32_t pmk_len;
uint8_t pmk[MAX_PMK_LEN];
uint8_t pmkid[PMKID_LEN];
bool update_erp_next_seq_num;
uint16_t next_erp_seq_num;
uint8_t replay_ctr[REPLAY_CTR_LEN];
void *add_bss_params;
enum phy_ch_width chan_width;
uint32_t max_rate_flags;
uint32_t ric_data_len;
#ifdef FEATURE_WLAN_ESE
uint32_t tspec_len;
#endif
uint8_t *ric_tspec_data;
uint16_t aid;
struct cm_hw_mode_trans_ind hw_mode_trans_ind;
uint8_t nss;
struct qdf_mac_addr dst_mac;
struct qdf_mac_addr src_mac;
uint16_t hlp_data_len;
uint8_t hlp_data[FILS_MAX_HLP_DATA_LEN];
bool is_ft_im_roam;
enum wlan_phymode phy_mode; /*phy mode sent by fw */
};
#endif #endif

查看文件

@@ -139,6 +139,17 @@ QDF_STATUS wlan_cm_tgt_send_roam_triggers(struct wlan_objmgr_psoc *psoc,
QDF_STATUS QDF_STATUS
wlan_cm_tgt_send_roam_invoke_req(struct wlan_objmgr_psoc *psoc, wlan_cm_tgt_send_roam_invoke_req(struct wlan_objmgr_psoc *psoc,
struct roam_invoke_req *roam_invoke_req); struct roam_invoke_req *roam_invoke_req);
/**
* wlan_cm_tgt_send_roam_sync_complete_cmd() - Send roam sync command to FW
* @psoc: psoc pointer
* @vdev_id: vdev id
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_cm_tgt_send_roam_sync_complete_cmd(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id);
#endif #endif
#endif #endif

查看文件

@@ -450,4 +450,37 @@ wlan_cm_tgt_send_roam_invoke_req(struct wlan_objmgr_psoc *psoc,
return status; return status;
} }
QDF_STATUS
wlan_cm_tgt_send_roam_sync_complete_cmd(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id)
{
QDF_STATUS status;
struct wlan_cm_roam_tx_ops *roam_tx_ops;
struct wlan_objmgr_vdev *vdev;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc,
vdev_id,
WLAN_MLME_NB_ID);
if (!vdev)
return QDF_STATUS_E_INVAL;
roam_tx_ops = wlan_cm_roam_get_tx_ops_from_vdev(vdev);
if (!roam_tx_ops || !roam_tx_ops->send_roam_sync_complete_cmd) {
mlme_err("CM_RSO: vdev %d send_roam_sync_complete_cmd is NULL",
vdev_id);
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
return QDF_STATUS_E_INVAL;
}
status = roam_tx_ops->send_roam_sync_complete_cmd(vdev);
if (QDF_IS_STATUS_ERROR(status))
mlme_debug("CM_RSO: vdev %d fail to send roam sync complete cmd",
vdev_id);
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
return status;
}
#endif #endif

查看文件

@@ -5201,8 +5201,8 @@ struct osif_cm_ops osif_ops = {
.disconnect_complete_cb = hdd_cm_disconnect_complete, .disconnect_complete_cb = hdd_cm_disconnect_complete,
.netif_queue_control_cb = hdd_cm_netif_queue_control, .netif_queue_control_cb = hdd_cm_netif_queue_control,
.napi_serialize_control_cb = hdd_cm_napi_serialize_control, .napi_serialize_control_cb = hdd_cm_napi_serialize_control,
#ifdef WLAN_FEATURE_FILS_SK
.save_gtk_cb = hdd_cm_save_gtk, .save_gtk_cb = hdd_cm_save_gtk,
#ifdef WLAN_FEATURE_FILS_SK
.set_hlp_data_cb = hdd_cm_set_hlp_data, .set_hlp_data_cb = hdd_cm_set_hlp_data,
#endif #endif
}; };

查看文件

@@ -6740,7 +6740,7 @@ int wlan_hdd_send_roam_auth_event(struct hdd_adapter *adapter, uint8_t *bssid,
&(adapter->wdev), &(adapter->wdev),
ETH_ALEN + req_rsn_len + rsp_rsn_len + ETH_ALEN + req_rsn_len + rsp_rsn_len +
sizeof(uint8_t) + REPLAY_CTR_LEN + sizeof(uint8_t) + REPLAY_CTR_LEN +
SIR_KCK_KEY_LEN + roam_info_ptr->kek_len + KCK_KEY_LEN + roam_info_ptr->kek_len +
sizeof(uint16_t) + sizeof(uint8_t) + sizeof(uint16_t) + sizeof(uint8_t) +
(9 * NLMSG_HDRLEN) + fils_params_len, (9 * NLMSG_HDRLEN) + fils_params_len,
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH_INDEX, QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH_INDEX,

查看文件

@@ -1043,13 +1043,17 @@ QDF_STATUS hdd_cm_connect_complete(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#ifdef WLAN_FEATURE_FILS_SK #ifdef WLAN_FEATURE_FILS_SK
QDF_STATUS hdd_cm_save_gtk(struct wlan_objmgr_vdev *vdev, QDF_STATUS hdd_cm_save_gtk(struct wlan_objmgr_vdev *vdev,
struct wlan_cm_connect_resp *rsp) struct wlan_cm_connect_resp *rsp)
{ {
uint8_t *kek; uint8_t *kek;
uint32_t kek_len; uint32_t kek_len;
uint8_t replay_ctr[REPLAY_CTR_LEN] = {0}; uint8_t *kck = NULL;
uint8_t kck_len = 0;
uint8_t replay_ctr_def[REPLAY_CTR_LEN] = {0};
uint8_t *replay_ctr;
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
struct hdd_adapter *adapter = hdd_get_adapter_by_vdev(hdd_ctx, struct hdd_adapter *adapter = hdd_get_adapter_by_vdev(hdd_ctx,
wlan_vdev_get_id(vdev)); wlan_vdev_get_id(vdev));
@@ -1059,14 +1063,66 @@ QDF_STATUS hdd_cm_save_gtk(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
kek = rsp->connect_ies.fils_ie->kek; if (rsp->is_reassoc && rsp->roaming_info) {
kek_len = rsp->connect_ies.fils_ie->kek_len; kek = rsp->roaming_info->kek;
wlan_hdd_save_gtk_offload_params(adapter, NULL, 0, kek, kek_len, kek_len = rsp->roaming_info->kek_len;
kck = rsp->roaming_info->kck;
kck_len = rsp->roaming_info->kck_len;
replay_ctr = rsp->roaming_info->replay_ctr;
} else if (rsp->connect_ies.fils_ie) {
kek = rsp->connect_ies.fils_ie->kek;
kek_len = rsp->connect_ies.fils_ie->kek_len;
replay_ctr = replay_ctr_def;
} else {
return QDF_STATUS_SUCCESS;
}
wlan_hdd_save_gtk_offload_params(adapter, kck, kck_len, kek, kek_len,
replay_ctr, true); replay_ctr, true);
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#else
QDF_STATUS hdd_cm_save_gtk(struct wlan_objmgr_vdev *vdev,
struct wlan_cm_connect_resp *rsp)
{
uint8_t *kek;
uint32_t kek_len;
uint8_t *kck = NULL;
uint8_t kck_len = 0;
uint8_t *replay_ctr;
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
struct hdd_adapter *adapter = hdd_get_adapter_by_vdev(hdd_ctx,
wlan_vdev_get_id(vdev));
if (!adapter || !rsp) {
hdd_err("adapter/connect rsp is NULL");
return QDF_STATUS_E_FAILURE;
}
if (rsp->is_reassoc && rsp->roaming_info) {
kek = rsp->roaming_info.kek;
kek_len = rsp->roaming_info.kek_len;
kck = rsp->roaming_info.kck;
kck_len = rsp->roaming_info.kck_len;
replay_ctr = rsp->roaming_info.replay_ctr;
} else {
return QDF_STATUS_SUCCESS;
}
wlan_hdd_save_gtk_offload_params(adapter, kck, kck_len, kek, kek_len,
replay_ctr, true);
return QDF_STATUS_SUCCESS;
}
#endif /* WLAN_FEATURE_FILS_SK*/
#else
QDF_STATUS hdd_cm_save_gtk(struct wlan_objmgr_vdev *vdev,
struct wlan_cm_connect_resp *rsp)
{
return QDF_STATUS_SUCCESS;
}
#endif
#ifdef WLAN_FEATURE_FILS_SK
static void hdd_update_hlp_info(struct net_device *dev, static void hdd_update_hlp_info(struct net_device *dev,
struct wlan_cm_connect_resp *rsp) struct wlan_cm_connect_resp *rsp)
{ {

查看文件

@@ -92,9 +92,6 @@ typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN];
#define SIR_VDEV_PLCY_MGR_TIMEOUT (4000) #define SIR_VDEV_PLCY_MGR_TIMEOUT (4000)
#endif #endif
/* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */
#define MAX_VDEV_SUPPORTED 4
#define MAX_POWER_DBG_ARGS_SUPPORTED 8 #define MAX_POWER_DBG_ARGS_SUPPORTED 8
#define QOS_MAP_MAX_EX 21 #define QOS_MAP_MAX_EX 21
#define QOS_MAP_RANGE_NUM 8 #define QOS_MAP_RANGE_NUM 8
@@ -118,7 +115,6 @@ typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN];
#define SIR_SAP_MAX_NUM_PEERS 32 #define SIR_SAP_MAX_NUM_PEERS 32
#endif #endif
#define SIR_KCK_KEY_LEN 16
#define KCK_192BIT_KEY_LEN 24 #define KCK_192BIT_KEY_LEN 24
#define KCK_256BIT_KEY_LEN 32 #define KCK_256BIT_KEY_LEN 32
@@ -531,6 +527,7 @@ struct bss_description;
struct roam_offload_synch_ind; struct roam_offload_synch_ind;
struct roam_pmkid_req_event; struct roam_pmkid_req_event;
#ifndef FEATURE_CM_ENABLE
/** /**
* typedef csr_roam_synch_fn_t - CSR roam synch callback routine pointer * typedef csr_roam_synch_fn_t - CSR roam synch callback routine pointer
* @mac: Global MAC context * @mac: Global MAC context
@@ -551,6 +548,7 @@ typedef QDF_STATUS
struct roam_offload_synch_ind *roam_synch_data, struct roam_offload_synch_ind *roam_synch_data,
struct bss_description *bss_desc_ptr, struct bss_description *bss_desc_ptr,
enum sir_roam_op_code reason); enum sir_roam_op_code reason);
#endif
/** /**
* typedef pe_roam_synch_fn_t - PE roam synch callback routine pointer * typedef pe_roam_synch_fn_t - PE roam synch callback routine pointer
@@ -607,7 +605,9 @@ typedef QDF_STATUS
struct sme_ready_req { struct sme_ready_req {
uint16_t messageType; /* eWNI_SME_SYS_READY_IND */ uint16_t messageType; /* eWNI_SME_SYS_READY_IND */
uint16_t length; uint16_t length;
#ifndef FEATURE_CM_ENABLE
csr_roam_synch_fn_t csr_roam_synch_cb; csr_roam_synch_fn_t csr_roam_synch_cb;
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac, QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
uint8_t vdev_id, uint8_t vdev_id,
struct qdf_mac_addr bssid); struct qdf_mac_addr bssid);
@@ -2162,20 +2162,6 @@ struct sir_set_hw_mode_resp {
struct policy_mgr_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED]; struct policy_mgr_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED];
}; };
/**
* struct sir_hw_mode_trans_ind - HW mode transition indication
* @old_hw_mode_index: Index of old HW mode
* @new_hw_mode_index: Index of new HW mode
* @num_vdev_mac_entries: Number of vdev-mac id entries
* @vdev_mac_map: vdev id-mac id map
*/
struct sir_hw_mode_trans_ind {
uint32_t old_hw_mode_index;
uint32_t new_hw_mode_index;
uint32_t num_vdev_mac_entries;
struct policy_mgr_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED];
};
/** /**
* struct sir_dual_mac_config_resp - Dual MAC config response * struct sir_dual_mac_config_resp - Dual MAC config response
* @status: Status of setting the dual mac configuration * @status: Status of setting the dual mac configuration
@@ -2590,51 +2576,6 @@ typedef struct {
} tSirStatsExtEvent, *tpSirStatsExtEvent; } tSirStatsExtEvent, *tpSirStatsExtEvent;
#endif #endif
struct roam_offload_synch_ind {
uint16_t beaconProbeRespOffset;
uint16_t beaconProbeRespLength;
uint16_t reassocRespOffset;
uint16_t reassocRespLength;
uint16_t reassoc_req_offset;
uint16_t reassoc_req_length;
uint8_t isBeacon;
uint8_t roamed_vdev_id;
struct qdf_mac_addr bssid;
struct qdf_mac_addr self_mac;
int8_t txMgmtPower;
uint32_t authStatus;
uint8_t rssi;
uint8_t roamReason;
uint32_t chan_freq;
uint8_t kck[MAX_KCK_LEN];
uint8_t kck_len;
uint32_t kek_len;
uint8_t kek[MAX_KEK_LENGTH];
uint32_t pmk_len;
uint8_t pmk[MAX_PMK_LEN];
uint8_t pmkid[PMKID_LEN];
bool update_erp_next_seq_num;
uint16_t next_erp_seq_num;
uint8_t replay_ctr[REPLAY_CTR_LEN];
void *add_bss_params;
enum phy_ch_width chan_width;
uint32_t max_rate_flags;
uint32_t ric_data_len;
#ifdef FEATURE_WLAN_ESE
uint32_t tspec_len;
#endif
uint8_t *ric_tspec_data;
uint16_t aid;
struct sir_hw_mode_trans_ind hw_mode_trans_ind;
uint8_t nss;
struct qdf_mac_addr dst_mac;
struct qdf_mac_addr src_mac;
uint16_t hlp_data_len;
uint8_t hlp_data[FILS_MAX_HLP_DATA_LEN];
bool is_ft_im_roam;
enum wlan_phymode phy_mode; /*phy mode sent by fw */
};
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
struct handoff_failure_ind { struct handoff_failure_ind {
uint8_t vdev_id; uint8_t vdev_id;

查看文件

@@ -1326,7 +1326,9 @@ void pe_register_callbacks_with_wma(struct mac_context *mac,
QDF_STATUS status; QDF_STATUS status;
status = wma_register_roaming_callbacks( status = wma_register_roaming_callbacks(
#ifndef FEATURE_CM_ENABLE
ready_req->csr_roam_synch_cb, ready_req->csr_roam_synch_cb,
#endif
ready_req->csr_roam_auth_event_handle_cb, ready_req->csr_roam_auth_event_handle_cb,
ready_req->pe_roam_synch_cb, ready_req->pe_roam_synch_cb,
ready_req->pe_disconnect_cb, ready_req->pe_disconnect_cb,
@@ -2492,7 +2494,7 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
pe_debug("LFR3:Received ROAM SYNCH IND bssid "QDF_MAC_ADDR_FMT" auth: %d vdevId: %d", pe_debug("LFR3:Received ROAM SYNCH IND bssid "QDF_MAC_ADDR_FMT" auth: %d vdevId: %d",
QDF_MAC_ADDR_REF(roam_sync_ind_ptr->bssid.bytes), QDF_MAC_ADDR_REF(roam_sync_ind_ptr->bssid.bytes),
roam_sync_ind_ptr->authStatus, roam_sync_ind_ptr->auth_status,
roam_sync_ind_ptr->roamed_vdev_id); roam_sync_ind_ptr->roamed_vdev_id);
/* /*
@@ -2571,7 +2573,7 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
} }
if (roam_sync_ind_ptr->authStatus == if (roam_sync_ind_ptr->auth_status ==
ROAM_AUTH_STATUS_AUTHENTICATED) { ROAM_AUTH_STATUS_AUTHENTICATED) {
ft_session_ptr->is_key_installed = true; ft_session_ptr->is_key_installed = true;
curr_sta_ds->is_key_installed = true; curr_sta_ds->is_key_installed = true;

查看文件

@@ -455,7 +455,7 @@ scan_ie_send_fail:
/** /**
* lim_process_hw_mode_trans_ind() - Process set HW mode transition indication * lim_process_hw_mode_trans_ind() - Process set HW mode transition indication
* @mac: Global MAC pointer * @mac: Global MAC pointer
* @body: Set HW mode response in sir_hw_mode_trans_ind format * @body: Set HW mode response in cm_hw_mode_trans_ind format
* *
* Process the set HW mode transition indication and post the message * Process the set HW mode transition indication and post the message
* to SME to invoke the HDD callback * to SME to invoke the HDD callback
@@ -465,11 +465,11 @@ scan_ie_send_fail:
*/ */
static void lim_process_hw_mode_trans_ind(struct mac_context *mac, void *body) static void lim_process_hw_mode_trans_ind(struct mac_context *mac, void *body)
{ {
struct sir_hw_mode_trans_ind *ind, *param; struct cm_hw_mode_trans_ind *ind, *param;
uint32_t len, i; uint32_t len, i;
struct scheduler_msg msg = {0}; struct scheduler_msg msg = {0};
ind = (struct sir_hw_mode_trans_ind *)body; ind = (struct cm_hw_mode_trans_ind *)body;
if (!ind) { if (!ind) {
pe_err("Set HW mode trans ind param is NULL"); pe_err("Set HW mode trans ind param is NULL");
return; return;

查看文件

@@ -721,13 +721,6 @@ struct csr_roamstruct {
#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(mac) \ #define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(mac) \
(mac->mlme_cfg->wmm_params.wmm_tspec_element.ts_acm_is_off) (mac->mlme_cfg->wmm_params.wmm_tspec_element.ts_acm_is_off)
#ifdef FEATURE_LFR_SUBNET_DETECTION
/* bit-4 and bit-5 indicate the subnet status */
#define CSR_GET_SUBNET_STATUS(roam_reason) (((roam_reason) & 0x30) >> 4)
#else
#define CSR_GET_SUBNET_STATUS(roam_reason) (0)
#endif
/** /**
* csr_get_vdev_dot11_mode() - get the supported dot11mode by vdev * csr_get_vdev_dot11_mode() - get the supported dot11mode by vdev
* @mac_ctx: pointer to global mac structure * @mac_ctx: pointer to global mac structure

查看文件

@@ -174,10 +174,11 @@ QDF_STATUS csr_roam_read_tsf(struct mac_context *mac, uint8_t *pTimestamp,
#endif /* FEATURE_CM_ENABLE */ #endif /* FEATURE_CM_ENABLE */
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
#ifndef FEATURE_CM_ENABLE
QDF_STATUS csr_roam_synch_callback(struct mac_context *mac, QDF_STATUS csr_roam_synch_callback(struct mac_context *mac,
struct roam_offload_synch_ind *roam_synch_data, struct roam_offload_synch_ind *roam_synch_data,
struct bss_description *bss_desc_ptr, enum sir_roam_op_code reason); struct bss_description *bss_desc_ptr, enum sir_roam_op_code reason);
#endif
/** /**
* csr_roam_auth_offload_callback() - Registered CSR Callback function to handle * csr_roam_auth_offload_callback() - Registered CSR Callback function to handle
* WPA3 roam pre-auth event from firmware. * WPA3 roam pre-auth event from firmware.
@@ -242,13 +243,14 @@ csr_roam_pmkid_req_callback(uint8_t vdev_id,
#endif /* WLAN_FEATURE_FIPS */ #endif /* WLAN_FEATURE_FIPS */
#else #else
#ifndef FEATURE_CM_ENABLE
static inline QDF_STATUS csr_roam_synch_callback(struct mac_context *mac, static inline QDF_STATUS csr_roam_synch_callback(struct mac_context *mac,
struct roam_offload_synch_ind *roam_synch_data, struct roam_offload_synch_ind *roam_synch_data,
struct bss_description *bss_desc_ptr, enum sir_roam_op_code reason) struct bss_description *bss_desc_ptr, enum sir_roam_op_code reason)
{ {
return QDF_STATUS_E_NOSUPPORT; return QDF_STATUS_E_NOSUPPORT;
} }
#endif
static inline QDF_STATUS static inline QDF_STATUS
csr_roam_auth_offload_callback(struct mac_context *mac_ctx, csr_roam_auth_offload_callback(struct mac_context *mac_ctx,
uint8_t vdev_id, uint8_t vdev_id,

查看文件

@@ -305,9 +305,9 @@ end:
static QDF_STATUS sme_process_hw_mode_trans_ind(struct mac_context *mac, static QDF_STATUS sme_process_hw_mode_trans_ind(struct mac_context *mac,
uint8_t *msg) uint8_t *msg)
{ {
struct sir_hw_mode_trans_ind *param; struct cm_hw_mode_trans_ind *param;
param = (struct sir_hw_mode_trans_ind *)msg; param = (struct cm_hw_mode_trans_ind *)msg;
if (!param) { if (!param) {
sme_err("HW mode trans ind param is NULL"); sme_err("HW mode trans ind param is NULL");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
@@ -1101,7 +1101,9 @@ QDF_STATUS sme_hdd_ready_ind(mac_handle_t mac_handle)
msg->messageType = eWNI_SME_SYS_READY_IND; msg->messageType = eWNI_SME_SYS_READY_IND;
msg->length = sizeof(*msg); msg->length = sizeof(*msg);
#ifndef FEATURE_CM_ENABLE
msg->csr_roam_synch_cb = csr_roam_synch_callback; msg->csr_roam_synch_cb = csr_roam_synch_callback;
#endif
msg->sme_msg_cb = sme_process_msg_callback; msg->sme_msg_cb = sme_process_msg_callback;
msg->stop_roaming_cb = sme_stop_roaming; msg->stop_roaming_cb = sme_stop_roaming;
msg->csr_roam_auth_event_handle_cb = msg->csr_roam_auth_event_handle_cb =

查看文件

@@ -80,6 +80,7 @@
#include "wlan_if_mgr_ucfg_api.h" #include "wlan_if_mgr_ucfg_api.h"
#include "wlan_if_mgr_roam.h" #include "wlan_if_mgr_roam.h"
#include "wlan_roam_debug.h" #include "wlan_roam_debug.h"
#include "wlan_cm_roam_public_struct.h"
#define RSN_AUTH_KEY_MGMT_SAE WLAN_RSN_SEL(WLAN_AKM_SAE) #define RSN_AUTH_KEY_MGMT_SAE WLAN_RSN_SEL(WLAN_AKM_SAE)
#define MAX_PWR_FCC_CHAN_12 8 #define MAX_PWR_FCC_CHAN_12 8
@@ -109,11 +110,6 @@
#define ROAMING_OFFLOAD_TIMER_STOP 2 #define ROAMING_OFFLOAD_TIMER_STOP 2
#define CSR_ROAMING_OFFLOAD_TIMEOUT_PERIOD (5 * QDF_MC_TIMER_TO_SEC_UNIT) #define CSR_ROAMING_OFFLOAD_TIMEOUT_PERIOD (5 * QDF_MC_TIMER_TO_SEC_UNIT)
/*
* To get 4 LSB of roam reason of roam_synch_data
* received from firmware
*/
#define ROAM_REASON_MASK 0x0F
#ifdef WLAN_FEATURE_SAE #ifdef WLAN_FEATURE_SAE
/** /**
@@ -12350,7 +12346,6 @@ static inline void csr_qos_send_assoc_ind(struct mac_context *mac_ctx,
sme_qos_csr_event_ind(mac_ctx, vdev_id, SME_QOS_CSR_ASSOC_COMPLETE, sme_qos_csr_event_ind(mac_ctx, vdev_id, SME_QOS_CSR_ASSOC_COMPLETE,
assoc_info); assoc_info);
} }
#else #else
static inline void csr_qos_send_disconnect_ind(struct mac_context *mac_ctx, static inline void csr_qos_send_disconnect_ind(struct mac_context *mac_ctx,
uint8_t vdev_id) uint8_t vdev_id)
@@ -12364,6 +12359,70 @@ static inline void csr_qos_send_assoc_ind(struct mac_context *mac_ctx,
} }
#endif #endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
static void
csr_qos_send_reassoc_ind(struct mac_context *mac_ctx,
uint8_t vdev_id,
sme_QosAssocInfo *assoc_info,
struct wlan_cm_connect_resp *connect_rsp)
{
sme_qos_csr_event_ind(mac_ctx, vdev_id, SME_QOS_CSR_HANDOFF_ASSOC_REQ,
NULL);
sme_qos_csr_event_ind(mac_ctx, vdev_id, SME_QOS_CSR_REASSOC_REQ,
NULL);
sme_qos_csr_event_ind(mac_ctx, vdev_id, SME_QOS_CSR_HANDOFF_COMPLETE,
NULL);
sme_qos_csr_event_ind(mac_ctx, vdev_id, SME_QOS_CSR_REASSOC_COMPLETE,
&assoc_info);
if (IS_ROAM_REASON_DISCONNECTION(
connect_rsp->roaming_info->roam_reason))
sme_qos_csr_event_ind(mac_ctx, vdev_id,
SME_QOS_CSR_DISCONNECT_ROAM_COMPLETE,
NULL);
}
#else
static inline void
csr_qos_send_reassoc_ind(struct mac_context *mac_ctx,
uint8_t vdev_id,
sme_QosAssocInfo *assoc_info,
struct wlan_cm_connect_resp *connect_rsp)
{}
#endif
#ifdef FEATURE_WLAN_ESE
static void
csr_fill_ese_params(struct mac_context *mac_ctx,
struct wlan_objmgr_vdev *vdev,
tDot11fBeaconIEs *bcn_ies)
{
int32_t ucast_cipher;
int32_t akm;
uint8_t vdev_id = wlan_vdev_get_id(vdev);
ucast_cipher = wlan_crypto_get_param(vdev,
WLAN_CRYPTO_PARAM_UCAST_CIPHER);
akm = wlan_crypto_get_param(vdev,
WLAN_CRYPTO_PARAM_KEY_MGMT);
if (mac_ctx->mlme_cfg->lfr.ese_enabled &&
(QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_CCKM) ||
(bcn_ies->ESEVersion.present && (!ucast_cipher ||
QDF_HAS_PARAM(ucast_cipher, WLAN_CRYPTO_CIPHER_NONE) ==
ucast_cipher))))
wlan_cm_set_ese_assoc(mac_ctx->pdev, vdev_id, true);
else
wlan_cm_set_ese_assoc(mac_ctx->pdev, vdev_id, false);
}
#else
static inline void
csr_fill_ese_params(struct mac_context *mac_ctx,
struct wlan_objmgr_vdev *vdev,
tDot11fBeaconIEs *bcn_ies)
{
}
#endif
static void csr_fill_connected_profile(struct mac_context *mac_ctx, static void csr_fill_connected_profile(struct mac_context *mac_ctx,
struct csr_roam_session *session, struct csr_roam_session *session,
struct wlan_objmgr_vdev *vdev, struct wlan_objmgr_vdev *vdev,
@@ -12437,8 +12496,19 @@ static void csr_fill_connected_profile(struct mac_context *mac_ctx,
MOBILITY_DOMAIN, &src_cfg); MOBILITY_DOMAIN, &src_cfg);
assoc_info.bss_desc = bss_desc; assoc_info.bss_desc = bss_desc;
assoc_info.uapsd_mask = rsp->uapsd_mask; if (rsp->connect_rsp.is_reassoc) {
csr_qos_send_assoc_ind(mac_ctx, vdev_id, &assoc_info); csr_fill_ese_params(mac_ctx, vdev, bcn_ies);
wlan_cm_roam_cfg_get_value(mac_ctx->psoc, vdev_id, UAPSD_MASK,
&src_cfg);
assoc_info.uapsd_mask = src_cfg.uint_value;
csr_qos_send_reassoc_ind(mac_ctx, vdev_id, &assoc_info,
&rsp->connect_rsp);
if (src_cfg.uint_value)
sme_ps_start_uapsd(MAC_HANDLE(mac_ctx), vdev_id);
} else {
assoc_info.uapsd_mask = rsp->uapsd_mask;
csr_qos_send_assoc_ind(mac_ctx, vdev_id, &assoc_info);
}
qdf_mem_free(bcn_ies); qdf_mem_free(bcn_ies);
@@ -12450,6 +12520,42 @@ purge_list:
} }
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
QDF_STATUS cm_csr_roam_sync_rsp(struct wlan_objmgr_vdev *vdev,
struct cm_vdev_join_rsp *rsp)
{
struct mac_context *mac_ctx;
uint8_t vdev_id = wlan_vdev_get_id(vdev);
struct csr_roam_session *session;
/*
* This API is to update legacy struct and should be removed once
* CSR is cleaned up fully. No new params should be added to CSR, use
* vdev/pdev/psoc instead
*/
if (QDF_IS_STATUS_ERROR(rsp->connect_rsp.connect_status))
return QDF_STATUS_SUCCESS;
/* handle below only in case of success */
mac_ctx = cds_get_context(QDF_MODULE_ID_SME);
if (!mac_ctx)
return QDF_STATUS_E_INVAL;
session = CSR_GET_SESSION(mac_ctx, vdev_id);
if (!session || !CSR_IS_SESSION_VALID(mac_ctx, vdev_id)) {
sme_err("session not found for vdev_id %d", vdev_id);
return QDF_STATUS_E_INVAL;
}
session->nss = rsp->nss;
csr_fill_connected_info(mac_ctx, session, rsp);
csr_fill_connected_profile(mac_ctx, session, vdev, rsp);
return QDF_STATUS_SUCCESS;
}
#endif
QDF_STATUS cm_csr_connect_rsp(struct wlan_objmgr_vdev *vdev, QDF_STATUS cm_csr_connect_rsp(struct wlan_objmgr_vdev *vdev,
struct cm_vdev_join_rsp *rsp) struct cm_vdev_join_rsp *rsp)
{ {
@@ -16259,7 +16365,6 @@ QDF_STATUS csr_fast_reassoc(mac_handle_t mac_handle,
return status; return status;
} }
#endif
static QDF_STATUS static QDF_STATUS
csr_process_roam_sync_callback(struct mac_context *mac_ctx, csr_process_roam_sync_callback(struct mac_context *mac_ctx,
@@ -16337,7 +16442,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
wlan_blm_update_bssid_connect_params(mac_ctx->pdev, wlan_blm_update_bssid_connect_params(mac_ctx->pdev,
connected_bssid, connected_bssid,
BLM_AP_DISCONNECTED); BLM_AP_DISCONNECTED);
if (IS_ROAM_REASON_STA_KICKOUT(roam_synch_data->roamReason)) { if (IS_ROAM_REASON_STA_KICKOUT(roam_synch_data->roam_reason)) {
struct reject_ap_info ap_info; struct reject_ap_info ap_info;
ap_info.bssid = connected_bssid; ap_info.bssid = connected_bssid;
@@ -16346,7 +16451,6 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
ap_info.source = ADDED_BY_DRIVER; ap_info.source = ADDED_BY_DRIVER;
wlan_blm_add_bssid_to_reject_list(mac_ctx->pdev, &ap_info); wlan_blm_add_bssid_to_reject_list(mac_ctx->pdev, &ap_info);
} }
#ifndef FEATURE_CM_ENABLE
/* use API similar to cm_update_scan_mlme_on_disconnect for CM */ /* use API similar to cm_update_scan_mlme_on_disconnect for CM */
csr_update_scan_entry_associnfo(mac_ctx, session_id, csr_update_scan_entry_associnfo(mac_ctx, session_id,
SCAN_ENTRY_CON_STATE_NONE); SCAN_ENTRY_CON_STATE_NONE);
@@ -16363,18 +16467,15 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
status = QDF_STATUS_E_FAILURE; status = QDF_STATUS_E_FAILURE;
goto end; goto end;
} }
#endif
status = wlan_cm_roam_state_change(mac_ctx->pdev, session_id, status = wlan_cm_roam_state_change(mac_ctx->pdev, session_id,
WLAN_ROAM_SYNCH_IN_PROG, WLAN_ROAM_SYNCH_IN_PROG,
REASON_ROAM_HANDOFF_DONE); REASON_ROAM_HANDOFF_DONE);
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
goto end; goto end;
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
csr_roam_call_callback(mac_ctx, session_id, NULL, 0, csr_roam_call_callback(mac_ctx, session_id, NULL, 0,
eCSR_ROAM_FT_START, eCSR_ROAM_RESULT_SUCCESS); eCSR_ROAM_FT_START, eCSR_ROAM_RESULT_SUCCESS);
#endif
goto end; goto end;
case SIR_ROAMING_START: case SIR_ROAMING_START:
status = wlan_cm_roam_state_change(mac_ctx->pdev, session_id, status = wlan_cm_roam_state_change(mac_ctx->pdev, session_id,
@@ -16383,14 +16484,11 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
goto end; goto end;
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
csr_roam_roaming_offload_timer_action(mac_ctx, csr_roam_roaming_offload_timer_action(mac_ctx,
CSR_ROAMING_OFFLOAD_TIMEOUT_PERIOD, session_id, CSR_ROAMING_OFFLOAD_TIMEOUT_PERIOD, session_id,
ROAMING_OFFLOAD_TIMER_START); ROAMING_OFFLOAD_TIMER_START);
csr_roam_call_callback(mac_ctx, session_id, NULL, 0, csr_roam_call_callback(mac_ctx, session_id, NULL, 0,
eCSR_ROAM_START, eCSR_ROAM_RESULT_SUCCESS); eCSR_ROAM_START, eCSR_ROAM_RESULT_SUCCESS);
#endif
/* /*
* For emergency deauth roaming, firmware sends ROAM start * For emergency deauth roaming, firmware sends ROAM start
* instead of ROAM scan start notification as data path queues * instead of ROAM scan start notification as data path queues
@@ -16427,21 +16525,15 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
wlan_cm_roam_state_change(mac_ctx->pdev, session_id, wlan_cm_roam_state_change(mac_ctx->pdev, session_id,
WLAN_ROAM_RSO_ENABLED, WLAN_ROAM_RSO_ENABLED,
REASON_ROAM_ABORT); REASON_ROAM_ABORT);
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
csr_roam_roaming_offload_timer_action(mac_ctx, csr_roam_roaming_offload_timer_action(mac_ctx,
0, session_id, ROAMING_OFFLOAD_TIMER_STOP); 0, session_id, ROAMING_OFFLOAD_TIMER_STOP);
csr_roam_call_callback(mac_ctx, session_id, NULL, 0, csr_roam_call_callback(mac_ctx, session_id, NULL, 0,
eCSR_ROAM_ABORT, eCSR_ROAM_RESULT_SUCCESS); eCSR_ROAM_ABORT, eCSR_ROAM_RESULT_SUCCESS);
#endif
vdev_roam_params->roam_invoke_in_progress = false; vdev_roam_params->roam_invoke_in_progress = false;
goto end; goto end;
case SIR_ROAM_SYNCH_NAPI_OFF: case SIR_ROAM_SYNCH_NAPI_OFF:
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
csr_roam_call_callback(mac_ctx, session_id, NULL, 0, csr_roam_call_callback(mac_ctx, session_id, NULL, 0,
eCSR_ROAM_NAPI_OFF, eCSR_ROAM_RESULT_SUCCESS); eCSR_ROAM_NAPI_OFF, eCSR_ROAM_RESULT_SUCCESS);
#endif
goto end; goto end;
case SIR_ROAMING_INVOKE_FAIL: case SIR_ROAMING_INVOKE_FAIL:
sme_debug("Roaming triggered failed source %d nud behaviour %d", sme_debug("Roaming triggered failed source %d nud behaviour %d",
@@ -16450,19 +16542,9 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
/* Userspace roam req fail, disconnect with AP */ /* Userspace roam req fail, disconnect with AP */
if (vdev_roam_params->source == USERSPACE_INITIATED || if (vdev_roam_params->source == USERSPACE_INITIATED ||
mac_ctx->nud_fail_behaviour == DISCONNECT_AFTER_ROAM_FAIL) { mac_ctx->nud_fail_behaviour == DISCONNECT_AFTER_ROAM_FAIL) {
/* This is temp ifdef will be removed in near future */
#ifdef FEATURE_CM_ENABLE
sme_release_global_lock(&mac_ctx->sme);
/* do not call cm disconnect while holding Sme lock */
cm_disconnect(mac_ctx->psoc, session_id,
CM_ROAM_DISCONNECT,
REASON_USER_TRIGGERED_ROAM_FAILURE, NULL);
sme_acquire_global_lock(&mac_ctx->sme);
#else
csr_roam_disconnect(mac_ctx, session_id, csr_roam_disconnect(mac_ctx, session_id,
eCSR_DISCONNECT_REASON_DEAUTH, eCSR_DISCONNECT_REASON_DEAUTH,
REASON_USER_TRIGGERED_ROAM_FAILURE); REASON_USER_TRIGGERED_ROAM_FAILURE);
#endif
} }
vdev_roam_params->roam_invoke_in_progress = false; vdev_roam_params->roam_invoke_in_progress = false;
@@ -16482,19 +16564,9 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
*/ */
if (wlan_reg_is_disable_for_freq(mac_ctx->pdev, if (wlan_reg_is_disable_for_freq(mac_ctx->pdev,
roam_synch_data->chan_freq)) { roam_synch_data->chan_freq)) {
/* This is temp ifdef will be removed in near future */
#ifdef FEATURE_CM_ENABLE
sme_release_global_lock(&mac_ctx->sme);
/* do not call cm disconnect while holding Sme lock */
cm_disconnect(mac_ctx->psoc, session_id,
CM_ROAM_DISCONNECT,
REASON_OPER_CHANNEL_BAND_CHANGE, NULL);
sme_acquire_global_lock(&mac_ctx->sme);
#else
csr_roam_disconnect(mac_ctx, session_id, csr_roam_disconnect(mac_ctx, session_id,
eCSR_DISCONNECT_REASON_DEAUTH, eCSR_DISCONNECT_REASON_DEAUTH,
REASON_OPER_CHANNEL_BAND_CHANGE); REASON_OPER_CHANNEL_BAND_CHANGE);
#endif
sme_debug("Roaming Failed for disabled channel or band"); sme_debug("Roaming Failed for disabled channel or band");
vdev_roam_params->roam_invoke_in_progress = false; vdev_roam_params->roam_invoke_in_progress = false;
goto end; goto end;
@@ -16538,7 +16610,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
policy_mgr_check_concurrent_intf_and_restart_sap(mac_ctx->psoc); policy_mgr_check_concurrent_intf_and_restart_sap(mac_ctx->psoc);
vdev_roam_params->roam_invoke_in_progress = false; vdev_roam_params->roam_invoke_in_progress = false;
if (roam_synch_data->authStatus == if (roam_synch_data->auth_status ==
ROAM_AUTH_STATUS_AUTHENTICATED) { ROAM_AUTH_STATUS_AUTHENTICATED) {
wlan_cm_roam_state_change(mac_ctx->pdev, session_id, wlan_cm_roam_state_change(mac_ctx->pdev, session_id,
WLAN_ROAM_RSO_ENABLED, WLAN_ROAM_RSO_ENABLED,
@@ -16556,11 +16628,8 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
} }
goto end; goto end;
case SIR_ROAMING_DEAUTH: case SIR_ROAMING_DEAUTH:
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
csr_roam_roaming_offload_timer_action( csr_roam_roaming_offload_timer_action(
mac_ctx, 0, session_id, ROAMING_OFFLOAD_TIMER_STOP); mac_ctx, 0, session_id, ROAMING_OFFLOAD_TIMER_STOP);
#endif
goto end; goto end;
default: default:
status = QDF_STATUS_E_FAILURE; status = QDF_STATUS_E_FAILURE;
@@ -16575,8 +16644,6 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
} }
conn_profile = &session->connectedProfile; conn_profile = &session->connectedProfile;
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
status = csr_roam_stop_network(mac_ctx, session_id, status = csr_roam_stop_network(mac_ctx, session_id,
session->pCurRoamProfile, session->pCurRoamProfile,
bss_desc, ies_local); bss_desc, ies_local);
@@ -16584,13 +16651,9 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
goto end; goto end;
session->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED; session->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED;
#endif
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
/* use cm_inform_bcn_probe for connection manager */ /* use cm_inform_bcn_probe for connection manager */
csr_rso_save_ap_to_scan_cache(mac_ctx, roam_synch_data, bss_desc); csr_rso_save_ap_to_scan_cache(mac_ctx, roam_synch_data, bss_desc);
#endif
/* For CM fill struct cm_vdev_join_rsp and struct wlan_cm_connect_resp /* For CM fill struct cm_vdev_join_rsp and struct wlan_cm_connect_resp
* instead of roam info */ * instead of roam info */
roam_info = qdf_mem_malloc(sizeof(struct csr_roam_info)); roam_info = qdf_mem_malloc(sizeof(struct csr_roam_info));
@@ -16603,8 +16666,6 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
qdf_mem_copy(&roam_info->bssid.bytes, &bss_desc->bssId, qdf_mem_copy(&roam_info->bssid.bytes, &bss_desc->bssId,
sizeof(struct qdf_mac_addr)); sizeof(struct qdf_mac_addr));
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
/* for CM hande same way as cm_csr_connect_rsp and /* for CM hande same way as cm_csr_connect_rsp and
* cm_csr_connect_done_ind */ * cm_csr_connect_done_ind */
csr_roam_save_connected_information(mac_ctx, session_id, csr_roam_save_connected_information(mac_ctx, session_id,
@@ -16614,7 +16675,6 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
/* For CM handle similar to cm_connect_complete to update */ /* For CM handle similar to cm_connect_complete to update */
csr_update_scan_entry_associnfo(mac_ctx, session_id, csr_update_scan_entry_associnfo(mac_ctx, session_id,
SCAN_ENTRY_CON_STATE_ASSOC); SCAN_ENTRY_CON_STATE_ASSOC);
#endif
#ifdef FEATURE_WLAN_ESE #ifdef FEATURE_WLAN_ESE
roam_info->isESEAssoc = wlan_cm_get_ese_assoc(mac_ctx->pdev, roam_info->isESEAssoc = wlan_cm_get_ese_assoc(mac_ctx->pdev,
@@ -16623,13 +16683,13 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
/* /*
* Encryption keys for new connection are obtained as follows: * Encryption keys for new connection are obtained as follows:
* authStatus = CSR_ROAM_AUTH_STATUS_AUTHENTICATED * auth_status = CSR_ROAM_AUTH_STATUS_AUTHENTICATED
* Open - No keys required. * Open - No keys required.
* Static WEP - Firmware copies keys from old AP to new AP. * Static WEP - Firmware copies keys from old AP to new AP.
* Fast roaming authentications e.g. PSK, FT, CCKM - firmware * Fast roaming authentications e.g. PSK, FT, CCKM - firmware
* supplicant obtains them through 4-way handshake. * supplicant obtains them through 4-way handshake.
* *
* authStatus = CSR_ROAM_AUTH_STATUS_CONNECTED * auth_status = CSR_ROAM_AUTH_STATUS_CONNECTED
* All other authentications - Host supplicant performs EAPOL * All other authentications - Host supplicant performs EAPOL
* with AP after this point and sends new keys to the driver. * with AP after this point and sends new keys to the driver.
* Driver starts wait_for_key timer for that purpose. * Driver starts wait_for_key timer for that purpose.
@@ -16645,7 +16705,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
*/ */
/* for CM handle this similar to cm_connect_complete_ind */ /* for CM handle this similar to cm_connect_complete_ind */
if (roam_synch_data->authStatus == ROAM_AUTH_STATUS_AUTHENTICATED || if (roam_synch_data->auth_status == ROAM_AUTH_STATUS_AUTHENTICATED ||
session->pCurRoamProfile->negotiatedAuthType == session->pCurRoamProfile->negotiatedAuthType ==
eCSR_AUTH_TYPE_SAE || eCSR_AUTH_TYPE_SAE ||
session->pCurRoamProfile->negotiatedAuthType == session->pCurRoamProfile->negotiatedAuthType ==
@@ -16654,7 +16714,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
cm_csr_set_ss_none(session_id); cm_csr_set_ss_none(session_id);
/* /*
* If authStatus is AUTHENTICATED, then we have done successful * If auth_status is AUTHENTICATED, then we have done successful
* 4 way handshake in FW using the cached PMKID. * 4 way handshake in FW using the cached PMKID.
* However, the session->psk_pmk has the PMK of the older AP * However, the session->psk_pmk has the PMK of the older AP
* as set_key is not received from supplicant. * as set_key is not received from supplicant.
@@ -16724,11 +16784,8 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
roam_info->fAuthRequired = true; roam_info->fAuthRequired = true;
cm_update_wait_for_key_timer(vdev, session_id, cm_update_wait_for_key_timer(vdev, session_id,
WAIT_FOR_KEY_TIMEOUT_PERIOD); WAIT_FOR_KEY_TIMEOUT_PERIOD);
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
csr_neighbor_roam_state_transition(mac_ctx, csr_neighbor_roam_state_transition(mac_ctx,
eCSR_NEIGHBOR_ROAM_STATE_INIT, session_id); eCSR_NEIGHBOR_ROAM_STATE_INIT, session_id);
#endif
} }
if (roam_synch_data->is_ft_im_roam) { if (roam_synch_data->is_ft_im_roam) {
@@ -16794,21 +16851,15 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
roam_info->chan_info.nss = roam_synch_data->nss; roam_info->chan_info.nss = roam_synch_data->nss;
roam_info->chan_info.rate_flags = roam_synch_data->max_rate_flags; roam_info->chan_info.rate_flags = roam_synch_data->max_rate_flags;
roam_info->chan_info.ch_width = roam_synch_data->chan_width; roam_info->chan_info.ch_width = roam_synch_data->chan_width;
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
csr_roam_fill_tdls_info(mac_ctx, roam_info, vdev); csr_roam_fill_tdls_info(mac_ctx, roam_info, vdev);
#endif
assoc_info.bss_desc = bss_desc; assoc_info.bss_desc = bss_desc;
roam_info->status_code = eSIR_SME_SUCCESS; roam_info->status_code = eSIR_SME_SUCCESS;
roam_info->reasonCode = eSIR_SME_SUCCESS; roam_info->reasonCode = eSIR_SME_SUCCESS;
wlan_cm_roam_cfg_get_value(mac_ctx->psoc, session_id, UAPSD_MASK, wlan_cm_roam_cfg_get_value(mac_ctx->psoc, session_id, UAPSD_MASK,
&config); &config);
assoc_info.uapsd_mask = config.uint_value; assoc_info.uapsd_mask = config.uint_value;
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
mac_ctx->roam.roamSession[session_id].connectState = mac_ctx->roam.roamSession[session_id].connectState =
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED; eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
#endif
/* for CM move all this sme qos API to cm_csr * API as in /* for CM move all this sme qos API to cm_csr * API as in
* cm_csr_connect_rsp */ * cm_csr_connect_rsp */
sme_qos_csr_event_ind(mac_ctx, session_id, sme_qos_csr_event_ind(mac_ctx, session_id,
@@ -16817,21 +16868,17 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
SME_QOS_CSR_REASSOC_REQ, NULL); SME_QOS_CSR_REASSOC_REQ, NULL);
sme_qos_csr_event_ind(mac_ctx, session_id, sme_qos_csr_event_ind(mac_ctx, session_id,
SME_QOS_CSR_HANDOFF_COMPLETE, NULL); SME_QOS_CSR_HANDOFF_COMPLETE, NULL);
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
mac_ctx->roam.roamSession[session_id].connectState = mac_ctx->roam.roamSession[session_id].connectState =
eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED; eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED;
#endif
/* for CM move all this sme qos API to cm_csr * API as in /* for CM move all this sme qos API to cm_csr * API as in
* cm_csr_connect_rsp */ * cm_csr_connect_rsp */
sme_qos_csr_event_ind(mac_ctx, session_id, sme_qos_csr_event_ind(mac_ctx, session_id,
SME_QOS_CSR_REASSOC_COMPLETE, &assoc_info); SME_QOS_CSR_REASSOC_COMPLETE, &assoc_info);
roam_info->bss_desc = bss_desc; roam_info->bss_desc = bss_desc;
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
conn_profile->acm_mask = sme_qos_get_acm_mask(mac_ctx, conn_profile->acm_mask = sme_qos_get_acm_mask(mac_ctx,
bss_desc, NULL); bss_desc, NULL);
#endif
if (conn_profile->modifyProfileFields.uapsd_mask) { if (conn_profile->modifyProfileFields.uapsd_mask) {
sme_debug( sme_debug(
" uapsd_mask (0x%X) set, request UAPSD now", " uapsd_mask (0x%X) set, request UAPSD now",
@@ -16846,7 +16893,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
roam_info->chan_info.rate_flags); roam_info->chan_info.rate_flags);
roam_info->roamSynchInProgress = true; roam_info->roamSynchInProgress = true;
roam_info->synchAuthStatus = roam_synch_data->authStatus; roam_info->synchAuthStatus = roam_synch_data->auth_status;
roam_info->kck_len = roam_synch_data->kck_len; roam_info->kck_len = roam_synch_data->kck_len;
roam_info->kek_len = roam_synch_data->kek_len; roam_info->kek_len = roam_synch_data->kek_len;
roam_info->pmk_len = roam_synch_data->pmk_len; roam_info->pmk_len = roam_synch_data->pmk_len;
@@ -16862,11 +16909,10 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
roam_synch_data->update_erp_next_seq_num; roam_synch_data->update_erp_next_seq_num;
roam_info->next_erp_seq_num = roam_synch_data->next_erp_seq_num; roam_info->next_erp_seq_num = roam_synch_data->next_erp_seq_num;
/* for cm enable copy to reassoc/connect resp */ /* for cm enable copy to reassoc/connect resp */
#ifndef FEATURE_CM_ENABLE
/* for CM fill fils info in struct wlan_cm_connect_resp */ /* for CM fill fils info in struct wlan_cm_connect_resp */
csr_update_fils_erp_seq_num(session->pCurRoamProfile, csr_update_fils_erp_seq_num(session->pCurRoamProfile,
roam_info->next_erp_seq_num); roam_info->next_erp_seq_num);
#endif
sme_debug("Update ERP Seq Num : %d, Next ERP Seq Num : %d", sme_debug("Update ERP Seq Num : %d, Next ERP Seq Num : %d",
roam_info->update_erp_next_seq_num, roam_info->update_erp_next_seq_num,
roam_info->next_erp_seq_num); roam_info->next_erp_seq_num);
@@ -16877,27 +16923,24 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
roam_info->kek_len); roam_info->kek_len);
/* bit-4 and bit-5 indicate the subnet status */ /* bit-4 and bit-5 indicate the subnet status */
roam_info->subnet_change_status = roam_info->subnet_change_status =
CSR_GET_SUBNET_STATUS(roam_synch_data->roamReason); CM_GET_SUBNET_STATUS(roam_synch_data->roam_reason);
/* fetch 4 LSB to get roam reason */ /* fetch 4 LSB to get roam reason */
roam_info->roam_reason = roam_synch_data->roamReason & roam_info->roam_reason = roam_synch_data->roam_reason &
ROAM_REASON_MASK; ROAM_REASON_MASK;
sme_debug("Update roam reason : %d", roam_info->roam_reason); sme_debug("Update roam reason : %d", roam_info->roam_reason);
/* for cm enable copy to reassoc/connect resp */ /* for cm enable copy to reassoc/connect resp */
#ifndef FEATURE_CM_ENABLE
/* for CM fill fils info in struct wlan_cm_connect_resp */ /* for CM fill fils info in struct wlan_cm_connect_resp */
csr_copy_fils_join_rsp_roam_info(roam_info, roam_synch_data); csr_copy_fils_join_rsp_roam_info(roam_info, roam_synch_data);
csr_roam_call_callback(mac_ctx, session_id, roam_info, 0, csr_roam_call_callback(mac_ctx, session_id, roam_info, 0,
eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_ASSOCIATED); eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_ASSOCIATED);
#endif
/* for CM move all this sme qos API to cm_csr * API as in /* for CM move all this sme qos API to cm_csr * API as in
* cm_csr_connect_rsp */ * cm_csr_connect_rsp */
if (IS_ROAM_REASON_DISCONNECTION(roam_synch_data->roamReason)) if (IS_ROAM_REASON_DISCONNECTION(roam_synch_data->roam_reason))
sme_qos_csr_event_ind(mac_ctx, session_id, sme_qos_csr_event_ind(mac_ctx, session_id,
SME_QOS_CSR_DISCONNECT_ROAM_COMPLETE, SME_QOS_CSR_DISCONNECT_ROAM_COMPLETE,
NULL); NULL);
/* for cm enable copy to reassoc/connect resp */
#ifndef FEATURE_CM_ENABLE
/* for CM move hanlde all roam specific handling in new func */ /* for CM move hanlde all roam specific handling in new func */
if (!CSR_IS_WAIT_FOR_KEY(mac_ctx, session_id)) { if (!CSR_IS_WAIT_FOR_KEY(mac_ctx, session_id)) {
wlan_mlme_get_bssid_vdev_id(mac_ctx->pdev, session_id, wlan_mlme_get_bssid_vdev_id(mac_ctx->pdev, session_id,
@@ -16908,7 +16951,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
("NO CSR_IS_WAIT_FOR_KEY -> csr_roam_link_up")); ("NO CSR_IS_WAIT_FOR_KEY -> csr_roam_link_up"));
csr_roam_link_up(mac_ctx, connected_bssid); csr_roam_link_up(mac_ctx, connected_bssid);
} }
#endif
sme_free_join_rsp_fils_params(roam_info); sme_free_join_rsp_fils_params(roam_info);
qdf_mem_free(roam_info->pbFrames); qdf_mem_free(roam_info->pbFrames);
qdf_mem_free(roam_info); qdf_mem_free(roam_info);
@@ -16954,7 +16997,7 @@ csr_roam_synch_callback(struct mac_context *mac_ctx,
return status; return status;
} }
#endif
#ifdef WLAN_FEATURE_SAE #ifdef WLAN_FEATURE_SAE
/** /**
* csr_process_roam_auth_sae_callback() - API to trigger the * csr_process_roam_auth_sae_callback() - API to trigger the

查看文件

@@ -510,7 +510,7 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(mac->psoc, session_id) && if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(mac->psoc, session_id) &&
eSIR_ROAM_AUTH_STATUS_AUTHENTICATED == eSIR_ROAM_AUTH_STATUS_AUTHENTICATED ==
session->roam_synch_data->authStatus) { session->roam_synch_data->auth_status) {
sme_debug("LFR3: Authenticated"); sme_debug("LFR3: Authenticated");
roam_info = qdf_mem_malloc(sizeof(*roam_info)); roam_info = qdf_mem_malloc(sizeof(*roam_info));
if (!roam_info) if (!roam_info)

查看文件

@@ -1002,10 +1002,12 @@ typedef struct {
bool tx_chain_mask_cck; bool tx_chain_mask_cck;
qdf_mc_timer_t service_ready_ext_timer; qdf_mc_timer_t service_ready_ext_timer;
#ifndef FEATURE_CM_ENABLE
QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac, QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
struct roam_offload_synch_ind *roam_synch_data, struct roam_offload_synch_ind *roam_synch_data,
struct bss_description *bss_desc_ptr, struct bss_description *bss_desc_ptr,
enum sir_roam_op_code reason); enum sir_roam_op_code reason);
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac, QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
uint8_t vdev_id, uint8_t vdev_id,
struct qdf_mac_addr bssid); struct qdf_mac_addr bssid);
@@ -2048,13 +2050,6 @@ void wma_vdev_clear_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
void void
wma_send_roam_preauth_status(tp_wma_handle wma_handle, wma_send_roam_preauth_status(tp_wma_handle wma_handle,
struct wmi_roam_auth_status_params *params); struct wmi_roam_auth_status_params *params);
#else
static inline void
wma_send_roam_preauth_status(tp_wma_handle wma_handle,
struct wmi_roam_auth_status_params *params)
{}
#endif
/** /**
* wma_handle_roam_sync_timeout() - Update roaming status at wma layer * wma_handle_roam_sync_timeout() - Update roaming status at wma layer
* @wma_handle: wma handle * @wma_handle: wma handle
@@ -2066,6 +2061,17 @@ wma_send_roam_preauth_status(tp_wma_handle wma_handle,
*/ */
void wma_handle_roam_sync_timeout(tp_wma_handle wma_handle, void wma_handle_roam_sync_timeout(tp_wma_handle wma_handle,
struct roam_sync_timeout_timer_info *info); struct roam_sync_timeout_timer_info *info);
#else
static inline void
wma_send_roam_preauth_status(tp_wma_handle wma_handle,
struct wmi_roam_auth_status_params *params)
{}
static inline void
wma_handle_roam_sync_timeout(tp_wma_handle wma_handle,
struct roam_sync_timeout_timer_info *info)
{}
#endif
#ifdef WMI_INTERFACE_EVENT_LOGGING #ifdef WMI_INTERFACE_EVENT_LOGGING
static inline void wma_print_wmi_cmd_log(uint32_t count, static inline void wma_print_wmi_cmd_log(uint32_t count,

查看文件

@@ -296,7 +296,7 @@ bool wma_capability_enhanced_mcast_filter(void);
void wma_process_pdev_hw_mode_trans_ind(void *wma, void wma_process_pdev_hw_mode_trans_ind(void *wma,
wmi_pdev_hw_mode_transition_event_fixed_param *fixed_param, wmi_pdev_hw_mode_transition_event_fixed_param *fixed_param,
wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry, wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry,
struct sir_hw_mode_trans_ind *hw_mode_trans_ind); struct cm_hw_mode_trans_ind *hw_mode_trans_ind);
/** /**
* wma_set_cts2self_for_p2p_go() - set CTS2SELF command for P2P GO. * wma_set_cts2self_for_p2p_go() - set CTS2SELF command for P2P GO.

查看文件

@@ -558,9 +558,11 @@ void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id);
int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf, int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
uint32_t len); uint32_t len);
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id); void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id);
#endif #endif
#endif
/* /*
* wma_dev_if.c functions declarations * wma_dev_if.c functions declarations

查看文件

@@ -726,7 +726,9 @@ QDF_STATUS wma_register_mgmt_frm_client(void);
QDF_STATUS wma_de_register_mgmt_frm_client(void); QDF_STATUS wma_de_register_mgmt_frm_client(void);
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
QDF_STATUS wma_register_roaming_callbacks( QDF_STATUS wma_register_roaming_callbacks(
#ifndef FEATURE_CM_ENABLE
csr_roam_synch_fn_t csr_roam_synch_cb, csr_roam_synch_fn_t csr_roam_synch_cb,
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)( QDF_STATUS (*csr_roam_auth_event_handle_cb)(
struct mac_context *mac, struct mac_context *mac,
uint8_t vdev_id, uint8_t vdev_id,
@@ -740,7 +742,9 @@ QDF_STATUS wma_register_roaming_callbacks(
csr_roam_pmkid_req_fn_t csr_roam_pmkid_req_cb); csr_roam_pmkid_req_fn_t csr_roam_pmkid_req_cb);
#else #else
static inline QDF_STATUS wma_register_roaming_callbacks( static inline QDF_STATUS wma_register_roaming_callbacks(
#ifndef FEATURE_CM_ENABLE
csr_roam_synch_fn_t csr_roam_synch_cb, csr_roam_synch_fn_t csr_roam_synch_cb,
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)( QDF_STATUS (*csr_roam_auth_event_handle_cb)(
struct mac_context *mac, struct mac_context *mac,
uint8_t vdev_id, uint8_t vdev_id,

查看文件

@@ -3758,7 +3758,7 @@ fail:
void wma_process_pdev_hw_mode_trans_ind(void *handle, void wma_process_pdev_hw_mode_trans_ind(void *handle,
wmi_pdev_hw_mode_transition_event_fixed_param *fixed_param, wmi_pdev_hw_mode_transition_event_fixed_param *fixed_param,
wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry, wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry,
struct sir_hw_mode_trans_ind *hw_mode_trans_ind) struct cm_hw_mode_trans_ind *hw_mode_trans_ind)
{ {
uint32_t i; uint32_t i;
tp_wma_handle wma = (tp_wma_handle) handle; tp_wma_handle wma = (tp_wma_handle) handle;
@@ -3840,7 +3840,7 @@ static int wma_pdev_hw_mode_transition_evt_handler(void *handle,
WMI_PDEV_HW_MODE_TRANSITION_EVENTID_param_tlvs *param_buf; WMI_PDEV_HW_MODE_TRANSITION_EVENTID_param_tlvs *param_buf;
wmi_pdev_hw_mode_transition_event_fixed_param *wmi_event; wmi_pdev_hw_mode_transition_event_fixed_param *wmi_event;
wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry; wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry;
struct sir_hw_mode_trans_ind *hw_mode_trans_ind; struct cm_hw_mode_trans_ind *hw_mode_trans_ind;
tp_wma_handle wma = (tp_wma_handle) handle; tp_wma_handle wma = (tp_wma_handle) handle;
if (wma_validate_handle(wma)) { if (wma_validate_handle(wma)) {

查看文件

@@ -3708,7 +3708,9 @@ QDF_STATUS wma_de_register_mgmt_frm_client(void)
* Return: Success or Failure Status * Return: Success or Failure Status
*/ */
QDF_STATUS wma_register_roaming_callbacks( QDF_STATUS wma_register_roaming_callbacks(
#ifndef FEATURE_CM_ENABLE
csr_roam_synch_fn_t csr_roam_synch_cb, csr_roam_synch_fn_t csr_roam_synch_cb,
#endif
QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac, QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
uint8_t vdev_id, uint8_t vdev_id,
struct qdf_mac_addr bssid), struct qdf_mac_addr bssid),
@@ -3726,7 +3728,9 @@ QDF_STATUS wma_register_roaming_callbacks(
if (!wma) if (!wma)
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
#ifndef FEATURE_CM_ENABLE
wma->csr_roam_synch_cb = csr_roam_synch_cb; wma->csr_roam_synch_cb = csr_roam_synch_cb;
#endif
wma->csr_roam_auth_event_handle_cb = csr_roam_auth_event_handle_cb; wma->csr_roam_auth_event_handle_cb = csr_roam_auth_event_handle_cb;
wma->pe_roam_synch_cb = pe_roam_synch_cb; wma->pe_roam_synch_cb = pe_roam_synch_cb;
wma->pe_disconnect_cb = pe_disconnect_cb; wma->pe_disconnect_cb = pe_disconnect_cb;

查看文件

@@ -1,4 +1,4 @@
/* /*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
@@ -725,20 +725,29 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
synch_event = param_buf->fixed_param; synch_event = param_buf->fixed_param;
roam_synch_ind_ptr->roamed_vdev_id = synch_event->vdev_id; roam_synch_ind_ptr->roamed_vdev_id = synch_event->vdev_id;
roam_synch_ind_ptr->authStatus = synch_event->auth_status; roam_synch_ind_ptr->auth_status = synch_event->auth_status;
roam_synch_ind_ptr->roamReason = synch_event->roam_reason; roam_synch_ind_ptr->roam_reason = synch_event->roam_reason;
roam_synch_ind_ptr->rssi = synch_event->rssi; roam_synch_ind_ptr->rssi = synch_event->rssi;
iface = &wma->interfaces[synch_event->vdev_id]; iface = &wma->interfaces[synch_event->vdev_id];
WMI_MAC_ADDR_TO_CHAR_ARRAY(&synch_event->bssid, WMI_MAC_ADDR_TO_CHAR_ARRAY(&synch_event->bssid,
roam_synch_ind_ptr->bssid.bytes); roam_synch_ind_ptr->bssid.bytes);
wma_debug("roamedVdevId %d authStatus %d roamReason %d rssi %d isBeacon %d", wma_debug("roamedVdevId %d authStatus %d roamReason %d rssi %d isBeacon %d",
roam_synch_ind_ptr->roamed_vdev_id, roam_synch_ind_ptr->roamed_vdev_id,
roam_synch_ind_ptr->authStatus, roam_synch_ind_ptr->roamReason, roam_synch_ind_ptr->auth_status,
roam_synch_ind_ptr->rssi, roam_synch_ind_ptr->isBeacon); roam_synch_ind_ptr->roam_reason,
roam_synch_ind_ptr->rssi,
roam_synch_ind_ptr->isBeacon);
#ifdef FEATURE_CM_ENABLE
if (!QDF_IS_STATUS_SUCCESS(
cm_fw_roam_sync_start_ind(iface->vdev,
roam_synch_ind_ptr)))
#else
if (!QDF_IS_STATUS_SUCCESS( if (!QDF_IS_STATUS_SUCCESS(
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr, wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
NULL, SIR_ROAMING_DEREGISTER_STA))) { NULL, SIR_ROAMING_DEREGISTER_STA)))
#endif
{
wma_err("LFR3: CSR Roam synch cb failed"); wma_err("LFR3: CSR Roam synch cb failed");
wma_free_roam_synch_frame_ind(iface); wma_free_roam_synch_frame_ind(iface);
return status; return status;
@@ -789,9 +798,9 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
key = param_buf->key; key = param_buf->key;
key_ft = param_buf->key_ext; key_ft = param_buf->key_ext;
if (key) { if (key) {
roam_synch_ind_ptr->kck_len = SIR_KCK_KEY_LEN; roam_synch_ind_ptr->kck_len = KCK_KEY_LEN;
qdf_mem_copy(roam_synch_ind_ptr->kck, key->kck, qdf_mem_copy(roam_synch_ind_ptr->kck, key->kck,
SIR_KCK_KEY_LEN); KCK_KEY_LEN);
roam_synch_ind_ptr->kek_len = SIR_KEK_KEY_LEN; roam_synch_ind_ptr->kek_len = SIR_KEK_KEY_LEN;
qdf_mem_copy(roam_synch_ind_ptr->kek, key->kek, qdf_mem_copy(roam_synch_ind_ptr->kek, key->kek,
SIR_KEK_KEY_LEN); SIR_KEK_KEY_LEN);
@@ -997,12 +1006,14 @@ static void wma_update_phymode_on_roam(tp_wma_handle wma, uint8_t *bssid,
wma_debug("LFR3: new phymode %d", bss_phymode); wma_debug("LFR3: new phymode %d", bss_phymode);
} }
#ifndef FEATURE_CM_ENABLE
static void wma_post_roam_sync_failure(tp_wma_handle wma, uint8_t vdev_id) static void wma_post_roam_sync_failure(tp_wma_handle wma, uint8_t vdev_id)
{ {
wlan_cm_roam_stop_req(wma->psoc, vdev_id, REASON_ROAM_SYNCH_FAILED); wlan_cm_roam_stop_req(wma->psoc, vdev_id, REASON_ROAM_SYNCH_FAILED);
wma_debug("In cleanup: RSO Command:%d, reason %d vdev %d", wma_debug("In cleanup: RSO Command:%d, reason %d vdev %d",
ROAM_SCAN_OFFLOAD_STOP, REASON_ROAM_SYNCH_FAILED, vdev_id); ROAM_SCAN_OFFLOAD_STOP, REASON_ROAM_SYNCH_FAILED, vdev_id);
} }
#endif
int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event, int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
uint32_t len) uint32_t len)
@@ -1182,10 +1193,6 @@ int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
} }
wma_roam_update_vdev(wma, roam_synch_ind_ptr); wma_roam_update_vdev(wma, roam_synch_ind_ptr);
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
bss_desc_ptr, SIR_ROAM_SYNCH_PROPAGATION);
wma_process_roam_synch_complete(wma, synch_event->vdev_id);
/* update freq and channel width */ /* update freq and channel width */
wma->interfaces[synch_event->vdev_id].ch_freq = wma->interfaces[synch_event->vdev_id].ch_freq =
roam_synch_ind_ptr->chan_freq; roam_synch_ind_ptr->chan_freq;
@@ -1202,27 +1209,45 @@ int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
wma_update_phymode_on_roam(wma, roam_synch_ind_ptr->bssid.bytes, wma_update_phymode_on_roam(wma, roam_synch_ind_ptr->bssid.bytes,
param_buf->chan, param_buf->chan,
&wma->interfaces[synch_event->vdev_id]); &wma->interfaces[synch_event->vdev_id]);
#ifdef FEATURE_CM_ENABLE
cm_fw_roam_sync_propagation(wma->psoc,
synch_event->vdev_id,
roam_synch_ind_ptr);
#else
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
bss_desc_ptr, SIR_ROAM_SYNCH_PROPAGATION);
wma_process_roam_synch_complete(wma, synch_event->vdev_id);
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr, wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
bss_desc_ptr, SIR_ROAM_SYNCH_COMPLETE); bss_desc_ptr, SIR_ROAM_SYNCH_COMPLETE);
#endif
wma->interfaces[synch_event->vdev_id].roam_synch_delay = wma->interfaces[synch_event->vdev_id].roam_synch_delay =
qdf_get_system_timestamp() - roam_synch_received; qdf_get_system_timestamp() - roam_synch_received;
wma_debug("LFR3: roam_synch_delay:%d", wma_debug("LFR3: roam_synch_delay:%d",
wma->interfaces[synch_event->vdev_id].roam_synch_delay); wma->interfaces[synch_event->vdev_id].roam_synch_delay);
#ifndef FEATURE_CM_ENABLE
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr, wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
bss_desc_ptr, SIR_ROAM_SYNCH_NAPI_OFF); bss_desc_ptr, SIR_ROAM_SYNCH_NAPI_OFF);
#endif
status = 0; status = 0;
cleanup_label: cleanup_label:
if (status != 0) { if (status != 0) {
#ifdef FEATURE_CM_ENABLE
cm_fw_roam_abort_req(wma->psoc, synch_event->vdev_id);
cm_roam_stop_req(wma->psoc, synch_event->vdev_id,
REASON_ROAM_SYNCH_FAILED);
#else
if (roam_synch_ind_ptr) if (roam_synch_ind_ptr)
wma->csr_roam_synch_cb(wma->mac_context, wma->csr_roam_synch_cb(wma->mac_context,
roam_synch_ind_ptr, NULL, roam_synch_ind_ptr, NULL,
SIR_ROAMING_ABORT); SIR_ROAMING_ABORT);
if (synch_event) if (synch_event)
wma_post_roam_sync_failure(wma, synch_event->vdev_id); wma_post_roam_sync_failure(wma, synch_event->vdev_id);
#endif
} }
if (roam_synch_ind_ptr && roam_synch_ind_ptr->ric_tspec_data) if (roam_synch_ind_ptr && roam_synch_ind_ptr->ric_tspec_data)
qdf_mem_free(roam_synch_ind_ptr->ric_tspec_data); qdf_mem_free(roam_synch_ind_ptr->ric_tspec_data);
if (roam_synch_ind_ptr) if (roam_synch_ind_ptr)
@@ -1381,14 +1406,15 @@ int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
int wma_roam_synch_event_handler(void *handle, uint8_t *event, int wma_roam_synch_event_handler(void *handle, uint8_t *event,
uint32_t len) uint32_t len)
{ {
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
int status = -EINVAL; int status = -EINVAL;
tp_wma_handle wma = (tp_wma_handle) handle;
struct wma_txrx_node *iface = NULL;
wmi_roam_synch_event_fixed_param *synch_event = NULL; wmi_roam_synch_event_fixed_param *synch_event = NULL;
WMI_ROAM_SYNCH_EVENTID_param_tlvs *param_buf = NULL; WMI_ROAM_SYNCH_EVENTID_param_tlvs *param_buf = NULL;
tp_wma_handle wma = (tp_wma_handle)handle;
#ifndef FEATURE_CM_ENABLE
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
struct wma_txrx_node *iface = NULL;
struct vdev_mlme_obj *mlme_obj; struct vdev_mlme_obj *mlme_obj;
#endif
if (!event) { if (!event) {
wma_err_rl("event param null"); wma_err_rl("event param null");
return status; return status;
@@ -1410,7 +1436,9 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
synch_event->vdev_id); synch_event->vdev_id);
return status; return status;
} }
#ifdef FEATURE_CM_ENABLE
cm_fw_roam_sync_req(wma->psoc, synch_event->vdev_id, event, len);
#else
iface = &wma->interfaces[synch_event->vdev_id]; iface = &wma->interfaces[synch_event->vdev_id];
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(iface->vdev); mlme_obj = wlan_vdev_mlme_get_cmpt_obj(iface->vdev);
if (mlme_obj) if (mlme_obj)
@@ -1427,6 +1455,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
return status; return status;
} }
wma_debug("Posted EV_ROAM to VDEV SM"); wma_debug("Posted EV_ROAM to VDEV SM");
#endif
return 0; return 0;
} }
@@ -2424,6 +2453,7 @@ wma_roam_ho_fail_handler(tp_wma_handle wma, uint32_t vdev_id,
} }
} }
#ifndef FEATURE_CM_ENABLE
/** /**
* wma_process_roam_synch_complete() - roam synch complete command to fw. * wma_process_roam_synch_complete() - roam synch complete command to fw.
* @handle: wma handle * @handle: wma handle
@@ -2460,6 +2490,7 @@ void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id)
DEBUG_INVALID_PEER_ID, NULL, NULL, 0, 0); DEBUG_INVALID_PEER_ID, NULL, NULL, 0, 0);
} }
#endif
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */ #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
QDF_STATUS wma_pre_chan_switch_setup(uint8_t vdev_id) QDF_STATUS wma_pre_chan_switch_setup(uint8_t vdev_id)
@@ -4187,7 +4218,7 @@ void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id)
static int wma_handle_hw_mode_transition(tp_wma_handle wma, static int wma_handle_hw_mode_transition(tp_wma_handle wma,
WMI_ROAM_EVENTID_param_tlvs *param) WMI_ROAM_EVENTID_param_tlvs *param)
{ {
struct sir_hw_mode_trans_ind *hw_mode_trans_ind; struct cm_hw_mode_trans_ind *hw_mode_trans_ind;
struct scheduler_msg sme_msg = {0}; struct scheduler_msg sme_msg = {0};
QDF_STATUS status; QDF_STATUS status;
@@ -4216,6 +4247,7 @@ static int wma_handle_hw_mode_transition(tp_wma_handle wma,
return 0; return 0;
} }
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
/** /**
* wma_invalid_roam_reason_handler() - Handle Invalid roam notification * wma_invalid_roam_reason_handler() - Handle Invalid roam notification
* @wma: wma handle * @wma: wma handle
@@ -4252,7 +4284,7 @@ static void wma_invalid_roam_reason_handler(tp_wma_handle wma_handle,
if (notif != WMI_ROAM_NOTIF_ROAM_START) if (notif != WMI_ROAM_NOTIF_ROAM_START)
wma_handle->pe_roam_synch_cb(wma_handle->mac_context, wma_handle->pe_roam_synch_cb(wma_handle->mac_context,
roam_synch_data, NULL, op_code); roam_synch_data, NULL, op_code);
#if defined(FEATURE_CM_ENABLE) && defined(WLAN_FEATURE_ROAM_OFFLOAD) #ifdef FEATURE_CM_ENABLE
if (notif == WMI_ROAM_NOTIF_ROAM_START) if (notif == WMI_ROAM_NOTIF_ROAM_START)
cm_fw_roam_start_req(wma_handle->psoc, vdev_id); cm_fw_roam_start_req(wma_handle->psoc, vdev_id);
else else
@@ -4270,6 +4302,7 @@ void wma_handle_roam_sync_timeout(tp_wma_handle wma_handle,
wma_invalid_roam_reason_handler(wma_handle, info->vdev_id, wma_invalid_roam_reason_handler(wma_handle, info->vdev_id,
WMI_ROAM_NOTIF_ROAM_ABORT); WMI_ROAM_NOTIF_ROAM_ABORT);
} }
#endif
static char *wma_get_roam_event_reason_string(uint32_t reason) static char *wma_get_roam_event_reason_string(uint32_t reason)
{ {
@@ -4419,11 +4452,11 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
lim_sae_auth_cleanup_retry(wma_handle->mac_context, lim_sae_auth_cleanup_retry(wma_handle->mac_context,
wmi_event->vdev_id); wmi_event->vdev_id);
break; break;
#endif
case WMI_ROAM_REASON_INVALID: case WMI_ROAM_REASON_INVALID:
wma_invalid_roam_reason_handler(wma_handle, wmi_event->vdev_id, wma_invalid_roam_reason_handler(wma_handle, wmi_event->vdev_id,
wmi_event->notif); wmi_event->notif);
break; break;
#endif
case WMI_ROAM_REASON_RSO_STATUS: case WMI_ROAM_REASON_RSO_STATUS:
wma_rso_cmd_status_event_handler(wmi_event); wma_rso_cmd_status_event_handler(wmi_event);
break; break;
@@ -4436,9 +4469,11 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
lim_sae_auth_cleanup_retry(wma_handle->mac_context, lim_sae_auth_cleanup_retry(wma_handle->mac_context,
wmi_event->vdev_id); wmi_event->vdev_id);
roam_synch_data->roamed_vdev_id = wmi_event->vdev_id; roam_synch_data->roamed_vdev_id = wmi_event->vdev_id;
#ifndef FEATURE_CM_ENABLE
wma_handle->csr_roam_synch_cb(wma_handle->mac_context, wma_handle->csr_roam_synch_cb(wma_handle->mac_context,
roam_synch_data, NULL, roam_synch_data, NULL,
SIR_ROAMING_INVOKE_FAIL); SIR_ROAMING_INVOKE_FAIL);
#endif
wlan_cm_update_roam_states(wma_handle->psoc, wmi_event->vdev_id, wlan_cm_update_roam_states(wma_handle->psoc, wmi_event->vdev_id,
wmi_event->notif_params, wmi_event->notif_params,
ROAM_INVOKE_FAIL_REASON); ROAM_INVOKE_FAIL_REASON);
@@ -4459,9 +4494,11 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
return -ENOMEM; return -ENOMEM;
roam_synch_data->roamed_vdev_id = wmi_event->vdev_id; roam_synch_data->roamed_vdev_id = wmi_event->vdev_id;
#ifndef FEATURE_CM_ENABLE
wma_handle->csr_roam_synch_cb( wma_handle->csr_roam_synch_cb(
wma_handle->mac_context, wma_handle->mac_context,
roam_synch_data, NULL, SIR_ROAMING_DEAUTH); roam_synch_data, NULL, SIR_ROAMING_DEAUTH);
#endif
qdf_mem_free(roam_synch_data); qdf_mem_free(roam_synch_data);
break; break;
default: default: