Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1030663rwl; Fri, 4 Nov 2022 09:02:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7tpd9HtntjPxeixjOg8oaFcXsdNQDrzuFdS43sphgLJXgxCJaehppzMap1M0jC4+pgICqE X-Received: by 2002:a62:15cf:0:b0:56e:664f:707c with SMTP id 198-20020a6215cf000000b0056e664f707cmr7431155pfv.39.1667577749000; Fri, 04 Nov 2022 09:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667577748; cv=none; d=google.com; s=arc-20160816; b=OS1KRwUTtWHvGBjmn5WQxSYQNbBYJGX+81bkaG8eA2RFFJbJpvubwUMZWR3CqnLzMS udTRp7JytmarpFWIuZSbHsoQPHUpNNXthPwd9HSsafyVz+lQbPFDByxrnTGZvNJ+sWhR RRYXG7wpaziCT5WcRH3dgROB558SEXjkR2OrU1VIOAcV19vj/sE7q4U2MreITTewwB/D 3kdWDBUfWVV9uDfOD91o2KNkC2TvdBaw6pJO8wFunRRCv7MGJe7Z0qLWMR2OLCZdAu36 PhMkqvLWxV3nTlyKiUB1RUyYIzhrGyRXRIqWwTPbfg1eZSJXIna+sSM+IIblgUhyqPfg dnFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=phB0ONzIEmhvjMaH01rqcRiaEOp/Z+phqx/hVI3Dfmg=; b=G0dYXiNR9rkFIUAB5TvdkJoeWe2AS2x6XuCPbuHI+ojObkKiKqfm283elbJ+4TNbUi GtutuyV/dMHnQDR00yrGZwMPv0KcA9PUfLR5PpS4ovRfjK+tXqTDh9YLFb9l6kmvY+ge 8XxKtEHd1DYM/3ay62Sl7r4bN/XCK8tzlh8E7Pngzw9NVntJGEjfbZXok7bM/b0fDzQi jUVFM+st5ria69cuJARLGyUA+gCYBLHMHUfV7BQ55jMypVMtHT+rMba/tWQF0s7pU+/Z vCeG/ZOj2c2F0aJmYhB0jtbkqaD3nqJWQ5UUoDNJ7AyyAkC4THLCgZEUolqBvPkbtE2u i12Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=iclFWdd6; 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; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020a63e246000000b00460c55062f0si5346680pgj.434.2022.11.04.09.02.04; Fri, 04 Nov 2022 09:02:28 -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=@sipsolutions.net header.s=mail header.b=iclFWdd6; 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; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232208AbiKDQBr (ORCPT + 67 others); 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 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