|
@@ -172,8 +172,8 @@
|
|
|
#include <wlan_hdd_debugfs_coex.h>
|
|
|
#include "wlan_blm_ucfg_api.h"
|
|
|
#include "ol_txrx.h"
|
|
|
-#include "nan_ucfg_api.h"
|
|
|
#include "wlan_hdd_sta_info.h"
|
|
|
+#include "mac_init_api.h"
|
|
|
|
|
|
#ifdef MODULE
|
|
|
#define WLAN_MODULE_NAME module_name(THIS_MODULE)
|
|
@@ -350,6 +350,45 @@ struct sock *cesium_nl_srv_sock;
|
|
|
static void wlan_hdd_auto_shutdown_cb(void);
|
|
|
#endif
|
|
|
|
|
|
+QDF_STATUS hdd_common_roam_callback(struct wlan_objmgr_psoc *psoc,
|
|
|
+ uint8_t session_id,
|
|
|
+ struct csr_roam_info *roam_info,
|
|
|
+ uint32_t roam_id,
|
|
|
+ eRoamCmdStatus roam_status,
|
|
|
+ eCsrRoamResult roam_result)
|
|
|
+{
|
|
|
+ struct hdd_context *hdd_ctx;
|
|
|
+ struct hdd_adapter *adapter;
|
|
|
+
|
|
|
+ adapter = wlan_hdd_get_adapter_from_vdev(psoc, session_id);
|
|
|
+ if (!adapter)
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+
|
|
|
+ hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
+ if (!hdd_ctx)
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+
|
|
|
+ switch (adapter->device_mode) {
|
|
|
+ case QDF_STA_MODE:
|
|
|
+ case QDF_NDI_MODE:
|
|
|
+ case QDF_P2P_CLIENT_MODE:
|
|
|
+ case QDF_P2P_DEVICE_MODE:
|
|
|
+ hdd_sme_roam_callback(adapter, roam_info, roam_id, roam_status,
|
|
|
+ roam_result);
|
|
|
+ break;
|
|
|
+ case QDF_SAP_MODE:
|
|
|
+ case QDF_P2P_GO_MODE:
|
|
|
+ wlansap_roam_callback(adapter->session.ap.sap_context,
|
|
|
+ roam_info, roam_id, roam_status,
|
|
|
+ roam_result);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ hdd_err("Wrong device mode");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
/**
|
|
|
* hdd_mic_flush_work() - disable and flush pending mic work
|
|
|
* @adapter: Pointer to hdd adapter
|
|
@@ -4406,15 +4445,9 @@ release_vdev:
|
|
|
}
|
|
|
|
|
|
static int hdd_set_sme_session_param(struct hdd_adapter *adapter,
|
|
|
- struct sme_session_params *session_param,
|
|
|
- csr_roam_complete_cb callback,
|
|
|
- void *callback_ctx)
|
|
|
+ struct sme_session_params *session_param)
|
|
|
{
|
|
|
- session_param->session_close_cb = hdd_sme_close_session_callback;
|
|
|
- session_param->callback = callback;
|
|
|
- session_param->callback_ctx = callback_ctx;
|
|
|
session_param->vdev = adapter->vdev;
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -4453,8 +4486,7 @@ bool hdd_is_vdev_in_conn_state(struct hdd_adapter *adapter)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-int hdd_vdev_create(struct hdd_adapter *adapter,
|
|
|
- csr_roam_complete_cb callback, void *ctx)
|
|
|
+int hdd_vdev_create(struct hdd_adapter *adapter)
|
|
|
{
|
|
|
QDF_STATUS status;
|
|
|
int errno;
|
|
@@ -4473,8 +4505,7 @@ int hdd_vdev_create(struct hdd_adapter *adapter,
|
|
|
return errno;
|
|
|
}
|
|
|
|
|
|
- errno = hdd_set_sme_session_param(adapter, &sme_session_params,
|
|
|
- callback, ctx);
|
|
|
+ errno = hdd_set_sme_session_param(adapter, &sme_session_params);
|
|
|
if (errno) {
|
|
|
hdd_err("failed to populating SME params");
|
|
|
goto objmgr_vdev_destroy_procedure;
|
|
@@ -10345,7 +10376,7 @@ int hdd_start_station_adapter(struct hdd_adapter *adapter)
|
|
|
return qdf_status_to_os_return(QDF_STATUS_SUCCESS);
|
|
|
}
|
|
|
|
|
|
- ret = hdd_vdev_create(adapter, hdd_sme_roam_callback, adapter);
|
|
|
+ ret = hdd_vdev_create(adapter);
|
|
|
if (ret) {
|
|
|
hdd_err("failed to create vdev: %d", ret);
|
|
|
return ret;
|
|
@@ -10412,8 +10443,7 @@ int hdd_start_ap_adapter(struct hdd_adapter *adapter)
|
|
|
return qdf_status_to_os_return(QDF_STATUS_E_FAILURE);
|
|
|
}
|
|
|
|
|
|
- ret = hdd_vdev_create(adapter, wlansap_roam_callback,
|
|
|
- adapter->session.ap.sap_context);
|
|
|
+ ret = hdd_vdev_create(adapter);
|
|
|
if (ret) {
|
|
|
hdd_err("failed to create vdev, status:%d", ret);
|
|
|
hdd_sap_destroy_ctx(adapter);
|
|
@@ -12965,6 +12995,10 @@ int hdd_register_cb(struct hdd_context *hdd_ctx)
|
|
|
sme_set_md_bl_evt_cb(mac_handle, hdd_md_bl_evt_cb, (void *)hdd_ctx);
|
|
|
#endif /* WLAN_FEATURE_MOTION_DETECTION */
|
|
|
|
|
|
+ mac_register_sesssion_open_close_cb(hdd_ctx->mac_handle,
|
|
|
+ hdd_sme_close_session_callback,
|
|
|
+ hdd_common_roam_callback);
|
|
|
+
|
|
|
hdd_exit();
|
|
|
|
|
|
return ret;
|