Loading Documentation/devicetree/bindings/platform/msm/rmnet_ipa.txt +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ Required properties: Optional: - qcom,rmnet-ipa-ssr: determine if modem SSR is supported - qcom,ipa-loaduC: indicate that ipa uC should be loaded - qcom,ipa-advertise-sg-support: determine how to respond to a query regarding scatter-gather capability Example: qcom,rmnet-ipa { Loading drivers/platform/msm/ipa/ipa_v2/rmnet_ipa.c +18 −2 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ enum wwan_device_status { struct ipa_rmnet_plat_drv_res { bool ipa_rmnet_ssr; bool ipa_loaduC; bool ipa_advertise_sg_support; }; /** Loading Loading @@ -1161,6 +1162,8 @@ static void apps_ipa_packet_receive_notify(void *priv, dev->stats.rx_bytes += packet_len; } static struct ipa_rmnet_plat_drv_res ipa_rmnet_res = {0, }; /** * ipa_wwan_ioctl() - I/O control for wwan network driver. * Loading Loading @@ -1289,6 +1292,15 @@ static int ipa_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) sizeof(struct rmnet_ioctl_extended_s))) rc = -EFAULT; break; /* GET SG support */ case RMNET_IOCTL_GET_SG_SUPPORT: extend_ioctl_data.u.data = ipa_rmnet_res.ipa_advertise_sg_support; if (copy_to_user((u8 *)ifr->ifr_ifru.ifru_data, &extend_ioctl_data, sizeof(struct rmnet_ioctl_extended_s))) rc = -EFAULT; break; /* Get endpoint ID */ case RMNET_IOCTL_GET_EPID: IPAWANDBG("get ioctl: RMNET_IOCTL_GET_EPID\n"); Loading Loading @@ -1823,8 +1835,6 @@ static struct notifier_block ssr_notifier = { .notifier_call = ssr_notifier_cb, }; static struct ipa_rmnet_plat_drv_res ipa_rmnet_res = {0, }; static int get_ipa_rmnet_dts_configuration(struct platform_device *pdev, struct ipa_rmnet_plat_drv_res *ipa_rmnet_drv_res) { Loading @@ -1838,6 +1848,12 @@ static int get_ipa_rmnet_dts_configuration(struct platform_device *pdev, "qcom,ipa-loaduC"); pr_info("IPA ipa-loaduC = %s\n", ipa_rmnet_drv_res->ipa_loaduC ? "True" : "False"); ipa_rmnet_drv_res->ipa_advertise_sg_support = of_property_read_bool(pdev->dev.of_node, "qcom,ipa-advertise-sg-support"); pr_info("IPA SG support = %s\n", ipa_rmnet_drv_res->ipa_advertise_sg_support ? "True" : "False"); return 0; } Loading Loading
Documentation/devicetree/bindings/platform/msm/rmnet_ipa.txt +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ Required properties: Optional: - qcom,rmnet-ipa-ssr: determine if modem SSR is supported - qcom,ipa-loaduC: indicate that ipa uC should be loaded - qcom,ipa-advertise-sg-support: determine how to respond to a query regarding scatter-gather capability Example: qcom,rmnet-ipa { Loading
drivers/platform/msm/ipa/ipa_v2/rmnet_ipa.c +18 −2 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ enum wwan_device_status { struct ipa_rmnet_plat_drv_res { bool ipa_rmnet_ssr; bool ipa_loaduC; bool ipa_advertise_sg_support; }; /** Loading Loading @@ -1161,6 +1162,8 @@ static void apps_ipa_packet_receive_notify(void *priv, dev->stats.rx_bytes += packet_len; } static struct ipa_rmnet_plat_drv_res ipa_rmnet_res = {0, }; /** * ipa_wwan_ioctl() - I/O control for wwan network driver. * Loading Loading @@ -1289,6 +1292,15 @@ static int ipa_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) sizeof(struct rmnet_ioctl_extended_s))) rc = -EFAULT; break; /* GET SG support */ case RMNET_IOCTL_GET_SG_SUPPORT: extend_ioctl_data.u.data = ipa_rmnet_res.ipa_advertise_sg_support; if (copy_to_user((u8 *)ifr->ifr_ifru.ifru_data, &extend_ioctl_data, sizeof(struct rmnet_ioctl_extended_s))) rc = -EFAULT; break; /* Get endpoint ID */ case RMNET_IOCTL_GET_EPID: IPAWANDBG("get ioctl: RMNET_IOCTL_GET_EPID\n"); Loading Loading @@ -1823,8 +1835,6 @@ static struct notifier_block ssr_notifier = { .notifier_call = ssr_notifier_cb, }; static struct ipa_rmnet_plat_drv_res ipa_rmnet_res = {0, }; static int get_ipa_rmnet_dts_configuration(struct platform_device *pdev, struct ipa_rmnet_plat_drv_res *ipa_rmnet_drv_res) { Loading @@ -1838,6 +1848,12 @@ static int get_ipa_rmnet_dts_configuration(struct platform_device *pdev, "qcom,ipa-loaduC"); pr_info("IPA ipa-loaduC = %s\n", ipa_rmnet_drv_res->ipa_loaduC ? "True" : "False"); ipa_rmnet_drv_res->ipa_advertise_sg_support = of_property_read_bool(pdev->dev.of_node, "qcom,ipa-advertise-sg-support"); pr_info("IPA SG support = %s\n", ipa_rmnet_drv_res->ipa_advertise_sg_support ? "True" : "False"); return 0; } Loading