From patchwork Sun Nov 8 06:57:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: RCore Linux X-Patchwork-Id: 58452 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA86vqs2022465 for ; Sun, 8 Nov 2009 06:57:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751286AbZKHG5l (ORCPT ); Sun, 8 Nov 2009 01:57:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750844AbZKHG5l (ORCPT ); Sun, 8 Nov 2009 01:57:41 -0500 Received: from mail-yx0-f187.google.com ([209.85.210.187]:35089 "EHLO mail-yx0-f187.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbZKHG5k convert rfc822-to-8bit (ORCPT ); Sun, 8 Nov 2009 01:57:40 -0500 Received: by yxe17 with SMTP id 17so1889221yxe.33 for ; Sat, 07 Nov 2009 22:57:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=R5SxEixm33jQ20bJ0MuLgJ+dTHbygqJrHTzzkFBFV08=; b=IcfDhEUXx2BjEDukuB9oHoQhCTv4/amS1u9rtykZebpAhgF0IuTCQTsRflBysHJgcx kgZKYE9rL+SZoDvs2p760oLHmxzjlBrHI/mOMKcAIujNc5UftjkO3bYz5nRglR/bEV1F u1JelrHEfhuHXsr7LWua0/8G7/sMlvOI/vOR8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=K5FTfSD+Un5fb6nP6DwkRj98kqZZwXsqzRI3Enrv/YiG4aGD1fC473ZuPmZ2+91VtK KvvplQtu/6UAHdekFjJTczx2RezP0QZPsDkKvIYAeXNHZN3/DApVStI48SGwKciwYZbs P77obSefDXGJMq6LEeOP1JL6gfN9VEcCDlq1Q= MIME-Version: 1.0 Received: by 10.150.46.5 with SMTP id t5mr10944095ybt.97.1257663465810; Sat, 07 Nov 2009 22:57:45 -0800 (PST) Date: Sat, 7 Nov 2009 22:57:45 -0800 Message-ID: <79f7ecbe0911072257o385ed65h238d2ed7261321f6@mail.gmail.com> Subject: [PATCH 1/1] ath_hif_usb: changed 'typedef struct' to 'struct' & replaced UsbTxQ with 'struct sk_buff *' From: RCore Linux To: "Luis R. Rodriguez" Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/ath/ath9k/ath_hif_usb.c b/ath/ath9k/ath_hif_usb.c index 0a67763..82634e1 100644 --- a/ath/ath9k/ath_hif_usb.c +++ b/ath/ath9k/ath_hif_usb.c @@ -91,37 +91,33 @@ struct cmd_urb_context { struct hif_device_usb *hif_dev; }; -struct UsbTxQ { - struct sk_buff *buf; -}; - -typedef struct _UsbTxUrbContext { +struct UsbTxUrbContext { u8 index; u8 inUse; struct hif_device_usb *hif_dev; struct sk_buff *buf; struct urb *urb; -} UsbTxUrbContext; +}; struct hif_usb_tx_pipe { - u8 usb_pipe; - struct UsbTxQ UsbTxBufQ[ZM_MAX_TX_BUF_NUM]; - u16 TxBufHead; - u16 TxBufTail; - u16 TxBufCnt; - u16 TxUrbHead; - u16 TxUrbTail; - u16 TxUrbCnt; - UsbTxUrbContext TxUrbCtx[ZM_MAX_TX_URB_NUM]; - usb_complete_t complete; + u8 usb_pipe; + struct sk_buff *UsbTxBufQ[ZM_MAX_TX_BUF_NUM]; + u16 TxBufHead; + u16 TxBufTail; + u16 TxBufCnt; + u16 TxUrbHead; + u16 TxUrbTail; + u16 TxUrbCnt; + struct UsbTxUrbContext TxUrbCtx[ZM_MAX_TX_URB_NUM]; + usb_complete_t complete; }; -typedef struct _UsbRxUrbContext { +struct UsbRxUrbContext{ u8 inUse; struct hif_device_usb *hif_dev; struct sk_buff *skb; struct urb *urb; -} UsbRxUrbContext; +} ; struct hif_device_usb { void *htc_handle; @@ -132,7 +128,7 @@ struct hif_device_usb { u16 device_id; struct sk_buff *regUsbReadBuf; - UsbRxUrbContext RxUrbCtx[ZM_MAX_RX_URB_NUM]; + struct UsbRxUrbContext RxUrbCtx[ZM_MAX_RX_URB_NUM]; struct usb_anchor rx_submitted; struct hif_usb_tx_pipe tx_lp; struct hif_usb_tx_pipe tx_mp; @@ -262,12 +258,12 @@ out: return r; } -static UsbTxUrbContext *zfLnxGetFreeTxUrb(struct hif_device_usb *hif_dev, +static struct UsbTxUrbContext *zfLnxGetFreeTxUrb(struct hif_device_usb *hif_dev, struct hif_usb_tx_pipe *pipe) { - u16 idx; - unsigned long irqFlag; - UsbTxUrbContext *ctx = NULL; + u16 idx; + unsigned long irqFlag; + struct UsbTxUrbContext *ctx = NULL; spin_lock_irqsave(&(hif_dev->cs_lock), irqFlag);