Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944200AbcJSPFs (ORCPT ); Wed, 19 Oct 2016 11:05:48 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:35253 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943815AbcJSPFa (ORCPT ); Wed, 19 Oct 2016 11:05:30 -0400 From: Ivan Safonov To: Greg Kroah-Hartman , Bhaktipriya Shridhar , Andy Shevchenko , Geliang Tang , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: insafonov@gmail.com Subject: [PATCH 26/37] staging:r8188eu: remove recvframe_pull function Date: Wed, 19 Oct 2016 22:07:54 +0700 Message-Id: <1476889685-7367-26-git-send-email-insafonov@gmail.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1476889685-7367-1-git-send-email-insafonov@gmail.com> References: <1476889685-7367-1-git-send-email-insafonov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2663 Lines: 73 skb_pull used instead. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_recv.c | 8 ++++---- drivers/staging/rtl8188eu/include/rtw_recv.h | 17 ----------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 5e47e25..1d29808 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -1303,7 +1303,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe) eth_type = ntohs(be_tmp); /* pattrib->ether_type */ pattrib->eth_type = eth_type; - ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); + ptr = skb_pull(precvframe->pkt, (rmv_len-sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); memcpy(ptr, pattrib->dst, ETH_ALEN); memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN); @@ -1372,7 +1372,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter, wlanhdr_offset = pnfhdr->attrib.hdrlen + pnfhdr->attrib.iv_len; - recvframe_pull(pnextrframe, wlanhdr_offset); + skb_pull(pnextrframe->pkt, wlanhdr_offset); /* append to first fragment frame's tail (if privacy frame, pull the ICV) */ recvframe_pull_tail(prframe, pfhdr->attrib.icv_len); @@ -1508,10 +1508,10 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe) pattrib = &prframe->attrib; - recvframe_pull(prframe, prframe->attrib.hdrlen); + skb_pull(prframe->pkt, prframe->attrib.hdrlen); if (prframe->attrib.iv_len > 0) - recvframe_pull(prframe, prframe->attrib.iv_len); + skb_pull(prframe->pkt, prframe->attrib.iv_len); a_len = prframe->pkt->len; diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 752c40fe..f0ce2e6 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -253,23 +253,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter); void rtw_reordering_ctrl_timeout_handler(unsigned long data); -static inline u8 *recvframe_pull(struct recv_frame *precvframe, uint sz) -{ - /* rx_data += sz; move rx_data sz bytes hereafter */ - - /* used for extract sz bytes from rx_data, update rx_data and return - * the updated rx_data to the caller */ - - u8 *data; - - if (precvframe == NULL) - return NULL; - data = skb_pull(precvframe->pkt, sz); - if (!data) - return NULL; - return data; -} - static inline u8 *recvframe_put(struct recv_frame *precvframe, uint sz) { /* used for append sz bytes from ptr to rx_tail, update rx_tail -- 2.7.3