void (*phy_put)(struct atm_dev *dev,unsigned char value,
unsigned long addr);
unsigned char (*phy_get)(struct atm_dev *dev,unsigned long addr);
- int (*change_qos)(struct atm_vcc *vcc,struct atm_qos *qos,int flags);
int (*proc_read)(struct atm_dev *dev,loff_t *pos,char *page);
struct module *owner;
};
return mask;
}
-static int atm_change_qos(struct atm_vcc *vcc, struct atm_qos *qos)
-{
- int error;
-
- /*
- * Don't let the QoS change the already connected AAL type nor the
- * traffic class.
- */
- if (qos->aal != vcc->qos.aal ||
- qos->rxtp.traffic_class != vcc->qos.rxtp.traffic_class ||
- qos->txtp.traffic_class != vcc->qos.txtp.traffic_class)
- return -EINVAL;
- error = adjust_tp(&qos->txtp, qos->aal);
- if (!error)
- error = adjust_tp(&qos->rxtp, qos->aal);
- if (error)
- return error;
- if (!vcc->dev->ops->change_qos)
- return -EOPNOTSUPP;
- return vcc->dev->ops->change_qos(vcc, qos, ATM_MF_SET);
-}
-
static int check_tp(const struct atm_trafprm *tp)
{
/* @@@ Should be merged with adjust_tp */
error = check_qos(&qos);
if (error)
return error;
+ /* QoS cannot be renegotiated on an already connected VCC. */
if (sock->state == SS_CONNECTED)
- return atm_change_qos(vcc, &qos);
+ return -EOPNOTSUPP;
if (sock->state != SS_UNCONNECTED)
return -EBADFD;
vcc->qos = qos;