|
@@ -4840,6 +4840,7 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
int rc = 0, index = 0, i = 0;
|
|
|
struct ipa_quota_stats_all *con_stats;
|
|
|
enum ipa_client_type wlan_client;
|
|
|
+ int ep_idx,wlan_ep_idx,usb_ep_idx;
|
|
|
|
|
|
/* qet HW-stats */
|
|
|
rc = ipa_get_teth_stats();
|
|
@@ -4879,18 +4880,29 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
else
|
|
|
wlan_client = IPA_CLIENT_WLAN1_CONS;
|
|
|
|
|
|
+ wlan_ep_idx = ipa_get_ep_mapping( wlan_client );
|
|
|
+
|
|
|
+ if (wlan_ep_idx == -1 || wlan_ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return wlan_ep_idx ;
|
|
|
+
|
|
|
IPAWANDBG("wlan: v4_rx_p-b(%d,%lld) v6_rx_p-b(%d,%lld),client(%d)\n",
|
|
|
- con_stats->client[wlan_client].num_ipv4_pkts,
|
|
|
- con_stats->client[wlan_client].num_ipv4_bytes,
|
|
|
- con_stats->client[wlan_client].num_ipv6_pkts,
|
|
|
- con_stats->client[wlan_client].num_ipv6_bytes,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_bytes,
|
|
|
wlan_client);
|
|
|
|
|
|
+
|
|
|
+ usb_ep_idx = ipa_get_ep_mapping( IPA_CLIENT_USB_CONS );
|
|
|
+
|
|
|
+ if (usb_ep_idx == -1 || usb_ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return usb_ep_idx ;
|
|
|
+
|
|
|
IPAWANDBG("usb: v4_rx_p(%d) b(%lld) v6_rx_p(%d) b(%lld)\n",
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_pkts,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_bytes,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_pkts,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_bytes);
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_bytes);
|
|
|
|
|
|
for (i = 0; i < MAX_WIGIG_CLIENTS; i++) {
|
|
|
enum ipa_client_type wigig_client =
|
|
@@ -4899,27 +4911,33 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
if (wigig_client > IPA_CLIENT_WIGIG4_CONS)
|
|
|
break;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( wigig_client );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
+
|
|
|
+
|
|
|
IPAWANDBG("wigig%d: v4_rx_p(%d) b(%lld) v6_rx_p(%d) b(%lld)\n",
|
|
|
i + 1,
|
|
|
- con_stats->client[wigig_client].num_ipv4_pkts,
|
|
|
- con_stats->client[wigig_client].num_ipv4_bytes,
|
|
|
- con_stats->client[wigig_client].num_ipv6_pkts,
|
|
|
- con_stats->client[wigig_client].num_ipv6_bytes);
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes);
|
|
|
}
|
|
|
|
|
|
/* update the DL stats */
|
|
|
data->ipv4_rx_packets =
|
|
|
- con_stats->client[wlan_client].num_ipv4_pkts +
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_pkts;
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_pkts +
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_rx_packets =
|
|
|
- con_stats->client[wlan_client].num_ipv6_pkts +
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_pkts;
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_pkts +
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_rx_bytes =
|
|
|
- con_stats->client[wlan_client].num_ipv4_bytes +
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_bytes;
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_bytes +
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_rx_bytes =
|
|
|
- con_stats->client[wlan_client].num_ipv6_bytes +
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_bytes;
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_bytes +
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_bytes;
|
|
|
|
|
|
for (i = 0; i < MAX_WIGIG_CLIENTS; i++) {
|
|
|
enum ipa_client_type wigig_client =
|
|
@@ -4928,14 +4946,19 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
if (wigig_client > IPA_CLIENT_WIGIG4_CONS)
|
|
|
break;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( wigig_client );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
+
|
|
|
data->ipv4_rx_packets +=
|
|
|
- con_stats->client[wigig_client].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_rx_packets +=
|
|
|
- con_stats->client[wigig_client].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_rx_bytes +=
|
|
|
- con_stats->client[wigig_client].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_rx_bytes +=
|
|
|
- con_stats->client[wigig_client].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
}
|
|
|
|
|
|
IPAWANDBG("v4_rx_p(%lu) v6_rx_p(%lu) v4_rx_b(%lu) v6_rx_b(%lu)\n",
|
|
@@ -4962,18 +4985,23 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
else
|
|
|
wlan_client = IPA_CLIENT_WLAN1_CONS;
|
|
|
|
|
|
+ wlan_ep_idx = ipa_get_ep_mapping( wlan_client );
|
|
|
+
|
|
|
+ if (wlan_ep_idx == -1 || wlan_ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return wlan_ep_idx ;
|
|
|
+
|
|
|
IPAWANDBG("wlan: v4_rx_p-b(%d,%lld) v6_rx_p-b(%d,%lld),client(%d)\n",
|
|
|
- con_stats->client[wlan_client].num_ipv4_pkts,
|
|
|
- con_stats->client[wlan_client].num_ipv4_bytes,
|
|
|
- con_stats->client[wlan_client].num_ipv6_pkts,
|
|
|
- con_stats->client[wlan_client].num_ipv6_bytes,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_bytes,
|
|
|
wlan_client);
|
|
|
|
|
|
IPAWANDBG("usb: v4_rx_p(%d) b(%lld) v6_rx_p(%d) b(%lld)\n",
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_pkts,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_bytes,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_pkts,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_bytes);
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_bytes);
|
|
|
|
|
|
for (i = 0; i < MAX_WIGIG_CLIENTS; i++) {
|
|
|
enum ipa_client_type wigig_client =
|
|
@@ -4981,28 +5009,32 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
|
|
|
if (wigig_client > IPA_CLIENT_WIGIG4_CONS)
|
|
|
break;
|
|
|
+ ep_idx = ipa_get_ep_mapping( wigig_client );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
|
|
|
IPAWANDBG("wigig%d: v4_rx_p(%d) b(%lld) v6_rx_p(%d) b(%lld)\n",
|
|
|
i + 1,
|
|
|
- con_stats->client[wigig_client].num_ipv4_pkts,
|
|
|
- con_stats->client[wigig_client].num_ipv4_bytes,
|
|
|
- con_stats->client[wigig_client].num_ipv6_pkts,
|
|
|
- con_stats->client[wigig_client].num_ipv6_bytes);
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes);
|
|
|
}
|
|
|
|
|
|
/* update the DL stats */
|
|
|
data->ipv4_rx_packets +=
|
|
|
- con_stats->client[wlan_client].num_ipv4_pkts +
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_pkts;
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_pkts +
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_rx_packets +=
|
|
|
- con_stats->client[wlan_client].num_ipv6_pkts +
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_pkts;
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_pkts +
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_rx_bytes +=
|
|
|
- con_stats->client[wlan_client].num_ipv4_bytes +
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_bytes;
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_bytes +
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_rx_bytes +=
|
|
|
- con_stats->client[wlan_client].num_ipv6_bytes +
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_bytes;
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_bytes +
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_bytes;
|
|
|
|
|
|
for (i = 0; i < MAX_WIGIG_CLIENTS; i++) {
|
|
|
enum ipa_client_type wigig_client =
|
|
@@ -5011,14 +5043,19 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
if (wigig_client > IPA_CLIENT_WIGIG4_CONS)
|
|
|
break;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( wigig_client );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
+
|
|
|
data->ipv4_rx_packets +=
|
|
|
- con_stats->client[wigig_client].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_rx_packets +=
|
|
|
- con_stats->client[wigig_client].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_rx_bytes +=
|
|
|
- con_stats->client[wigig_client].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_rx_bytes +=
|
|
|
- con_stats->client[wigig_client].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
}
|
|
|
|
|
|
IPAWANDBG("v4_rx_p(%lu) v6_rx_p(%lu) v4_rx_b(%lu) v6_rx_b(%lu)\n",
|
|
@@ -5044,18 +5081,23 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
else
|
|
|
wlan_client = IPA_CLIENT_WLAN1_CONS;
|
|
|
|
|
|
+ wlan_ep_idx = ipa_get_ep_mapping( wlan_client );
|
|
|
+
|
|
|
+ if (wlan_ep_idx == -1 || wlan_ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return wlan_ep_idx ;
|
|
|
+
|
|
|
IPAWANDBG("wlan: v4_rx_p-b(%d,%lld) v6_rx_p-b(%d,%lld),client(%d)\n",
|
|
|
- con_stats->client[wlan_client].num_ipv4_pkts,
|
|
|
- con_stats->client[wlan_client].num_ipv4_bytes,
|
|
|
- con_stats->client[wlan_client].num_ipv6_pkts,
|
|
|
- con_stats->client[wlan_client].num_ipv6_bytes,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_bytes,
|
|
|
wlan_client);
|
|
|
|
|
|
IPAWANDBG("usb: v4_rx_p(%d) b(%lld) v6_rx_p(%d) b(%lld)\n",
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_pkts,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_bytes,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_pkts,
|
|
|
- con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_bytes);
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[usb_ep_idx].num_ipv6_bytes);
|
|
|
|
|
|
for (i = 0; i < MAX_WIGIG_CLIENTS; i++) {
|
|
|
enum ipa_client_type wigig_client =
|
|
@@ -5064,26 +5106,31 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
if (wigig_client > IPA_CLIENT_WIGIG4_CONS)
|
|
|
break;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( wigig_client );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
+
|
|
|
IPAWANDBG("wigig%d: v4_rx_p(%d) b(%lld) v6_rx_p(%d) b(%lld)\n",
|
|
|
i + 1,
|
|
|
- con_stats->client[wigig_client].num_ipv4_pkts,
|
|
|
- con_stats->client[wigig_client].num_ipv4_bytes,
|
|
|
- con_stats->client[wigig_client].num_ipv6_pkts,
|
|
|
- con_stats->client[wigig_client].num_ipv6_bytes);
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes);
|
|
|
}
|
|
|
|
|
|
/* update the DL stats */
|
|
|
data->ipv4_rx_packets +=
|
|
|
- con_stats->client[wlan_client].num_ipv4_pkts +
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_pkts +
|
|
|
con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_pkts;
|
|
|
data->ipv6_rx_packets +=
|
|
|
- con_stats->client[wlan_client].num_ipv6_pkts +
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_pkts +
|
|
|
con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_pkts;
|
|
|
data->ipv4_rx_bytes +=
|
|
|
- con_stats->client[wlan_client].num_ipv4_bytes +
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv4_bytes +
|
|
|
con_stats->client[IPA_CLIENT_USB_CONS].num_ipv4_bytes;
|
|
|
data->ipv6_rx_bytes +=
|
|
|
- con_stats->client[wlan_client].num_ipv6_bytes +
|
|
|
+ con_stats->client[wlan_ep_idx].num_ipv6_bytes +
|
|
|
con_stats->client[IPA_CLIENT_USB_CONS].num_ipv6_bytes;
|
|
|
|
|
|
for (i = 0; i < MAX_WIGIG_CLIENTS; i++) {
|
|
@@ -5093,14 +5140,18 @@ static int rmnet_ipa3_query_tethering_stats_hw(
|
|
|
if (wigig_client > IPA_CLIENT_WIGIG4_CONS)
|
|
|
break;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( wigig_client );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
data->ipv4_rx_packets +=
|
|
|
- con_stats->client[wigig_client].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_rx_packets +=
|
|
|
- con_stats->client[wigig_client].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_rx_bytes +=
|
|
|
- con_stats->client[wigig_client].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_rx_bytes +=
|
|
|
- con_stats->client[wigig_client].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
}
|
|
|
|
|
|
IPAWANDBG("v4_rx_p(%lu) v6_rx_p(%lu) v4_rx_b(%lu) v6_rx_b(%lu)\n",
|
|
@@ -5123,43 +5174,52 @@ skip_nlo_stats:
|
|
|
index = IPA_CLIENT_MHI_PRIME_TETH_CONS;
|
|
|
else
|
|
|
index = IPA_CLIENT_Q6_WAN_CONS;
|
|
|
+ ep_idx = ipa_get_ep_mapping( index );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
|
|
|
IPAWANDBG("usb: v4_tx_p(%d) b(%lld) v6_tx_p(%d) b(%lld)\n",
|
|
|
- con_stats->client[index].num_ipv4_pkts,
|
|
|
- con_stats->client[index].num_ipv4_bytes,
|
|
|
- con_stats->client[index].num_ipv6_pkts,
|
|
|
- con_stats->client[index].num_ipv6_bytes);
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes);
|
|
|
|
|
|
/* update the USB UL stats */
|
|
|
data->ipv4_tx_packets =
|
|
|
- con_stats->client[index].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_tx_packets =
|
|
|
- con_stats->client[index].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_tx_bytes =
|
|
|
- con_stats->client[index].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_tx_bytes =
|
|
|
- con_stats->client[index].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
|
|
|
if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 &&
|
|
|
ipa3_ctx->platform_type == IPA_PLAT_TYPE_MSM) {
|
|
|
|
|
|
index = IPA_CLIENT_Q6_UL_NLO_DATA_CONS;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( index );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
+
|
|
|
IPAWANDBG("usb: v4_tx_p(%d) b(%lld) v6_tx_p(%d) b(%lld)\n",
|
|
|
- con_stats->client[index].num_ipv4_pkts,
|
|
|
- con_stats->client[index].num_ipv4_bytes,
|
|
|
- con_stats->client[index].num_ipv6_pkts,
|
|
|
- con_stats->client[index].num_ipv6_bytes);
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes);
|
|
|
|
|
|
/* update the USB UL stats */
|
|
|
data->ipv4_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
}
|
|
|
/* query WLAN UL stats */
|
|
|
memset(con_stats, 0, sizeof(struct ipa_quota_stats_all));
|
|
@@ -5182,40 +5242,49 @@ skip_nlo_stats:
|
|
|
else
|
|
|
index = IPA_CLIENT_Q6_WAN_CONS;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( index );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
+
|
|
|
IPAWANDBG("wlan1: v4_tx_p(%d) b(%lld) v6_tx_p(%d) b(%lld)\n",
|
|
|
- con_stats->client[index].num_ipv4_pkts,
|
|
|
- con_stats->client[index].num_ipv4_bytes,
|
|
|
- con_stats->client[index].num_ipv6_pkts,
|
|
|
- con_stats->client[index].num_ipv6_bytes);
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes);
|
|
|
|
|
|
/* update the wlan UL stats */
|
|
|
data->ipv4_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 &&
|
|
|
ipa3_ctx->platform_type == IPA_PLAT_TYPE_MSM) {
|
|
|
index = IPA_CLIENT_Q6_UL_NLO_DATA_CONS;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( index );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
IPAWANDBG("wlan1: v4_tx_p(%d) b(%lld) v6_tx_p(%d) b(%lld)\n",
|
|
|
- con_stats->client[index].num_ipv4_pkts,
|
|
|
- con_stats->client[index].num_ipv4_bytes,
|
|
|
- con_stats->client[index].num_ipv6_pkts,
|
|
|
- con_stats->client[index].num_ipv6_bytes);
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes);
|
|
|
|
|
|
/* update the USB UL stats */
|
|
|
data->ipv4_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
}
|
|
|
|
|
|
if (ipa_get_ep_mapping(IPA_CLIENT_WIGIG_PROD) !=
|
|
@@ -5235,35 +5304,44 @@ skip_nlo_stats:
|
|
|
else
|
|
|
index = IPA_CLIENT_Q6_WAN_CONS;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( index );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
+
|
|
|
IPAWANDBG("wigig: v4_tx_p(%d) b(%lld) v6_tx_p(%d) b(%lld)\n",
|
|
|
- con_stats->client[index].num_ipv4_pkts,
|
|
|
- con_stats->client[index].num_ipv4_bytes,
|
|
|
- con_stats->client[index].num_ipv6_pkts,
|
|
|
- con_stats->client[index].num_ipv6_bytes);
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts,
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes);
|
|
|
|
|
|
/* update the WIGIG UL stats */
|
|
|
data->ipv4_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
|
|
|
if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 &&
|
|
|
ipa3_ctx->platform_type == IPA_PLAT_TYPE_MSM) {
|
|
|
index = IPA_CLIENT_Q6_UL_NLO_DATA_CONS;
|
|
|
|
|
|
+ ep_idx = ipa_get_ep_mapping( index );
|
|
|
+
|
|
|
+ if (ep_idx == -1 || ep_idx >= ipa3_get_max_num_pipes())
|
|
|
+ return ep_idx ;
|
|
|
/* update the WIGIG UL stats */
|
|
|
data->ipv4_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv4_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_pkts;
|
|
|
data->ipv6_tx_packets +=
|
|
|
- con_stats->client[index].num_ipv6_pkts;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_pkts;
|
|
|
data->ipv4_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv4_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv4_bytes;
|
|
|
data->ipv6_tx_bytes +=
|
|
|
- con_stats->client[index].num_ipv6_bytes;
|
|
|
+ con_stats->client[ep_idx].num_ipv6_bytes;
|
|
|
}
|
|
|
|
|
|
} else {
|