|
@@ -710,8 +710,18 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
|
|
|
|
|
|
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
|
|
|
|
- /* if not associated, no need to proceed with reassoc */
|
|
|
|
- if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
|
|
|
|
|
|
+ /*
|
|
|
|
+ * pHddStaCtx->conn_info.connState is set to disconnected only
|
|
|
|
+ * after the disconnect done indication from SME. If the SME is
|
|
|
|
+ * in the process of disconnecting, the SME Connection state is
|
|
|
|
+ * set to disconnected and the pHddStaCtx->conn_info.connState
|
|
|
|
+ * will still be associated till the disconnect is done.
|
|
|
|
+ * So check both the HDD state and SME state here.
|
|
|
|
+ * If not associated, no need to proceed with reassoc
|
|
|
|
+ */
|
|
|
|
+ if ((eConnectionState_Associated != sta_ctx->conn_info.connState) ||
|
|
|
|
+ (!sme_is_conn_state_connected(hdd_ctx->mac_handle,
|
|
|
|
+ adapter->session_id))) {
|
|
hdd_warn("Not associated");
|
|
hdd_warn("Not associated");
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
goto exit;
|
|
goto exit;
|