Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3880431rwi; Sat, 22 Oct 2022 01:27:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7e2ls9PraA+f7z5HY1VEuWsuVl/ZlnnZSceZxFjDFVPiOVaRY2WEA1QCFhaHG24OayemaT X-Received: by 2002:a17:90b:33c3:b0:20a:ebc3:6514 with SMTP id lk3-20020a17090b33c300b0020aebc36514mr62041035pjb.147.1666427269883; Sat, 22 Oct 2022 01:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427269; cv=none; d=google.com; s=arc-20160816; b=IlZN4frJoGoSpIs6FLSodTCRBkmrV1FAMm8VjHlbSM6uzqat0tgrSULEw6H5eZ3aA8 2Rk7YtPH2Q6Oz1sBNjxbIW1HJp7HfEfVbT9S5LRlM1cwgpUdzLX3jquGre0QMZijhjUJ YJhG4numlD9aegbwHOHClLieT7fQewAQ37MI1eJaGX7hB8FExuDbHJq4+gC9BfgwB/W/ iZ+MnlMePlizqsZbQRmj5BfcJqUrxBKh8xR1d+kq1/UCR9lqft5+11lOcKbP0+dslDLd f06JG5lWYlG0alpd5crW6huZQKyLnZ/WoPnRro8QkDrMXD9LPOpZy9EhpkX6QRn2KzYI dx3w== 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=GocChEVnz4V5UncG5GRHBvGX0cot1JnGv6Ti6OwBkhk=; b=lyRrg9Of9QEKc4v7cLYJq0qSkYL2RDGyHigeIwjAPHoT0nZEMl1MWF0k0hfUScI8tZ YWydn3c5c3ZS8WjP838AVVCQ92ex/fzgvbXch88r4t0K38ZzQqnakwAzorNyACPUidig KT7raUYviSntVaHrwD7WVRzmt+7Kf/4Am1BQ+SstjTvhVXQPQy3TOigYqncw1Z1DiSZQ wTUlas6sRZhsZqXMzcX8uL8OEvgcWuX15NrPrmYViinyoVlTeZpGvcAzqI/KM1mSMk95 KK7jw5ofX8k4598WbDwEt6V85JiXXCMnyIgxCjPJ1ZTyhSfjMpC6ruNcXHmlapJjt92C XLhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0XKvmnBn; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a1709027c8f00b00174eef66680si26225167pll.120.2022.10.22.01.27.38; Sat, 22 Oct 2022 01:27:49 -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=0XKvmnBn; 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 S231341AbiJVHvy (ORCPT + 99 others); Sat, 22 Oct 2022 03:51:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbiJVHte (ORCPT ); Sat, 22 Oct 2022 03:49:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0967F2AA152; Sat, 22 Oct 2022 00:46:02 -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 ams.source.kernel.org (Postfix) with ESMTPS id 31373B82E1A; Sat, 22 Oct 2022 07:44:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82001C433C1; Sat, 22 Oct 2022 07:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424697; bh=ox7vi4Bv2Sh7+GvuZXncrkO2Hs5AcUsm0cIlGIXr+08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0XKvmnBnsK62BAdZDyogDNXH7NkYbWSaZd8vdGMoI2sgjXZOHV43trz4sAbWQqczK v3Y/TsZgSY8DUMo/GZtnJYmybIBBNwntxanjXnOIB3CP+nkD4DzuJFFFu+1myvFqBx ED+W7PtYRQayLWkqjnei+O4Om2rc0WDHy5D9F/xE= 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 5.19 243/717] wifi: mt76: mt7615: add mt7615_mutex_acquire/release in mt7615_sta_set_decap_offload Date: Sat, 22 Oct 2022 09:22:02 +0200 Message-Id: <20221022072457.940959451@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 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 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 d722c3c177be..4a1e6b92ff73 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c @@ -1194,12 +1194,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 -- 2.35.1