@@ -20,6 +20,9 @@
#ifndef _MWIFIEX_FW_H_
#define _MWIFIEX_FW_H_
+#include <linux/if_ether.h>
+
+
#define INTF_HEADER_LEN 4
struct eth_803_hdr {
@@ -26,16 +26,6 @@
#include "11n_aggr.h"
#include "11n_rxreorder.h"
-/** Ethernet II header */
-struct eth_II_hdr {
- /** Ethernet II header destination address */
- u8 dest_addr[MWIFIEX_MAC_ADDR_LENGTH];
- /** Ethernet II header source address */
- u8 src_addr[MWIFIEX_MAC_ADDR_LENGTH];
- /** Ethernet II header length */
- u16 ethertype;
-};
-
/*
* This function processes the received packet and forwards it
* to kernel/upper layer.
@@ -58,7 +48,7 @@ mwifiex_process_rx_packet(struct mwifiex_adapter *adapter,
struct rx_packet_hdr *rx_pkt_hdr;
struct rxpd *local_rx_pd;
int hdr_chop;
- struct eth_II_hdr *eth_hdr;
+ struct ethhdr *eth_hdr;
u8 rfc1042_eth_hdr[MWIFIEX_MAC_ADDR_LENGTH] = { 0xaa, 0xaa, 0x03,
0x00, 0x00, 0x00 };
@@ -114,7 +104,7 @@ mwifiex_process_rx_packet(struct mwifiex_adapter *adapter,
* To create the Ethernet II, just move the src, dst address
* right before the snap_type.
*/
- eth_hdr = (struct eth_II_hdr *)
+ eth_hdr = (struct ethhdr *)
((u8 *) &rx_pkt_hdr->eth803_hdr
+ sizeof(rx_pkt_hdr->eth803_hdr) +
sizeof(rx_pkt_hdr->rfc1042_hdr)
@@ -122,10 +112,10 @@ mwifiex_process_rx_packet(struct mwifiex_adapter *adapter,
- sizeof(rx_pkt_hdr->eth803_hdr.src_addr)
- sizeof(rx_pkt_hdr->rfc1042_hdr.snap_type));
- memcpy(eth_hdr->src_addr, rx_pkt_hdr->eth803_hdr.src_addr,
- sizeof(eth_hdr->src_addr));
- memcpy(eth_hdr->dest_addr, rx_pkt_hdr->eth803_hdr.dest_addr,
- sizeof(eth_hdr->dest_addr));
+ memcpy(eth_hdr->h_source, rx_pkt_hdr->eth803_hdr.src_addr,
+ sizeof(eth_hdr->h_source));
+ memcpy(eth_hdr->h_dest, rx_pkt_hdr->eth803_hdr.dest_addr,
+ sizeof(eth_hdr->h_dest));
/* Chop off the rxpd + the excess memory from the 802.2/llc/snap
header that was removed. */