|
@@ -303,13 +303,13 @@ void hdd_cm_clear_pmf_stats(struct hdd_adapter *adapter)
|
|
|
sizeof(adapter->deflink->hdd_stats.hdd_pmf_stats));
|
|
|
}
|
|
|
|
|
|
-void hdd_cm_save_connect_status(struct hdd_adapter *adapter,
|
|
|
+void hdd_cm_save_connect_status(struct wlan_hdd_link_info *link_info,
|
|
|
uint32_t reason_code)
|
|
|
{
|
|
|
struct hdd_station_ctx *hdd_sta_ctx;
|
|
|
|
|
|
- hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter->deflink);
|
|
|
- adapter->connect_req_status = reason_code;
|
|
|
+ hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(link_info);
|
|
|
+ link_info->adapter->connect_req_status = reason_code;
|
|
|
hdd_sta_ctx->conn_info.assoc_status_code = reason_code;
|
|
|
hdd_sta_ctx->cache_conn_info.assoc_status_code = reason_code;
|
|
|
}
|
|
@@ -876,7 +876,7 @@ hdd_cm_connect_failure_pre_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
time_buffer_size = sizeof(hdd_sta_ctx->conn_info.connect_time);
|
|
|
qdf_mem_zero(hdd_sta_ctx->conn_info.connect_time, time_buffer_size);
|
|
|
hdd_init_scan_reject_params(hdd_ctx);
|
|
|
- hdd_cm_save_connect_status(adapter, rsp->status_code);
|
|
|
+ hdd_cm_save_connect_status(link_info, rsp->status_code);
|
|
|
hdd_conn_remove_connect_info(hdd_sta_ctx);
|
|
|
ucfg_dp_remove_conn_info(vdev);
|
|
|
hdd_cm_update_rssi_snr_by_bssid(link_info);
|
|
@@ -978,12 +978,13 @@ static void hdd_cm_update_prev_ap_ie(struct hdd_station_ctx *hdd_sta_ctx,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static void hdd_cm_save_bss_info(struct hdd_adapter *adapter,
|
|
|
+static void hdd_cm_save_bss_info(struct wlan_hdd_link_info *link_info,
|
|
|
struct wlan_cm_connect_resp *rsp)
|
|
|
{
|
|
|
struct hdd_context *hdd_ctx;
|
|
|
struct hdd_station_ctx *hdd_sta_ctx;
|
|
|
QDF_STATUS status;
|
|
|
+ struct hdd_adapter *adapter = link_info->adapter;
|
|
|
mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter);
|
|
|
struct sDot11fAssocResponse *assoc_resp;
|
|
|
|
|
@@ -993,7 +994,7 @@ static void hdd_cm_save_bss_info(struct hdd_adapter *adapter,
|
|
|
}
|
|
|
|
|
|
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
- hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter->deflink);
|
|
|
+ hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(link_info);
|
|
|
|
|
|
assoc_resp = qdf_mem_malloc(sizeof(struct sDot11fAssocResponse));
|
|
|
if (!assoc_resp)
|
|
@@ -1031,7 +1032,7 @@ static void hdd_cm_save_bss_info(struct hdd_adapter *adapter,
|
|
|
} else {
|
|
|
hdd_sta_ctx->conn_info.conn_flag.ht_present = false;
|
|
|
}
|
|
|
- if (hdd_is_roam_sync_in_progress(hdd_ctx, adapter->deflink->vdev_id))
|
|
|
+ if (hdd_is_roam_sync_in_progress(hdd_ctx, link_info->vdev_id))
|
|
|
hdd_sta_ctx->conn_info.roam_count++;
|
|
|
|
|
|
if (assoc_resp->HTInfo.present) {
|
|
@@ -1052,7 +1053,7 @@ static void hdd_cm_save_bss_info(struct hdd_adapter *adapter,
|
|
|
*/
|
|
|
if (adapter->device_mode == QDF_STA_MODE) {
|
|
|
/* Cleanup already existing he info */
|
|
|
- hdd_cleanup_conn_info(adapter->deflink);
|
|
|
+ hdd_cleanup_conn_info(link_info);
|
|
|
|
|
|
/* Cache last connection info */
|
|
|
qdf_mem_copy(&hdd_sta_ctx->cache_conn_info,
|
|
@@ -1179,7 +1180,7 @@ static void hdd_wmm_cm_connect(struct wlan_objmgr_vdev *vdev,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
|
|
|
+static void hdd_cm_save_connect_info(struct wlan_hdd_link_info *link_info,
|
|
|
struct wlan_cm_connect_resp *rsp)
|
|
|
{
|
|
|
struct hdd_station_ctx *sta_ctx;
|
|
@@ -1190,18 +1191,20 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
|
|
|
uint32_t ie_len, status;
|
|
|
tDot11fBeaconIEs *bcn_ie;
|
|
|
struct s_ext_cap *p_ext_cap = NULL;
|
|
|
+ struct hdd_adapter *adapter = link_info->adapter;
|
|
|
mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter);
|
|
|
uint32_t phymode;
|
|
|
|
|
|
- sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter->deflink);
|
|
|
+ sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(link_info);
|
|
|
bcn_ie = qdf_mem_malloc(sizeof(*bcn_ie));
|
|
|
if (!bcn_ie)
|
|
|
return;
|
|
|
|
|
|
qdf_copy_macaddr(&sta_ctx->conn_info.bssid, &rsp->bssid);
|
|
|
- vdev = hdd_objmgr_get_vdev_by_user(adapter->deflink, WLAN_DP_ID);
|
|
|
+ vdev = hdd_objmgr_get_vdev_by_user(link_info, WLAN_DP_ID);
|
|
|
if (vdev) {
|
|
|
- ucfg_dp_conn_info_set_bssid(vdev, &rsp->bssid);
|
|
|
+ if (ucfg_dp_get_intf_id(vdev) == rsp->vdev_id)
|
|
|
+ ucfg_dp_conn_info_set_bssid(vdev, &rsp->bssid);
|
|
|
hdd_objmgr_put_vdev_by_user(vdev, WLAN_DP_ID);
|
|
|
}
|
|
|
|
|
@@ -1214,7 +1217,7 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
|
|
|
sta_ctx->conn_info.assoc_status_code = rsp->status_code;
|
|
|
|
|
|
crypto_params =
|
|
|
- wlan_crypto_vdev_get_crypto_params(adapter->deflink->vdev);
|
|
|
+ wlan_crypto_vdev_get_crypto_params(link_info->vdev);
|
|
|
|
|
|
if (crypto_params) {
|
|
|
sme_fill_enc_type(&sta_ctx->conn_info.uc_encrypt_type,
|
|
@@ -1227,7 +1230,7 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
|
|
|
sta_ctx->conn_info.last_auth_type =
|
|
|
sta_ctx->conn_info.auth_type;
|
|
|
}
|
|
|
- des_chan = wlan_vdev_mlme_get_des_chan(adapter->deflink->vdev);
|
|
|
+ des_chan = wlan_vdev_mlme_get_des_chan(link_info->vdev);
|
|
|
|
|
|
sta_ctx->conn_info.chan_freq = rsp->freq;
|
|
|
|
|
@@ -1277,7 +1280,7 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
|
|
|
|
|
|
}
|
|
|
|
|
|
- vdev = hdd_objmgr_get_vdev_by_user(adapter->deflink, WLAN_OSIF_CM_ID);
|
|
|
+ vdev = hdd_objmgr_get_vdev_by_user(link_info, WLAN_OSIF_CM_ID);
|
|
|
if (vdev) {
|
|
|
sta_ctx->conn_info.nss = wlan_vdev_mlme_get_nss(vdev);
|
|
|
ucfg_wlan_vdev_mgr_get_param(vdev, WLAN_MLME_CFG_RATE_FLAGS,
|
|
@@ -1293,7 +1296,7 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
|
|
|
}
|
|
|
qdf_mem_free(bcn_ie);
|
|
|
|
|
|
- hdd_cm_save_bss_info(adapter, rsp);
|
|
|
+ hdd_cm_save_bss_info(link_info, rsp);
|
|
|
}
|
|
|
|
|
|
#ifdef WLAN_FEATURE_FILS_SK
|
|
@@ -1431,7 +1434,7 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
|
|
|
wlan_hdd_ft_set_key_delay(vdev);
|
|
|
hdd_cm_update_rssi_snr_by_bssid(link_info);
|
|
|
- hdd_cm_save_connect_status(adapter, rsp->status_code);
|
|
|
+ hdd_cm_save_connect_status(link_info, rsp->status_code);
|
|
|
|
|
|
hdd_init_scan_reject_params(hdd_ctx);
|
|
|
time_buffer_size = sizeof(sta_ctx->conn_info.connect_time);
|
|
@@ -1441,13 +1444,14 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
hdd_start_tsf_sync(adapter);
|
|
|
hdd_cm_rec_connect_info(rsp);
|
|
|
|
|
|
- hdd_cm_save_connect_info(adapter, rsp);
|
|
|
+ hdd_cm_save_connect_info(link_info, rsp);
|
|
|
if (adapter->device_mode == QDF_STA_MODE &&
|
|
|
hdd_adapter_is_ml_adapter(adapter)) {
|
|
|
/* Save connection info in assoc link adapter as well */
|
|
|
assoc_link_adapter = hdd_get_assoc_link_adapter(adapter);
|
|
|
if (assoc_link_adapter)
|
|
|
- hdd_cm_save_connect_info(assoc_link_adapter, rsp);
|
|
|
+ hdd_cm_save_connect_info(assoc_link_adapter->deflink,
|
|
|
+ rsp);
|
|
|
}
|
|
|
if (hdd_add_beacon_filter(adapter) != 0)
|
|
|
hdd_err("add beacon filter failed");
|