Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755260AbcJGSCe (ORCPT ); Fri, 7 Oct 2016 14:02:34 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33097 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756846AbcJGSAl (ORCPT ); Fri, 7 Oct 2016 14:00:41 -0400 From: Ivan Safonov To: Greg Kroah-Hartman , Kyle Kuffermann , Alexey Khoroshilov , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Ivan Safonov Subject: [PATCH 33/34] staging:r8188eu: refactor recvbuf2recvframe function Date: Sat, 8 Oct 2016 01:01:32 +0700 Message-Id: <1475863293-27587-33-git-send-email-insafonov@gmail.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1475863293-27587-1-git-send-email-insafonov@gmail.com> References: <1475863293-27587-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: 2007 Lines: 51 Reduce number of nesting levels. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 31 ++++++++++++------------ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 9347dcd..cc52082 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -172,22 +172,21 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n")); } - } else { - /* enqueue recvframe to txrtp queue */ - if (pattrib->pkt_rpt_type == TX_REPORT1) { - /* CCX-TXRPT ack for xmit mgmt frames. */ - handle_txrpt_ccx_88e(adapt, precvframe->rx_data); - } else if (pattrib->pkt_rpt_type == TX_REPORT2) { - ODM_RA_TxRPT2Handle_8188E( - &haldata->odmpriv, - precvframe->rx_data, - pattrib->pkt_len, - pattrib->MacIDValidEntry[0], - pattrib->MacIDValidEntry[1] - ); - } else if (pattrib->pkt_rpt_type == HIS_REPORT) { - interrupt_handler_8188eu(adapt, pattrib->pkt_len, precvframe->rx_data); - } + } else if (pattrib->pkt_rpt_type == TX_REPORT1) { + /* CCX-TXRPT ack for xmit mgmt frames. */ + handle_txrpt_ccx_88e(adapt, precvframe->rx_data); + rtw_free_recvframe(precvframe, pfree_recv_queue); + } else if (pattrib->pkt_rpt_type == TX_REPORT2) { + ODM_RA_TxRPT2Handle_8188E( + &haldata->odmpriv, + precvframe->rx_data, + pattrib->pkt_len, + pattrib->MacIDValidEntry[0], + pattrib->MacIDValidEntry[1] + ); + rtw_free_recvframe(precvframe, pfree_recv_queue); + } else if (pattrib->pkt_rpt_type == HIS_REPORT) { + interrupt_handler_8188eu(adapt, pattrib->pkt_len, precvframe->rx_data); rtw_free_recvframe(precvframe, pfree_recv_queue); } pkt_cnt--; -- 2.7.3