Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1054296rwl; Fri, 4 Nov 2022 09:15:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5lmvSTzFhZM5mEoXF59SfPXQPC001GOvzLKvV2x0ey866MyeEEqte7v5sbLxTB1ZGLA+qw X-Received: by 2002:aa7:d80a:0:b0:462:2c1c:8716 with SMTP id v10-20020aa7d80a000000b004622c1c8716mr37150759edq.185.1667578505533; Fri, 04 Nov 2022 09:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667578505; cv=none; d=google.com; s=arc-20160816; b=PXIeSlk0abwdodLoo4+M2pjU0WxkrY9sjUPeNqowftIckVSqBbmW17K+ON0ZUOtthK d7hIZ7TrDlB+/7lGx21GNWcu0xHUrW5ic2o14NEqdNvk9paMvO4KT3Nv/5Q6TQbSi/0+ 0nadsOcRpUDKvM2C/gZ8FgelMMyiK3VLxqilsibTMoyhI7RCjiavVWL4jh9HSvvkjPGd d8Jzj9oHB2HkTySwXbWJtqVbO9V+O2a25YZKBLR/pjsW7U+qDIASO6Yhnwjnp6A8YLJy zCKyOD1THLm9vmBlOhhHOcVPEukNea/pje8OAYW4sjnUpHODJJKTHRPxyav9eWPS/YPa DWvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=b/TZ9KPtAsv5iGV9pnB4CCAXT4pqWPk7Y30tNUj3NA8=; b=GAv6T3SgvIg2zQgfeWqol09WzYAmGgLoPsxJwvR839R+H1h6i2jPl98ZpeH6cZMiye XCGeYwE3DwbgopHFtETGi9dhD6v+jm/l35HENc1MbGMfKIXcr7HFufNH8GDtC/u9Blxh EwLU1alKNDUeMJTxgJJ/z9YVZQSf0ZS7ts64HvujS7fyzhgq7fQVcHJflrFFE7PQOgZ9 y9ldOICBbcrLISr9ZiwvFdplSsc+Z9JQdHsEicQgSkpCSNGp07+CGfppaObiNI/fD0Ur wMEqjozPyHI7/CEzfxTq5/s9JihmL9znn0yZOcau1Djx0ZMsKaTEu1EdWGSzc1ms23w2 7tZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=ta35BkRs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b90-20020a509f63000000b00463817b0ba1si4756326edf.163.2022.11.04.09.14.46; Fri, 04 Nov 2022 09:15:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@denx.de header.s=phobos-20191101 header.b=ta35BkRs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231887AbiKDQJy (ORCPT + 67 others); Fri, 4 Nov 2022 12:09:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiKDQJx (ORCPT ); Fri, 4 Nov 2022 12:09:53 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B9D94730B; Fri, 4 Nov 2022 09:09:52 -0700 (PDT) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 9745D806F4; Fri, 4 Nov 2022 17:09:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1667578190; bh=b/TZ9KPtAsv5iGV9pnB4CCAXT4pqWPk7Y30tNUj3NA8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ta35BkRsmt2SKYIV9tyAPQfnsaefH75qgjtMiz2+2hPnTfCWvVCxP/kLEI6WXj3QI wh71DzYw8ie0QD6lmJfbG/iU8+3ETdjaKB8IQml4o4JvvEEdxOu8BWt7BGYrsQA3Jk Cb3+bK7+tw4DeNUEbd5vDCBOBtYkwIFj8HSLI6j8VuU2lmMrhpVTa7Tru0MII2Fe4G JFHBMXq/4kwyVGpDOmjchOIpwnBsLCgq+iIBYUET29TN+TFbANNaCPiW3GXc2YPCTj +unQai3+jz4XZ4HoNidSaUC+BuTukIcYQlNK89xDbQyscnTvR2C0NImYIMekbPvNry w3Tjx1PziNWrg== Message-ID: Date: Fri, 4 Nov 2022 17:09:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v3] wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port Content-Language: en-US To: Johannes Berg , linux-wireless@vger.kernel.org Cc: Amitkumar Karwar , Angus Ainslie , Jakub Kicinski , Kalle Valo , Martin Fuzzey , Martin Kepplinger , Prameela Rani Garnepudi , Sebastian Krzyszkowiak , Siva Rebbagondla , netdev@vger.kernel.org References: <20221104155841.213387-1-marex@denx.de> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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-wireless@vger.kernel.org On 11/4/22 17:01, Johannes Berg wrote: > On Fri, 2022-11-04 at 16:58 +0100, Marek Vasut wrote: >> >> Therefore, to fix this problem, inspect the ETH_P_802_3 frames in >> the rsi_91x driver, check the ethertype of the encapsulated frame, >> and in case it is ETH_P_PAE, transmit the frame via high-priority >> queue just like other ETH_P_PAE frames. > > This part seems wrong now. OK >> +bool rsi_is_tx_eapol(struct sk_buff *skb) >> +{ >> + return !!(IEEE80211_SKB_CB(skb)->control.flags & >> + IEEE80211_TX_CTRL_PORT_CTRL_PROTO); >> +} > > For how trivial this is now, maybe make it an inline? Feels fairly > pointless to have it as an out-of-line function to call in another file > when it's a simple bit check. In V2 it was suggested I deduplicate this into a separate function, since the test is done in multiple places. I would like to keep it deduplicated. > You can also drop the !! since the return value is bool. OK