From a987746e2c8072ce0aad870d44ef96423ad91faa Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Wed, 20 Feb 2019 11:20:38 -0800 Subject: [PATCH] qcacld-3.0: Replace struct ether_header with qdf_ether_header_t Replace struct ether_header with qdf_ether_header_t. Change-Id: I250b9c72828595c738cf3cfdca69ba6de66ef8aa CRs-Fixed: 2395980 --- core/cds/inc/cds_if_upperproto.h | 11 ----------- core/dp/txrx/ol_rx.c | 2 +- core/dp/txrx/ol_tx_hl.c | 8 ++++---- core/wma/src/wma_data.c | 4 ++-- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/core/cds/inc/cds_if_upperproto.h b/core/cds/inc/cds_if_upperproto.h index bfaeeb928e..70f25a3505 100644 --- a/core/cds/inc/cds_if_upperproto.h +++ b/core/cds/inc/cds_if_upperproto.h @@ -21,17 +21,6 @@ #define ETHER_ADDR_LEN 6 /* length of an Ethernet address */ -/* - * Structure of a 10Mb/s Ethernet header. - */ -#ifndef _NET_ETHERNET_H_ -struct ether_header { - uint8_t ether_dhost[ETHER_ADDR_LEN]; - uint8_t ether_shost[ETHER_ADDR_LEN]; - uint16_t ether_type; -} __packed; -#endif - #define ETHERTYPE_OCB_TX 0x8151 #define ETHERTYPE_OCB_RX 0x8152 diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c index b381d1fbb9..7dc3322bef 100644 --- a/core/dp/txrx/ol_rx.c +++ b/core/dp/txrx/ol_rx.c @@ -1161,7 +1161,7 @@ void ol_rx_ocb_prepare_rx_stats_header(struct ol_txrx_vdev_t *vdev, } if (!chan_info || !chan_info->disable_rx_stats_hdr) { - struct ether_header eth_header = { {0} }; + qdf_ether_header_t eth_header = { {0} }; struct ocb_rx_stats_hdr_t rx_header = {0}; /* diff --git a/core/dp/txrx/ol_tx_hl.c b/core/dp/txrx/ol_tx_hl.c index 2cea3d7c1d..b1483c0bdf 100644 --- a/core/dp/txrx/ol_tx_hl.c +++ b/core/dp/txrx/ol_tx_hl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -358,17 +358,17 @@ static inline int ol_tx_encap_wrapper(struct ol_txrx_pdev_t *pdev, static bool parse_ocb_tx_header(qdf_nbuf_t msdu, struct ocb_tx_ctrl_hdr_t *tx_ctrl) { - struct ether_header *eth_hdr_p; + qdf_ether_header_t *eth_hdr_p; struct ocb_tx_ctrl_hdr_t *tx_ctrl_hdr; /* Check if TX control header is present */ - eth_hdr_p = (struct ether_header *)qdf_nbuf_data(msdu); + eth_hdr_p = (qdf_ether_header_t *)qdf_nbuf_data(msdu); if (eth_hdr_p->ether_type != QDF_SWAP_U16(ETHERTYPE_OCB_TX)) /* TX control header is not present. Nothing to do.. */ return true; /* Remove the ethernet header */ - qdf_nbuf_pull_head(msdu, sizeof(struct ether_header)); + qdf_nbuf_pull_head(msdu, sizeof(qdf_ether_header_t)); /* Parse the TX control header */ tx_ctrl_hdr = (struct ocb_tx_ctrl_hdr_t *)qdf_nbuf_data(msdu); diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index 1b3a0bdb2b..d3e7b59f1b 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -3050,7 +3050,7 @@ void ol_rx_err(void *pdev, uint8_t vdev_id, { tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA); struct mic_failure_ind *mic_err_ind; - struct ether_header *eth_hdr; + qdf_ether_header_t *eth_hdr; struct scheduler_msg cds_msg = {0}; if (!wma) @@ -3061,7 +3061,7 @@ void ol_rx_err(void *pdev, uint8_t vdev_id, if (qdf_nbuf_len(rx_frame) < sizeof(*eth_hdr)) return; - eth_hdr = (struct ether_header *)qdf_nbuf_data(rx_frame); + eth_hdr = (qdf_ether_header_t *)qdf_nbuf_data(rx_frame); mic_err_ind = qdf_mem_malloc(sizeof(*mic_err_ind)); if (!mic_err_ind) return;