]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mt76x2: fix is_mt7612 routine
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Tue, 17 Apr 2018 22:27:18 +0000 (00:27 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 30 Apr 2018 10:20:45 +0000 (13:20 +0300)
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 <lorenzo.bianconi@redhat.com>
Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt76x2.h

index 783b8122ec3c9b0121029bf5f294ae45f794ac70..a5d1255e4b9c8319d583043ea67a756fd3843d8f 100644 (file)
@@ -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);