]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usbnet: ipheth: break up NCM header size computation
authorFoster Snowhill <forst@pen.gy>
Sat, 25 Jan 2025 23:54:07 +0000 (00:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:16 +0000 (10:05 +0100)
commitc0912ae6586e61d6b83755aed681c56f41eb33dd
treea03107b4dff9aa28bd931d32369eef26ab069f26
parentcf63d65ab9bb78a50f440ac9e59431e8e66de622
usbnet: ipheth: break up NCM header size computation

commit efcbc678a14be268040ffc1fa33c98faf2d55141 upstream.

Originally, the total NCM header size was computed as the sum of two
vaguely labelled constants. While accurate, it wasn't particularly clear
where they were coming from.

Use sizes of existing NCM structs where available. Define the total
NDP16 size based on the maximum amount of DPEs that can fit into the
iOS-specific fixed-size header.

This change does not fix any particular issue. Rather, it introduces
intermediate constants that will simplify subsequent commits.
It should also make it clearer for the reader where the constant values
come from.

Cc: stable@vger.kernel.org # 6.5.x
Signed-off-by: Foster Snowhill <forst@pen.gy>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/ipheth.c