]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
atm: remove the unused change_qos device operation
authorJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 19:44:13 +0000 (12:44 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Jun 2026 15:53:52 +0000 (08:53 -0700)
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.

Link: https://patch.msgid.link/20260615194416.752559-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/atm/solos-pci.c
include/linux/atmdev.h
net/atm/common.c

index 4ad170a858ee7ed3d5635bd0a829fb79eabd6382..9c246b956c308811b3cbddee8a9c2ed78a6b684a 100644 (file)
@@ -1182,7 +1182,6 @@ static const struct atmdev_ops fpga_ops = {
        .send =         psend,
        .phy_put =      NULL,
        .phy_get =      NULL,
-       .change_qos =   NULL,
        .proc_read =    NULL,
        .owner =        THIS_MODULE
 };
index 59477676063c0d329eba461c58c7727280277fca..218c05f2ec540d9766193fa5e61dfe32c15d09c6 100644 (file)
@@ -143,7 +143,6 @@ struct atmdev_ops { /* only send is required */
        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;
 };
index 650814d0a56c521a177d7988244d0d7055a67b22..44a0179d458681c9ba8e25cf1cfeb6f8a05b9c77 100644 (file)
@@ -673,28 +673,6 @@ __poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait)
        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 */
@@ -753,8 +731,9 @@ int vcc_setsockopt(struct socket *sock, int level, int optname,
                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;