mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
mei: bus: add mei_cldev_mtu interface
Add a new helper function that allows MEI client drivers to query the maximum transmission unit (MTU) for a connected MEI client. This is useful for clients that need to transmit large payloads, such as firmware blobs, allowing them to determine the maximum message size that can be safely sent before starting transmission and size of the buffer to allocate when receiving data. Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20250905154953.3974335-2-badal.nilawar@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
committed by
Lucas De Marchi
parent
187e16f69d
commit
8d5b7009aa
@@ -614,6 +614,19 @@ u8 mei_cldev_ver(const struct mei_cl_device *cldev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mei_cldev_ver);
|
||||
|
||||
/**
|
||||
* mei_cldev_mtu - max message that client can send and receive
|
||||
*
|
||||
* @cldev: mei client device
|
||||
*
|
||||
* Return: mtu or 0 if client is not connected
|
||||
*/
|
||||
size_t mei_cldev_mtu(const struct mei_cl_device *cldev)
|
||||
{
|
||||
return mei_cl_mtu(cldev->cl);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mei_cldev_mtu);
|
||||
|
||||
/**
|
||||
* mei_cldev_enabled - check whether the device is enabled
|
||||
*
|
||||
|
||||
@@ -113,6 +113,7 @@ int mei_cldev_register_notif_cb(struct mei_cl_device *cldev,
|
||||
mei_cldev_cb_t notif_cb);
|
||||
|
||||
u8 mei_cldev_ver(const struct mei_cl_device *cldev);
|
||||
size_t mei_cldev_mtu(const struct mei_cl_device *cldev);
|
||||
|
||||
void *mei_cldev_get_drvdata(const struct mei_cl_device *cldev);
|
||||
void mei_cldev_set_drvdata(struct mei_cl_device *cldev, void *data);
|
||||
|
||||
Reference in New Issue
Block a user