Merge "ipacm: send mux-id info to modem"
diff --git a/ipacm/src/IPACM_Filtering.cpp b/ipacm/src/IPACM_Filtering.cpp
index 623bad4..cdb37b4 100644
--- a/ipacm/src/IPACM_Filtering.cpp
+++ b/ipacm/src/IPACM_Filtering.cpp
@@ -477,9 +477,28 @@
if(flt_rule_tbl == NULL)
{
- IPACMERR("Invalid add_offload_req\n");
+ if(mux_id ==0)
+ {
+ IPACMERR("Invalid add_offload_req muxd: (%d)\n", mux_id);
+ close(fd_wwan_ioctl);
+ return false;
+ }
+#ifdef QMI_IPA_MAX_FILTERS_EX2_V01
+ /* used for sending mux_id info to modem for UL sky*/
+ IPACMDBG_H("sending mux_id info (%d) to modem for UL\n", mux_id);
+ memset(&qmi_add_msg, 0, sizeof(qmi_add_msg));
+ qmi_add_msg.embedded_call_mux_id_valid = true;
+ qmi_add_msg.embedded_call_mux_id = mux_id;
+ ret = ioctl(fd_wwan_ioctl, WAN_IOC_ADD_OFFLOAD_CONNECTION, &qmi_add_msg);
+ if (ret != 0)
+ {
+ IPACMERR("Failed sending WAN_IOC_ADD_OFFLOAD_CONNECTION with ret %d\n ", ret);
+ close(fd_wwan_ioctl);
+ return false;
+ }
+#endif
close(fd_wwan_ioctl);
- return false;
+ return true;
}
/* check Max offload connections */
if (total_num_offload_rules + flt_rule_tbl->num_rules > QMI_IPA_MAX_FILTERS_V01)
diff --git a/ipacm/src/IPACM_Wan.cpp b/ipacm/src/IPACM_Wan.cpp
index 1400696..9f2eb61 100644
--- a/ipacm/src/IPACM_Wan.cpp
+++ b/ipacm/src/IPACM_Wan.cpp
@@ -1626,6 +1626,12 @@
IPACM_Wan::backhaul_mode = m_is_sta_mode;
IPACMDBG_H("Setting up QMAP ID %d.\n", ext_prop->ext[0].mux_id);
IPACM_Iface::ipacmcfg->SetQmapId(ext_prop->ext[0].mux_id);
+ /* sending mux-id info to PCIE-modem for UL */
+ if(false == m_filtering.AddOffloadFilteringRule(NULL, ext_prop->ext[0].mux_id))
+ {
+ IPACMERR("Failed to send mux id info to modem.\n");
+ return IPACM_FAILURE;
+ }
}
else
{