qcacmn: Add interface APIs b/w mlme and serialization

Add the interface layers APIs that will be utilized by the mlme
module to interface with the serialization module.
Also add a serialization command cancel option to cancel cmds of a vdev
belonging to a given command type and define the vdev mlme legacy callback
function that will be used by the mlme-serialization interface APIs

Change-Id: I6a376465ef2929f15c6464bbd29c0250251696d8
CRs-Fixed: 2312821
This commit is contained in:
Santosh Anbu
2018-11-22 13:03:16 +05:30
committed by nshrivas
parent 502095b236
commit 9c61c1fb03
6 changed files with 399 additions and 34 deletions

View File

@@ -91,6 +91,8 @@ enum vdev_cmd_type {
* of legacy vdev object
* @mlme_vdev_ext_hdl_destroy: callback to invoke destroy of legacy
* vdev object
* @mlme_vdev_enqueue_exp_cmd: callback to enqueue exception command
* required by serialization
*/
struct vdev_mlme_ops {
QDF_STATUS (*mlme_vdev_validate_basic_params)(
@@ -155,6 +157,9 @@ struct vdev_mlme_ops {
struct vdev_mlme_obj *vdev_mlme);
QDF_STATUS (*mlme_vdev_ext_hdl_destroy)(
struct vdev_mlme_obj *vdev_mlme);
QDF_STATUS (*mlme_vdev_enqueue_exp_cmd)(
struct vdev_mlme_obj *vdev_mlme,
uint8_t cmd_type);
};
@@ -677,4 +682,27 @@ static inline QDF_STATUS mlme_vdev_ext_hdl_destroy(
return ret;
}
/**
* mlme_vdev_enqueue_exp_ser_cmd - Enqueue exception serialization cmd
* @vdev_mlme_obj: VDEV MLME comp object
* @cmd_type: Serialization command type
*
* API to enqueue the exception serialization command, used by
* mlme-serialization wrapper layer
*
* Return: SUCCESS on successful enqueuing the command
* Else FAILURE
*/
static inline QDF_STATUS
mlme_vdev_enqueue_exp_ser_cmd(struct vdev_mlme_obj *vdev_mlme,
uint8_t cmd_type)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (vdev_mlme->ops && vdev_mlme->ops->mlme_vdev_enqueue_exp_cmd)
ret = vdev_mlme->ops->mlme_vdev_enqueue_exp_cmd(vdev_mlme,
cmd_type);
return ret;
}
#endif