From patchwork Thu Nov 27 10:09:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 5394521 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7C638C11AD for ; Thu, 27 Nov 2014 10:23:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3DD1201EC for ; Thu, 27 Nov 2014 10:23:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D13E8201B9 for ; Thu, 27 Nov 2014 10:23:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XtwEH-0001oj-2H; Thu, 27 Nov 2014 10:23:17 +0000 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XtwDn-0001R2-TD for ath10k@lists.infradead.org; Thu, 27 Nov 2014 10:22:49 +0000 Received: by mail-wg0-f48.google.com with SMTP id y19so6035303wgg.7 for ; Thu, 27 Nov 2014 02:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jxd9sICQQSMJTWYTENTOjWemCias6rlJxMCmxBz03as=; b=XG37A2ufgfvrkYbhbNsnfeQBNbWJKrVhP7mDq/dTlgpzcdcDo5/usdnPsORyuw5iQQ InaGE5kkCvdnhyaEPGGuKXlS5tXaNnxO5/9mCfoF75VpXjvUXXWQDIOXenzNihqlYU8v eCQBLoWENrWYU6CPgDtrssxydnphfhEMMk/6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jxd9sICQQSMJTWYTENTOjWemCias6rlJxMCmxBz03as=; b=h/yyxwlq50+lwjkPI+TJuvW7d9BLP6mv9dlMHQp+juyVbVPJAbVemRgNo0EqXKre0W KnYgs+RtAEP11Lt0DVBQxgL1MESBUleyTj7UE9bqgHswMsq92+/IRJS1KBYo+hmvsk8h UinHPvLn55XZRRMVIUBCkxMvTcYbIYWTJ0l8TLSIU7OobhxiPNCt7xaEnWF7K2k4UPXW LzRCIFotXfxypiOFTD8t/OYmn1xJOI2of9RvRTRrbrtexnhVFo8s93KlAsIptygK1rL+ RopBGGH120WTqcieu2eRylPANsYK8nfui/jlszfxjFiUQMEAG6bpGoEeHB4mFVgrxpqc 71xg== X-Gm-Message-State: ALoCoQnfR4/LkIg9GmhYAbLKcMbXjpp5tKpDuviVFFIxcHcMMbBWX/UrLTqZKpRTTng1q8aZVgIKHKv0J4KK63cedJH9Bz5B7oLWsCpfUkvw08HDnwrb7cqhxornbEhaw2NJ9jXJRq4E4DI8aIJyeqX7pmnpcL5PD4i4EuwZSSg7UUNP20bKJgY= X-Received: by 10.180.35.133 with SMTP id h5mr50949860wij.28.1417083744869; Thu, 27 Nov 2014 02:22:24 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id wx3sm10056383wjc.19.2014.11.27.02.22.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Nov 2014 02:22:24 -0800 (PST) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH 2/3] ath10k: remove callback argument Date: Thu, 27 Nov 2014 11:09:37 +0100 Message-Id: <1417082978-1701-2-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1417082978-1701-1-git-send-email-michal.kazior@tieto.com> References: <1417082978-1701-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141127_022248_219259_D5A86390 X-CRM114-Status: GOOD ( 13.15 ) X-Spam-Score: -0.8 (/) Cc: linux-wireless@vger.kernel.org, Michal Kazior X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Pass the eid argument via skbuff control buffer. This will make it possible to work with queues of HTC event buffers. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/hif.h | 3 +-- drivers/net/wireless/ath/ath10k/htc.c | 10 +++++++--- drivers/net/wireless/ath/ath10k/pci.c | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 4a29498..226b2d2 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -79,6 +79,7 @@ static inline const char *ath10k_bus_str(enum ath10k_bus bus) struct ath10k_skb_cb { dma_addr_t paddr; + u8 eid; u8 vdev_id; struct { diff --git a/drivers/net/wireless/ath/ath10k/hif.h b/drivers/net/wireless/ath/ath10k/hif.h index 91d24a5..0c92e02 100644 --- a/drivers/net/wireless/ath/ath10k/hif.h +++ b/drivers/net/wireless/ath/ath10k/hif.h @@ -32,8 +32,7 @@ struct ath10k_hif_sg_item { struct ath10k_hif_cb { int (*tx_completion)(struct ath10k *ar, - struct sk_buff *wbuf, - unsigned transfer_id); + struct sk_buff *wbuf); int (*rx_completion)(struct ath10k *ar, struct sk_buff *wbuf); }; diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index e245e34..f1946a6 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -160,6 +160,7 @@ int ath10k_htc_send(struct ath10k_htc *htc, ath10k_htc_prepare_tx_skb(ep, skb); + skb_cb->eid = eid; skb_cb->paddr = dma_map_single(dev, skb->data, skb->len, DMA_TO_DEVICE); ret = dma_mapping_error(dev, skb_cb->paddr); if (ret) @@ -197,15 +198,18 @@ err_pull: } static int ath10k_htc_tx_completion_handler(struct ath10k *ar, - struct sk_buff *skb, - unsigned int eid) + struct sk_buff *skb) { struct ath10k_htc *htc = &ar->htc; - struct ath10k_htc_ep *ep = &htc->endpoint[eid]; + struct ath10k_skb_cb *skb_cb; + struct ath10k_htc_ep *ep; if (WARN_ON_ONCE(!skb)) return 0; + skb_cb = ATH10K_SKB_CB(skb); + ep = &htc->endpoint[skb_cb->eid]; + ath10k_htc_notify_tx_completion(ep, skb); /* the skb now belongs to the completion handler */ diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 541f3bc..95e9066 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -835,7 +835,7 @@ static void ath10k_pci_ce_send_done(struct ath10k_ce_pipe *ce_state) if (transfer_context == NULL) continue; - cb->tx_completion(ar, transfer_context, transfer_id); + cb->tx_completion(ar, transfer_context); } } @@ -1263,7 +1263,7 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe) id = MS(__le16_to_cpu(ce_desc[i].flags), CE_DESC_FLAGS_META_DATA); - ar_pci->msg_callbacks_current.tx_completion(ar, skb, id); + ar_pci->msg_callbacks_current.tx_completion(ar, skb); } }