Commit d3edd108 authored by YueHaibing's avatar YueHaibing Committed by Felix Fietkau

mt76: Remove set but not used variables 'pid' and 'final_mpdu'

Fixes gcc '-Wunused-but-set-variable' warnings:

drivers/net/wireless/mediatek/mt76/mt7603/mac.c: In function mt7603_fill_txs:
drivers/net/wireless/mediatek/mt76/mt7603/mac.c:969:5: warning: variable pid set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7603/mac.c:961:7: warning: variable final_mpdu set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7615/mac.c: In function mt7615_fill_txs:
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:555:5: warning: variable pid set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:552:19: warning: variable final_mpdu set but not used [-Wunused-but-set-variable]

They are never used, so can be removed.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent d2679d65
...@@ -909,7 +909,6 @@ mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta, ...@@ -909,7 +909,6 @@ mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta,
int final_idx = 0; int final_idx = 0;
u32 final_rate; u32 final_rate;
u32 final_rate_flags; u32 final_rate_flags;
bool final_mpdu;
bool ack_timeout; bool ack_timeout;
bool fixed_rate; bool fixed_rate;
bool probe; bool probe;
...@@ -917,7 +916,6 @@ mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta, ...@@ -917,7 +916,6 @@ mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta,
bool cck = false; bool cck = false;
int count; int count;
u32 txs; u32 txs;
u8 pid;
int idx; int idx;
int i; int i;
...@@ -925,9 +923,7 @@ mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta, ...@@ -925,9 +923,7 @@ mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta,
probe = !!(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE); probe = !!(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE);
txs = le32_to_cpu(txs_data[4]); txs = le32_to_cpu(txs_data[4]);
final_mpdu = txs & MT_TXS4_ACKED_MPDU;
ampdu = !fixed_rate && (txs & MT_TXS4_AMPDU); ampdu = !fixed_rate && (txs & MT_TXS4_AMPDU);
pid = FIELD_GET(MT_TXS4_PID, txs);
count = FIELD_GET(MT_TXS4_TX_COUNT, txs); count = FIELD_GET(MT_TXS4_TX_COUNT, txs);
txs = le32_to_cpu(txs_data[0]); txs = le32_to_cpu(txs_data[0]);
......
...@@ -504,23 +504,20 @@ static bool mt7615_fill_txs(struct mt7615_dev *dev, struct mt7615_sta *sta, ...@@ -504,23 +504,20 @@ static bool mt7615_fill_txs(struct mt7615_dev *dev, struct mt7615_sta *sta,
{ {
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
int i, idx, count, final_idx = 0; int i, idx, count, final_idx = 0;
bool fixed_rate, final_mpdu, ack_timeout; bool fixed_rate, ack_timeout;
bool probe, ampdu, cck = false; bool probe, ampdu, cck = false;
u32 final_rate, final_rate_flags, final_nss, txs; u32 final_rate, final_rate_flags, final_nss, txs;
u8 pid;
fixed_rate = info->status.rates[0].count; fixed_rate = info->status.rates[0].count;
probe = !!(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE); probe = !!(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE);
txs = le32_to_cpu(txs_data[1]); txs = le32_to_cpu(txs_data[1]);
final_mpdu = txs & MT_TXS1_ACKED_MPDU;
ampdu = !fixed_rate && (txs & MT_TXS1_AMPDU); ampdu = !fixed_rate && (txs & MT_TXS1_AMPDU);
txs = le32_to_cpu(txs_data[3]); txs = le32_to_cpu(txs_data[3]);
count = FIELD_GET(MT_TXS3_TX_COUNT, txs); count = FIELD_GET(MT_TXS3_TX_COUNT, txs);
txs = le32_to_cpu(txs_data[0]); txs = le32_to_cpu(txs_data[0]);
pid = FIELD_GET(MT_TXS0_PID, txs);
final_rate = FIELD_GET(MT_TXS0_TX_RATE, txs); final_rate = FIELD_GET(MT_TXS0_TX_RATE, txs);
ack_timeout = txs & MT_TXS0_ACK_TIMEOUT; ack_timeout = txs & MT_TXS0_ACK_TIMEOUT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment