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:
@@ -638,6 +638,10 @@ enum wlan_serialization_cmd_type {
|
||||
* @WLAN_SER_CANCEL_SINGLE_SCAN: Cancel a single scan with a given ID
|
||||
* @WLAN_SER_CANCEL_PDEV_SCANS: Cancel all the scans on a given pdev
|
||||
* @WLAN_SER_CANCEL_VDEV_SCANS: Cancel all the scans on given vdev
|
||||
* @WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD: Cancel all non scans on a given pdev
|
||||
* @WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD: Cancel all non scans on a given vdev
|
||||
* @WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE: Cancel all non scans on a given vdev
|
||||
* and matching cmd type
|
||||
* @WLAN_SER_CANCEL_NON_SCAN_CMD: Cancel the given non scan command
|
||||
*/
|
||||
enum wlan_serialization_cancel_type {
|
||||
@@ -646,6 +650,7 @@ enum wlan_serialization_cancel_type {
|
||||
WLAN_SER_CANCEL_VDEV_SCANS,
|
||||
WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD,
|
||||
WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD,
|
||||
WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE,
|
||||
WLAN_SER_CANCEL_NON_SCAN_CMD,
|
||||
WLAN_SER_CANCEL_MAX,
|
||||
};
|
||||
|
@@ -756,57 +756,48 @@ wlan_serialization_find_and_cancel_cmd(
|
||||
switch (req_type) {
|
||||
case WLAN_SER_CANCEL_SINGLE_SCAN:
|
||||
/* remove scan cmd which matches the given cmd struct */
|
||||
status = wlan_serialization_cmd_cancel_handler(ser_obj,
|
||||
cmd,
|
||||
NULL,
|
||||
NULL,
|
||||
cmd->cmd_type,
|
||||
queue_type);
|
||||
status = wlan_serialization_cmd_cancel_handler(
|
||||
ser_obj, cmd, NULL, NULL,
|
||||
WLAN_SER_CMD_SCAN, queue_type);
|
||||
break;
|
||||
case WLAN_SER_CANCEL_PDEV_SCANS:
|
||||
/* remove all scan cmds which matches the pdev object */
|
||||
status = wlan_serialization_cmd_cancel_handler(
|
||||
ser_obj,
|
||||
NULL,
|
||||
wlan_vdev_get_pdev(cmd->vdev),
|
||||
NULL,
|
||||
cmd->cmd_type,
|
||||
queue_type);
|
||||
ser_obj, NULL, pdev, NULL,
|
||||
WLAN_SER_CMD_SCAN, queue_type);
|
||||
break;
|
||||
case WLAN_SER_CANCEL_VDEV_SCANS:
|
||||
/* remove all scan cmds which matches the vdev object */
|
||||
status = wlan_serialization_cmd_cancel_handler(ser_obj,
|
||||
NULL, NULL,
|
||||
cmd->vdev,
|
||||
cmd->cmd_type,
|
||||
queue_type);
|
||||
status = wlan_serialization_cmd_cancel_handler(
|
||||
ser_obj, NULL, NULL, cmd->vdev,
|
||||
WLAN_SER_CMD_SCAN, queue_type);
|
||||
break;
|
||||
case WLAN_SER_CANCEL_NON_SCAN_CMD:
|
||||
/* remove nonscan cmd which matches the given cmd */
|
||||
status = wlan_serialization_cmd_cancel_handler(ser_obj,
|
||||
cmd,
|
||||
NULL,
|
||||
NULL,
|
||||
cmd->cmd_type,
|
||||
queue_type);
|
||||
status = wlan_serialization_cmd_cancel_handler(
|
||||
ser_obj, cmd, NULL, NULL,
|
||||
WLAN_SER_CMD_NONSCAN, queue_type);
|
||||
break;
|
||||
case WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD:
|
||||
/* remove all non scan cmds which matches the pdev object */
|
||||
status = wlan_serialization_cmd_cancel_handler(
|
||||
ser_obj,
|
||||
NULL,
|
||||
wlan_vdev_get_pdev(cmd->vdev),
|
||||
NULL,
|
||||
cmd->cmd_type,
|
||||
queue_type);
|
||||
ser_obj, NULL, pdev, NULL,
|
||||
WLAN_SER_CMD_NONSCAN, queue_type);
|
||||
break;
|
||||
case WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD:
|
||||
/* remove all non scan cmds which matches the vdev object */
|
||||
status = wlan_serialization_cmd_cancel_handler(ser_obj,
|
||||
NULL, NULL,
|
||||
cmd->vdev,
|
||||
cmd->cmd_type,
|
||||
queue_type);
|
||||
status = wlan_serialization_cmd_cancel_handler(
|
||||
ser_obj, NULL, NULL, cmd->vdev,
|
||||
WLAN_SER_CMD_NONSCAN, queue_type);
|
||||
break;
|
||||
case WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE:
|
||||
/*
|
||||
* remove all non scan cmds which matches the vdev
|
||||
* and given cmd type
|
||||
*/
|
||||
status = wlan_serialization_cmd_cancel_handler(
|
||||
ser_obj, NULL, NULL, cmd->vdev,
|
||||
cmd->cmd_type, queue_type);
|
||||
break;
|
||||
default:
|
||||
ser_err("Invalid request");
|
||||
|
@@ -486,6 +486,15 @@ wlan_ser_cancel_non_scan_cmd(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cmd_type > WLAN_SER_CMD_NONSCAN && vdev &&
|
||||
(!wlan_serialization_match_cmd_type(nnode, cmd_type,
|
||||
WLAN_SER_PDEV_NODE) ||
|
||||
!wlan_serialization_match_cmd_vdev(nnode, vdev,
|
||||
WLAN_SER_PDEV_NODE))) {
|
||||
pnode = nnode;
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* active queue can't be removed directly, requester needs to
|
||||
* wait for active command response and send remove request for
|
||||
|
Reference in New Issue
Block a user