Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp342488ima; Fri, 1 Feb 2019 04:17:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN5wIHxRy9PyGvPWDY9AQN2vIhr5Cl8R7bLHzE8zHtSYQgAc2zT1kckbyR6qbqsCKnJU6OhK X-Received: by 2002:a63:7219:: with SMTP id n25mr35528265pgc.324.1549023436466; Fri, 01 Feb 2019 04:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549023436; cv=none; d=google.com; s=arc-20160816; b=P2Uq/09KuLBqTM85lg9Q4pclR8dNkoqrPNp7r68WRBr7nYvjnPMgbbG9rHsdkQTx3m aTxeBEfy0ZLHWD8jhMMD8d0wmWfF//VAFwOByia3tzuGyhSDGZPFQQn8H4+Ar0vNmmv3 qgha51SqwKK0dO9D2575rBtF04NFXmdcEj83zztSvHB22fD2LBec9Fv4mnBWtdhVLtkv ctbzfrm6EEGw32M71Nf03kZ7+GAU9+wP8b5pDdIEWuQ1k/Z/y+5CU1pe9a6D1UcHChAO +8zh8QNMktnnjCDbhzKb4Akedi/PUDxJj3GNugtZjfJFY8ddk2BoAKqhjYbBl6wC8ZND hNcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:user-agent:cc:to :references:in-reply-to:from:subject:content-transfer-encoding :mime-version:dmarc-filter:dkim-signature:dkim-signature; bh=Er+6+Cvu9/1vPPARkNi53Z3pJiy4/AwuOtLnvaIE03E=; b=vUg2leCJXpx81IyfxEjb4wuxjqD/b2lAIDGbdbTOJHQRqwhzpSwu08dBYmvC3M5gZm t73Ckko0R4izj75IP+/mdMxHyqe738kKnkt3iPnN/KAEwE2/3nJjnqZmlg68m+FknEjI owcdO0Yt2fN7GTeZuXiZ1h+BqyB8g3oxI4+5V99YINp3CoOzYfnDg8CMnrd7Wydv9M8x drFT7zQMAmvjp1xwZW2jsQ4ZuyTm3wO7+q2qSDzrDzhJlaLQUON/z0DEZe4R+nrDk8P6 6qCeJmoJTzMdBAw9EnO74NLffQJvDxuq3AQPu22UkQOjr+4TzUrnwq7Y80GoMaTE+dqY 9YRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cpLRl5jw; dkim=pass header.i=@codeaurora.org header.s=default header.b="MmC/uv3C"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5si7412738pgn.243.2019.02.01.04.17.00; Fri, 01 Feb 2019 04:17:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cpLRl5jw; dkim=pass header.i=@codeaurora.org header.s=default header.b="MmC/uv3C"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbfBAMQi (ORCPT + 99 others); Fri, 1 Feb 2019 07:16:38 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:56052 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbfBAMQi (ORCPT ); Fri, 1 Feb 2019 07:16:38 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D7DB26030D; Fri, 1 Feb 2019 12:16:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1549023396; bh=8frgMAbGrOj6TuPoEi3BLHfJPExy3KDLos5tq3XKau4=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=cpLRl5jw4TlTyNCdJeI2fDui0h+pF5wXpva/s4XZF4Zn/gY9XPx/gIe1QYtGsHS0f JYMUJ0ieeyjnqzyhDtmNecvlisNchIOhttJIVLy5L5g6bf2Q/Zr5uvg7xDNzVPBV9J GqCnMZtxh6PbzgtmKKZwrMRjda8OCp9lBYcXFMy8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MISSING_DATE,MISSING_MID autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9D0776043F; Fri, 1 Feb 2019 12:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1549023396; bh=8frgMAbGrOj6TuPoEi3BLHfJPExy3KDLos5tq3XKau4=; h=Subject:From:In-Reply-To:References:To:Cc:From; b=MmC/uv3Cr7Lj21blGhcv2Mwti1RtWrTdjww4JCqSA3m6xqz81Csz9qCFN7CgZEi7m bN4RVYmEMaVLKTASIBJb9a6acno/cfgbDfJp8QHC+wvnwANouHiDFhBGi1MUJ9F81X c+P7Sp2vZebu+up0ju97sJc6QCvlOAxJjC3kiw0g= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9D0776043F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] rt2x00: Work around a firmware bug with shared keys From: Kalle Valo In-Reply-To: References: To: Bernd Edlinger Cc: Stanislaw Gruszka , Helmut Schaa , "David S. Miller" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20190201121636.D7DB26030D@smtp.codeaurora.org> Date: Fri, 1 Feb 2019 12:16:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bernd Edlinger wrote: > Apparently the rt2x61 firmware fails temporarily to decode > broadcast packets if the shared keys are not assigned > in the "correct" sequence. At the same time unicast > packets work fine, since they are encrypted with the > pairwise key. > > At least with WPA2 CCMP mode the shared keys are > set in the following sequence: keyidx=1, 2, 1, 2. > After a while only keyidx 2 gets decrypted, and > keyidx 1 is ignored, probably because there is never > a keyidx 3. > > Symptoms are arping -b works for 10 minutes, since > keyidx=2 is used for broadcast, and then it stops > working for 10 minutes, because keyidx=1 is used. > That failure mode repeats forever. > > Note, the firmware does not even know which keyidx > corresponds to which hw_key_idx so the firmware is > trying to be smarter than the driver, which is bound > to fail. > > As workaround the function rt61pci_config_shared_key > requests software decryption of the shared keys, > by returning EOPNOTSUPP. However, pairwise keys are > still handled by hardware which works just fine. > > Signed-off-by: Bernd Edlinger > Acked-by: Stanislaw Gruszka Patch applied to wireless-drivers-next.git, thanks. a4296994eb80 rt2x00: Work around a firmware bug with shared keys -- https://patchwork.kernel.org/patch/10764543/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches