From patchwork Sat Apr 30 15:13:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivo van Doorn X-Patchwork-Id: 743732 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p3UFImVn008916 for ; Sat, 30 Apr 2011 15:18:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757247Ab1D3PSr (ORCPT ); Sat, 30 Apr 2011 11:18:47 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:43423 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750918Ab1D3PSq (ORCPT ); Sat, 30 Apr 2011 11:18:46 -0400 Received: by ewy4 with SMTP id 4so1390988ewy.19 for ; Sat, 30 Apr 2011 08:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:mime-version :content-type:content-transfer-encoding:message-id; bh=Ew4gXeZRyTp3VcyljYpBn6axiLZnnnSy2VapD/GyLMg=; b=JH06fy3ux51ahIr2EaPDN/ywWSfeHCLILucgFSsD0PxyAfeTad2bxT3IwH14ef5/hk R5YK7fFn4IS5T1E5Fjg69rDfl75e0zDzDf1pwUZSJrhPofkrUIS/kCp2grzpsH3txnuL qRs1qAD9HQMOXtwfucN8xrHtn0OrIbnOaRqrc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-type :content-transfer-encoding:message-id; b=FnOmcaRgNu3+5BOUasNFdtKmnToBUGeGXJDZL1D6HJ7o8wifw75e6Oy/6aw7sUtBS1 IeJN3Z9M+IDVsau9YKa2A2Ljj4u6RWzH0Lu4OjsfmKtIQvShEasxpC2Gtz3VqOpcUC3o qAXrWeodscvYxGkkPoyfR1qNjwo81nnAfmuYU= Received: by 10.14.10.153 with SMTP id 25mr2619217eev.56.1304176725169; Sat, 30 Apr 2011 08:18:45 -0700 (PDT) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id y15sm1322487eeh.20.2011.04.30.08.18.44 (version=SSLv3 cipher=OTHER); Sat, 30 Apr 2011 08:18:44 -0700 (PDT) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 1/6] rt2x00: Reduce tx status reading timeout Date: Sat, 30 Apr 2011 17:13:46 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.x86_64; KDE/4.4.5; x86_64; ; ) Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com MIME-Version: 1.0 Message-Id: <201104301713.47545.IvDoorn@gmail.com> 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 (demeter2.kernel.org [140.211.167.43]); Sat, 30 Apr 2011 15:18:49 +0000 (UTC) When no TX status was available, the default timeout of 20ms is a bit high. The frame is highly likely already send out, so the TX status should be available within only a few milliseconds. Signed-off-by: Ivo van Doorn Acked-by: Gertjan van Wingerde --- drivers/net/wireless/rt2x00/rt2800usb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 0d4e8fa..e4f82d2 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c @@ -134,7 +134,7 @@ static void rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, } else if (!kfifo_is_empty(&rt2x00dev->txstatus_fifo)) { queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); } else if (rt2800usb_txstatus_pending(rt2x00dev)) { - mod_timer(&rt2x00dev->txstatus_timer, jiffies + msecs_to_jiffies(20)); + mod_timer(&rt2x00dev->txstatus_timer, jiffies + msecs_to_jiffies(2)); } } @@ -493,7 +493,7 @@ static void rt2800usb_work_txdone(struct work_struct *work) * also delayed -> use a timer to retrieve it. */ if (rt2800usb_txstatus_pending(rt2x00dev)) - mod_timer(&rt2x00dev->txstatus_timer, jiffies + msecs_to_jiffies(20)); + mod_timer(&rt2x00dev->txstatus_timer, jiffies + msecs_to_jiffies(2)); } /*