Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3997898ybl; Mon, 13 Jan 2020 06:15:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyRsFPYVPawnS6NEGtxLmfZHhF+TXI60KrtYbAEtJhyKi9N6aHs+Sakc4OFQFmVNfJZWOz5 X-Received: by 2002:a9d:ec1:: with SMTP id 59mr12670681otj.141.1578924943436; Mon, 13 Jan 2020 06:15:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578924943; cv=none; d=google.com; s=arc-20160816; b=Thksk1OP26/PmuXET03XZzsTWVnrG6tS3foqVLBN2jzt8P9kwRYYivC2RM1w5+A4up RF/INZ985h1xT7lzsUvHNIXn3vh/s4q9ICXwjglvSZHdbC7ANUnwfPJJRa1wT3jSuMb5 580U4GkbgSne8qtYph8tOCJ2ns8O1I3Z3YKZwrycKAW7H50o2iXaozt1NXNLcjc49w/O tp6Vv0wMWIJuRZfE6GyOVWQ7bvws7idQM9Dd/3VwMd4i5XZ8qsp2TumdofhUDsKmL0c3 exBxCZ7hZe1gziCI0mSsSZHqPnVbcDq4+m7Gq69X7mG5dpDKmsHZm+0AK7sRSx6ieJAW qn/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ktlpbV8JhpEQtpBOTtFZIp0QxeG75WOzqkK9rMrTWc0=; b=oFlV8L0SKMEr7Z3WBzThf7J/fQX3+zvZSao4cFuhbHcrVRVf6dQsi8r+DiODWaa2VR TMAJRH4B6R66kHEsJP6rfTqhLbOlb/CZgzbxCVpotWGaCCShxe76M+VTXirUhoTnCRTV 0SWqXyvI4Xroigd82cbyis1nxnyCG19cpndHQxchBieGjKpXgM61fZIDP8zxN4e0zC4a Bp3GMI2dUmnohC16lhV0WQaVRMG1GCPPV3KTN8WFyQXM/QNNHdOKtHv+TpqtB5eWuTip 84+jQxEeDEC0QlZRbaZhXl0LiAXEaT2pRFZTKh3s/D2kyaufith7rQ1yDknhnkuc37nN QpTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ptzDp+9d; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20si5777830oic.40.2020.01.13.06.15.22; Mon, 13 Jan 2020 06:15:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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=@gmail.com header.s=20161025 header.b=ptzDp+9d; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728757AbgAMOPB (ORCPT + 99 others); Mon, 13 Jan 2020 09:15:01 -0500 Received: from mail-ot1-f49.google.com ([209.85.210.49]:34132 "EHLO mail-ot1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726505AbgAMOPB (ORCPT ); Mon, 13 Jan 2020 09:15:01 -0500 Received: by mail-ot1-f49.google.com with SMTP id a15so9053508otf.1 for ; Mon, 13 Jan 2020 06:15:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ktlpbV8JhpEQtpBOTtFZIp0QxeG75WOzqkK9rMrTWc0=; b=ptzDp+9d+5NbquVcbbEdsdvRXdUqRT67MONrI/360oZ4pkyvqGV7AymhFKBUI/+UHl nd/haMRkw2QYzUrzoxg1aCodRZMtJ/ZVavfk/66LlZgG4nx8szSGdLIFTPpVSfbYO0IC KPbXjce7ThMm0/Hzl6gOjWkoYce9DaA/AC1zQYOyIZ30ZRcKzcn8ryN+KvDu6WJUJyKI HwAzkKsXfAVQaXx+rRGHKtdPGGpUNYMn08wpht9ljR55149fBbglhxFpODJkDqOZHWWh L/+HxDFssW6Aao8n2WpyB/hKNAszmbVB9+YtRknLeNls4dm0xcO+OnTym5iWINZ37qxd TP7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ktlpbV8JhpEQtpBOTtFZIp0QxeG75WOzqkK9rMrTWc0=; b=eO+vZMP98GcBYODThxSXp1kSF7K21jYSJuQVQTvienceh52DftxQLDl7GW0BY6bSmu r9sqznTNYyrti3gUe8FJjAdSz9LiklTzbEMDM24ObeGzOMRZzBSi6BgIgRsN+SsgT3Io cWsTbThuCITe8ejixKTRHLtqL57nkQbOwZSpZl24CTHo68yFQ9vJiZpwtMpapydM+UsM 0vOsYVI6XZT253C5V/2AlcAb4oW5THJZXibThu+gMdLJiOKCAjKPFayb+OCP/zcdAeAT VRU3ermsUjVQUs74yV5YWrtxAsIi1Adlfk2wv2beABBRI3Axo30vnyGQkyfHEb41taIw K8lw== X-Gm-Message-State: APjAAAWAfVsGgasODtG/6cn4nxr8SF2DknLOqMKr8ra2IjUx9rILlpDH hpBcR8THgVtLvPbsHJeXLzMdHZzLvJc542TTdNw= X-Received: by 2002:a05:6830:145:: with SMTP id j5mr12628144otp.242.1578924900340; Mon, 13 Jan 2020 06:15:00 -0800 (PST) MIME-Version: 1.0 References: <20200110132142.7737-1-denis281089@gmail.com> In-Reply-To: From: Denis Kalashnikov Date: Mon, 13 Jan 2020 17:13:12 +0300 Message-ID: Subject: Re: [PATCH v3] ath9k: fix firmware bug in some Mikrotik R11e-2HPnD cards To: Felix Fietkau Cc: linux-wireless@vger.kernel.org, Kalle Valo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org I read value from the SREV register of AR9582 -- got 0x001c04ff. I looked through the code of ath9k and found out that in this case the revision is 4. So, since AR_SREV_REVISION_9580_10 is defined as 4, I logically concluded that AR_SREV_9580_10 would do the job. But you suspicions turned to be right. I tested AR9580 now and it has the same value as AR9582 in the SREV register -- 0x001c04ff. PCI Subsystem ID is zero on those Mikrotik cards, so it is not useful. Felix, guys, may be somebody have any thoughts how we can distinguish AR9582? Or that a chip has only 2 chains? May be values from other registers? =D1=81=D0=B1, 11 =D1=8F=D0=BD=D0=B2. 2020 =D0=B3. =D0=B2 13:37, Felix Fietk= au : > > On 2020-01-10 14:21, Denis Kalashnikov wrote: > > Some of the Mikrotik R11e-2HPnD cards have EEPROM where is > > flashed that a card has 3 chains, but actually all this cards > > have only 2. This leads ath9k to write into the logs: > > 'ath: phy0: Unable to reset channel, reset status -5' and > > stations don't see that AP. > > > > Mikrotik R11e-2HPnD is based on AR9582 chip. > > > > Signed-off-by: Denis Kalashnikov > > --- > > > > Changelog: > > > > Changes since v2: > > Use macros AR_SREV_9580_10 to select only AR9582 chips (they all > > have only 2 chains) instead of more general macros AR_SREV_9580 > > that selects not only AR9582 but also AR9580 chips with 3 chains. > I don't think you can detect AR9582 based on SREV. Where did you get > this information from? > > - Felix