summaryrefslogtreecommitdiff
path: root/package/kernel/mac80211/patches/301-ath9k_hw-fix-device-ID-check-for-AR956x.patch
blob: 5998be868bdf66d21edc39df986cb4d677a3de22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Felix Fietkau <nbd@openwrt.org>
Date: Sun, 21 Jun 2015 19:45:59 +0200
Subject: [PATCH] ath9k_hw: fix device ID check for AR956x

Because of the missing return, the macVersion value was being
overwritten with an invalid register read

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---

--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -279,6 +279,7 @@ static void ath9k_hw_read_revisions(stru
 		return;
 	case AR9300_DEVID_QCA956X:
 		ah->hw_version.macVersion = AR_SREV_VERSION_9561;
+		return;
 	}
 
 	val = REG_READ(ah, AR_SREV) & AR_SREV_ID;
@@ -3169,6 +3170,7 @@ static struct {
 	{ AR_SREV_VERSION_9550,         "9550" },
 	{ AR_SREV_VERSION_9565,         "9565" },
 	{ AR_SREV_VERSION_9531,         "9531" },
+	{ AR_SREV_VERSION_9561,         "956X" },
 };
 
 /* For devices with external radios */