From patchwork Sat May 8 21:40:23 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: 97944 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 o48LeZAu031246 for ; Sat, 8 May 2010 21:41:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753597Ab0EHVko (ORCPT ); Sat, 8 May 2010 17:40:44 -0400 Received: from cpsmtpb-ews01.kpnxchange.com ([213.75.39.4]:2125 "EHLO cpsmtpb-ews01.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753588Ab0EHVkc (ORCPT ); Sat, 8 May 2010 17:40:32 -0400 Received: from cpbrm-ews34.kpnxchange.com ([10.94.84.165]) by cpsmtpb-ews01.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 8 May 2010 23:40:30 +0200 Received: from CPSMTPM-EML110.kpnxchange.com ([195.121.3.14]) by cpbrm-ews34.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 8 May 2010 23:40:30 +0200 Received: from wingerd.gvw.nl ([86.87.118.224]) by CPSMTPM-EML110.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Sat, 8 May 2010 23:40:30 +0200 Received: by wingerd.gvw.nl (Postfix, from userid 501) id DA6ED60036; Sat, 8 May 2010 23:40:29 +0200 (CEST) From: Gertjan van Wingerde To: "John W. Linville" Cc: Ivo van Doorn , , , Gertjan van Wingerde Subject: [PATCH 6/9] rt2x00: Clean up generic procedures on descriptor writing. Date: Sat, 8 May 2010 23:40:23 +0200 Message-Id: <1273354826-4335-7-git-send-email-gwingerde@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1273354826-4335-1-git-send-email-gwingerde@gmail.com> References: <1273354826-4335-1-git-send-email-gwingerde@gmail.com> X-OriginalArrivalTime: 08 May 2010 21:40:30.0956 (UTC) FILETIME=[14F73AC0:01CAEEF7] 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]); Sat, 08 May 2010 21:41:02 +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 2 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; }