From mboxrd@z Thu Jan 1 00:00:00 1970 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 BAE2CC4332F for ; Fri, 4 Nov 2022 16:01:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232208AbiKDQBr (ORCPT ); Fri, 4 Nov 2022 12:01:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbiKDQBq (ORCPT ); Fri, 4 Nov 2022 12:01:46 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4466F326DE; Fri, 4 Nov 2022 09:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=phB0ONzIEmhvjMaH01rqcRiaEOp/Z+phqx/hVI3Dfmg=; t=1667577705; x=1668787305; b=iclFWdd6NekfVQBSWXH2zZMcxo5kn4BKMkZZaCPaMwskEoj bKGBn9tm7dZJ8SEllbjMBphfMmquG7XDSIjOzTHtGTpcWFDOPnjznA/0OxDftQ1eTbqqEqBnHV5s/ XnayQTjUYYh3/wSksVD6BPqTb9gmc0+PxsnGfab3KLE0NiH0E1/LKzJoiiDinjvDKDeC/qqU4RLdU cLYftjVPWojLjTrkYXOlNnadwcqBP/PbcewuhfJ037c4NazvMO4jO8p07IyyB6zmxLqC7ZV/Ew0p0 qQL6BElb0QxEzGNZxnA+8MfuG8tKbfYN5QF+B2rwI/bqtEFkbehTKqjq8+4mXikA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oqz8Q-008uK8-09; Fri, 04 Nov 2022 17:01:34 +0100 Message-ID: Subject: Re: [PATCH v3] wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port From: Johannes Berg To: Marek Vasut , 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 Date: Fri, 04 Nov 2022 17:01:32 +0100 In-Reply-To: <20221104155841.213387-1-marex@denx.de> References: <20221104155841.213387-1-marex@denx.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 2022-11-04 at 16:58 +0100, Marek Vasut wrote: >=20 > 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. > +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. You can also drop the !! since the return value is bool. johannes