atmdev_ops::change_qos() was the hook for renegotiating the traffic parameters of an already-connected VCC, driven from SO_ATMQOS on a connected socket (and previously from the SVC as_modify path, now gone). None of the ATM drivers left in tree implement it - solos-pci only listed change_qos = NULL - so atm_change_qos() always returned -EOPNOTSUPP. Drop the operation and return -EOPNOTSUPP directly.
Unified · Split
| @@ -1182,7 +1182,6 @@ static const struct atmdev_ops fpga_ops = { · 1181 unmodified lines | ||
| 1182 | 1182 | .send = psend, |
| 1183 | 1183 | .phy_put = NULL, |
| 1184 | 1184 | .phy_get = NULL, |
| 1185 | − .change_qos = NULL, | |
| 1186 | 1185 | .proc_read = NULL, |
| 1187 | 1186 | .owner = THIS_MODULE |
| 1188 | 1187 | }; |
| @@ -143,7 +143,6 @@ struct atmdev_ops { /* only send is required */ · 142 unmodified lines | ||
| 143 | 143 | void (*phy_put)(struct atm_dev *dev,unsigned char value, |
| 144 | 144 | unsigned long addr); |
| 145 | 145 | unsigned char (*phy_get)(struct atm_dev *dev,unsigned long addr); |
| 146 | − int (*change_qos)(struct atm_vcc *vcc,struct atm_qos *qos,int flags); | |
| 147 | 146 | int (*proc_read)(struct atm_dev *dev,loff_t *pos,char *page); |
| 148 | 147 | struct module *owner; |
| 149 | 148 | }; |
| @@ -673,28 +673,6 @@ __poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait) · 672 unmodified lines | ||
| 673 | 673 | return mask; |
| 674 | 674 | } |
| 675 | 675 | |
| 676 | −static int atm_change_qos(struct atm_vcc *vcc, struct atm_qos *qos) | |
| 677 | −{ | |
| 678 | − int error; | |
| 679 | − | |
| 680 | − /* | |
| 681 | − * Don't let the QoS change the already connected AAL type nor the | |
| 682 | − * traffic class. | |
| 683 | − */ | |
| 684 | − if (qos->aal != vcc->qos.aal || | |
| 685 | − qos->rxtp.traffic_class != vcc->qos.rxtp.traffic_class || | |
| 686 | − qos->txtp.traffic_class != vcc->qos.txtp.traffic_class) | |
| 687 | − return -EINVAL; | |
| 688 | − error = adjust_tp(&qos->txtp, qos->aal); | |
| 689 | − if (!error) | |
| 690 | − error = adjust_tp(&qos->rxtp, qos->aal); | |
| 691 | − if (error) | |
| 692 | − return error; | |
| 693 | − if (!vcc->dev->ops->change_qos) | |
| 694 | − return -EOPNOTSUPP; | |
| 695 | − return vcc->dev->ops->change_qos(vcc, qos, ATM_MF_SET); | |
| 696 | −} | |
| 697 | − | |
| 698 | 676 | static int check_tp(const struct atm_trafprm *tp) |
| 699 | 677 | { |
| 700 | 678 | /* @@@ Should be merged with adjust_tp */ |
| @@ -753,8 +731,9 @@ int vcc_setsockopt(struct socket *sock, int level, int optname, · 52 unmodified lines | ||
| 753 | 731 | error = check_qos(&qos); |
| 754 | 732 | if (error) |
| 755 | 733 | return error; |
| 734 | + /* QoS cannot be renegotiated on an already connected VCC. */ | |
| 756 | 735 | if (sock->state == SS_CONNECTED) |
| 757 | − return atm_change_qos(vcc, &qos); | |
| 736 | + return -EOPNOTSUPP; | |
| 758 | 737 | if (sock->state != SS_UNCONNECTED) |
| 759 | 738 | return -EBADFD; |
| 760 | 739 | vcc->qos = qos; |