diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index ff15f28edb26..0df4af7726ba 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -4583,7 +4583,7 @@ static int drv_cmd_get_scan_home_away_time(struct hdd_adapter *adapter, { int ret = 0; uint16_t val; - char extra[32]; + char extra[32] = {0}; uint8_t len = 0; QDF_STATUS status; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 623282c765f0..effeeb23ecd7 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4838,6 +4838,7 @@ QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter) hdd_register_wext(adapter->dev); hdd_conn_set_connection_state(adapter, eConnectionState_NotConnected); + sme_roam_reset_configs(mac_handle, adapter->vdev_id); /* set fast roaming capability in sme session */ status = sme_config_fast_roaming(mac_handle, adapter->vdev_id, diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index a996f51ff689..4da258bb188d 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1014,6 +1014,16 @@ sme_modify_roam_cand_sel_criteria(mac_handle_t mac_handle, */ QDF_STATUS sme_roam_control_restore_default_config(mac_handle_t mac_handle, uint8_t vdev_id); + +/** + * sme_roam_reset_configs() - API to reset roam config + * @mac_handle: Opaque handle to the global MAC context + * @vdev_id: vdev Identifier + * + * Return: void + */ +void sme_roam_reset_configs(mac_handle_t mac_handle, uint8_t vdev_id); + QDF_STATUS sme_set_neighbor_scan_min_chan_time(mac_handle_t mac_handle, const uint16_t nNeighborScanMinChanTime, uint8_t sessionId); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 72b5a857a932..048b2cf24b03 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -6834,6 +6834,15 @@ sme_restore_default_roaming_params(struct mac_context *mac, mac->mlme_cfg->lfr.roam_scan_period_after_inactivity; } +void sme_roam_reset_configs(mac_handle_t mac_handle, uint8_t vdev_id) +{ + struct mac_context *mac = MAC_CONTEXT(mac_handle); + tCsrNeighborRoamControlInfo *neighbor_roam_info; + + neighbor_roam_info = &mac->roam.neighborRoamInfo[vdev_id]; + sme_restore_default_roaming_params(mac, neighbor_roam_info); +} + QDF_STATUS sme_roam_control_restore_default_config(mac_handle_t mac_handle, uint8_t vdev_id) {