提交 71f6c323 编写于 作者: F Fabien Parent 提交者: Greg Kroah-Hartman

greybus: connection: {en,dis}able fct flow in connection management

The AP must enable the FCT flow of APBA once it has received the response
from the AP that the connection between APBA and a module has been setted up.
Disable the flow of FCT tokens when destroying connections.
Signed-off-by: NFabien Parent <fparent@baylibre.com>
Reviewed-by: NJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
上级 e70055b3
......@@ -314,7 +314,7 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
int ret;
if (gb_connection_is_static(connection))
return 0;
return gb_connection_hd_fct_flow_enable(connection);
intf = connection->intf;
ret = gb_svc_connection_create(hd->svc,
......@@ -330,12 +330,23 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
return ret;
}
ret = gb_connection_hd_fct_flow_enable(connection);
if (ret) {
gb_svc_connection_destroy(hd->svc, hd->svc->ap_intf_id,
connection->hd_cport_id,
intf->interface_id,
connection->intf_cport_id);
return ret;
}
return 0;
}
static void
gb_connection_svc_connection_destroy(struct gb_connection *connection)
{
gb_connection_hd_fct_flow_disable(connection);
if (gb_connection_is_static(connection))
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册