Loading drivers/platform/msm/ipa/ipa_v2/ipa_i.h +10 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -941,6 +941,10 @@ struct ipa_uc_wdi_ctx { struct IpaHwStatsWDIInfoData_t *wdi_uc_stats_mmio; void *priv; ipa_uc_ready_cb uc_ready_cb; /* for AP+STA stats update */ #ifdef IPA_WAN_MSG_IPv6_ADDR_GW_LEN ipa_wdi_meter_notifier_cb stats_notify; #endif }; /** Loading Loading @@ -1524,6 +1528,7 @@ int ipa2_resume_wdi_pipe(u32 clnt_hdl); int ipa2_suspend_wdi_pipe(u32 clnt_hdl); int ipa2_get_wdi_stats(struct IpaHwStatsWDIInfoData_t *stats); u16 ipa2_get_smem_restr_bytes(void); int ipa2_broadcast_wdi_quota_reach_ind(uint32_t fid, uint64_t num_bytes); int ipa2_setup_uc_ntn_pipes(struct ipa_ntn_conn_in_params *inp, ipa_notify_cb notify, void *priv, u8 hdr_len, struct ipa_ntn_conn_out_params *outp); Loading Loading @@ -1564,6 +1569,10 @@ enum ipacm_client_enum ipa2_get_client(int pipe_idx); bool ipa2_get_client_uplink(int pipe_idx); int ipa2_get_wlan_stats(struct ipa_get_wdi_sap_stats *wdi_sap_stats); int ipa2_set_wlan_quota(struct ipa_set_wifi_quota *wdi_quota); /* * IPADMA */ Loading drivers/platform/msm/ipa/ipa_v2/ipa_qmi_service.c +3 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -763,7 +763,8 @@ static void ipa_q6_clnt_ind_cb(struct qmi_handle *handle, unsigned int msg_id, IPAWANDBG("Quota reached indication on qmux(%d) Mbytes(%lu)\n", qmi_ind.apn.mux_id, (unsigned long int) qmi_ind.apn.num_Mbytes); ipa_broadcast_quota_reach_ind(qmi_ind.apn.mux_id); ipa_broadcast_quota_reach_ind(qmi_ind.apn.mux_id, IPA_UPSTEAM_MODEM); } } Loading drivers/platform/msm/ipa/ipa_v2/ipa_qmi_service.h +20 −3 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -168,7 +168,8 @@ int rmnet_ipa_poll_tethering_stats(struct wan_ioctl_poll_tethering_stats *data); int rmnet_ipa_set_data_quota(struct wan_ioctl_set_data_quota *data); void ipa_broadcast_quota_reach_ind(uint32_t mux_id); void ipa_broadcast_quota_reach_ind(uint32_t mux_id, enum ipa_upstream_type upstream_type); int rmnet_ipa_set_tether_client_pipe(struct wan_ioctl_set_tether_client_pipe *data); Loading @@ -176,6 +177,8 @@ int rmnet_ipa_set_tether_client_pipe(struct wan_ioctl_set_tether_client_pipe int rmnet_ipa_query_tethering_stats(struct wan_ioctl_query_tether_stats *data, bool reset); int rmnet_ipa_reset_tethering_stats(struct wan_ioctl_reset_tether_stats *data); int ipa_qmi_get_data_stats(struct ipa_get_data_stats_req_msg_v01 *req, struct ipa_get_data_stats_resp_msg_v01 *resp); Loading Loading @@ -268,7 +271,21 @@ static inline int rmnet_ipa_set_data_quota( return -EPERM; } static inline void ipa_broadcast_quota_reach_ind(uint32_t mux_id) { } static inline void ipa_broadcast_quota_reach_ind ( uint32_t mux_id, enum ipa_upstream_type upstream_type) { } static int rmnet_ipa_reset_tethering_stats ( struct wan_ioctl_reset_tether_stats *data ) { return -EPERM; } static inline int ipa_qmi_get_data_stats( struct ipa_get_data_stats_req_msg_v01 *req, Loading drivers/platform/msm/ipa/ipa_v2/ipa_uc_wdi.c +31 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -12,6 +12,7 @@ #include "ipa_i.h" #include <linux/dmapool.h> #include <linux/delay.h> #include "ipa_qmi_service.h" #define IPA_HOLB_TMR_DIS 0x0 Loading Loading @@ -1205,6 +1206,12 @@ int ipa2_connect_wdi_pipe(struct ipa_wdi_in_params *in, ep->client_notify = in->sys.notify; ep->priv = in->sys.priv; /* for AP+STA stats update */ if (in->wdi_notify) ipa_ctx->uc_wdi_ctx.stats_notify = in->wdi_notify; else IPADBG("in->wdi_notify is null\n"); if (!ep->skip_ep_cfg) { if (ipa2_cfg_ep(ipa_ep_idx, &in->sys.ipa_ep_cfg)) { IPAERR("fail to configure EP.\n"); Loading Loading @@ -1302,6 +1309,12 @@ int ipa2_disconnect_wdi_pipe(u32 clnt_hdl) IPADBG("client (ep: %d) disconnected\n", clnt_hdl); /* for AP+STA stats update */ if (ipa_ctx->uc_wdi_ctx.stats_notify) ipa_ctx->uc_wdi_ctx.stats_notify = NULL; else IPADBG("uc_wdi_ctx.stats_notify already null\n"); uc_timeout: return result; } Loading Loading @@ -1660,6 +1673,23 @@ uc_timeout: return result; } /** * ipa_broadcast_wdi_quota_reach_ind() - quota reach * @uint32_t fid: [in] input netdev ID * @uint64_t num_bytes: [in] used bytes * * Returns: 0 on success, negative on failure */ int ipa2_broadcast_wdi_quota_reach_ind(uint32_t fid, uint64_t num_bytes) { IPAERR("Quota reached indication on fis(%d) Mbytes(%lu)\n", fid, (unsigned long int) num_bytes); ipa_broadcast_quota_reach_ind(0, IPA_UPSTEAM_WLAN); return 0; } int ipa_write_qmapid_wdi_pipe(u32 clnt_hdl, u8 qmap_id) { int result = 0; Loading drivers/platform/msm/ipa/ipa_v2/ipa_utils.c +32 −2 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -953,11 +953,39 @@ void ipa2_set_client(int index, enum ipacm_client_enum client, bool uplink) } } /* ipa2_get_wlan_stats() - get ipa wifi stats * * Return value: success or failure */ int ipa2_get_wlan_stats(struct ipa_get_wdi_sap_stats *wdi_sap_stats) { if (ipa_ctx->uc_wdi_ctx.stats_notify) { ipa_ctx->uc_wdi_ctx.stats_notify(IPA_GET_WDI_SAP_STATS, wdi_sap_stats); } else { IPAERR("uc_wdi_ctx.stats_notify not registered\n"); return -EFAULT; } return 0; } int ipa2_set_wlan_quota(struct ipa_set_wifi_quota *wdi_quota) { if (ipa_ctx->uc_wdi_ctx.stats_notify) { ipa_ctx->uc_wdi_ctx.stats_notify(IPA_SET_WIFI_QUOTA, wdi_quota); } else { IPAERR("uc_wdi_ctx.stats_notify not registered\n"); return -EFAULT; } return 0; } /** * ipa2_get_client() - provide client mapping * @client: client type * * Return value: none * Return value: client mapping enum */ enum ipacm_client_enum ipa2_get_client(int pipe_idx) { Loading Loading @@ -5030,6 +5058,8 @@ int ipa2_bind_api_controller(enum ipa_hw_type ipa_hw_type, api_ctrl->ipa_suspend_wdi_pipe = ipa2_suspend_wdi_pipe; api_ctrl->ipa_get_wdi_stats = ipa2_get_wdi_stats; api_ctrl->ipa_get_smem_restr_bytes = ipa2_get_smem_restr_bytes; api_ctrl->ipa_broadcast_wdi_quota_reach_ind = ipa2_broadcast_wdi_quota_reach_ind; api_ctrl->ipa_uc_wdi_get_dbpa = ipa2_uc_wdi_get_dbpa; api_ctrl->ipa_uc_reg_rdyCB = ipa2_uc_reg_rdyCB; api_ctrl->ipa_uc_dereg_rdyCB = ipa2_uc_dereg_rdyCB; Loading Loading
drivers/platform/msm/ipa/ipa_v2/ipa_i.h +10 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -941,6 +941,10 @@ struct ipa_uc_wdi_ctx { struct IpaHwStatsWDIInfoData_t *wdi_uc_stats_mmio; void *priv; ipa_uc_ready_cb uc_ready_cb; /* for AP+STA stats update */ #ifdef IPA_WAN_MSG_IPv6_ADDR_GW_LEN ipa_wdi_meter_notifier_cb stats_notify; #endif }; /** Loading Loading @@ -1524,6 +1528,7 @@ int ipa2_resume_wdi_pipe(u32 clnt_hdl); int ipa2_suspend_wdi_pipe(u32 clnt_hdl); int ipa2_get_wdi_stats(struct IpaHwStatsWDIInfoData_t *stats); u16 ipa2_get_smem_restr_bytes(void); int ipa2_broadcast_wdi_quota_reach_ind(uint32_t fid, uint64_t num_bytes); int ipa2_setup_uc_ntn_pipes(struct ipa_ntn_conn_in_params *inp, ipa_notify_cb notify, void *priv, u8 hdr_len, struct ipa_ntn_conn_out_params *outp); Loading Loading @@ -1564,6 +1569,10 @@ enum ipacm_client_enum ipa2_get_client(int pipe_idx); bool ipa2_get_client_uplink(int pipe_idx); int ipa2_get_wlan_stats(struct ipa_get_wdi_sap_stats *wdi_sap_stats); int ipa2_set_wlan_quota(struct ipa_set_wifi_quota *wdi_quota); /* * IPADMA */ Loading
drivers/platform/msm/ipa/ipa_v2/ipa_qmi_service.c +3 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -763,7 +763,8 @@ static void ipa_q6_clnt_ind_cb(struct qmi_handle *handle, unsigned int msg_id, IPAWANDBG("Quota reached indication on qmux(%d) Mbytes(%lu)\n", qmi_ind.apn.mux_id, (unsigned long int) qmi_ind.apn.num_Mbytes); ipa_broadcast_quota_reach_ind(qmi_ind.apn.mux_id); ipa_broadcast_quota_reach_ind(qmi_ind.apn.mux_id, IPA_UPSTEAM_MODEM); } } Loading
drivers/platform/msm/ipa/ipa_v2/ipa_qmi_service.h +20 −3 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -168,7 +168,8 @@ int rmnet_ipa_poll_tethering_stats(struct wan_ioctl_poll_tethering_stats *data); int rmnet_ipa_set_data_quota(struct wan_ioctl_set_data_quota *data); void ipa_broadcast_quota_reach_ind(uint32_t mux_id); void ipa_broadcast_quota_reach_ind(uint32_t mux_id, enum ipa_upstream_type upstream_type); int rmnet_ipa_set_tether_client_pipe(struct wan_ioctl_set_tether_client_pipe *data); Loading @@ -176,6 +177,8 @@ int rmnet_ipa_set_tether_client_pipe(struct wan_ioctl_set_tether_client_pipe int rmnet_ipa_query_tethering_stats(struct wan_ioctl_query_tether_stats *data, bool reset); int rmnet_ipa_reset_tethering_stats(struct wan_ioctl_reset_tether_stats *data); int ipa_qmi_get_data_stats(struct ipa_get_data_stats_req_msg_v01 *req, struct ipa_get_data_stats_resp_msg_v01 *resp); Loading Loading @@ -268,7 +271,21 @@ static inline int rmnet_ipa_set_data_quota( return -EPERM; } static inline void ipa_broadcast_quota_reach_ind(uint32_t mux_id) { } static inline void ipa_broadcast_quota_reach_ind ( uint32_t mux_id, enum ipa_upstream_type upstream_type) { } static int rmnet_ipa_reset_tethering_stats ( struct wan_ioctl_reset_tether_stats *data ) { return -EPERM; } static inline int ipa_qmi_get_data_stats( struct ipa_get_data_stats_req_msg_v01 *req, Loading
drivers/platform/msm/ipa/ipa_v2/ipa_uc_wdi.c +31 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -12,6 +12,7 @@ #include "ipa_i.h" #include <linux/dmapool.h> #include <linux/delay.h> #include "ipa_qmi_service.h" #define IPA_HOLB_TMR_DIS 0x0 Loading Loading @@ -1205,6 +1206,12 @@ int ipa2_connect_wdi_pipe(struct ipa_wdi_in_params *in, ep->client_notify = in->sys.notify; ep->priv = in->sys.priv; /* for AP+STA stats update */ if (in->wdi_notify) ipa_ctx->uc_wdi_ctx.stats_notify = in->wdi_notify; else IPADBG("in->wdi_notify is null\n"); if (!ep->skip_ep_cfg) { if (ipa2_cfg_ep(ipa_ep_idx, &in->sys.ipa_ep_cfg)) { IPAERR("fail to configure EP.\n"); Loading Loading @@ -1302,6 +1309,12 @@ int ipa2_disconnect_wdi_pipe(u32 clnt_hdl) IPADBG("client (ep: %d) disconnected\n", clnt_hdl); /* for AP+STA stats update */ if (ipa_ctx->uc_wdi_ctx.stats_notify) ipa_ctx->uc_wdi_ctx.stats_notify = NULL; else IPADBG("uc_wdi_ctx.stats_notify already null\n"); uc_timeout: return result; } Loading Loading @@ -1660,6 +1673,23 @@ uc_timeout: return result; } /** * ipa_broadcast_wdi_quota_reach_ind() - quota reach * @uint32_t fid: [in] input netdev ID * @uint64_t num_bytes: [in] used bytes * * Returns: 0 on success, negative on failure */ int ipa2_broadcast_wdi_quota_reach_ind(uint32_t fid, uint64_t num_bytes) { IPAERR("Quota reached indication on fis(%d) Mbytes(%lu)\n", fid, (unsigned long int) num_bytes); ipa_broadcast_quota_reach_ind(0, IPA_UPSTEAM_WLAN); return 0; } int ipa_write_qmapid_wdi_pipe(u32 clnt_hdl, u8 qmap_id) { int result = 0; Loading
drivers/platform/msm/ipa/ipa_v2/ipa_utils.c +32 −2 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -953,11 +953,39 @@ void ipa2_set_client(int index, enum ipacm_client_enum client, bool uplink) } } /* ipa2_get_wlan_stats() - get ipa wifi stats * * Return value: success or failure */ int ipa2_get_wlan_stats(struct ipa_get_wdi_sap_stats *wdi_sap_stats) { if (ipa_ctx->uc_wdi_ctx.stats_notify) { ipa_ctx->uc_wdi_ctx.stats_notify(IPA_GET_WDI_SAP_STATS, wdi_sap_stats); } else { IPAERR("uc_wdi_ctx.stats_notify not registered\n"); return -EFAULT; } return 0; } int ipa2_set_wlan_quota(struct ipa_set_wifi_quota *wdi_quota) { if (ipa_ctx->uc_wdi_ctx.stats_notify) { ipa_ctx->uc_wdi_ctx.stats_notify(IPA_SET_WIFI_QUOTA, wdi_quota); } else { IPAERR("uc_wdi_ctx.stats_notify not registered\n"); return -EFAULT; } return 0; } /** * ipa2_get_client() - provide client mapping * @client: client type * * Return value: none * Return value: client mapping enum */ enum ipacm_client_enum ipa2_get_client(int pipe_idx) { Loading Loading @@ -5030,6 +5058,8 @@ int ipa2_bind_api_controller(enum ipa_hw_type ipa_hw_type, api_ctrl->ipa_suspend_wdi_pipe = ipa2_suspend_wdi_pipe; api_ctrl->ipa_get_wdi_stats = ipa2_get_wdi_stats; api_ctrl->ipa_get_smem_restr_bytes = ipa2_get_smem_restr_bytes; api_ctrl->ipa_broadcast_wdi_quota_reach_ind = ipa2_broadcast_wdi_quota_reach_ind; api_ctrl->ipa_uc_wdi_get_dbpa = ipa2_uc_wdi_get_dbpa; api_ctrl->ipa_uc_reg_rdyCB = ipa2_uc_reg_rdyCB; api_ctrl->ipa_uc_dereg_rdyCB = ipa2_uc_dereg_rdyCB; Loading