Skip to content

Commit

Permalink
bnx2x: prevent incorrect byte-swap in BE
Browse files Browse the repository at this point in the history
Fixes incorrectly defined struct in FW HSI for BE platform.
Affects tunneling, tx-switching and anti-spoofing.

Introduced in e42780b
    bnx2x: Utilize FW 7.10.51

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Kravkov <Dmitry.Kravkov@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Sep 2, 2014
1 parent a5325ae commit 55ef5c8
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -3983,37 +3983,17 @@ struct eth_mac_addresses {

/* tunneling related data */
struct eth_tunnel_data {
#if defined(__BIG_ENDIAN)
__le16 dst_mid;
__le16 dst_lo;
#elif defined(__LITTLE_ENDIAN)
__le16 dst_lo;
__le16 dst_mid;
#endif
#if defined(__BIG_ENDIAN)
__le16 fw_ip_hdr_csum;
__le16 dst_hi;
#elif defined(__LITTLE_ENDIAN)
__le16 dst_hi;
__le16 fw_ip_hdr_csum;
#endif
#if defined(__BIG_ENDIAN)
u8 flags;
#define ETH_TUNNEL_DATA_IP_HDR_TYPE_OUTER (0x1<<0)
#define ETH_TUNNEL_DATA_IP_HDR_TYPE_OUTER_SHIFT 0
#define ETH_TUNNEL_DATA_RESERVED (0x7F<<1)
#define ETH_TUNNEL_DATA_RESERVED_SHIFT 1
u8 ip_hdr_start_inner_w;
__le16 pseudo_csum;
#elif defined(__LITTLE_ENDIAN)
__le16 pseudo_csum;
u8 ip_hdr_start_inner_w;
u8 flags;
#define ETH_TUNNEL_DATA_IP_HDR_TYPE_OUTER (0x1<<0)
#define ETH_TUNNEL_DATA_IP_HDR_TYPE_OUTER_SHIFT 0
#define ETH_TUNNEL_DATA_RESERVED (0x7F<<1)
#define ETH_TUNNEL_DATA_RESERVED_SHIFT 1
#endif
};

/* union for mac addresses and for tunneling data.
Expand Down

0 comments on commit 55ef5c8

Please sign in to comment.