lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 9 Sep 2013 09:25:10 +0200 From: Benedikt Spranger <b.spranger@...utronix.de> To: netdev@...r.kernel.org Cc: Alexander Frank <Alexander.Frank@...rspaecher.com>, Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Holger Dengler <dengler@...utronix.de>, Benedikt Spranger <b.spranger@...utronix.de> Subject: [PATCH 13/16] c_can: flexcard: add ioctl to reset FIFO message object The FlexCard FIFO reset implementation did not reset the FIFO message object. Since the FIFO configuration is done from userspace a function to reset the FIFO message object is needed. Add an ioctl to reset the FIFO message object from userspace. Signed-off-by: Benedikt Spranger <b.spranger@...utronix.de> --- drivers/net/can/c_can/c_can.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 51ca2a6..670a6b1 100644 --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c @@ -1447,7 +1447,21 @@ void free_c_can_dev(struct net_device *dev) } EXPORT_SYMBOL_GPL(free_c_can_dev); +static int c_can_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +{ + switch (cmd) { + case SIOCDEVPRIVATE: + c_can_inval_msg_object(dev, 0, FC_TXFIFO_MO); + break; + default: + return -ENOIOCTLCMD; + } + + return 0; +} + static const struct net_device_ops c_can_netdev_ops = { + .ndo_do_ioctl = c_can_ioctl, .ndo_open = c_can_open, .ndo_stop = c_can_close, .ndo_start_xmit = c_can_start_xmit, -- 1.8.4.rc3 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists