From patchwork Wed Oct 19 08:26:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4634 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp212114wrs; Wed, 19 Oct 2022 02:06:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4enagif5Q7dPkB+a/c0v7u/TdDvPo5q2DRRiR8fZmtzsIY/EONafVVHBAiSrA8rxilkru7 X-Received: by 2002:a17:906:c08c:b0:78d:b8ce:c28f with SMTP id f12-20020a170906c08c00b0078db8cec28fmr5779146ejz.437.1666170406003; Wed, 19 Oct 2022 02:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170405; cv=none; d=google.com; s=arc-20160816; b=rGcO6T8iWlwrZy7jmXKf/D0P6NASMQb+V/Ro1WmKlMjBuxYcpl/of1yhwf1Uzj1KIg DuJ+wLW1/SWUXkzjIzHfWGAzXAmFUXhEfUZlNwUrJtqqq1kx+h0y2ckA5UdDUHUKGU8H KU+PFaGe6lANLyrHgTnAF8GDt7Vfyd6p+/rg6848xR5/ja7wZuVm7HOYjFgiXEkkJ/0I VItOhuGEJTtu/Ea40urTxli324Vhto6fcOMFUJ9qAS00HQmL4I8+2WUXO//xm3jzO6Id iEFA4XTDeUeXhSuFIvWZHey5dvwX4HwxEphxKuKRg2CgIuezlBsR1UlzFJHuLNK+wAmc EUKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bX5iEXCgDimOeAxt07iO6NjziRGf1OOwOPj6/8Gog/s=; b=nqn41sv95MYygxE5wgRBXd09TPODx2ivUEZNhz10dz5gv/NyQ5vv77My4MAHBEr1YL 4aWOYpU9iUYz3gvZ+fxJVxnBuGSG8ZbB+XwfLYzs9nQbuPdyKl0rNnyJCbfeEcOIEdxX +zM9ne/dgJ62qX/bAQch8kL9TjZdcwSERFqmaIRqNdkL0ysve5dslRzgoVTJ1OobZocu fet3W5+klDZkgSmFvKmF5lxcA7uqXcb1K0c5di+sFUpP+ztTnZgo32LRYCnek6No9Thy EUXh5brWkoEzRNsPSpGYv+dCSUVKdG3fp37uuBPFW7i6VkSQWiInjRltJSijEGq1YKOR EnLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kXx78nHo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he38-20020a1709073da600b0078dbc4ea733si13986475ejc.730.2022.10.19.02.06.15; Wed, 19 Oct 2022 02:06:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kXx78nHo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231916AbiJSI4u (ORCPT + 99 others); Wed, 19 Oct 2022 04:56:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231905AbiJSI4F (ORCPT ); Wed, 19 Oct 2022 04:56:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D5F9B871; Wed, 19 Oct 2022 01:52:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0E35F61868; Wed, 19 Oct 2022 08:50:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25D71C433C1; Wed, 19 Oct 2022 08:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169453; bh=5hFsduFDooxb/R2PcYIuH4Pnf/toVcyN16MWoPsuRb0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kXx78nHoE9zy49Gr21mtFOlB1TpLS4OOe6n6Tc7ASqv93z6gvqBd7rQVnn0YLkqH0 BFPqGAaTY60xcPfIyZXcSOpZ91d/q36iv8dNOEt2sAQnPW4Uydj2cd7OFiyJnY1euy CT9Z0lCEF7fmx6AkF+3pVX3mudoQQpm+N597D78Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Felix Fietkau , Sasha Levin Subject: [PATCH 6.0 283/862] wifi: mt76: mt7615: add mt7615_mutex_acquire/release in mt7615_sta_set_decap_offload Date: Wed, 19 Oct 2022 10:26:10 +0200 Message-Id: <20221019083302.521043144@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106299544031317?= X-GMAIL-MSGID: =?utf-8?q?1747106299544031317?= From: Lorenzo Bianconi [ Upstream commit 765c69d477a44c088e5d19e7758dfa4db418e3ba ] Similar to mt7921 driver, introduce mt7615_mutex_acquire/release in mt7615_sta_set_decap_offload in order to avoid sending mcu commands while the device is in low-power state. Fixes: d4b98c63d7a77 ("mt76: mt7615: add support for rx decapsulation offload") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c index 9bf8545c8c17..8d4733f87cda 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c @@ -1195,12 +1195,16 @@ static void mt7615_sta_set_decap_offload(struct ieee80211_hw *hw, struct mt7615_dev *dev = mt7615_hw_dev(hw); struct mt7615_sta *msta = (struct mt7615_sta *)sta->drv_priv; + mt7615_mutex_acquire(dev); + if (enabled) set_bit(MT_WCID_FLAG_HDR_TRANS, &msta->wcid.flags); else clear_bit(MT_WCID_FLAG_HDR_TRANS, &msta->wcid.flags); mt7615_mcu_set_sta_decap_offload(dev, vif, sta); + + mt7615_mutex_release(dev); } #ifdef CONFIG_PM