]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ibmveth: Fix endian issues with MAC addresses
authorAnton Blanchard <anton@samba.org>
Wed, 5 Mar 2014 03:51:37 +0000 (14:51 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2014 04:44:16 +0000 (21:44 -0700)
commit9fddfa0369b13c56045738cffb90a28d48e44f23
tree4cef128dfded1d9d981fc9153b76cc923926e3bf
parentccec079c02f3a264647d7c17faebb551071d727f
ibmveth: Fix endian issues with MAC addresses

commit d746ca9561440685edb62614d1bcbbc27ff50e66 upstream.

The code to load a MAC address into a u64 for passing to the
hypervisor via a register is broken on little endian.

Create a helper function called ibmveth_encode_mac_addr
which does the right thing in both big and little endian.

We were storing the MAC address in a long in struct ibmveth_adapter.
It's never used so remove it - we don't need another place in the
driver where we create endian issues with MAC addresses.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ibmveth.c
drivers/net/ethernet/ibm/ibmveth.h