diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-10-07 05:37:40 -0400 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-10-13 11:39:15 -0400 |
commit | a14054ce0b8ada03a7ddea14e51812e2fd583c94 (patch) | |
tree | 185587a264dc9ce2955ea06f032bd8182ddc847f /drivers/net/wireless | |
parent | 69cacac3b3ffdd9495e83bc34674d3fab34aaa44 (diff) |
mt76x0: phy: fix bank check in mt76x0_rf_csr_{wr,rr}
Fix typo in bank check in mt76x0_rf_csr_{wr,rr} routines.
This issue has never been hit since mt76x0_rf_csr_{wr,rr}
are actually used just by pci code
Fixes: 10de7a8b4ab9 ("mt76x0: phy files")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c index e2b62ce2306b..4419c0078a6f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | |||
@@ -37,7 +37,7 @@ mt76x0_rf_csr_wr(struct mt76x02_dev *dev, u32 offset, u8 value) | |||
37 | bank = MT_RF_BANK(offset); | 37 | bank = MT_RF_BANK(offset); |
38 | reg = MT_RF_REG(offset); | 38 | reg = MT_RF_REG(offset); |
39 | 39 | ||
40 | if (WARN_ON_ONCE(reg > 127) || WARN_ON_ONCE(bank) > 8) | 40 | if (WARN_ON_ONCE(reg > 127) || WARN_ON_ONCE(bank > 8)) |
41 | return -EINVAL; | 41 | return -EINVAL; |
42 | 42 | ||
43 | mutex_lock(&dev->phy_mutex); | 43 | mutex_lock(&dev->phy_mutex); |
@@ -76,7 +76,7 @@ static int mt76x0_rf_csr_rr(struct mt76x02_dev *dev, u32 offset) | |||
76 | bank = MT_RF_BANK(offset); | 76 | bank = MT_RF_BANK(offset); |
77 | reg = MT_RF_REG(offset); | 77 | reg = MT_RF_REG(offset); |
78 | 78 | ||
79 | if (WARN_ON_ONCE(reg > 127) || WARN_ON_ONCE(bank) > 8) | 79 | if (WARN_ON_ONCE(reg > 127) || WARN_ON_ONCE(bank > 8)) |
80 | return -EINVAL; | 80 | return -EINVAL; |
81 | 81 | ||
82 | mutex_lock(&dev->phy_mutex); | 82 | mutex_lock(&dev->phy_mutex); |