Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FB6CC05027 for ; Fri, 10 Feb 2023 09:09:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbjBJJJZ (ORCPT ); Fri, 10 Feb 2023 04:09:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231915AbjBJJJE (ORCPT ); Fri, 10 Feb 2023 04:09:04 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22DAC37700 for ; Fri, 10 Feb 2023 01:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Su8zTzR2eBMkXZoHn096ACCwuReb2hQXURyH9ZRK9B8=; b=S0VEOQP7B/KfzPcUQM3ziZmqwQ iPkfll1AmhFKWsd95JlykBqHgtJu8RKFVySuoNV8tAXt+V7R66439THFvpCoPLlAmpaTIhPJ5pevV ImHkq5pqQAR7F+MMNvl43rjkZxnwu9HSLJAaYM0b+xwhskgiyy51vQumSH29+3AlDmzk=; Received: from p200300daa717ad00b877f5316056673d.dip0.t-ipconnect.de ([2003:da:a717:ad00:b877:f531:6056:673d] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pQPNT-006VcP-EF; Fri, 10 Feb 2023 10:07:31 +0100 Message-ID: Date: Fri, 10 Feb 2023 10:07:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH] wifi: mt76: mt7921: fix rx filter incorrect by drv/fw inconsistent To: Deren Wu , Lorenzo Bianconi Cc: Sean Wang , Soul Huang , YN Chen , Leon Yen , Eric-SY Chang , KM Lin , Robin Chiu , CH Yeh , Posh Sun , Stella Chang , Evelyn Tsai , Ryder Lee , Shayne Chen , linux-wireless , linux-mediatek References: Content-Language: en-US From: Felix Fietkau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 17.01.23 10:30, Deren Wu wrote: > From: Neil Chen > > The rx filter, in mt7921 series, may be changed in fw operation. There is > a racing problem if rx filter controlled by both driver and firmware at > the same time. To avoid this issue, let mt7921 driver set rx filter by new > command MCU_CE_CMD_SET_RX_FILTER and allow the firmware controlling it > only. > > Reviewed-by: Lorenzo Bianconi > Co-developed-by: Deren Wu > Signed-off-by: Deren Wu > Signed-off-by: Neil Chen Somebody on github reported that this patch breaks scanning. After looking over it once more, I noticed something very odd: It seems that you are dropping the mac80211 FIF_* -> mt76 filter flags conversion and passing mac80211 flags to the firmware by using *total_flags as an argument to mt7921_mcu_set_rxfilter. This does not make any sense to me. Shouldn't you leave the existing conversion logic in place, and just pass the new dev->mt76.rxfilter value to the firmware? - Felix