Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp330844pxu; Thu, 15 Oct 2020 05:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW8TsyIR9O6p+1vpQvcxuB3UIfxl/Z1rEh9jawVYNdLzBDfv3P3LqvCNuUt9qNoQaEkw/w X-Received: by 2002:a17:906:3e4e:: with SMTP id t14mr4118919eji.242.1602764047857; Thu, 15 Oct 2020 05:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602764047; cv=none; d=google.com; s=arc-20160816; b=AHox7CzudnxJsCoBDis292AErUl+M13ybsE9Gn6Gqr+J2GPqmLpTUMOim3PR7oQXWA 2PkQmEN9G1ijo+R4QOr+keT3CKZsstXg+Zm7EdylWv1Ag+0EvARLKHiQK+0GbDKoo1ea b2OdGzUtyGTFS2YE4ISIpyOJms4QkZg2kMPM/z15CykxTu2L8o+DwzESCK4cLfPXQofV G3mMvK5UwqBzPZT0qTwLtOpy2h9NDxFT60KRITqKrc9n/9J0zJgqOvR2olNRNU7ay/9A kx7hmHYg6Cf3Lv2eADUjogJCRK1FHuTAZzPgf6r1+86LAOOCUDoKVLdf6dAVifAmuLRj fduA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jNZCQNx9mk4JUu8wy3/Ib66oco9i1I0Dp29LMO9C3O0=; b=ArAFwD8Y5fBQJqJbgmK8xxDwPvqJ2LiQ0GryN8OIAvVKFPDO4PqTdwd05WN7GFlqdP DfymzhSJQqthtxWUBuAQtT3K5PbZVRNjlFvRXlKJgJ3d5ozMIFuIovQTxYPoPpx+WmbS bgT5NepMh2kQeKNq4bKFdEpJE6z+h7qVgz8bKFUn8iSZjDtFLXtkCc/1EX282+MaMZjU e+dqJKKpdGc4ckjWo1ikQSezA46qd19hKTZAwrjDkmf2uMv3mLemZ3jTFLJvdlz36nHj Cca1jRyyqipktCTZPWn+8SylRLlSuqlMEfhEdlwepgZsryuAusBwaLY1bmt9sPG4Mlza OWZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y25si1820375edu.509.2020.10.15.05.13.25; Thu, 15 Oct 2020 05:14:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727321AbgJOLQp (ORCPT + 99 others); Thu, 15 Oct 2020 07:16:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgJOLQp (ORCPT ); Thu, 15 Oct 2020 07:16:45 -0400 Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3611C061755; Thu, 15 Oct 2020 04:16:44 -0700 (PDT) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CBmvD5tJkz1sKwV; Thu, 15 Oct 2020 13:16:37 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CBmv95DK9z1qrg8; Thu, 15 Oct 2020 13:16:37 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id OLsXCAXsHmhb; Thu, 15 Oct 2020 13:16:35 +0200 (CEST) X-Auth-Info: k0ZyYsDVmrX4DrH1M24vgA5atTsx5U5lcEFJ6aD+EcU= Received: from localhost.localdomain (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 15 Oct 2020 13:16:35 +0200 (CEST) From: Marek Vasut To: netdev@vger.kernel.org Cc: Marek Vasut , Angus Ainslie , "David S . Miller" , Jakub Kicinski , Kalle Valo , Lee Jones , Martin Kepplinger , Sebastian Krzyszkowiak , Siva Rebbagondla , linux-wireless@vger.kernel.org Subject: [PATCH] rsi: Fix TX EAPOL packet handling against iwlwifi AP Date: Thu, 15 Oct 2020 13:16:16 +0200 Message-Id: <20201015111616.429220-1-marex@denx.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In case RSI9116 SDIO WiFi operates in STA mode against Intel 9260 in AP mode, the association fails. The former is using wpa_supplicant during association, the later is set up using hostapd: iwl$ cat hostapd.conf interface=wlp1s0 ssid=test country_code=DE hw_mode=g channel=1 wpa=2 wpa_passphrase=test wpa_key_mgmt=WPA-PSK iwl$ hostapd -d hostapd.conf rsi$ wpa_supplicant -i wlan0 -c <(wpa_passphrase test test) The problem is that the TX EAPOL data descriptor RSI_DESC_REQUIRE_CFM_TO_HOST flag and extended descriptor EAPOL4_CONFIRM frame type are not set in case the AP is iwlwifi, because in that case the TX EAPOL packet is 2 bytes shorter. The downstream vendor driver has this change in place already [1], however there is no explanation for it, neither is there any commit history from which such explanation could be obtained. [1] https://github.com/SiliconLabs/RS911X-nLink-OSD/blob/master/rsi/rsi_91x_hal.c#L238 Signed-off-by: Marek Vasut Cc: Angus Ainslie Cc: David S. Miller Cc: Jakub Kicinski Cc: Kalle Valo Cc: Lee Jones Cc: Martin Kepplinger Cc: Sebastian Krzyszkowiak Cc: Siva Rebbagondla Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org --- drivers/net/wireless/rsi/rsi_91x_hal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c index 3f7e3cfb6f00..ce9892152f4d 100644 --- a/drivers/net/wireless/rsi/rsi_91x_hal.c +++ b/drivers/net/wireless/rsi/rsi_91x_hal.c @@ -248,7 +248,8 @@ int rsi_prepare_data_desc(struct rsi_common *common, struct sk_buff *skb) rsi_set_len_qno(&data_desc->len_qno, (skb->len - FRAME_DESC_SZ), RSI_WIFI_MGMT_Q); - if ((skb->len - header_size) == EAPOL4_PACKET_LEN) { + if (((skb->len - header_size) == EAPOL4_PACKET_LEN) || + ((skb->len - header_size) == EAPOL4_PACKET_LEN - 2)) { data_desc->misc_flags |= RSI_DESC_REQUIRE_CFM_TO_HOST; xtend_desc->confirm_frame_type = EAPOL4_CONFIRM; -- 2.28.0