From patchwork Fri Aug 7 07:08:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 6965361 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 852249F358 for ; Fri, 7 Aug 2015 07:08:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 733642066F for ; Fri, 7 Aug 2015 07:08:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D09720666 for ; Fri, 7 Aug 2015 07:08:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZNblL-0000Hg-RU; Fri, 07 Aug 2015 07:08:19 +0000 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZNblJ-0000CU-0c for ath10k@lists.infradead.org; Fri, 07 Aug 2015 07:08:18 +0000 Received: by labd1 with SMTP id d1so3217347lab.1 for ; Fri, 07 Aug 2015 00:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=9OvhKnN8kNMyCHrkEUGBtXuLSrs9EL5cyNEipVNUeP0=; b=JBmvofAysFvCRuqSOLt/b9PAQMP0udg02M4A4Rz+JfM9THj1MkvZnYRwLsXKCDaTCp iFffBdUOtlN/yBS55SMGo/Fs6/i8U/i0mvv2+IZSA3OK+gTitpalX19o+EyGgkPGMaqE UkAEvjBa5wDwkrcZ583EXqHItAai29tWRZ5zY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9OvhKnN8kNMyCHrkEUGBtXuLSrs9EL5cyNEipVNUeP0=; b=fNH0TZw4/NA0XFW2laYmFGO0E6qJF6eKCK//4enqlCO2ce5F831hgbhaTEFU5CnDcS DtG+HIAPhALC0JYA9zw7SJJqJ1AdR3dL8Gq3kg8REsVSyO2VZnfSSZxOvkLiFiQZLNVE URwNHN07Y8LCv11m5nj0D2eWyMhjyMKDzpuOJJRW25nzsTxif+3Wc+h3TG48yruBjWOb IZjLsIYN6notxt80hTtFYo4Gz6HcRGl0+3M2Ifd4apjyWw+nEOyR4xnVLmSOR3+TGp3T C4TJ1I3yORdj8QXRtUTWIyZEnF4cSvRN/rU9NV/4OKZOqWagKMt60B1Rss2+LmQdwsVw UwGw== X-Gm-Message-State: ALoCoQm8p7hVhWpMAzAe63SYQqbD0mPVgW9zPKAY7+/uQWuvLSVQ+ogaabcvxWQmi9RlqdN4zNdJBaT/n0TLgtYab9Rn1DLcSLwn5Pr3PLqc7fsTS4h3m5BO5JivirXKUiMHbfV7pec3NF1yMITgOmOITkwBXvLbyVnkYFjmLh9MDYvKZmf6kUWp2p6Yzy5EwOgSFssVXEy0 X-Received: by 10.152.23.234 with SMTP id p10mr6086255laf.52.1438931271757; Fri, 07 Aug 2015 00:07:51 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.10]) by smtp.gmail.com with ESMTPSA id rf2sm1942568lbb.12.2015.08.07.00.07.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Aug 2015 00:07:48 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: wake up queue upon vif creation Date: Fri, 7 Aug 2015 09:08:21 +0200 Message-Id: <1438931301-27081-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150807_000817_263154_48CA5287 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Michal Kazior MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Vif's vdev_id is used as queue number. However due to the tx pausing design in ath10k it was possible for a new interface to be created with its tx queue stopped (via ieee80211_stop_queues). This could in turn leave the interface inoperable until ath10k_mac_tx_unlock() was called. This problem only affected multi-vif scenarios when new interfaces were created some time later after other interfaces have been running for some time and had Tx queue full at some point prior. Possible manifestation of the bug was authentication timeout for a client vif. Fixes: 96d828d45e16 ("ath10k: rework tx queue locking") Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/mac.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index acd222f3b899..03e498cb64b4 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4299,6 +4299,11 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, } } + spin_lock_bh(&ar->htt.tx_lock); + if (!ar->tx_paused) + ieee80211_wake_queue(ar->hw, arvif->vdev_id); + spin_unlock_bh(&ar->htt.tx_lock); + mutex_unlock(&ar->conf_mutex); return 0;