OSDN Git Service

tulip: use ndo_siocdevprivate
authorArnd Bergmann <arnd@arndb.de>
Tue, 27 Jul 2021 13:44:53 +0000 (15:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jul 2021 19:11:43 +0000 (20:11 +0100)
commit029a4fef6b22b92d4f9b50ac0cdc48dfaff9af68
treec44ac7fc71290c9ecd04d1274f0e41c2fa073a7e
parent4747c1a8bc50a69e9b2cd7eb188fcbd95f177999
tulip: use ndo_siocdevprivate

The tulip driver has a debugging method over ioctl built-in, but it
does not actually check the command type, which may end up leading
to random behavior when trying to run other ioctls on it.

Change the driver to use ndo_siocdevprivate and limit the execution
further to the first private command code. If anyone still has tools
to run these debugging commands, they might have to be patched for
it if they pass different ioctl command.

The function has existed in this form since the driver was merged in
Linux-1.1.86.

Cc: linux-parisc@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dec/tulip/de4x5.c