aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/atmdev.h2
-rw-r--r--net/atm/atm_misc.c11
2 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index e7d0593bb576..37e5ee485399 100644
--- a/include/linux/atmdev.h
+++ b/include/linux/atmdev.h
@@ -468,7 +468,7 @@ static inline void atm_dev_put(struct atm_dev *dev)
468int atm_charge(struct atm_vcc *vcc,int truesize); 468int atm_charge(struct atm_vcc *vcc,int truesize);
469struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, 469struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
470 gfp_t gfp_flags); 470 gfp_t gfp_flags);
471int atm_pcr_goal(struct atm_trafprm *tp); 471int atm_pcr_goal(const struct atm_trafprm *tp);
472 472
473void vcc_release_async(struct atm_vcc *vcc, int reply); 473void vcc_release_async(struct atm_vcc *vcc, int reply);
474 474
diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c
index 223c7ad5bd0f..02cc7e71efea 100644
--- a/net/atm/atm_misc.c
+++ b/net/atm/atm_misc.c
@@ -74,11 +74,14 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
74 */ 74 */
75 75
76 76
77int atm_pcr_goal(struct atm_trafprm *tp) 77int atm_pcr_goal(const struct atm_trafprm *tp)
78{ 78{
79 if (tp->pcr && tp->pcr != ATM_MAX_PCR) return -tp->pcr; 79 if (tp->pcr && tp->pcr != ATM_MAX_PCR)
80 if (tp->min_pcr && !tp->pcr) return tp->min_pcr; 80 return -tp->pcr;
81 if (tp->max_pcr != ATM_MAX_PCR) return -tp->max_pcr; 81 if (tp->min_pcr && !tp->pcr)
82 return tp->min_pcr;
83 if (tp->max_pcr != ATM_MAX_PCR)
84 return -tp->max_pcr;
82 return 0; 85 return 0;
83} 86}
84 87