s390/qeth: remove .do_ioctl() callback from driver discipline
With commit 18787eeebd
("qeth: use ndo_siocdevprivate") this callback
is now actually used to handle transport mode-specific _private_ ioctls.
We only have such ioctls for L3 devices. So wire up a L3-specific
.ndo_siocdevprivate() callback that handles those ioctls, and defers to
the core qeth_siocdevprivate() for all other private ioctls.
This takes the discipline one step closer to its original purpose of
providing an internal extension for the qeth_core_ccwgroup_driver.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0969becb5f
commit
2decb0b7ba
@ -771,8 +771,6 @@ struct qeth_discipline {
|
|||||||
void (*remove) (struct ccwgroup_device *);
|
void (*remove) (struct ccwgroup_device *);
|
||||||
int (*set_online)(struct qeth_card *card, bool carrier_ok);
|
int (*set_online)(struct qeth_card *card, bool carrier_ok);
|
||||||
void (*set_offline)(struct qeth_card *card);
|
void (*set_offline)(struct qeth_card *card);
|
||||||
int (*do_ioctl)(struct net_device *dev, struct ifreq *rq,
|
|
||||||
void __user *data, int cmd);
|
|
||||||
int (*control_event_handler)(struct qeth_card *card,
|
int (*control_event_handler)(struct qeth_card *card,
|
||||||
struct qeth_ipa_cmd *cmd);
|
struct qeth_ipa_cmd *cmd);
|
||||||
};
|
};
|
||||||
|
@ -6600,10 +6600,7 @@ int qeth_siocdevprivate(struct net_device *dev, struct ifreq *rq, void __user *d
|
|||||||
rc = qeth_query_oat_command(card, data);
|
rc = qeth_query_oat_command(card, data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (card->discipline->do_ioctl)
|
rc = -EOPNOTSUPP;
|
||||||
rc = card->discipline->do_ioctl(dev, rq, data, cmd);
|
|
||||||
else
|
|
||||||
rc = -EOPNOTSUPP;
|
|
||||||
}
|
}
|
||||||
if (rc)
|
if (rc)
|
||||||
QETH_CARD_TEXT_(card, 2, "ioce%x", rc);
|
QETH_CARD_TEXT_(card, 2, "ioce%x", rc);
|
||||||
|
@ -2430,7 +2430,6 @@ const struct qeth_discipline qeth_l2_discipline = {
|
|||||||
.remove = qeth_l2_remove_device,
|
.remove = qeth_l2_remove_device,
|
||||||
.set_online = qeth_l2_set_online,
|
.set_online = qeth_l2_set_online,
|
||||||
.set_offline = qeth_l2_set_offline,
|
.set_offline = qeth_l2_set_offline,
|
||||||
.do_ioctl = NULL,
|
|
||||||
.control_event_handler = qeth_l2_control_event,
|
.control_event_handler = qeth_l2_control_event,
|
||||||
};
|
};
|
||||||
EXPORT_SYMBOL_GPL(qeth_l2_discipline);
|
EXPORT_SYMBOL_GPL(qeth_l2_discipline);
|
||||||
|
@ -1511,7 +1511,8 @@ static int qeth_l3_arp_flush_cache(struct qeth_card *card)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, void __user *data, int cmd)
|
static int qeth_l3_ndo_siocdevprivate(struct net_device *dev, struct ifreq *rq,
|
||||||
|
void __user *data, int cmd)
|
||||||
{
|
{
|
||||||
struct qeth_card *card = dev->ml_priv;
|
struct qeth_card *card = dev->ml_priv;
|
||||||
struct qeth_arp_cache_entry arp_entry;
|
struct qeth_arp_cache_entry arp_entry;
|
||||||
@ -1552,7 +1553,7 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, void __use
|
|||||||
rc = qeth_l3_arp_flush_cache(card);
|
rc = qeth_l3_arp_flush_cache(card);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rc = -EOPNOTSUPP;
|
rc = qeth_siocdevprivate(dev, rq, data, cmd);
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -1841,7 +1842,7 @@ static const struct net_device_ops qeth_l3_netdev_ops = {
|
|||||||
.ndo_validate_addr = eth_validate_addr,
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
.ndo_set_rx_mode = qeth_l3_set_rx_mode,
|
.ndo_set_rx_mode = qeth_l3_set_rx_mode,
|
||||||
.ndo_eth_ioctl = qeth_do_ioctl,
|
.ndo_eth_ioctl = qeth_do_ioctl,
|
||||||
.ndo_siocdevprivate = qeth_siocdevprivate,
|
.ndo_siocdevprivate = qeth_l3_ndo_siocdevprivate,
|
||||||
.ndo_fix_features = qeth_fix_features,
|
.ndo_fix_features = qeth_fix_features,
|
||||||
.ndo_set_features = qeth_set_features,
|
.ndo_set_features = qeth_set_features,
|
||||||
.ndo_tx_timeout = qeth_tx_timeout,
|
.ndo_tx_timeout = qeth_tx_timeout,
|
||||||
@ -1857,7 +1858,7 @@ static const struct net_device_ops qeth_l3_osa_netdev_ops = {
|
|||||||
.ndo_validate_addr = eth_validate_addr,
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
.ndo_set_rx_mode = qeth_l3_set_rx_mode,
|
.ndo_set_rx_mode = qeth_l3_set_rx_mode,
|
||||||
.ndo_eth_ioctl = qeth_do_ioctl,
|
.ndo_eth_ioctl = qeth_do_ioctl,
|
||||||
.ndo_siocdevprivate = qeth_siocdevprivate,
|
.ndo_siocdevprivate = qeth_l3_ndo_siocdevprivate,
|
||||||
.ndo_fix_features = qeth_fix_features,
|
.ndo_fix_features = qeth_fix_features,
|
||||||
.ndo_set_features = qeth_set_features,
|
.ndo_set_features = qeth_set_features,
|
||||||
.ndo_tx_timeout = qeth_tx_timeout,
|
.ndo_tx_timeout = qeth_tx_timeout,
|
||||||
@ -2071,7 +2072,6 @@ const struct qeth_discipline qeth_l3_discipline = {
|
|||||||
.remove = qeth_l3_remove_device,
|
.remove = qeth_l3_remove_device,
|
||||||
.set_online = qeth_l3_set_online,
|
.set_online = qeth_l3_set_online,
|
||||||
.set_offline = qeth_l3_set_offline,
|
.set_offline = qeth_l3_set_offline,
|
||||||
.do_ioctl = qeth_l3_do_ioctl,
|
|
||||||
.control_event_handler = qeth_l3_control_event,
|
.control_event_handler = qeth_l3_control_event,
|
||||||
};
|
};
|
||||||
EXPORT_SYMBOL_GPL(qeth_l3_discipline);
|
EXPORT_SYMBOL_GPL(qeth_l3_discipline);
|
||||||
|
Loading…
Reference in New Issue
Block a user