From patchwork Fri Sep 27 14:38:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 2955541 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 72BD6BFF0B for ; Fri, 27 Sep 2013 14:38:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5AB23201EA for ; Fri, 27 Sep 2013 14:38:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 240A2202C7 for ; Fri, 27 Sep 2013 14:38:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753918Ab3I0Oij (ORCPT ); Fri, 27 Sep 2013 10:38:39 -0400 Received: from ebb06.tieto.com ([131.207.168.38]:49051 "EHLO ebb06.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753427Ab3I0Oig (ORCPT ); Fri, 27 Sep 2013 10:38:36 -0400 X-AuditID: 83cfa826-b7f268e000004e10-4f-524598684413 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb06.tieto.com (SMTP Mailer) with SMTP id 9A.2C.19984.86895425; Fri, 27 Sep 2013 17:38:33 +0300 (EEST) Received: from uw001058.eu.tieto.com (10.28.19.57) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.298.1; Fri, 27 Sep 2013 17:38:32 +0300 From: Michal Kazior To: CC: , Michal Kazior Subject: [PATCH 3/4] ath10k: remove ce_sendlist_send Date: Fri, 27 Sep 2013 16:38:25 +0200 Message-ID: <1380292706-3609-4-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380292706-3609-1-git-send-email-michal.kazior@tieto.com> References: <1380292706-3609-1-git-send-email-michal.kazior@tieto.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBIsWRmVeSWpSXmKPExsXSfL5DSTdzhmuQwc0zjBaPLh1jtniz4g67 xbetD9gcmD0+z7zL5rF5Sb3H501yAcxRXDYpqTmZZalF+nYJXBkrvjsV3JKu+L17IXsD41mx LkZODgkBE4nby/+xQdhiEhfurQeyuTiEBFYxSmxf8IoVwlnKKNFwcD4rSBWbgK7Eq8azYLaI gILEr0kfwbqZBXwlnj1ZxgRiCwNN/f/pHlgNi4CqxOyth9hBbF4BN4krre8Yuxg5gLYpSMyZ ZAMS5hRwlzjwYjtYuRBQSfvnDawQ5YISJ2c+YYEYLyFx8MULZogaFYmD6/czT2AUmIWkbBaS sgWMTKsY+VOTkgzM9EoyU0vy9ZLzczcxggNwhdoOxmcPpA4xCnAwKvHwKpS5BAmxJpYVV+Ye YpTkYFIS5U3udQ0S4kvKT6nMSCzOiC8qzUktPsQowcGsJMIr0gmU401JrKxKLcqHSUlzsCiJ 827ocAwSEkhPLEnNTk0tSC2CycpwcChJ8ApOB2oULEpNT61Iy8wpQUgzcXCCDOcBGi4OUsNb XJCYW5yZDpE/xagoJc4rB5IQAElklObB9cISxCtGcaBXhHmNQap4gMkFrvsV0GAmoMEOHU4g g0sSEVJSDYxZuvq5t7af/K1W8tL5+LHKlLsvU9hjdifFnPcRDFymc/pG53up/D+7PH4aXY8X Dnh/2052vWCR02tjz2uaJhF95loPQ848N09QLN3415rX69bKxQlux7YfzBa7UHL2fkTKq895 Zxn3zc7IlxYunckTcrMndP6cq/aTPWeaO2mmXZvttatKsESJpTgj0VCLuag4EQBxbBu96wIA AA== Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 It is completely pointless to keep this function around. It doesn't do anything different than ce_send except it introduces more overhead. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/ce.c | 34 --------------------------------- drivers/net/wireless/ath/ath10k/ce.h | 15 --------------- drivers/net/wireless/ath/ath10k/pci.c | 4 ++-- 3 files changed, 2 insertions(+), 51 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index 834e29e..9e6daa9 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -338,40 +338,6 @@ int ath10k_ce_send(struct ath10k_ce_pipe *ce_state, return ret; } -int ath10k_ce_sendlist_send(struct ath10k_ce_pipe *ce_state, - void *per_transfer_context, - unsigned int transfer_id, - u32 paddr, unsigned int nbytes, - u32 flags) -{ - struct ath10k_ce_ring *src_ring = ce_state->src_ring; - struct ath10k *ar = ce_state->ar; - struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); - unsigned int nentries_mask = src_ring->nentries_mask; - unsigned int sw_index; - unsigned int write_index; - int delta, ret = -ENOMEM; - - spin_lock_bh(&ar_pci->ce_lock); - - sw_index = src_ring->sw_index; - write_index = src_ring->write_index; - - delta = CE_RING_DELTA(nentries_mask, write_index, sw_index - 1); - - if (delta >= 1) { - ret = ath10k_ce_send_nolock(ce_state, per_transfer_context, - paddr, nbytes, - transfer_id, flags); - if (ret) - ath10k_warn("CE send failed: %d\n", ret); - } - - spin_unlock_bh(&ar_pci->ce_lock); - - return ret; -} - int ath10k_ce_recv_buf_enqueue(struct ath10k_ce_pipe *ce_state, void *per_recv_context, u32 buffer) diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h index aec8028..949b174 100644 --- a/drivers/net/wireless/ath/ath10k/ce.h +++ b/drivers/net/wireless/ath/ath10k/ce.h @@ -156,21 +156,6 @@ void ath10k_ce_send_cb_register(struct ath10k_ce_pipe *ce_state, void (*send_cb)(struct ath10k_ce_pipe *), int disable_interrupts); -/* - * Queue a "sendlist" of buffers to be sent using gather to a single - * anonymous destination buffer - * ce - which copy engine to use - * sendlist - list of simple buffers to send using gather - * transfer_id - arbitrary ID; reflected to destination - * Returns 0 on success; otherwise an error status. - * - * Implemenation note: Pushes multiple buffers with Gather to Source ring. - */ -int ath10k_ce_sendlist_send(struct ath10k_ce_pipe *ce_state, - void *per_transfer_context, - unsigned int transfer_id, - u32 paddr, unsigned int nbytes, - u32 flags); /*==================Recv=======================*/ diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index dff23d9..4f6a978 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -730,8 +730,8 @@ static int ath10k_pci_hif_send_head(struct ath10k *ar, u8 pipe_id, pipe_info->num_sends_allowed--; spin_unlock_bh(&pipe_info->pipe_lock); - ret = ath10k_ce_sendlist_send(ce_hdl, nbuf, transfer_id, - skb_cb->paddr, len, flags); + ret = ath10k_ce_send(ce_hdl, nbuf, skb_cb->paddr, len, transfer_id, + flags); if (ret) ath10k_warn("CE send failed: %p\n", nbuf);