From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50A82C33CAD for ; Mon, 13 Jan 2020 14:15:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2056C207E0 for ; Mon, 13 Jan 2020 14:15:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ptzDp+9d" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728803AbgAMOPB (ORCPT ); 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-Google-Smtp-Source: APXvYqwoeM6MgvmrRgLVeFxPKGEtT7juRnkXH2oYE/XMIzYxs50Ch86YnrjQbu3ZswlD4YNls82F2eDE8mTM2ZUy+7I= 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