staging: brcm80211: remove usage of struct ether_header
authorArend van Spriel <arend@broadcom.com>
Wed, 22 Dec 2010 08:30:11 +0000 (09:30 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Jan 2011 23:17:41 +0000 (15:17 -0800)
In linux the is already a structure defined for the ethernet
header. Code now uses struct ethhdr instead.

Reviewed-by: Brett Rudley <brudley@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Dowan Kim <dowan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/dhd_common.c
drivers/staging/brcm80211/brcmfmac/dhd_linux.c
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
drivers/staging/brcm80211/brcmfmac/wl_iw.c
drivers/staging/brcm80211/include/proto/bcmevent.h
drivers/staging/brcm80211/sys/wlc_mac80211.c
drivers/staging/brcm80211/util/bcmsrom.c

index 3dbf72eebd4ab3e2992deb4ec3c9db5fef372a4d..4eacdff7bff76f67657cca6f17228f3ec595f607 100644 (file)
@@ -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
index 5d5255fc62a6cea3fda7822ff6b86846e269660c..4ef12426718ae3dd50d42078231667675356f1a3 100644 (file)
@@ -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);
index 3edce44978a1ff3eec3e0dfe9bb15f828cf82e72..383416d5a75024ff03d55c6c85872daef809f19b 100644 (file)
@@ -44,7 +44,6 @@
 #include <sbsdpcmdev.h>
 #include <bcmsdpcm.h>
 
-#include <proto/ethernet.h>
 #include <proto/802.1d.h>
 #include <proto/802.11.h>
 
index 991463f4a7f4c1559ffbf8d1d4998ea0942bccaa..f857d381f5c48a6c7830d537751f45276fd29bbb 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <bcmutils.h>
 #include <bcmendian.h>
-#include <proto/ethernet.h>
 
 #include <asm/uaccess.h>
 
index db6e68eab290ce8fdf24b7066cf9780f06779d92..00700c69a054513892620b0a33a720e966a2c899 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <bcmutils.h>
 #include <bcmendian.h>
-#include <proto/ethernet.h>
 
 #include <linux/if_arp.h>
 #include <asm/uaccess.h>
@@ -35,7 +34,6 @@
 typedef const struct si_pub si_t;
 #include <wlioctl.h>
 
-#include <proto/ethernet.h>
 #include <dngl_stats.h>
 #include <dhd.h>
 
index 865d15767a006a3faa60fe006a582c675cad9932..5796f7563c68721f0108fd49e4ba8cd10be87fc6 100644 (file)
@@ -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;
index 1d5d01ac0a9b384e7b9c6d08f9b821f695d38f36..9c57573ceaa5b97a55ca8555a72112410307ac38 100644 (file)
@@ -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);
index 19d45026a5ee159265310ff174a20eaa6c8f08e6..fc836ee38ed83ce982c23c97b3dac5d4781b8298 100644 (file)
@@ -44,6 +44,7 @@
 #include <sbsdpcmdev.h>
 #endif
 
+#include <linux/if_ether.h>
 #include <proto/ethernet.h>    /* for sprom content groking */
 
 #define        BS_ERROR(args)