From patchwork Wed Apr 1 21:32:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 6142441 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 34A9CBF4A6 for ; Wed, 1 Apr 2015 21:33:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EF31202EC for ; Wed, 1 Apr 2015 21:33:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EAEC202F0 for ; Wed, 1 Apr 2015 21:33:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335AbbDAVd3 (ORCPT ); Wed, 1 Apr 2015 17:33:29 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:34841 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213AbbDAVd2 (ORCPT ); Wed, 1 Apr 2015 17:33:28 -0400 Received: by wgdm6 with SMTP id m6so66974851wgd.2 for ; Wed, 01 Apr 2015 14:33:27 -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; bh=7MI7Hbbx3aGep/lLC8Pn1j7HJjNb/9wFZXLjEpe2MHg=; b=AfWK7zCUNPa3chVNM2YCdQUezAOku6ezrK3buZexyvTkc4TFKj0NYeIkhKQJNKPbad E1aM0sVDgS4t/78BF+hcTdTY7TXmielM4P+YKfJ6LQDuaFg1mWNGyGxLnZla4AkD5HLx AIkm9N5ZkmU38RiAJNfLzAKGuZDFzXOLGq5MSyt/gfGk1LCoJbKOGBIPPtYvlgYPy5/E pOwwpzdCJ1+0dOFx8NjgrNan5PE7l6+3Bu70nVTEOKY7mrWT6bVb7p2haAGoH0V6lw7f GgWAnepzOPmOP/7CcDQMnRzlQKufSDBU/BOo66KN8BnfifkBZfiS/qCrNhvkwmz6s5OO Vu1g== X-Received: by 10.194.11.9 with SMTP id m9mr86203515wjb.82.1427924007462; Wed, 01 Apr 2015 14:33:27 -0700 (PDT) Received: from tipsey.3.home (94.196.242.13.threembb.co.uk. [94.196.242.13]) by mx.google.com with ESMTPSA id nb9sm3944852wic.10.2015.04.01.14.33.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 14:33:26 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 1/2] staging: vt6655: s_vGenerateTxParameter Replace PSTxBufHead with struct vnt_tx_fifo_head Date: Wed, 1 Apr 2015 22:32:51 +0100 Message-Id: <1427923972-11947-1-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.0 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 endian correction on fifo_ctl and current_rate. Removing pTxBufHead, pFifoHead and wFifoCtl Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/rxtx.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 5b869d1..195dcc9 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -116,7 +116,7 @@ void s_vGenerateTxParameter( struct vnt_private *pDevice, unsigned char byPktType, - void *pTxBufHead, + struct vnt_tx_fifo_head *, void *pvRrvTime, void *pvRTS, void *pvCTS, @@ -944,7 +944,7 @@ void s_vGenerateTxParameter( struct vnt_private *pDevice, unsigned char byPktType, - void *pTxBufHead, + struct vnt_tx_fifo_head *tx_buffer_head, void *pvRrvTime, void *pvRTS, void *pvCTS, @@ -955,21 +955,18 @@ s_vGenerateTxParameter( unsigned short wCurrentRate ) { - unsigned short wFifoCtl; + u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl); bool bDisCRC = false; unsigned char byFBOption = AUTO_FB_NONE; - PSTxBufHead pFifoHead = (PSTxBufHead)pTxBufHead; - - pFifoHead->wReserved = wCurrentRate; - wFifoCtl = pFifoHead->wFIFOCtl; + tx_buffer_head->current_rate = cpu_to_le16(wCurrentRate); - if (wFifoCtl & FIFOCTL_CRCDIS) + if (fifo_ctl & FIFOCTL_CRCDIS) bDisCRC = true; - if (wFifoCtl & FIFOCTL_AUTO_FB_0) + if (fifo_ctl & FIFOCTL_AUTO_FB_0) byFBOption = AUTO_FB_0; - else if (wFifoCtl & FIFOCTL_AUTO_FB_1) + else if (fifo_ctl & FIFOCTL_AUTO_FB_1) byFBOption = AUTO_FB_1; if (!pvRrvTime)