Skip to content

Commit

Permalink
mt76x0: phy: fix bank check in mt76x0_rf_csr_{wr,rr}
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Oct 8, 2018
1 parent c83abb8 commit 9c272ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mt76x0/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mt76x0_rf_csr_wr(struct mt76x02_dev *dev, u32 offset, u8 value)
bank = MT_RF_BANK(offset);
reg = MT_RF_REG(offset);

if (WARN_ON_ONCE(reg > 127) || WARN_ON_ONCE(bank) > 8)
if (WARN_ON_ONCE(reg > 127) || WARN_ON_ONCE(bank > 8))
return -EINVAL;

mutex_lock(&dev->phy_mutex);
Expand Down Expand Up @@ -76,7 +76,7 @@ static int mt76x0_rf_csr_rr(struct mt76x02_dev *dev, u32 offset)
bank = MT_RF_BANK(offset);
reg = MT_RF_REG(offset);

if (WARN_ON_ONCE(reg > 127) || WARN_ON_ONCE(bank) > 8)
if (WARN_ON_ONCE(reg > 127) || WARN_ON_ONCE(bank > 8))
return -EINVAL;

mutex_lock(&dev->phy_mutex);
Expand Down

0 comments on commit 9c272ff

Please sign in to comment.