From patchwork Sun May 9 19:24:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gertjan van Wingerde X-Patchwork-Id: 98006 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o49JOdp1031251 for ; Sun, 9 May 2010 19:24:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582Ab0EITY2 (ORCPT ); Sun, 9 May 2010 15:24:28 -0400 Received: from cpsmtpb-ews07.kpnxchange.com ([213.75.39.10]:2462 "EHLO cpsmtpb-ews07.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559Ab0EITY2 (ORCPT ); Sun, 9 May 2010 15:24:28 -0400 Received: from cpbrm-ews19.kpnxchange.com ([10.94.84.150]) by cpsmtpb-ews07.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 9 May 2010 21:24:25 +0200 Received: from CPSMTPM-EML108.kpnxchange.com ([195.121.3.12]) by cpbrm-ews19.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 9 May 2010 21:24:25 +0200 Received: from wingerd.gvw.nl ([86.87.118.224]) by CPSMTPM-EML108.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Sun, 9 May 2010 21:24:25 +0200 Received: by wingerd.gvw.nl (Postfix, from userid 501) id 058E560037; Sun, 9 May 2010 21:24:24 +0200 (CEST) From: Gertjan van Wingerde To: "John W. Linville" Cc: Ivo van Doorn , , , Gertjan van Wingerde Subject: [PATCH 6/9 v2] rt2x00: Clean up generic procedures on descriptor writing. Date: Sun, 9 May 2010 21:24:22 +0200 Message-Id: <1273433062-12982-1-git-send-email-gwingerde@gmail.com> X-Mailer: git-send-email 1.7.1 X-OriginalArrivalTime: 09 May 2010 19:24:25.0476 (UTC) FILETIME=[3C5F9C40:01CAEFAD] X-RecipientDomain: vger.kernel.org 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.3 (demeter.kernel.org [140.211.167.41]); Sun, 09 May 2010 19:24:40 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 59d9459..8768c6f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -428,20 +428,23 @@ static void rt2x00queue_write_tx_descriptor(struct queue_entry *entry, * it is now ready to be dumped to userspace through debugfs. */ rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TX, entry->skb); +} + +static void rt2x00queue_kick_tx_queue(struct queue_entry *entry, + struct txentry_desc *txdesc) +{ + struct data_queue *queue = entry->queue; + struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; /* * Check if we need to kick the queue, there are however a few rules - * 1) Don't kick beacon queue - * 2) Don't kick unless this is the last in frame in a burst. + * 1) Don't kick unless this is the last in frame in a burst. * When the burst flag is set, this frame is always followed * by another frame which in some way are related to eachother. * This is true for fragments, RTS or CTS-to-self frames. - * 3) Rule 2 can be broken when the available entries + * 2) Rule 1 can be broken when the available entries * in the queue are less then a certain threshold. */ - if (entry->queue->qid == QID_BEACON) - return; - if (rt2x00queue_threshold(queue) || !test_bit(ENTRY_TXD_BURST, &txdesc->flags)) rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, queue->qid); @@ -537,6 +540,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, rt2x00queue_index_inc(queue, Q_INDEX); rt2x00queue_write_tx_descriptor(entry, &txdesc); + rt2x00queue_kick_tx_queue(entry, &txdesc); return 0; }