History

atm: remove the unused change_qos device operation

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.

Jakub Kicinski committed 5 months ago

Commit 6719d571 parent aa582dc3 files · +2 −25Browse files

Unified · Split

3 files
  1. drivers/atm/solos-pci.c +0 −1
  2. include/linux/atmdev.h +0 −1
  3. net/atm/common.c +2 −23
drivers/atm/solos-pci.c+0−1
@@ -1182,7 +1182,6 @@ static const struct atmdev_ops fpga_ops = { · 1181 unmodified lines
11821182 .send = psend,
11831183 .phy_put = NULL,
11841184 .phy_get = NULL,
1185− .change_qos = NULL,
11861185 .proc_read = NULL,
11871186 .owner = THIS_MODULE
11881187 };
include/linux/atmdev.h+0−1
@@ -143,7 +143,6 @@ struct atmdev_ops { /* only send is required */ · 142 unmodified lines
143143 void (*phy_put)(struct atm_dev *dev,unsigned char value,
144144 unsigned long addr);
145145 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);
147146 int (*proc_read)(struct atm_dev *dev,loff_t *pos,char *page);
148147 struct module *owner;
149148 };
net/atm/common.c+2−23
@@ -673,28 +673,6 @@ __poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait) · 672 unmodified lines
673673 return mask;
674674 }
675675
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−
698676 static int check_tp(const struct atm_trafprm *tp)
699677 {
700678 /* @@@ Should be merged with adjust_tp */
@@ -753,8 +731,9 @@ int vcc_setsockopt(struct socket *sock, int level, int optname, · 52 unmodified lines
753731 error = check_qos(&qos);
754732 if (error)
755733 return error;
734+ /* QoS cannot be renegotiated on an already connected VCC. */
756735 if (sock->state == SS_CONNECTED)
757− return atm_change_qos(vcc, &qos);
736+ return -EOPNOTSUPP;
758737 if (sock->state != SS_UNCONNECTED)
759738 return -EBADFD;
760739 vcc->qos = qos;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t