Skip to content

Commit

Permalink
wifi: mt76: mt76x0: remove dead code in mt76x0_phy_get_target_power
Browse files Browse the repository at this point in the history
tx_rate can't be greater than 3 in mt76x0_phy_get_target_power routine
for cck rates. Get rid of dead code.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Lorenzo Bianconi authored and Felix Fietkau committed Dec 1, 2022
1 parent 6f917bb commit f4cfd3f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,6 @@ mt76x0_phy_get_target_power(struct mt76x02_dev *dev, u8 tx_mode,
case 0:
/* cck rates */
tx_rate = (info[0] & 0x60) >> 5;
if (tx_rate > 3)
return -EINVAL;

*target_power = cur_power + dev->rate_power.cck[tx_rate];
*target_pa_power = mt76x0_phy_get_rf_pa_mode(dev, 0, tx_rate);
break;
Expand Down

0 comments on commit f4cfd3f

Please sign in to comment.