qcacmn: Add qdf API for dev_hold

Add qdf API for dev_hold

Change-Id: I585e6781718fd55e8359906e5355f068376406c2
CRs-Fixed: 3579431
This commit is contained in:
Himanshu Batra
2023-08-09 14:01:35 +05:30
committed by Rahul Choudhary
parent d97cfce6b4
commit f86703892d
4 changed files with 49 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@@ -65,6 +65,17 @@ qdf_net_if_get_dev_by_name(char *nif_name);
QDF_STATUS
qdf_net_if_release_dev(struct qdf_net_if *nif);
/**
* qdf_net_if_hold_dev() - Hold reference to network device
* @nif: network device
*
* This function holds reference to the network device
*
* Return: QDF_STATUS_SUCCESS on success
*/
QDF_STATUS
qdf_net_if_hold_dev(struct qdf_net_if *nif);
/**
* qdf_napi_enable() - Enable the napi schedule
* @napi: NAPI context
@@ -138,6 +149,12 @@ qdf_net_if_release_dev(struct qdf_net_if *nif)
return __qdf_net_if_release_dev(nif);
}
static inline QDF_STATUS
qdf_net_if_hold_dev(struct qdf_net_if *nif)
{
return __qdf_net_if_hold_dev(nif);
}
/**
* qdf_net_update_net_device_dev_addr() - update net_device dev_addr
* @ndev: net_device