diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 0bd425a06f64..f9bb1f539c33 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1139,14 +1139,21 @@ static void hdd_save_bss_info(struct hdd_adapter *adapter, hdd_sta_ctx->conn_info.conn_flag.vht_op_present = false; } - /* Cleanup already existing he info */ - hdd_cleanup_conn_info(adapter); + /* + * Cache connection info only in case of station + */ - /* Cache last connection info */ - qdf_mem_copy(&hdd_sta_ctx->cache_conn_info, &hdd_sta_ctx->conn_info, - sizeof(hdd_sta_ctx->cache_conn_info)); + if (adapter->device_mode == QDF_STA_MODE) { + /* Cleanup already existing he info */ + hdd_cleanup_conn_info(adapter); - hdd_copy_he_operation(hdd_sta_ctx, roam_info); + /* Cache last connection info */ + qdf_mem_copy(&hdd_sta_ctx->cache_conn_info, + &hdd_sta_ctx->conn_info, + sizeof(hdd_sta_ctx->cache_conn_info)); + + hdd_copy_he_operation(hdd_sta_ctx, roam_info); + } } /**