Search Linux Wireless

[PATCH] mt76: mt7915: fix uninitialized variable in mt7915_tm_set_tx_cont()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set MT_PHY_TYPE_OFDM as default value for mode variable in
mt7915_tm_set_tx_cont routine in order to proper initialize it even
for default case.

Fixes: 3f0caa3cbf94: "mt76: mt7915: add support for continuous tx in testmode"
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
---
 drivers/net/wireless/mediatek/mt76/mt7915/testmode.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
index 7fb2170a9561..a76af0701179 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
@@ -569,9 +569,6 @@ mt7915_tm_set_tx_cont(struct mt7915_phy *phy, bool en)
 	case MT76_TM_TX_MODE_CCK:
 		mode = MT_PHY_TYPE_CCK;
 		break;
-	case MT76_TM_TX_MODE_OFDM:
-		mode = MT_PHY_TYPE_OFDM;
-		break;
 	case MT76_TM_TX_MODE_HT:
 		mode = MT_PHY_TYPE_HT;
 		break;
@@ -590,7 +587,9 @@ mt7915_tm_set_tx_cont(struct mt7915_phy *phy, bool en)
 	case MT76_TM_TX_MODE_HE_MU:
 		mode = MT_PHY_TYPE_HE_MU;
 		break;
+	case MT76_TM_TX_MODE_OFDM:
 	default:
+		mode = MT_PHY_TYPE_OFDM;
 		break;
 	}
 
-- 
2.29.2




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux