qcacld-3.0: Register for qdf_op_protect/unprotect

As a step towards removing qdf_ssr_protect, register for the
replacement APIs, qdf_op_protect/unprotect.

Change-Id: Ica5802082b3be51f47bdf4ae0eb132b80c29b08a
CRs-Fixed: 2418432
This commit is contained in:
Dustin Brown
2019-03-18 11:07:32 -07:00
committed by nshrivas
orang tua dcbad34816
melakukan 265e82b4d0
3 mengubah file dengan 25 tambahan dan 0 penghapusan

Melihat File

@@ -12911,6 +12911,23 @@ static inline int hdd_state_query_cb(void)
return !!wlan_hdd_validate_context(cds_get_context(QDF_MODULE_ID_HDD)); return !!wlan_hdd_validate_context(cds_get_context(QDF_MODULE_ID_HDD));
} }
static int __hdd_op_protect_cb(void **out_sync, const char *func)
{
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (!hdd_ctx)
return -EAGAIN;
return __osif_psoc_sync_op_start(hdd_ctx->parent_dev,
(struct osif_psoc_sync **)out_sync,
func);
}
static void __hdd_op_unprotect_cb(void *sync, const char *func)
{
__osif_psoc_sync_op_stop(sync, func);
}
/** /**
* hdd_init() - Initialize Driver * hdd_init() - Initialize Driver
* *
@@ -12930,6 +12947,7 @@ int hdd_init(void)
return -ENOMEM; return -ENOMEM;
} }
qdf_op_callbacks_register(__hdd_op_protect_cb, __hdd_op_unprotect_cb);
qdf_register_module_state_query_callback(hdd_state_query_cb); qdf_register_module_state_query_callback(hdd_state_query_cb);
wlan_init_bug_report_lock(); wlan_init_bug_report_lock();
@@ -12961,6 +12979,7 @@ void hdd_deinit(void)
#endif #endif
wlan_destroy_bug_report_lock(); wlan_destroy_bug_report_lock();
qdf_op_callbacks_register(NULL, NULL);
cds_deinit(); cds_deinit();
} }

Melihat File

@@ -58,6 +58,9 @@ static struct osif_psoc_sync *osif_psoc_sync_lookup(struct device *dev)
for (i = 0; i < QDF_ARRAY_SIZE(__osif_psoc_sync_arr); i++) { for (i = 0; i < QDF_ARRAY_SIZE(__osif_psoc_sync_arr); i++) {
struct osif_psoc_sync *psoc_sync = __osif_psoc_sync_arr + i; struct osif_psoc_sync *psoc_sync = __osif_psoc_sync_arr + i;
if (!psoc_sync->in_use)
continue;
if (psoc_sync->dev == dev) if (psoc_sync->dev == dev)
return psoc_sync; return psoc_sync;
} }

Melihat File

@@ -57,6 +57,9 @@ static struct osif_vdev_sync *osif_vdev_sync_lookup(struct net_device *net_dev)
for (i = 0; i < QDF_ARRAY_SIZE(__osif_vdev_sync_arr); i++) { for (i = 0; i < QDF_ARRAY_SIZE(__osif_vdev_sync_arr); i++) {
struct osif_vdev_sync *vdev_sync = __osif_vdev_sync_arr + i; struct osif_vdev_sync *vdev_sync = __osif_vdev_sync_arr + i;
if (!vdev_sync->in_use)
continue;
if (vdev_sync->net_dev == net_dev) if (vdev_sync->net_dev == net_dev)
return vdev_sync; return vdev_sync;
} }