diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 2304c4c028aa..fd2465fbd014 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -802,10 +802,16 @@ void hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter, const tSirMacAddr bssid, int channel) { hdd_wext_state_t *wext_state = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); + struct hdd_station_ctx *hdd_sta_ctx = + WLAN_HDD_GET_STATION_CTX_PTR(adapter); tCsrRoamProfile *profile = &wext_state->roamProfile; + tSirMacAddr connected_bssid; + qdf_mem_copy(connected_bssid, hdd_sta_ctx->conn_info.bssId.bytes, + ETH_ALEN); sme_fast_reassoc(WLAN_HDD_GET_HAL_CTX(adapter), - profile, bssid, channel, adapter->sessionId); + profile, bssid, channel, adapter->sessionId, + connected_bssid); } #endif diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index dbd5ecee0f6a..6be2c45d01c2 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1488,12 +1488,13 @@ QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile, * @bssid: bssid to look for in scan cache * @channel: channel on which reassoc should be send * @vdev_id: vdev id + * @connected_bssid: bssid of currently connected profile * * Return: QDF_STATUS */ QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile, const tSirMacAddr bssid, int channel, - uint8_t vdev_id); + uint8_t vdev_id, const tSirMacAddr connected_bssid); /** * sme_congestion_register_callback(): registers congestion callback diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index b534f56c3739..175d350d712e 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -15663,7 +15663,7 @@ free_scan_flter: QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile, const tSirMacAddr bssid, int channel, - uint8_t vdev_id) + uint8_t vdev_id, const tSirMacAddr connected_bssid) { QDF_STATUS status; struct wma_roam_invoke_cmd *fastreassoc; @@ -15674,6 +15674,11 @@ QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile, sme_err("qdf_mem_malloc failed for fastreassoc"); return QDF_STATUS_E_NOMEM; } + /* if both are same then set the flag */ + if (!qdf_mem_cmp(connected_bssid, bssid, ETH_ALEN)) { + fastreassoc->is_same_bssid = true; + sme_debug("bssid same, bssid[%pM]", bssid); + } fastreassoc->vdev_id = vdev_id; fastreassoc->bssid[0] = bssid[0]; fastreassoc->bssid[1] = bssid[1]; diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index b7b12d8c2dda..a65f374d880a 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -2108,6 +2108,7 @@ typedef struct wma_unit_test_cmd { * @channel: channel * @frame_len: frame length, includs mac header, fixed params and ies * @frame_buf: buffer contaning probe response or beacon + * @is_same_bssid: flag to indicate if roaming is requested for same bssid */ struct wma_roam_invoke_cmd { uint32_t vdev_id; @@ -2115,6 +2116,7 @@ struct wma_roam_invoke_cmd { uint32_t channel; uint32_t frame_len; uint8_t *frame_buf; + uint8_t is_same_bssid; }; /**