|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
|
|
*
|
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
@@ -218,83 +218,6 @@ int hdd_objmgr_release_and_destroy_pdev(struct hdd_context *hdd_ctx)
|
|
|
return qdf_status_to_os_return(status);
|
|
|
}
|
|
|
|
|
|
-#ifdef WLAN_OBJMGR_REF_ID_TRACE
|
|
|
-struct wlan_objmgr_vdev *__hdd_objmgr_get_vdev(struct hdd_adapter *adapter,
|
|
|
- const char *func,
|
|
|
- int line)
|
|
|
-{
|
|
|
- struct wlan_objmgr_vdev *vdev = NULL;
|
|
|
- QDF_STATUS status;
|
|
|
-
|
|
|
- if (!adapter) {
|
|
|
- hdd_err("Adapter is NULL (via %s)", func);
|
|
|
- return NULL;
|
|
|
- }
|
|
|
-
|
|
|
- qdf_spin_lock_bh(&adapter->vdev_lock);
|
|
|
- vdev = adapter->vdev;
|
|
|
- if (vdev) {
|
|
|
- status = wlan_objmgr_vdev_try_get_ref_debug(vdev, WLAN_OSIF_ID,
|
|
|
- func, line);
|
|
|
- if (QDF_IS_STATUS_ERROR(status))
|
|
|
- vdev = NULL;
|
|
|
- }
|
|
|
- qdf_spin_unlock_bh(&adapter->vdev_lock);
|
|
|
-
|
|
|
- if (!vdev)
|
|
|
- hdd_debug("VDEV is NULL (via %s)", func);
|
|
|
-
|
|
|
- return vdev;
|
|
|
-}
|
|
|
-
|
|
|
-void __hdd_objmgr_put_vdev(struct wlan_objmgr_vdev *vdev, const char *func,
|
|
|
- int line)
|
|
|
-{
|
|
|
- if (!vdev) {
|
|
|
- hdd_err("VDEV is NULL (via %s)", func);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- wlan_objmgr_vdev_release_ref_debug(vdev, WLAN_OSIF_ID, func, line);
|
|
|
-}
|
|
|
-#else
|
|
|
-struct wlan_objmgr_vdev *__hdd_objmgr_get_vdev(struct hdd_adapter *adapter,
|
|
|
- const char *func)
|
|
|
-{
|
|
|
- struct wlan_objmgr_vdev *vdev = NULL;
|
|
|
- QDF_STATUS status;
|
|
|
-
|
|
|
- if (!adapter) {
|
|
|
- hdd_err("Adapter is NULL (via %s)", func);
|
|
|
- return NULL;
|
|
|
- }
|
|
|
-
|
|
|
- qdf_spin_lock_bh(&adapter->vdev_lock);
|
|
|
- vdev = adapter->vdev;
|
|
|
- if (vdev) {
|
|
|
- status = wlan_objmgr_vdev_try_get_ref(vdev, WLAN_OSIF_ID);
|
|
|
- if (QDF_IS_STATUS_ERROR(status))
|
|
|
- vdev = NULL;
|
|
|
- }
|
|
|
- qdf_spin_unlock_bh(&adapter->vdev_lock);
|
|
|
-
|
|
|
- if (!vdev)
|
|
|
- hdd_debug("VDEV is NULL (via %s)", func);
|
|
|
-
|
|
|
- return vdev;
|
|
|
-}
|
|
|
-
|
|
|
-void __hdd_objmgr_put_vdev(struct wlan_objmgr_vdev *vdev, const char *func)
|
|
|
-{
|
|
|
- if (!vdev) {
|
|
|
- hdd_err("VDEV is NULL (via %s)", func);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- wlan_objmgr_vdev_release_ref(vdev, WLAN_OSIF_ID);
|
|
|
-}
|
|
|
-#endif
|
|
|
-
|
|
|
int hdd_objmgr_set_peer_mlme_auth_state(struct wlan_objmgr_vdev *vdev,
|
|
|
bool is_authenticated)
|
|
|
{
|