Prechádzať zdrojové kódy

qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_txrx_encap.c

Fix Datapath kernel checkpatch warnings in ol_txrx_encap.c

Change-Id: Ib1af9f38ab4fb13fa11b1fcc8c21d1b6bb8a614d
CRs-Fixed: 2032874
Yun Park 8 rokov pred
rodič
commit
89f62d6c3a
1 zmenil súbory, kde vykonal 17 pridanie a 26 odobranie
  1. 17 26
      core/dp/txrx/ol_txrx_encap.c

+ 17 - 26
core/dp/txrx/ol_txrx_encap.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -41,22 +41,6 @@
 #include <ol_txrx_internal.h>   /* TXRX_ASSERT1 */
 #include <ol_txrx_encap.h>      /* struct ol_rx_decap_info_t */
 
-#define OL_TX_COPY_NATIVE_WIFI_HEADER(wh, msdu, hdsize, localbuf)	\
-	do {								\
-		wh = (struct ieee80211_frame *)qdf_nbuf_data(msdu);	\
-		if ((wh->i_fc[1] &					\
-		     IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS) { \
-			hdsize = sizeof(struct ieee80211_frame_addr4);	\
-		} else {						\
-			hdsize = sizeof(struct ieee80211_frame);	\
-		}							\
-		if (qdf_nbuf_len(msdu) < hdsize) {			\
-			return A_ERROR;					\
-		}							\
-		qdf_mem_copy(localbuf, wh, hdsize);			\
-		wh = (struct ieee80211_frame *)localbuf;		\
-	} while (0)
-
 static inline A_STATUS
 ol_tx_copy_native_wifi_header(qdf_nbuf_t msdu,
 			      uint8_t *hdsize, uint8_t *localbuf)
@@ -268,8 +252,10 @@ ol_tx_encap_from_8023(struct ol_txrx_vdev_t *vdev,
 			llc_hdr->ethertype[1] = eth_hdr->ethertype[1];
 			new_hdsize += sizeof(struct llc_snap_hdr_t);
 		} else {
-			/*llc ready, and it's in payload pdu,
-			  do we need to move to BD pdu? */
+			/*
+			 * llc ready, and it's in payload pdu,
+			 * do we need to move to BD pdu?
+			 */
 		}
 	}
 	qdf_mem_copy((void *)
@@ -294,10 +280,10 @@ ol_tx_encap(struct ol_txrx_vdev_t *vdev,
 						    msdu_info);
 	} else if (pdev->frame_format == wlan_frm_fmt_802_3) {
 		return ol_tx_encap_from_8023(vdev, tx_desc, msdu, msdu_info);
-	} else {
-		/* todo for other types */
-		return A_ERROR;
 	}
+
+	/* todo for other types */
+	return A_ERROR;
 }
 
 static inline void
@@ -406,8 +392,10 @@ ol_rx_decap_to_8023(struct ol_txrx_vdev_t *vdev,
 
 	/* normal msdu(non-subfrm of A-MSDU) if ethr_hdr is null */
 	if (ethr_hdr == NULL) {
-		/* mpdu hdr should be present in info,
-		   re-create ethr_hdr based on mpdu hdr */
+		/*
+		 * mpdu hdr should be present in info,
+		 * re-create ethr_hdr based on mpdu hdr
+		 */
 		TXRX_ASSERT2(info->hdr_len != 0);
 		wh = (struct ieee80211_frame_addr4 *)info->hdr;
 		ethr_hdr = (struct ethernet_hdr_t *)local_buf;
@@ -495,6 +483,7 @@ ol_rx_decap_msdu(struct ol_txrx_vdev_t *vdev,
 {
 	struct ol_txrx_pdev_t *pdev = vdev->pdev;
 	struct ieee80211_frame *wh;
+
 	wh = (struct ieee80211_frame *)qdf_nbuf_data(msdu);
 
 	if (pdev->frame_format == wlan_frm_fmt_native_wifi) {
@@ -549,8 +538,10 @@ ol_rx_decap(struct ol_txrx_vdev_t *vdev,
 		if (info->is_msdu_cmpl_mpdu && !info->is_first_subfrm) {
 			/* It's normal MSDU. */
 		} else {
-			/* It's a first subfrm of A-MSDU and
-			   may also be the last subfrm of A-MSDU */
+			/*
+			 * It's a first subfrm of A-MSDU and
+			 * may also be the last subfrm of A-MSDU
+			 */
 			info->is_subfrm = 1;
 			info->hdr_len = 0;
 			if (vdev->pdev->sw_subfrm_hdr_recovery_enable) {