From: Rusty Russell Date: Fri, 13 Feb 2015 06:43:44 +0000 (+1030) Subject: virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined. X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~45^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed9ecb0415b97b5f9f91f146e1977bb372c74c6d;p=pandora-kernel.git virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined. In particular, the virtio header always has the u16 num_buffers field. We define a new 'struct virtio_net_hdr_v1' for this (rather than simply calling it 'struct virtio_net_hdr', to avoid nasty type errors if some parts of a project define VIRTIO_NET_NO_LEGACY and some don't. Transitional devices (which can't define VIRTIO_NET_NO_LEGACY) will have to keep using struct virtio_net_hdr_mrg_rxbuf, which has the same byte layout as struct virtio_net_hdr_v1. Signed-off-by: Rusty Russell --- Reading git-diff-tree failed