From patchwork Mon Mar 7 02:15:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 614371 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p272FsPD019041 for ; Mon, 7 Mar 2011 02:15:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755242Ab1CGCPw (ORCPT ); Sun, 6 Mar 2011 21:15:52 -0500 Received: from mail-yw0-f46.google.com ([209.85.213.46]:64006 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755208Ab1CGCPw (ORCPT ); Sun, 6 Mar 2011 21:15:52 -0500 Received: by ywj3 with SMTP id 3so1451731ywj.19 for ; Sun, 06 Mar 2011 18:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:x-mailer:cc:subject; bh=6u25W7fn2XdMpti3hToGeLNKOrrO2S4t6p3+719HgDc=; b=lAS/UwQiQEEuxMxvVxdhP/xe5l+crNk6P9tWzMJucK8a6IFxMKvm96flZjhCSxbXpY OlrxpFLwuaEeNf/Y+UTpdpvIt7Iy590C9DlGcmKcsKXZKhQ/VKQ2gxSawff1ZZcAiKtA 8fVtJIdNGOrH9FLcyPZ2/8Ztc1QKTlUhNuc+w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:content-transfer-encoding:message-id :date:to:x-mailer:cc:subject; b=ojf8sBwbuL1dpO2QgM0dVMG1tK/JsTz1ogq0pJ7VuCESOFL/5Csxrj2UE/qOBnh8FY eC2T/UEIrjyf3E8kJyGZtZgx/lBF1zSc6kxyLY4AsnVGKelrm7Cvz0X7/dzLsyHxwgG5 aPbbHmvr24PdOwHNnb3CuCZI7xkgB4AjGWy44= Received: by 10.150.72.29 with SMTP id u29mr4084436yba.15.1299464151667; Sun, 06 Mar 2011 18:15:51 -0800 (PST) Received: from bodhi ([117.197.194.30]) by mx.google.com with ESMTPS id q29sm1416036ybk.22.2011.03.06.18.15.49 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Mar 2011 18:15:51 -0800 (PST) From: Sujith MIME-Version: 1.0 Message-ID: <19828.16335.34173.89614@gargle.gargle.HOWL> Date: Mon, 7 Mar 2011 07:45:43 +0530 To: linux-wireless@vger.kernel.org X-Mailer: VM 8.1.1 under 23.2.1 (x86_64-unknown-linux-gnu) CC: ath9k-devel@venema.h4ckr.net Subject: [RFC 28/34] ath9k_htc: Optimize HTC start/stop API Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 07 Mar 2011 02:15:54 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 47fdd19..405a09d 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -312,7 +312,7 @@ static int hif_usb_send_tx(struct hif_device_usb *hif_dev, struct sk_buff *skb) return 0; } -static void hif_usb_start(void *hif_handle, u8 pipe_id) +static void hif_usb_start(void *hif_handle) { struct hif_device_usb *hif_dev = (struct hif_device_usb *)hif_handle; unsigned long flags; @@ -324,7 +324,7 @@ static void hif_usb_start(void *hif_handle, u8 pipe_id) spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags); } -static void hif_usb_stop(void *hif_handle, u8 pipe_id) +static void hif_usb_stop(void *hif_handle) { struct hif_device_usb *hif_dev = (struct hif_device_usb *)hif_handle; struct tx_buf *tx_buf = NULL, *tx_buf_tmp = NULL; diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index be87f47..7ced8ab 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c @@ -302,27 +302,12 @@ int htc_send_epid(struct htc_target *target, struct sk_buff *skb, void htc_stop(struct htc_target *target) { - enum htc_endpoint_id epid; - struct htc_endpoint *endpoint; - - for (epid = ENDPOINT0; epid < ENDPOINT_MAX; epid++) { - endpoint = &target->endpoint[epid]; - if (endpoint->service_id != 0) - target->hif->stop(target->hif_dev, endpoint->ul_pipeid); - } + target->hif->stop(target->hif_dev); } void htc_start(struct htc_target *target) { - enum htc_endpoint_id epid; - struct htc_endpoint *endpoint; - - for (epid = ENDPOINT0; epid < ENDPOINT_MAX; epid++) { - endpoint = &target->endpoint[epid]; - if (endpoint->service_id != 0) - target->hif->start(target->hif_dev, - endpoint->ul_pipeid); - } + target->hif->start(target->hif_dev); } void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle, diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.h b/drivers/net/wireless/ath/ath9k/htc_hst.h index 064a324..191e3c0 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.h +++ b/drivers/net/wireless/ath/ath9k/htc_hst.h @@ -33,8 +33,8 @@ struct ath9k_htc_hif { u8 control_dl_pipe; u8 control_ul_pipe; - void (*start) (void *hif_handle, u8 pipe); - void (*stop) (void *hif_handle, u8 pipe); + void (*start) (void *hif_handle); + void (*stop) (void *hif_handle); int (*send) (void *hif_handle, u8 pipe, struct sk_buff *buf); };