ath9k: fix ar9003_get_eepmisc
authorWenli Looi <wlooi@ucalgary.ca>
Sun, 20 Mar 2022 23:30:08 +0000 (17:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 14:53:47 +0000 (16:53 +0200)
[ Upstream commit 9aaff3864b603408c02c629957ae8d8ff5d5a4f2 ]

The current implementation is reading the wrong eeprom type.

Fixes: d8ec2e2a63e8 ("ath9k: Add an eeprom_ops callback for retrieving the eepmisc value")
Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220320233010.123106-5-wlooi@ucalgary.ca
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c

index 694a58b1e99505ae1947058be2f68a8d17b324c1..bdbe0427b90ed689db4c25d40f50930e8d6d118a 100644 (file)
@@ -5501,7 +5501,7 @@ unsigned int ar9003_get_paprd_scale_factor(struct ath_hw *ah,
 
 static u8 ar9003_get_eepmisc(struct ath_hw *ah)
 {
-       return ah->eeprom.map4k.baseEepHeader.eepMisc;
+       return ah->eeprom.ar9300_eep.baseEepHeader.opCapFlags.eepMisc;
 }
 
 const struct eeprom_ops eep_ar9300_ops = {