From patchwork Fri Aug 14 21:58:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7019671 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B2A2EC05AC for ; Fri, 14 Aug 2015 21:59:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA071206F7 for ; Fri, 14 Aug 2015 21:59:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFEF8206EB for ; Fri, 14 Aug 2015 21:59:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753465AbbHNV7U (ORCPT ); Fri, 14 Aug 2015 17:59:20 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:37853 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752679AbbHNV7T (ORCPT ); Fri, 14 Aug 2015 17:59:19 -0400 Received: by wibhh20 with SMTP id hh20so33920481wib.0 for ; Fri, 14 Aug 2015 14:59:18 -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=/xctcufsXVYlLP+K8tsNA63PNp0qPE2PIO5IMJHHgCM=; b=Dzs3/M3N4skkH2ZCNIBv1RZVb3PZULnwZdbok7Zi9LeYdMuFDS7RNTIy+tMn/slEaq CJ4WiTr2csC4mH6NMCf6F8s2TXlMqo78Tx3McWL9lhJUMuv0ph2MejKLVgvTM0W8x5ze D58KX5Iae/6MXgjpq8HeMIx0l4vorUrIcCIlKSkGOek1T71NYWZbrc2QXaQNB8c2X07S crEiZFdaOkQykqs+ys16ias/texaOzsEG9WOxmATXasIygvhQ0C+FoSJpmnChRDB8zkd f3DD6GFumyVfXGD9jJ10MYVbwgp/ppCgfrYl68eiUhD28ROxMSASHxj1NSEwjUUtgyMH ydlA== X-Received: by 10.194.109.97 with SMTP id hr1mr3795394wjb.38.1439589557903; Fri, 14 Aug 2015 14:59:17 -0700 (PDT) Received: from tipsey.3.home (188.31.106.31.threembb.co.uk. [188.31.106.31]) by smtp.gmail.com with ESMTPSA id s7sm4947902wix.23.2015.08.14.14.59.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Aug 2015 14:59:17 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 2/6] staging: vt6655: replaced typedef struct tagTDES1 Date: Fri, 14 Aug 2015 22:58:47 +0100 Message-Id: <1439589531-3059-2-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1439589531-3059-1-git-send-email-tvboxspy@gmail.com> References: <1439589531-3059-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=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Create struct vnt_tdes1 that replaces members wReqCount -> req_count byTCR -> tcr byReserved -> reserved Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/desc.h | 13 ++++++------- drivers/staging/vt6655/device_main.c | 9 ++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h index 00fa348..6efe825 100644 --- a/drivers/staging/vt6655/desc.h +++ b/drivers/staging/vt6655/desc.h @@ -234,12 +234,11 @@ struct vnt_tdes0 { #endif } __packed; -typedef struct tagTDES1 { - volatile __le16 wReqCount; - volatile unsigned char byTCR; - volatile unsigned char byReserved; -} __attribute__ ((__packed__)) -STDES1; +struct vnt_tdes1 { + volatile __le16 req_count; + volatile u8 tcr; + volatile u8 reserved; +} __packed; typedef struct tagDEVICE_TD_INFO { void *mic_hdr; @@ -254,7 +253,7 @@ typedef struct tagDEVICE_TD_INFO { /* transmit descriptor */ typedef struct tagSTxDesc { volatile struct vnt_tdes0 td0; - volatile STDES1 m_td1TD1; + volatile struct vnt_tdes1 td1; volatile __le32 buff_addr; volatile __le32 next_desc; struct tagSTxDesc *next __aligned(8); diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 842e052..947e868 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -915,7 +915,7 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx) byTsr1 = pTD->td0.tsr1; /* Only the status of first TD in the chain is correct */ - if (pTD->m_td1TD1.byTCR & TCR_STP) { + if (pTD->td1.tcr & TCR_STP) { if ((pTD->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB) != 0) { if (!(byTsr1 & TSR1_TERR)) { if (byTsr0 != 0) { @@ -1174,7 +1174,7 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) head_td = priv->apCurrTD[dma_idx]; - head_td->m_td1TD1.byTCR = 0; + head_td->td1.tcr = 0; head_td->pTDInfo->skb = skb; @@ -1192,9 +1192,8 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) priv->bPWBitOn = false; /* Set TSR1 & ReqCount in TxDescHead */ - head_td->m_td1TD1.byTCR |= (TCR_STP | TCR_EDP | EDMSDU); - head_td->m_td1TD1.wReqCount = - cpu_to_le16((u16)head_td->pTDInfo->dwReqCount); + head_td->td1.tcr |= (TCR_STP | TCR_EDP | EDMSDU); + head_td->td1.req_count = cpu_to_le16((u16)head_td->pTDInfo->dwReqCount); head_td->buff_addr = cpu_to_le32(head_td->pTDInfo->buf_dma);