From patchwork Tue Apr 17 22:27:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10346967 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 16DB160365 for ; Tue, 17 Apr 2018 22:27:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E750B27816 for ; Tue, 17 Apr 2018 22:27:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC18427853; Tue, 17 Apr 2018 22:27:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DEC227816 for ; Tue, 17 Apr 2018 22:27:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751113AbeDQW11 (ORCPT ); Tue, 17 Apr 2018 18:27:27 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:46473 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbeDQW10 (ORCPT ); Tue, 17 Apr 2018 18:27:26 -0400 Received: by mail-wr0-f196.google.com with SMTP id d1so39606765wrj.13 for ; Tue, 17 Apr 2018 15:27:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Hh+gNnUQLJs25OquhbSm6w1w1k/K+7YiEcml18Zi76c=; b=ZTcjQ2KuTzcUwY5HCOZn3Mzw5csBZR8nQqd6kItken/EPQfgccTIOCejqTmct47krV 7fvUAOZw9ARm6pn1GOOH1PrIsTRkVOMnS4Poxf7x4yQhudTUsRNtLhb6yM1aN2V6yz1b 0+fqpexJ+lmZfUZxySFN1a4ejNuLDXuxhvdstLxVkohonnWuvatl7wMnZ4gYoIgMTs/G bX/Q/KrhakfKgxsDuYU+4NR/GmCmdgLLWLKky1KHqL6mGTwWMd+gP1cFO+LKHXO2vlJb huGC5uqFTDg1YnPdf7kGVX5tHrIatscZLI1ByCePhW/uFvji6+3ebPcs0z086/zM285w K0HQ== X-Gm-Message-State: ALQs6tAgibV+dvg1SfSRPoAXOHa5/jLCbXIHD3S+92V/72eUgTpQgEZ6 1k09DoQ32ijDgc+/slSoEt7Y2g== X-Google-Smtp-Source: AIpwx49ij60w/zEE7sCpffV2LeTiOD8b5MjTfK1BMQEr9FFfxcXy0A54DY9aUY7DfkbV/0ogw2jPTg== X-Received: by 10.223.142.68 with SMTP id n62mr2968290wrb.159.1524004045232; Tue, 17 Apr 2018 15:27:25 -0700 (PDT) Received: from localhost.localdomain ([151.66.73.16]) by smtp.gmail.com with ESMTPSA id r196sm53585wmf.9.2018.04.17.15.27.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 15:27:24 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org Subject: [PATCH] mt76x2: fix is_mt7612 routine Date: Wed, 18 Apr 2018 00:27:18 +0200 Message-Id: <20180417222718.17039-1-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.16.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix is_mt7612 routine since asic version is set in mt76_dev revision field and not in mt76x2_dev one. Moreover remove mt76x2_dev rev field since it is never used in the driver Fixes: 7bc04215a66b ('mt76: add driver code for MT76x2e') Signed-off-by: Lorenzo Bianconi Acked-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt76x2.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2.h b/drivers/net/wireless/mediatek/mt76/mt76x2.h index 783b8122ec3c..a5d1255e4b9c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x2.h @@ -117,7 +117,6 @@ struct mt76x2_dev { u8 beacon_mask; u8 beacon_data_mask; - u32 rev; u32 rxfilter; u16 chainmask; @@ -151,7 +150,7 @@ struct mt76x2_sta { static inline bool is_mt7612(struct mt76x2_dev *dev) { - return (dev->rev >> 16) == 0x7612; + return mt76_chip(&dev->mt76) == 0x7612; } void mt76x2_set_irq_mask(struct mt76x2_dev *dev, u32 clear, u32 set);