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
1182 .send = psend,1182 .send = psend,
1183 .phy_put = NULL,1183 .phy_put = NULL,
1184 .phy_get = NULL,1184 .phy_get = NULL,
1185 .change_qos = NULL,
1186 .proc_read = NULL,1185 .proc_read = NULL,
1187 .owner = THIS_MODULE1186 .owner = THIS_MODULE
1188};1187};
include/linux/atmdev.h+0−1
@@ -143,7 +143,6 @@ struct atmdev_ops { /* only send is required */ · 142 unmodified lines
143 void (*phy_put)(struct atm_dev *dev,unsigned char value,143 void (*phy_put)(struct atm_dev *dev,unsigned char value,
144 unsigned long addr);144 unsigned long addr);
145 unsigned char (*phy_get)(struct atm_dev *dev,unsigned long addr);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 int (*proc_read)(struct atm_dev *dev,loff_t *pos,char *page);146 int (*proc_read)(struct atm_dev *dev,loff_t *pos,char *page);
148 struct module *owner;147 struct module *owner;
149};148};
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
673 return mask;673 return mask;
674}674}
675 675
676static 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
698static int check_tp(const struct atm_trafprm *tp)676static int check_tp(const struct atm_trafprm *tp)
699{677{
700 /* @@@ Should be merged with adjust_tp */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 error = check_qos(&qos);731 error = check_qos(&qos);
754 if (error)732 if (error)
755 return error;733 return error;
734 /* QoS cannot be renegotiated on an already connected VCC. */
756 if (sock->state == SS_CONNECTED)735 if (sock->state == SS_CONNECTED)
757 return atm_change_qos(vcc, &qos);736 return -EOPNOTSUPP;
758 if (sock->state != SS_UNCONNECTED)737 if (sock->state != SS_UNCONNECTED)
759 return -EBADFD;738 return -EBADFD;
760 vcc->qos = qos;739 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