Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3078659rwb; Mon, 7 Nov 2022 23:42:13 -0800 (PST) X-Google-Smtp-Source: AMsMyM4dcpY5zUymJiZeEfNohBdAqOR+L72nosj7tcUJEFBPGkuIyDkg5f/KUP8xY+eanGdzYypq X-Received: by 2002:a17:90b:3144:b0:215:db2e:bc6e with SMTP id ip4-20020a17090b314400b00215db2ebc6emr31074033pjb.12.1667893333799; Mon, 07 Nov 2022 23:42:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667893333; cv=none; d=google.com; s=arc-20160816; b=OXdDOirCF4sXPcTvaJmVq2+KUo8LHZ/1reVTMyu9iyEExpjltiq96uAXDtb9LcX1dB r4+fiZ5rCrIaqIDrdBe0a2Ofo2h33SOVCP+eo/UoO8ByTq8LFeN+zuZIMP/XM0kymlwC vh1CfpAg5UO5Cilm1ZLXrzWwmWpmBR48cpPS35M+9OfZOcfQbAOfFhrcVbuYMZ87Juhb WmYbM6ufiW/CpMum/lk9b5L8aq6pN035y+4ipgjpMFybkH54SiuYlXY3Kabvn9N+7cZo +hP4YsegV6BLWBLZHVmCM/6dwJlNIgR2nLY+0SySQnYZXPaL2lkv/gMGb1bjb7SKRpOK 4ObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=/sdD5S+HoY8JZk910nAOUsVbgOs5act91LBONJdHQbc=; b=JgGfXOzEWcMV5GshcB+h6+Xgi8oiZW82jz1ykFjA0HqAYxCZG7TbBEHD6AYVe9pLT2 moE1vfbVAYFKcLg1Srq7wnkWOFDsAOJN1pk4GCeMnT2d/Ef4517WfMgfoeSZFsV02qV7 fQYnBpFDuyi4MHEAOaFPRuLbbzaNxvLpqzpehLkvNKGfQRYYqsCmPvMSPsS/Km3E7oZm BXQ1jaweTzkzOmLIns3Dj/XAzB++y2JqkyrZCt69SpWpCO80eiUaCjqW1PJ6V/M/vZzG 3Ljhk8zmj5UOW2pdXDW81vsUCqEFedrI5HQFfnonnLo+O+5FI8s5zychS6guyLTpnkGT R3VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=acLhMm23; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t190-20020a6381c7000000b0044034efb2aesi11616681pgd.869.2022.11.07.23.42.05; Mon, 07 Nov 2022 23:42:13 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=acLhMm23; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233577AbiKHHlv (ORCPT + 67 others); Tue, 8 Nov 2022 02:41:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233734AbiKHHla (ORCPT ); Tue, 8 Nov 2022 02:41:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46EB818E39; Mon, 7 Nov 2022 23:41:17 -0800 (PST) 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 E7B31B818A4; Tue, 8 Nov 2022 07:41:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8504C433D6; Tue, 8 Nov 2022 07:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667893274; bh=ByJfhaoaY6HddmbTF0YfvhHmft9TNEzZg+mTg1/kn80=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=acLhMm23m3W06kYTWEo4bJXgzhmTkMMNI2WDDDGLFrBVovrJl65Xpkm7fRudWNMIc KMbKrXpn3PjXh50Z6WTQIDB5RW6EoBZxusmPU82W+Q9qXlbVOpKQ0SwBhKPZOWRrMt vdBgzMuMTL9Vd5Yl0suvg/YVcPa3iMAi5Msu5wpsbumipo4PwbWkBZEiG7qgFY/Kkq uBCRR8Drz54qK5EPBkLh5ZZZiiTxi0cPhYvAqSSLkUUfbaqhn3//YuDI5U5/UHZKo9 Si8jOM0K4h7mr17FFO7X5UHLjS9LYYplJreE863HTtkMUoA2s2ZGrch0Q40gmTjmMZ aY9wvbbivWTCA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v5] wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port From: Kalle Valo In-Reply-To: <20221104163339.227432-1-marex@denx.de> References: <20221104163339.227432-1-marex@denx.de> To: Marek Vasut Cc: linux-wireless@vger.kernel.org, Marek Vasut , Amitkumar Karwar , Angus Ainslie , Jakub Kicinski , Johannes Berg , Martin Fuzzey , Martin Kepplinger , Prameela Rani Garnepudi , Sebastian Krzyszkowiak , Siva Rebbagondla , netdev@vger.kernel.org User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <166789327017.4985.4306929119411941567.kvalo@kernel.org> Date: Tue, 8 Nov 2022 07:41:11 +0000 (UTC) X-Spam-Status: No, score=-7.1 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-wireless@vger.kernel.org Marek Vasut wrote: > When using wpa_supplicant v2.10, this driver is no longer able to > associate with any AP and fails in the EAPOL 4-way handshake while > sending the 2/4 message to the AP. The problem is not present in > wpa_supplicant v2.9 or older. The problem stems from HostAP commit > 144314eaa ("wpa_supplicant: Send EAPOL frames over nl80211 where available") > which changes the way EAPOL frames are sent, from them being send > at L2 frames to them being sent via nl80211 control port. > > An EAPOL frame sent as L2 frame is passed to the WiFi driver with > skb->protocol ETH_P_PAE, while EAPOL frame sent via nl80211 control > port has skb->protocol set to ETH_P_802_3 . The later happens in > ieee80211_tx_control_port(), where the EAPOL frame is encapsulated > into 802.3 frame. > > The rsi_91x driver handles ETH_P_PAE EAPOL frames as high-priority > frames and sends them via highest-priority transmit queue, while > the ETH_P_802_3 frames are sent as regular frames. The EAPOL 4-way > handshake frames must be sent as highest-priority, otherwise the > 4-way handshake times out. > > Therefore, to fix this problem, inspect the skb control flags and > if flag IEEE80211_TX_CTRL_PORT_CTRL_PROTO is set, assume this is > an EAPOL frame and transmit the frame via high-priority queue just > like other ETH_P_PAE frames. > > Fixes: 0eb42586cf87 ("rsi: data packet descriptor enhancements") > Signed-off-by: Marek Vasut Patch applied to wireless-next.git, thanks. b8f6efccbb9d wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port -- https://patchwork.kernel.org/project/linux-wireless/patch/20221104163339.227432-1-marex@denx.de/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches