ipacm:put WIGIG_CLIENT_CONNECT inside flag to fix compilation issue
Put WIGIG_CLIENT_CONNECT event inside flag to fix compilation issue.
Change-Id: Ib4bd2bb024890485e9ea1fee20ad9c26e4cf0991
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index fd45856..2c0e263 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -4479,6 +4479,8 @@
{
/* 4 tx pipes for wigig */
tether_client->dl_dst_pipe_len = tx_prop->num_tx_props;
+
+#ifdef IPA_CLIENT_WIGIG4_CONS
for(cnt = 0; cnt < tx_prop->num_tx_props; cnt++)
{
enum ipa_client_type client;
@@ -4511,7 +4513,7 @@
cnt, i + 1,
tether_client->dl_dst_pipe_list[cnt]);
}
-
+#endif
ret = ioctl(fd_wwan_ioctl, WAN_IOC_SET_TETHER_CLIENT_PIPE, tether_client);
if(ret != 0)
{
@@ -4742,6 +4744,9 @@
IPACMDBG_H("Received client MAC 0x%02x%02x%02x%02x%02x%02x.\n",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+ /*fix -Wall -Werror if wigig feature is not enabled */
+ IPACMDBG_H("ep: %d\n", ep);
+
num_rt_rule = each_client_rt_rule_count[iptype];
len = sizeof(ipa_ioc_add_rt_rule) + num_rt_rule * sizeof(ipa_rt_rule_add);
@@ -4780,13 +4785,15 @@
res = IPACM_FAILURE;
goto end;
}
-
+#ifdef IPA_CLIENT_WIGIG4_CONS
if ((ep >= IPA_CLIENT_WIGIG1_CONS) && (ep <= IPA_CLIENT_WIGIG4_CONS))
{
IPACMDBG_H("wigig DL pipe %d\n", ep);
rt_rule.rule.dst = (enum ipa_client_type)ep;
}
- else if(ipa_if_cate == WLAN_IF && IPACM_Iface::ipacmcfg->isMCC_Mode)
+ else
+#endif
+ if(ipa_if_cate == WLAN_IF && IPACM_Iface::ipacmcfg->isMCC_Mode)
{
IPACMDBG_H("In WLAN MCC mode, use alt dst pipe: %d\n",
tx_prop->tx[i].alt_dst_pipe);
diff --git a/ipacm/src/IPACM_Main.cpp b/ipacm/src/IPACM_Main.cpp
index 0c9be6b..f17a951 100644
--- a/ipacm/src/IPACM_Main.cpp
+++ b/ipacm/src/IPACM_Main.cpp
@@ -238,7 +238,9 @@
struct ipa_wlan_msg_ex event_ex_o;
struct ipa_wlan_msg *event_wlan = NULL;
struct ipa_wlan_msg_ex *event_ex = NULL;
+#ifdef WIGIG_CLIENT_CONNECT
struct ipa_wigig_msg *event_wigig = NULL;
+#endif
struct ipa_get_data_stats_resp_msg_v01 event_data_stats;
struct ipa_get_apn_data_stats_resp_msg_v01 event_network_stats;
#ifdef FEATURE_IPACM_HAL
@@ -247,7 +249,9 @@
ipacm_cmd_q_data evt_data;
ipacm_event_data_mac *data = NULL;
+#ifdef WIGIG_CLIENT_CONNECT
ipacm_event_data_mac_ep *data_wigig = NULL;
+#endif
ipacm_event_data_fid *data_fid = NULL;
ipacm_event_data_iptype *data_iptype = NULL;
ipacm_event_data_wlan_ex *data_ex;
@@ -396,6 +400,7 @@
evt_data.event = IPA_WLAN_CLIENT_ADD_EVENT;
evt_data.evt_data = data;
break;
+#ifdef WIGIG_CLIENT_CONNECT
case WIGIG_CLIENT_CONNECT:
event_wigig = (struct ipa_wigig_msg *)(buffer + sizeof(struct ipa_msg_meta));
IPACMDBG_H("Received WIGIG_CLIENT_CONNECT\n");
@@ -418,6 +423,7 @@
evt_data.event = IPA_WIGIG_CLIENT_ADD_EVENT;
evt_data.evt_data = data_wigig;
break;
+#endif
case WLAN_CLIENT_CONNECT_EX:
IPACMDBG_H("Received WLAN_CLIENT_CONNECT_EX\n");