Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 574e2af7 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

include: Convert ethernet mac address declarations to use ETH_ALEN



It's convenient to have ethernet mac addresses use
ETH_ALEN to be able to grep for them a bit easier and
also to ensure that the addresses are __aligned(2).

Add #include <linux/if_ether.h> as necessary.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e216975a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@
#ifndef __DM9000_PLATFORM_DATA
#define __DM9000_PLATFORM_DATA __FILE__

#include <linux/if_ether.h>

/* IO control flags */

#define DM9000_PLATF_8BITONLY	(0x0001)
@@ -27,7 +29,7 @@

struct dm9000_plat_data {
	unsigned int	flags;
	unsigned char	dev_addr[6];
	unsigned char	dev_addr[ETH_ALEN];

	/* allow replacement IO routines */

+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <linux/string.h>
#include <linux/of_mdio.h>
#include <linux/if_ether.h>
#include <asm/types.h>

#define FS_ENET_NAME	"fs_enet"
@@ -135,7 +136,7 @@ struct fs_platform_info {
	const struct fs_mii_bus_info *bus_info;

	int rx_ring, tx_ring;	/* number of buffers on rx     */
	__u8 macaddr[6];	/* mac address                 */
	__u8 macaddr[ETH_ALEN];	/* mac address                 */
	int rx_copybreak;	/* limit we copy small frames  */
	int use_napi;		/* use NAPI                    */
	int napi_weight;	/* NAPI weight                 */
+30 −29
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#define LINUX_IEEE80211_H

#include <linux/types.h>
#include <linux/if_ether.h>
#include <asm/byteorder.h>

/*
@@ -209,28 +210,28 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2)
struct ieee80211_hdr {
	__le16 frame_control;
	__le16 duration_id;
	u8 addr1[6];
	u8 addr2[6];
	u8 addr3[6];
	u8 addr1[ETH_ALEN];
	u8 addr2[ETH_ALEN];
	u8 addr3[ETH_ALEN];
	__le16 seq_ctrl;
	u8 addr4[6];
	u8 addr4[ETH_ALEN];
} __packed __aligned(2);

struct ieee80211_hdr_3addr {
	__le16 frame_control;
	__le16 duration_id;
	u8 addr1[6];
	u8 addr2[6];
	u8 addr3[6];
	u8 addr1[ETH_ALEN];
	u8 addr2[ETH_ALEN];
	u8 addr3[ETH_ALEN];
	__le16 seq_ctrl;
} __packed __aligned(2);

struct ieee80211_qos_hdr {
	__le16 frame_control;
	__le16 duration_id;
	u8 addr1[6];
	u8 addr2[6];
	u8 addr3[6];
	u8 addr1[ETH_ALEN];
	u8 addr2[ETH_ALEN];
	u8 addr3[ETH_ALEN];
	__le16 seq_ctrl;
	__le16 qos_ctrl;
} __packed __aligned(2);
@@ -608,8 +609,8 @@ struct ieee80211s_hdr {
	u8 flags;
	u8 ttl;
	__le32 seqnum;
	u8 eaddr1[6];
	u8 eaddr2[6];
	u8 eaddr1[ETH_ALEN];
	u8 eaddr2[ETH_ALEN];
} __packed __aligned(2);

/* Mesh flags */
@@ -758,7 +759,7 @@ struct ieee80211_rann_ie {
	u8 rann_flags;
	u8 rann_hopcount;
	u8 rann_ttl;
	u8 rann_addr[6];
	u8 rann_addr[ETH_ALEN];
	__le32 rann_seq;
	__le32 rann_interval;
	__le32 rann_metric;
@@ -802,9 +803,9 @@ enum ieee80211_vht_opmode_bits {
struct ieee80211_mgmt {
	__le16 frame_control;
	__le16 duration;
	u8 da[6];
	u8 sa[6];
	u8 bssid[6];
	u8 da[ETH_ALEN];
	u8 sa[ETH_ALEN];
	u8 bssid[ETH_ALEN];
	__le16 seq_ctrl;
	union {
		struct {
@@ -833,7 +834,7 @@ struct ieee80211_mgmt {
		struct {
			__le16 capab_info;
			__le16 listen_interval;
			u8 current_ap[6];
			u8 current_ap[ETH_ALEN];
			/* followed by SSID and Supported rates */
			u8 variable[0];
		} __packed reassoc_req;
@@ -966,21 +967,21 @@ struct ieee80211_vendor_ie {
struct ieee80211_rts {
	__le16 frame_control;
	__le16 duration;
	u8 ra[6];
	u8 ta[6];
	u8 ra[ETH_ALEN];
	u8 ta[ETH_ALEN];
} __packed __aligned(2);

struct ieee80211_cts {
	__le16 frame_control;
	__le16 duration;
	u8 ra[6];
	u8 ra[ETH_ALEN];
} __packed __aligned(2);

struct ieee80211_pspoll {
	__le16 frame_control;
	__le16 aid;
	u8 bssid[6];
	u8 ta[6];
	u8 bssid[ETH_ALEN];
	u8 ta[ETH_ALEN];
} __packed __aligned(2);

/* TDLS */
@@ -989,14 +990,14 @@ struct ieee80211_pspoll {
struct ieee80211_tdls_lnkie {
	u8 ie_type; /* Link Identifier IE */
	u8 ie_len;
	u8 bssid[6];
	u8 init_sta[6];
	u8 resp_sta[6];
	u8 bssid[ETH_ALEN];
	u8 init_sta[ETH_ALEN];
	u8 resp_sta[ETH_ALEN];
} __packed;

struct ieee80211_tdls_data {
	u8 da[6];
	u8 sa[6];
	u8 da[ETH_ALEN];
	u8 sa[ETH_ALEN];
	__be16 ether_type;
	u8 payload_type;
	u8 category;
@@ -1090,8 +1091,8 @@ struct ieee80211_p2p_noa_attr {
struct ieee80211_bar {
	__le16 frame_control;
	__le16 duration;
	__u8 ra[6];
	__u8 ta[6];
	__u8 ra[ETH_ALEN];
	__u8 ta[ETH_ALEN];
	__le16 control;
	__le16 start_seq_num;
} __packed;
+6 −5
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#ifndef MLX4_DEVICE_H
#define MLX4_DEVICE_H

#include <linux/if_ether.h>
#include <linux/pci.h>
#include <linux/completion.h>
#include <linux/radix-tree.h>
@@ -620,7 +621,7 @@ struct mlx4_eth_av {
	u8		dgid[16];
	u32		reserved4[2];
	__be16		vlan;
	u8		mac[6];
	u8		mac[ETH_ALEN];
};

union mlx4_ext_av {
@@ -914,10 +915,10 @@ enum mlx4_net_trans_promisc_mode {
};

struct mlx4_spec_eth {
	u8	dst_mac[6];
	u8	dst_mac_msk[6];
	u8	src_mac[6];
	u8	src_mac_msk[6];
	u8	dst_mac[ETH_ALEN];
	u8	dst_mac_msk[ETH_ALEN];
	u8	src_mac[ETH_ALEN];
	u8	src_mac_msk[ETH_ALEN];
	u8	ether_type_enable;
	__be16	ether_type;
	__be16	vlan_id_msk;
+3 −2
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#define MLX4_QP_H

#include <linux/types.h>
#include <linux/if_ether.h>

#include <linux/mlx4/device.h>

@@ -143,7 +144,7 @@ struct mlx4_qp_path {
	u8			feup;
	u8			fvl_rx;
	u8			reserved4[2];
	u8			dmac[6];
	u8			dmac[ETH_ALEN];
};

enum { /* fl */
@@ -318,7 +319,7 @@ struct mlx4_wqe_datagram_seg {
	__be32			dqpn;
	__be32			qkey;
	__be16			vlan;
	u8			mac[6];
	u8			mac[ETH_ALEN];
};

struct mlx4_wqe_lso_seg {
Loading