From e2582ad85a59bc758431db9648627c626ef2e2a7 Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Wed, 22 Dec 2010 09:30:11 +0100 Subject: [PATCH] staging: brcm80211: remove usage of struct ether_header In linux the is already a structure defined for the ethernet header. Code now uses struct ethhdr instead. Reviewed-by: Brett Rudley Reviewed-by: Henry Ptasinski Reviewed-by: Roland Vossen Reviewed-by: Dowan Kim Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/brcmfmac/dhd_common.c | 2 +- drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 12 ++++++------ drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 1 - drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 1 - drivers/staging/brcm80211/brcmfmac/wl_iw.c | 2 -- drivers/staging/brcm80211/include/proto/bcmevent.h | 2 +- drivers/staging/brcm80211/sys/wlc_mac80211.c | 2 +- drivers/staging/brcm80211/util/bcmsrom.c | 1 + 8 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c index 3dbf72e..4eacdff 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c @@ -868,7 +868,7 @@ wl_host_event(struct dhd_info *dhd, int *ifidx, void *pktdata, if (ifevent->action == WLC_E_IF_ADD) dhd_add_if(dhd, ifevent->ifidx, NULL, event->ifname, - pvt_data->eth.ether_dhost, + pvt_data->eth.h_dest, ifevent->flags, ifevent->bssidx); else diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index 5d5255f..4ef1242 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c @@ -1031,11 +1031,11 @@ int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf) /* Update multicast statistic */ if (pktbuf->len >= ETH_ALEN) { u8 *pktdata = (u8 *) (pktbuf->data); - struct ether_header *eh = (struct ether_header *)pktdata; + struct ethhdr *eh = (struct ethhdr *)pktdata; - if (is_multicast_ether_addr(eh->ether_dhost)) + if (is_multicast_ether_addr(eh->h_dest)) dhdp->tx_multicast++; - if (ntoh16(eh->ether_type) == ETH_P_PAE) + if (ntoh16(eh->h_proto) == ETH_P_PAE) atomic_inc(&dhd->pend_8021x_cnt); } @@ -1255,13 +1255,13 @@ void dhd_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success) { uint ifidx; dhd_info_t *dhd = (dhd_info_t *) (dhdp->info); - struct ether_header *eh; + struct ethhdr *eh; u16 type; dhd_prot_hdrpull(dhdp, &ifidx, txp); - eh = (struct ether_header *)(txp->data); - type = ntoh16(eh->ether_type); + eh = (struct ethhdr *)(txp->data); + type = ntoh16(eh->h_proto); if (type == ETH_P_PAE) atomic_dec(&dhd->pend_8021x_cnt); diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c index 3edce44..383416d 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c @@ -44,7 +44,6 @@ #include #include -#include #include #include diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c index 991463f..f857d38 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c @@ -20,7 +20,6 @@ #include #include -#include #include diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c index db6e68e..00700c6 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c +++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -35,7 +34,6 @@ typedef const struct si_pub si_t; #include -#include #include #include diff --git a/drivers/staging/brcm80211/include/proto/bcmevent.h b/drivers/staging/brcm80211/include/proto/bcmevent.h index 865d157..5796f75 100644 --- a/drivers/staging/brcm80211/include/proto/bcmevent.h +++ b/drivers/staging/brcm80211/include/proto/bcmevent.h @@ -40,7 +40,7 @@ typedef BWL_PRE_PACKED_STRUCT struct { #ifdef BRCM_FULLMAC typedef BWL_PRE_PACKED_STRUCT struct bcm_event { - struct ether_header eth; + struct ethhdr eth; bcmeth_hdr_t bcm_hdr; wl_event_msg_t event; } BWL_POST_PACKED_STRUCT bcm_event_t; diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c index 1d5d01a..9c57573c 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.c +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c @@ -1729,7 +1729,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, /* some code depends on packed structures */ ASSERT(sizeof(struct ether_addr) == ETH_ALEN); - ASSERT(sizeof(struct ether_header) == ETH_HLEN); + ASSERT(sizeof(struct ethhdr) == ETH_HLEN); ASSERT(sizeof(d11regs_t) == SI_CORE_SIZE); ASSERT(sizeof(ofdm_phy_hdr_t) == D11_PHY_HDR_LEN); ASSERT(sizeof(cck_phy_hdr_t) == D11_PHY_HDR_LEN); diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c index 19d4502..fc836ee 100644 --- a/drivers/staging/brcm80211/util/bcmsrom.c +++ b/drivers/staging/brcm80211/util/bcmsrom.c @@ -44,6 +44,7 @@ #include #endif +#include #include /* for sprom content groking */ #define BS_ERROR(args) -- 2.7.4