From patchwork Sat Aug 15 20:57:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7021451 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 04F159F39D for ; Sat, 15 Aug 2015 20:58:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED99820524 for ; Sat, 15 Aug 2015 20:58:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1F3220523 for ; Sat, 15 Aug 2015 20:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754509AbbHOU6I (ORCPT ); Sat, 15 Aug 2015 16:58:08 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:36709 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754156AbbHOU6G (ORCPT ); Sat, 15 Aug 2015 16:58:06 -0400 Received: by wicja10 with SMTP id ja10so43297583wic.1 for ; Sat, 15 Aug 2015 13:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VJB6MtKyE0WSkY2yJ7MWZuuk6HkALeXhlMU1yxgjNO8=; b=iqviAYOXDwjElu6lyeCKnC5w4ffD+SVRhcD6hU6IvV31/DHcyvG1RuL+b/18AMmYBG RHJrPd5P5MJ6FkUpKtHPrT8Z8l9hKO4YCMkn/2WB6ayTINWCf1YfJpfaGnhfYSNoJJBj dWdP+cI/FAJLXqZVoGH4jUXoqnXMFgVsLYb3Awj4aULDasrlvsuNeulyiPIzwpde6MG9 GyZNQ8+g7zlmNiL6v9cPvU+4JBZAD2bpQvPVkMG5ImLGAMTgS9w6cFEwxe4mHgGtB+97 amlXjTEx3Z597roozQtMxjbo9jiwiCA9Z3Iko1zquOnqRgMPRRrJxcHP29Z8HE417X2j /2Qw== X-Received: by 10.180.77.68 with SMTP id q4mr18757905wiw.22.1439672285009; Sat, 15 Aug 2015 13:58:05 -0700 (PDT) Received: from tipsey.3.home (188.31.160.140.threembb.co.uk. [188.31.160.140]) by smtp.gmail.com with ESMTPSA id jr5sm14438355wjc.14.2015.08.15.13.58.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Aug 2015 13:58:04 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 2/4] staging: vt6655: replace typedef struct tagRDES1 Date: Sat, 15 Aug 2015 21:57:33 +0100 Message-Id: <1439672255-2548-2-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1439672255-2548-1-git-send-email-tvboxspy@gmail.com> References: <1439672255-2548-1-git-send-email-tvboxspy@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP with struct vnt_rdes1 and members wReqCount -> req_count wReserved -> reserved Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/card.c | 4 ++-- drivers/staging/vt6655/desc.h | 11 +++++------ drivers/staging/vt6655/device_main.c | 2 +- drivers/staging/vt6655/dpc.c | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index ab632e0..7a30ba2 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -575,7 +575,7 @@ CARDvSafeResetRx( pDesc = &(pDevice->aRD0Ring[uu]); pDesc->rd0.res_count = cpu_to_le16(pDevice->rx_buf_sz); pDesc->rd0.owner = OWNED_BY_NIC; - pDesc->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz); + pDesc->rd1.req_count = cpu_to_le16(pDevice->rx_buf_sz); } /* init state, all RD is chip's */ @@ -583,7 +583,7 @@ CARDvSafeResetRx( pDesc = &(pDevice->aRD1Ring[uu]); pDesc->rd0.res_count = cpu_to_le16(pDevice->rx_buf_sz); pDesc->rd0.owner = OWNED_BY_NIC; - pDesc->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz); + pDesc->rd1.req_count = cpu_to_le16(pDevice->rx_buf_sz); } /* set perPkt mode */ diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h index 68b3121..eb0c7c3 100644 --- a/drivers/staging/vt6655/desc.h +++ b/drivers/staging/vt6655/desc.h @@ -189,16 +189,15 @@ struct vnt_rdes0 { #endif } __packed; -typedef struct tagRDES1 { - __le16 wReqCount; - unsigned short wReserved; -} __attribute__ ((__packed__)) -SRDES1; +struct vnt_rdes1 { + __le16 req_count; + u16 reserved; +} __packed; /* Rx descriptor*/ typedef struct tagSRxDesc { volatile struct vnt_rdes0 rd0; - volatile SRDES1 m_rd1RD1; + volatile struct vnt_rdes1 rd1; volatile __le32 buff_addr; volatile __le32 next_desc; struct tagSRxDesc *next __aligned(8); diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 37c2be2..22c1957 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -818,7 +818,7 @@ static bool device_alloc_rx_buf(struct vnt_private *pDevice, PSRxDesc pRD) pRD->rd0.res_count = cpu_to_le16(pDevice->rx_buf_sz); pRD->rd0.owner = OWNED_BY_NIC; - pRD->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz); + pRD->rd1.req_count = cpu_to_le16(pDevice->rx_buf_sz); pRD->buff_addr = cpu_to_le32(pRDInfo->skb_dma); return true; diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index dbaaeeb..ef39cbe 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -143,7 +143,7 @@ bool vnt_receive_frame(struct vnt_private *priv, PSRxDesc curr_rd) dma_unmap_single(&priv->pcid->dev, rd_info->skb_dma, priv->rx_buf_sz, DMA_FROM_DEVICE); - frame_size = le16_to_cpu(curr_rd->m_rd1RD1.wReqCount) + frame_size = le16_to_cpu(curr_rd->rd1.req_count) - le16_to_cpu(curr_rd->rd0.res_count); if ((frame_size > 2364) || (frame_size < 33)) {