Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1459197imu; Wed, 16 Jan 2019 20:30:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN4uxj5M7NEQ2OTewFwmJH/PGpnp01DePib3j5+GtRyEvj6+eEvxPqk8GDz0jqUvxu6lBlv2 X-Received: by 2002:a62:6e07:: with SMTP id j7mr13702784pfc.135.1547699440268; Wed, 16 Jan 2019 20:30:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547699440; cv=none; d=google.com; s=arc-20160816; b=kSKGMDcFugdwuZge7RUP4OhW+UUWKopwjsmt2cUmXTJl6XGVz584L4X4j+APeeBJp6 zohkg1wROgAVcirOSAlXcJ0laAEVYUXje5F9ZrF/MSD6XGV6q54P/eBvnuiLh32Jj4KA h4AG0cg6knTn0SP/i1n01tYouzao+j4n3atWetRYsT56RaS/svDxnN3etDXRUjNqlNDL cKH2lZmIepgZtqE+isAfAIp1biZMvHe6irBDTVsm5lQDIcQ70usNlXe1FpTnTrffKrrq 2g52pdBE0MpkGKrv3/lA2QLBUZ1MOWFp2EfNgCRkmrqvkJsMAy3PCnRNNKZ/TV4BssON 0lNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=kDoVSZBbJvye+hjYVe9w8uuv0tF7jlyz4CAyxFfHy/E=; b=u1INWoXKtbzo8FT9rYs+p7FuXMpcM1VhSdsYGIREfJ27/ecJZfVOwtjycvCl2UQ1ta PuriB3Nl4DaglePlg1T4fn6IMbAmhPIDlVICJLRZXG6V25Zsh/ijD9JArxN0X+O1pLxM U9TxdSKjLBZfQcqO8NedXQEYOKTDJz/hWsG043jvFGxftneQZVf386cy3aKISvOmxnae ksWnnnwDRTiROo9PSU5NVPhNpwELbJWgq0ZagwW0vbvPgm7VuKUqDNFTlxUAK5CfwirK opdQvh0dvN/LNCS/PR3GXK0Nmyaib9M9oiPt48b5d8Vfi8PJVSNT6iQgBNUnjPxgg75W fixw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33si536904pld.374.2019.01.16.20.30.24; Wed, 16 Jan 2019 20:30:40 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389835AbfAPLVc (ORCPT + 99 others); Wed, 16 Jan 2019 06:21:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49402 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730420AbfAPLVc (ORCPT ); Wed, 16 Jan 2019 06:21:32 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE988C0703AB; Wed, 16 Jan 2019 11:21:31 +0000 (UTC) Received: from localhost (unknown [10.40.205.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D32B1059594; Wed, 16 Jan 2019 11:21:31 +0000 (UTC) Date: Wed, 16 Jan 2019 12:21:30 +0100 From: Stanislaw Gruszka To: Bernd Edlinger Cc: Helmut Schaa , Kalle Valo , "David S. Miller" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] rt61pci: Work around a firmware bug with shared keys Message-ID: <20190116112129.GC5234@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 16 Jan 2019 11:21:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 15, 2019 at 02:01:29PM +0000, 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