|
@@ -14,6 +14,8 @@
|
|
|
#define MAX_STREAM_TYPES 2
|
|
|
#define MAX_IP_TYPES 2
|
|
|
|
|
|
+#define IPA_RTP_RT_TBL_NAME "ipa_rtp_rt"
|
|
|
+
|
|
|
#define IPA_RTP_GENL_OP(_cmd, _func) \
|
|
|
{ \
|
|
|
.cmd = _cmd, \
|
|
@@ -62,6 +64,334 @@ struct genl_family ipa_rtp_genl_family = {
|
|
|
.n_ops = ARRAY_SIZE(ipa_rtp_genl_ops),
|
|
|
};
|
|
|
|
|
|
+static enum ipa_hdr_proc_type ipa3_get_rtp_hdr_proc_type(u32 stream_id)
|
|
|
+{
|
|
|
+ enum ipa_hdr_proc_type rtp_hdr_proc_type = IPA_HDR_PROC_MAX;
|
|
|
+
|
|
|
+ switch (stream_id) {
|
|
|
+ case 0:
|
|
|
+ rtp_hdr_proc_type = IPA_HDR_PROC_RTP_METADATA_STREAM0;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ rtp_hdr_proc_type = IPA_HDR_PROC_RTP_METADATA_STREAM1;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ rtp_hdr_proc_type = IPA_HDR_PROC_RTP_METADATA_STREAM2;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ rtp_hdr_proc_type = IPA_HDR_PROC_RTP_METADATA_STREAM3;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ IPAERR("invalid stream_id %u params\n", stream_id);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return rtp_hdr_proc_type;
|
|
|
+}
|
|
|
+
|
|
|
+static enum ipa_client_type ipa3_get_rtp_dst_pipe(u32 stream_id)
|
|
|
+{
|
|
|
+ enum ipa_client_type dst_pipe_num = IPA_CLIENT_MAX;
|
|
|
+
|
|
|
+ switch (stream_id) {
|
|
|
+ case 0:
|
|
|
+ dst_pipe_num = IPA_CLIENT_UC_RTP1_CONS;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ dst_pipe_num = IPA_CLIENT_UC_RTP2_CONS;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ dst_pipe_num = IPA_CLIENT_UC_RTP3_CONS;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ dst_pipe_num = IPA_CLIENT_UC_RTP4_CONS;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ IPAERR("invalid stream_id %u params\n", stream_id);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return dst_pipe_num;
|
|
|
+}
|
|
|
+
|
|
|
+static int ipa3_rtp_del_flt_rule(u32 stream_id)
|
|
|
+{
|
|
|
+ int rc = 0;
|
|
|
+ int ipa_ep_idx;
|
|
|
+ struct ipa3_ep_context *ep;
|
|
|
+ struct ipa_ioc_del_flt_rule *rtp_del_flt_rule = NULL;
|
|
|
+
|
|
|
+ IPADBG("Deleting rtp filter rules of stream_id: %u\n", stream_id);
|
|
|
+ rtp_del_flt_rule = kzalloc(sizeof(*rtp_del_flt_rule) +
|
|
|
+ 1 * sizeof(struct ipa_flt_rule_del), GFP_KERNEL);
|
|
|
+ if (!rtp_del_flt_rule) {
|
|
|
+ IPAERR("failed at kzalloc of rtp_del_flt_rule\n");
|
|
|
+ rc = -ENOMEM;
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+
|
|
|
+ ipa_ep_idx = ipa_get_ep_mapping(IPA_CLIENT_WLAN2_PROD);
|
|
|
+ ep = &ipa3_ctx->ep[ipa_ep_idx];
|
|
|
+ if (ep->rtp_flt4_rule_hdls[stream_id]) {
|
|
|
+ rtp_del_flt_rule->commit = 1;
|
|
|
+ rtp_del_flt_rule->ip = 0;
|
|
|
+ rtp_del_flt_rule->num_hdls = 1;
|
|
|
+ rtp_del_flt_rule->hdl[0].hdl = ep->rtp_flt4_rule_hdls[stream_id];
|
|
|
+ if (ipa3_del_flt_rule(rtp_del_flt_rule) || rtp_del_flt_rule->hdl[0].status) {
|
|
|
+ IPAERR("failed to del rtp_flt_rule\n");
|
|
|
+ kfree(rtp_del_flt_rule);
|
|
|
+ rc = -EPERM;
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+ ep->rtp_flt4_rule_hdls[stream_id] = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ kfree(rtp_del_flt_rule);
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
+static int ipa3_rtp_del_rt_rule(u32 stream_id)
|
|
|
+{
|
|
|
+ int rc = 0;
|
|
|
+ struct ipa_ioc_del_rt_rule *rtp_del_rt_rule = NULL;
|
|
|
+
|
|
|
+ IPADBG("Deleting rtp route rules of stream_id: %u\n", stream_id);
|
|
|
+ rtp_del_rt_rule = kzalloc(sizeof(*rtp_del_rt_rule) +
|
|
|
+ 1 * sizeof(struct ipa_rt_rule_del), GFP_KERNEL);
|
|
|
+ if (!rtp_del_rt_rule) {
|
|
|
+ IPAERR("failed at kzalloc of rtp_del_rt_rule\n");
|
|
|
+ rc = -ENOMEM;
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ipa3_ctx->rtp_rt4_rule_hdls[stream_id]) {
|
|
|
+ rtp_del_rt_rule->commit = 1;
|
|
|
+ rtp_del_rt_rule->ip = 0;
|
|
|
+ rtp_del_rt_rule->num_hdls = 1;
|
|
|
+ rtp_del_rt_rule->hdl[0].hdl = ipa3_ctx->rtp_rt4_rule_hdls[stream_id];
|
|
|
+ if (ipa3_del_rt_rule(rtp_del_rt_rule) || rtp_del_rt_rule->hdl[0].status) {
|
|
|
+ IPAERR("failed to del rtp_rt_rule\n");
|
|
|
+ kfree(rtp_del_rt_rule);
|
|
|
+ rc = -EPERM;
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+ ipa3_ctx->rtp_rt4_rule_hdls[stream_id] = -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ kfree(rtp_del_rt_rule);
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
+static int ipa3_rtp_del_hdr_proc_ctx(u32 stream_id)
|
|
|
+{
|
|
|
+ int buf_size, rc = 0;
|
|
|
+
|
|
|
+ struct ipa_ioc_del_hdr_proc_ctx *rtp_del_proc_ctx = NULL;
|
|
|
+ struct ipa_hdr_proc_ctx_del *rtp_del_proc_ctx_entry = NULL;
|
|
|
+
|
|
|
+ IPADBG("Deleting rtp hdr proc ctx of stream_id: %u\n", stream_id);
|
|
|
+ buf_size = (sizeof(struct ipa_ioc_del_hdr_proc_ctx) +
|
|
|
+ (sizeof(struct ipa_hdr_proc_ctx_del)));
|
|
|
+ rtp_del_proc_ctx = kzalloc(buf_size, GFP_KERNEL);
|
|
|
+ if (!rtp_del_proc_ctx) {
|
|
|
+ IPAERR("failed at kzalloc of rtp_del_proc_ctx\n");
|
|
|
+ rc = -ENOMEM;
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ipa3_ctx->rtp_proc_hdls[stream_id]) {
|
|
|
+ rtp_del_proc_ctx_entry = &(rtp_del_proc_ctx->hdl[0]);
|
|
|
+ rtp_del_proc_ctx->commit = 1;
|
|
|
+ rtp_del_proc_ctx->num_hdls = 1;
|
|
|
+ rtp_del_proc_ctx->hdl[0].hdl = ipa3_ctx->rtp_proc_hdls[stream_id];
|
|
|
+ if (ipa3_del_hdr_proc_ctx(rtp_del_proc_ctx) || rtp_del_proc_ctx->hdl[0].status) {
|
|
|
+ IPAERR("failed to del rtp proc ctx hdl\n");
|
|
|
+ kfree(rtp_del_proc_ctx);
|
|
|
+ rc = -EPERM;
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+ ipa3_ctx->rtp_proc_hdls[stream_id] = -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ kfree(rtp_del_proc_ctx);
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
+int ipa3_install_rtp_hdr_proc_rt_flt_rules(struct traffic_tuple_info *tuple_info, u32 stream_id)
|
|
|
+{
|
|
|
+ int rc = 0;
|
|
|
+ int buf_size;
|
|
|
+ static const int num_of_proc_ctx = 1;
|
|
|
+ struct ipa_ioc_add_hdr_proc_ctx *rtp_proc_ctx = NULL;
|
|
|
+ struct ipa_hdr_proc_ctx_add *rtp_proc_ctx_entry = NULL;
|
|
|
+ struct ipa_rtp_hdr_proc_ctx_params rtp_params;
|
|
|
+
|
|
|
+ struct ipa_ioc_add_rt_rule *rtp_rt_rule = NULL;
|
|
|
+ struct ipa_rt_rule_add *rtp_rt_rule_entry = NULL;
|
|
|
+ struct ipa3_rt_tbl *entry = NULL;
|
|
|
+
|
|
|
+ struct ipa3_ep_context *ep;
|
|
|
+ struct ipa_ioc_add_flt_rule *rtp_flt_rule = NULL;
|
|
|
+ struct ipa_flt_rule_add *rtp_flt_rule_entry = NULL;
|
|
|
+ int ipa_ep_idx = 0;
|
|
|
+
|
|
|
+ IPADBG("adding rtp proc ctx entry\n");
|
|
|
+ buf_size = (sizeof(struct ipa_ioc_add_hdr_proc_ctx) +
|
|
|
+ (num_of_proc_ctx * sizeof(struct ipa_hdr_proc_ctx_add)));
|
|
|
+
|
|
|
+ rtp_proc_ctx = kzalloc(buf_size, GFP_KERNEL);
|
|
|
+ if (!rtp_proc_ctx) {
|
|
|
+ IPAERR("failed at kzalloc of rtp_proc_ctx\n");
|
|
|
+ rc = -ENOMEM;
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+
|
|
|
+ memset(rtp_proc_ctx, 0, sizeof(*rtp_proc_ctx));
|
|
|
+
|
|
|
+ rtp_proc_ctx_entry = &(rtp_proc_ctx->proc_ctx[0]);
|
|
|
+ rtp_proc_ctx->commit = true;
|
|
|
+ rtp_proc_ctx->num_proc_ctxs = num_of_proc_ctx;
|
|
|
+ rtp_proc_ctx_entry->proc_ctx_hdl = -1;
|
|
|
+ rtp_proc_ctx_entry->status = -1;
|
|
|
+ if (ipa3_get_rtp_hdr_proc_type(stream_id) >= IPA_HDR_PROC_MAX) {
|
|
|
+ IPAERR("invalid stream_id %u params\n", stream_id);
|
|
|
+ rc = -EPERM;
|
|
|
+ goto free_rtp_proc_ctx;
|
|
|
+ }
|
|
|
+ rtp_proc_ctx_entry->type = ipa3_get_rtp_hdr_proc_type(stream_id);
|
|
|
+ rtp_params.hdr_add_param.input_ip_version = tuple_info->ip_type;
|
|
|
+
|
|
|
+ if (ipa3_add_rtp_hdr_proc_ctx(rtp_proc_ctx, rtp_params, false)
|
|
|
+ || rtp_proc_ctx_entry->status) {
|
|
|
+ IPAERR("failed to add rtp hdr proc ctx hdl\n");
|
|
|
+ rc = -EPERM;
|
|
|
+ goto free_rtp_proc_ctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ IPADBG("rtp proc ctx hdl = %u\n", rtp_proc_ctx_entry->proc_ctx_hdl);
|
|
|
+ ipa3_ctx->rtp_proc_hdls[stream_id] = rtp_proc_ctx_entry->proc_ctx_hdl;
|
|
|
+
|
|
|
+ IPADBG("adding rtp route rule entry\n");
|
|
|
+
|
|
|
+ rtp_rt_rule = kzalloc(sizeof(struct ipa_ioc_add_rt_rule) + 1 *
|
|
|
+ sizeof(struct ipa_rt_rule_add), GFP_KERNEL);
|
|
|
+ if (!rtp_rt_rule) {
|
|
|
+ IPAERR("failed at kzalloc of rtp_rt_rule\n");
|
|
|
+ rc = -ENOMEM;
|
|
|
+ goto free_rtp_proc_ctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ memset(rtp_rt_rule, 0, sizeof(*rtp_rt_rule));
|
|
|
+ rtp_rt_rule->num_rules = 1;
|
|
|
+ rtp_rt_rule->commit = 1;
|
|
|
+ rtp_rt_rule->ip = tuple_info->ip_type;
|
|
|
+ strscpy(rtp_rt_rule->rt_tbl_name, IPA_RTP_RT_TBL_NAME,
|
|
|
+ IPA_RESOURCE_NAME_MAX);
|
|
|
+
|
|
|
+ rtp_rt_rule_entry = &rtp_rt_rule->rules[0];
|
|
|
+ rtp_rt_rule_entry->at_rear = 1;
|
|
|
+ if (ipa3_get_rtp_dst_pipe(stream_id) >= IPA_CLIENT_MAX) {
|
|
|
+ IPAERR("invalid stream_id %u params\n", stream_id);
|
|
|
+ rc = -EPERM;
|
|
|
+ goto free_rtp_rt_rule;
|
|
|
+ }
|
|
|
+ rtp_rt_rule_entry->rule.dst = ipa3_get_rtp_dst_pipe(stream_id);
|
|
|
+ rtp_rt_rule_entry->rule.hdr_hdl = 0;
|
|
|
+ rtp_rt_rule_entry->rule.hdr_proc_ctx_hdl = ipa3_ctx->rtp_proc_hdls[stream_id];
|
|
|
+ rtp_rt_rule_entry->rule.hashable = 1;
|
|
|
+ rtp_rt_rule_entry->rule.retain_hdr = 1;
|
|
|
+ rtp_rt_rule_entry->status = -1;
|
|
|
+
|
|
|
+ if (ipa_add_rt_rule(rtp_rt_rule) || rtp_rt_rule_entry->status) {
|
|
|
+ IPAERR("fail to add rtp_rt_rule\n");
|
|
|
+ rc = -EPERM;
|
|
|
+ goto free_rtp_rt_rule;
|
|
|
+ }
|
|
|
+
|
|
|
+ ipa3_ctx->rtp_rt4_rule_hdls[stream_id] = rtp_rt_rule_entry->rt_rule_hdl;
|
|
|
+ rtp_rt_rule->rt_tbl_name[IPA_RESOURCE_NAME_MAX-1] = '\0';
|
|
|
+ entry = __ipa3_find_rt_tbl(tuple_info->ip_type, rtp_rt_rule->rt_tbl_name);
|
|
|
+ ipa3_ctx->rtp_rt4_tbl_idxs[stream_id] = entry->idx;
|
|
|
+ ipa3_ctx->rtp_rt4_tbl_hdls[stream_id] = entry->id;
|
|
|
+
|
|
|
+ IPADBG("rtp rt rule hdl %d\n", ipa3_ctx->rtp_rt4_rule_hdls[stream_id]);
|
|
|
+ IPADBG("rtp rt tbl idx %d\n", ipa3_ctx->rtp_rt4_tbl_idxs[stream_id]);
|
|
|
+ IPADBG("rtp rt tbl hdl %d\n", ipa3_ctx->rtp_rt4_tbl_hdls[stream_id]);
|
|
|
+
|
|
|
+ IPADBG("adding rtp flt rules for %d\n", ipa_ep_idx);
|
|
|
+
|
|
|
+ rtp_flt_rule = kzalloc(sizeof(*rtp_flt_rule) +
|
|
|
+ 1 * sizeof(struct ipa_flt_rule_add), GFP_KERNEL);
|
|
|
+ if (!rtp_flt_rule) {
|
|
|
+ IPAERR("failed at kzalloc of rtp_flt_rule\n");
|
|
|
+ rc = -ENOMEM;
|
|
|
+ goto free_rtp_rt_rule;
|
|
|
+ }
|
|
|
+
|
|
|
+ memset(rtp_flt_rule, 0, sizeof(*rtp_flt_rule));
|
|
|
+ ipa_ep_idx = ipa_get_ep_mapping(IPA_CLIENT_WLAN2_PROD);
|
|
|
+ ep = &ipa3_ctx->ep[ipa_ep_idx];
|
|
|
+
|
|
|
+ rtp_flt_rule->commit = 1;
|
|
|
+ rtp_flt_rule->ip = tuple_info->ip_type;
|
|
|
+ rtp_flt_rule->ep = IPA_CLIENT_WLAN2_PROD;
|
|
|
+ rtp_flt_rule->num_rules = 1;
|
|
|
+ rtp_flt_rule->rules[0].at_rear = 1;
|
|
|
+ rtp_flt_rule_entry = &rtp_flt_rule->rules[0];
|
|
|
+
|
|
|
+ rtp_flt_rule_entry->rule.hashable = 1;
|
|
|
+ rtp_flt_rule_entry->status = -1;
|
|
|
+ rtp_flt_rule_entry->rule.action = IPA_PASS_TO_ROUTING;
|
|
|
+ rtp_flt_rule_entry->rule.rt_tbl_hdl = ipa3_ctx->rtp_rt4_tbl_hdls[stream_id];
|
|
|
+ rtp_flt_rule_entry->rule.rt_tbl_idx = ipa3_ctx->rtp_rt4_tbl_idxs[stream_id];
|
|
|
+
|
|
|
+ rtp_flt_rule_entry->rule.attrib.u.v4.dst_addr_mask = 0xFFFFFFFF;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.u.v4.dst_addr = tuple_info->ip_info.ipv4.dst_ip;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.u.v4.src_addr_mask = 0xFFFFFFFF;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.u.v4.src_addr = tuple_info->ip_info.ipv4.src_ip;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.u.v4.protocol = tuple_info->ip_info.ipv4.protocol;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.src_port = tuple_info->ip_info.ipv4.src_port_number;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.dst_port = tuple_info->ip_info.ipv4.dst_port_number;
|
|
|
+
|
|
|
+ rtp_flt_rule_entry->rule.attrib.attrib_mask |= IPA_FLT_SRC_ADDR;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.attrib_mask |= IPA_FLT_DST_ADDR;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.attrib_mask |= IPA_FLT_PROTOCOL;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.attrib_mask |= IPA_FLT_SRC_PORT;
|
|
|
+ rtp_flt_rule_entry->rule.attrib.attrib_mask |= IPA_FLT_DST_PORT;
|
|
|
+
|
|
|
+ if (ipa3_add_flt_rule(rtp_flt_rule) || rtp_flt_rule_entry->status) {
|
|
|
+ IPAERR("fail to add rtp_flt_rule\n");
|
|
|
+ rc = -EPERM;
|
|
|
+ goto free_rtp_flt_rule;
|
|
|
+ }
|
|
|
+
|
|
|
+ ep->rtp_flt4_rule_hdls[stream_id] = rtp_flt_rule->rules[0].flt_rule_hdl;
|
|
|
+ IPADBG("rtp flt rule hdl is %u\n", ep->rtp_flt4_rule_hdls[stream_id]);
|
|
|
+
|
|
|
+free_rtp_flt_rule:
|
|
|
+ kfree(rtp_flt_rule);
|
|
|
+free_rtp_rt_rule:
|
|
|
+ if (rc && !rtp_rt_rule_entry->status)
|
|
|
+ ipa3_rtp_del_rt_rule(stream_id);
|
|
|
+ kfree(rtp_rt_rule);
|
|
|
+free_rtp_proc_ctx:
|
|
|
+ if (rc && !rtp_proc_ctx_entry->status)
|
|
|
+ ipa3_rtp_del_hdr_proc_ctx(stream_id);
|
|
|
+ kfree(rtp_proc_ctx);
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
+int ipa3_delete_rtp_hdr_proc_rt_flt_rules(u32 stream_id)
|
|
|
+{
|
|
|
+ int rc = 0;
|
|
|
+
|
|
|
+ if (ipa3_rtp_del_flt_rule(stream_id) ||
|
|
|
+ ipa3_rtp_del_rt_rule(stream_id) ||
|
|
|
+ ipa3_rtp_del_hdr_proc_ctx(stream_id)) {
|
|
|
+ IPAERR("failed to delete rtp hdr proc rt flt rules\n");
|
|
|
+ rc = -EPERM;
|
|
|
+ }
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
int ipa_rtp_send_tuple_info_resp(struct genl_info *info,
|
|
|
struct assign_stream_id *tuple_info_resp)
|
|
|
{
|
|
@@ -121,6 +451,7 @@ int ipa_rtp_tuple_info_req_hdlr(struct sk_buff *skb_2,
|
|
|
struct nlattr *na;
|
|
|
struct traffic_tuple_info tuple_info_req;
|
|
|
struct assign_stream_id tuple_info_resp;
|
|
|
+ struct remove_bitstream_buffers rmv_sid_req;
|
|
|
int is_req_valid = 0, i = 0;
|
|
|
int stream_id_available = 0, rc = -1;
|
|
|
|
|
@@ -191,7 +522,6 @@ int ipa_rtp_tuple_info_req_hdlr(struct sk_buff *skb_2,
|
|
|
IPADBG_LOW("dst_ip is %u\n", tuple_info_req.ip_info.ipv4.dst_ip);
|
|
|
IPADBG_LOW("protocol is %u\n", tuple_info_req.ip_info.ipv4.protocol);
|
|
|
|
|
|
- /* Call IPA driver/uC tuple info API's here */
|
|
|
memset(&tuple_info_resp, 0, sizeof(tuple_info_resp));
|
|
|
|
|
|
for (i = 0; i < MAX_STREAMS; i++) {
|
|
@@ -208,10 +538,22 @@ int ipa_rtp_tuple_info_req_hdlr(struct sk_buff *skb_2,
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
+ /* Call IPA driver/uC tuple info API's here */
|
|
|
+ if (ipa3_install_rtp_hdr_proc_rt_flt_rules(&tuple_info_req, tuple_info_resp.stream_id) ||
|
|
|
+ ipa3_tuple_info_cmd_to_wlan_uc(&tuple_info_req, tuple_info_resp.stream_id)) {
|
|
|
+ IPAERR("failed to install hdr proc and flt rules or filters at WLAN\n");
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+
|
|
|
if (is_req_valid &&
|
|
|
- ipa_rtp_send_tuple_info_resp(info, &tuple_info_resp))
|
|
|
+ ipa_rtp_send_tuple_info_resp(info, &tuple_info_resp)) {
|
|
|
+ IPAERR("failed in sending stream_id response\n");
|
|
|
+ memset(&rmv_sid_req, 0, sizeof(rmv_sid_req));
|
|
|
+ rmv_sid_req.stream_id = tuple_info_resp.stream_id;
|
|
|
+ ipa3_uc_send_remove_stream_cmd(&rmv_sid_req);
|
|
|
+ ipa3_delete_rtp_hdr_proc_rt_flt_rules(rmv_sid_req.stream_id);
|
|
|
si[tuple_info_resp.stream_id] = 0;
|
|
|
- else
|
|
|
+ } else
|
|
|
rc = 0;
|
|
|
|
|
|
IPADBG("Exit\n");
|
|
@@ -383,7 +725,7 @@ int ipa_rtp_smmu_unmap_buff_req_hdlr(struct sk_buff *skb_2,
|
|
|
unmap_buffer_req.buff_info[i].meta_buff_size);
|
|
|
}
|
|
|
|
|
|
- /* Call IPA driver/uC tuple info API's here */
|
|
|
+ /* Call IPA driver/uC API's here */
|
|
|
if (is_req_valid)
|
|
|
rc = ipa3_unmap_buff_from_device_addr(&unmap_buffer_req);
|
|
|
|
|
@@ -526,9 +868,12 @@ int ipa_rtp_rmv_stream_id_req_hdlr(struct sk_buff *skb_2,
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
- /* Call IPA driver/uC tuple info API's here */
|
|
|
- if (is_req_valid)
|
|
|
- rc = ipa3_uc_send_remove_stream_cmd(&rmv_sid_req);
|
|
|
+ /* Call IPA driver/uC API's here */
|
|
|
+ if (is_req_valid && ipa3_uc_send_remove_stream_cmd(&rmv_sid_req)
|
|
|
+ && ipa3_delete_rtp_hdr_proc_rt_flt_rules(rmv_sid_req.stream_id)) {
|
|
|
+ IPAERR("failed in removing stream-id, deleting hdr proc and flt rules\n");
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
|
|
|
si[rmv_sid_req.stream_id] = 0;
|
|
|
ipa3_ctx->rtp_stream_id_cnt--;
|