linux-next/Documentation
Arnd Bergmann b9067f5dc4 net: split out SIOCDEVPRIVATE handling from dev_ioctl
SIOCDEVPRIVATE ioctl commands are mainly used in really old
drivers, and they have a number of problems:

- They hide behind the normal .ndo_do_ioctl function that
  is also used for other things in modern drivers, so it's
  hard to spot a driver that actually uses one of these

- Since drivers use a number different calling conventions,
  it is impossible to support compat mode for them in
  a generic way.

- With all drivers using the same 16 commands codes, there
  is no way to introspect the data being passed through
  things like strace.

Add a new net_device_ops callback pointer, to address the
first two of these. Separating them from .ndo_do_ioctl
makes it easy to grep for drivers with a .ndo_siocdevprivate
callback, and the unwieldy name hopefully makes it easier
to spot in code review.

By passing the ifreq structure and the ifr_data pointer
separately, it is no longer necessary to overload these,
and the driver can use either one for a given command.

Cc: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-27 20:11:43 +01:00
..
2021-06-30 12:12:56 -07:00
2021-06-30 15:51:09 -07:00
2021-06-30 19:45:42 +02:00
2021-07-25 09:21:21 +01:00
2021-07-08 12:18:04 -07:00
2021-04-29 14:32:00 -07:00
2021-07-08 12:06:20 -07:00
2021-05-31 22:48:24 -04:00
2021-07-01 08:36:12 +02:00
2021-05-10 15:17:34 -06:00
2021-07-03 11:13:22 -07:00
2021-05-26 09:11:24 +02:00