Loading drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +19 −10 Original line number Diff line number Diff line Loading @@ -2297,32 +2297,41 @@ static int rmnet_ipa_ap_suspend(struct device *dev) { struct net_device *netdev = IPA_NETDEV(); struct ipa3_wwan_private *wwan_ptr; int ret; IPAWANDBG("Enter...\n"); IPAWANDBG_LOW("Enter...\n"); if (netdev == NULL) { IPAWANERR("netdev is NULL.\n"); return 0; ret = 0; goto bail; } netif_tx_lock_bh(netdev); wwan_ptr = netdev_priv(netdev); if (wwan_ptr == NULL) { IPAWANERR("wwan_ptr is NULL.\n"); return 0; ret = 0; goto unlock_and_bail; } /* Do not allow A7 to suspend in case there are oustanding packets */ if (atomic_read(&wwan_ptr->outstanding_pkts) != 0) { IPAWANDBG("Outstanding packets, postponing AP suspend.\n"); return -EAGAIN; ret = -EAGAIN; goto unlock_and_bail; } /* Make sure that there is no Tx operation ongoing */ netif_tx_lock_bh(netdev); netif_stop_queue(netdev); ipa_rm_release_resource(IPA_RM_RESOURCE_WWAN_0_PROD); netif_tx_unlock_bh(netdev); IPAWANDBG_LOW("Exit\n"); ret = 0; return 0; unlock_and_bail: netif_tx_unlock_bh(netdev); bail: IPAWANDBG("Exit with %d\n", ret); return ret; } /** Loading @@ -2339,10 +2348,10 @@ static int rmnet_ipa_ap_resume(struct device *dev) { struct net_device *netdev = IPA_NETDEV(); IPAWANDBG_LOW("Enter...\n"); IPAWANDBG("Enter...\n"); if (netdev) netif_wake_queue(netdev); IPAWANDBG_LOW("Exit\n"); IPAWANDBG("Exit\n"); return 0; } Loading Loading
drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +19 −10 Original line number Diff line number Diff line Loading @@ -2297,32 +2297,41 @@ static int rmnet_ipa_ap_suspend(struct device *dev) { struct net_device *netdev = IPA_NETDEV(); struct ipa3_wwan_private *wwan_ptr; int ret; IPAWANDBG("Enter...\n"); IPAWANDBG_LOW("Enter...\n"); if (netdev == NULL) { IPAWANERR("netdev is NULL.\n"); return 0; ret = 0; goto bail; } netif_tx_lock_bh(netdev); wwan_ptr = netdev_priv(netdev); if (wwan_ptr == NULL) { IPAWANERR("wwan_ptr is NULL.\n"); return 0; ret = 0; goto unlock_and_bail; } /* Do not allow A7 to suspend in case there are oustanding packets */ if (atomic_read(&wwan_ptr->outstanding_pkts) != 0) { IPAWANDBG("Outstanding packets, postponing AP suspend.\n"); return -EAGAIN; ret = -EAGAIN; goto unlock_and_bail; } /* Make sure that there is no Tx operation ongoing */ netif_tx_lock_bh(netdev); netif_stop_queue(netdev); ipa_rm_release_resource(IPA_RM_RESOURCE_WWAN_0_PROD); netif_tx_unlock_bh(netdev); IPAWANDBG_LOW("Exit\n"); ret = 0; return 0; unlock_and_bail: netif_tx_unlock_bh(netdev); bail: IPAWANDBG("Exit with %d\n", ret); return ret; } /** Loading @@ -2339,10 +2348,10 @@ static int rmnet_ipa_ap_resume(struct device *dev) { struct net_device *netdev = IPA_NETDEV(); IPAWANDBG_LOW("Enter...\n"); IPAWANDBG("Enter...\n"); if (netdev) netif_wake_queue(netdev); IPAWANDBG_LOW("Exit\n"); IPAWANDBG("Exit\n"); return 0; } Loading