From patchwork Wed May 18 18:25:42 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: 794452 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 p4IIQlhx030473 for ; Wed, 18 May 2011 18:26:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933449Ab1ERS0p (ORCPT ); Wed, 18 May 2011 14:26:45 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:42289 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932709Ab1ERS0o (ORCPT ); Wed, 18 May 2011 14:26:44 -0400 Received: by eyx24 with SMTP id 24so530032eyx.19 for ; Wed, 18 May 2011 11:26:43 -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:references :in-reply-to:mime-version:message-id:content-type :content-transfer-encoding; bh=+4/PBBC55oMfefcURXWV9qhpBJqvj/AGeERyrQ62oYQ=; b=HGZBCzorACSk1Kjc9XduTKpzOSEGMRab6ZuA1m49QXes9SUjJcIFIDgc2lYyMfhPm/ h2DA+JWu+2EoQ74EA1kA1CeJauX3/jMLpeUrFBekcFNPJbk9+zaGybAuVkQvzbopDSFC 5XgeUpzeFbT9kbOBCi9zgNN7ectncwOrtMnaA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:message-id:content-type:content-transfer-encoding; b=u5nJ0pFZL+R/0fSQnG3OM0NazMnj0u5gu/Bp3Ch1X50Em4Ua4BiWBaZpZLNS1QHBv4 9dIEcixzDYuj7QeBrS222I27Wzd4QEjOStICspxwIXAlkBfQYxKhtO1qfbP9+JBZiZf3 QZC2UPCQRlcSU8w9rKNvrmRnV0w1WJk0rq/cw= Received: by 10.213.9.12 with SMTP id j12mr786156ebj.147.1305743202820; Wed, 18 May 2011 11:26:42 -0700 (PDT) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id 34sm1354242eee.1.2011.05.18.11.26.41 (version=SSLv3 cipher=OTHER); Wed, 18 May 2011 11:26:41 -0700 (PDT) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 4/7] rt2x00: Interface sequence lock doesn't have to disable interrupts. Date: Wed, 18 May 2011 20:25:42 +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 References: <201105182022.20341.IvDoorn@gmail.com> <201105182022.40563.IvDoorn@gmail.com> <201105182023.04837.IvDoorn@gmail.com> In-Reply-To: <201105182023.04837.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201105182025.42692.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]); Wed, 18 May 2011 18:26:47 +0000 (UTC) From: Gertjan van Wingerde This lock is only used in the TX path and thus in process context. Therefore we can use a much lighter spinlock variant. Signed-off-by: Gertjan van Wingerde Signed-off-by: Ivo van Doorn --- drivers/net/wireless/rt2x00/rt2x00queue.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 56f9d0d..f1e1381 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -206,7 +206,6 @@ static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry, struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); - unsigned long irqflags; if (!(tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)) return; @@ -227,14 +226,14 @@ static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry, * sequence counting per-frame, since those will override the * sequence counter given by mac80211. */ - spin_lock_irqsave(&intf->seqlock, irqflags); + spin_lock(&intf->seqlock); if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)) intf->seqno += 0x10; hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); hdr->seq_ctrl |= cpu_to_le16(intf->seqno); - spin_unlock_irqrestore(&intf->seqlock, irqflags); + spin_unlock(&intf->seqlock); }