mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
Fix errors found by cppcheck
Mismatching declarations as well as unused results. Signed-off-by: Rosen Penev <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
1dae8f0e57
commit
5e49aa933c
@@ -236,7 +236,7 @@ int mt7603_mcu_set_timing(struct mt7603_dev *dev, int slot, int sifs, int rifs,
|
||||
int eifs);
|
||||
void mt7603_mcu_exit(struct mt7603_dev *dev);
|
||||
|
||||
void mt7603_wtbl_init(struct mt7603_dev *dev, int idx, int vif, const u8 *addr);
|
||||
void mt7603_wtbl_init(struct mt7603_dev *dev, int idx, int vif, const u8 *mac_addr);
|
||||
void mt7603_wtbl_clear(struct mt7603_dev *dev, int idx);
|
||||
void mt7603_wtbl_update_cap(struct mt7603_dev *dev, struct ieee80211_sta *sta);
|
||||
void mt7603_wtbl_set_rates(struct mt7603_dev *dev, struct mt7603_sta *sta,
|
||||
@@ -254,7 +254,7 @@ int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
|
||||
void mt7603_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
|
||||
struct mt76_queue_entry *e, bool flush);
|
||||
|
||||
void mt7603_queue_rx_skb(struct mt76_dev *dev, enum mt76_rxq_id q,
|
||||
void mt7603_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
|
||||
struct sk_buff *skb);
|
||||
void mt7603_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q);
|
||||
|
||||
|
||||
+1
-2
@@ -25,7 +25,6 @@ mt7603_tx_queue_mcu(struct mt7603_dev *dev, enum mt76_txq_id qid,
|
||||
struct mt76_queue *q = &dev->mt76.q_tx[qid];
|
||||
struct mt76_queue_buf buf;
|
||||
dma_addr_t addr;
|
||||
int idx;
|
||||
|
||||
addr = dma_map_single(dev->mt76.dev, skb->data, skb->len, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(dev->mt76.dev, addr))
|
||||
@@ -34,7 +33,7 @@ mt7603_tx_queue_mcu(struct mt7603_dev *dev, enum mt76_txq_id qid,
|
||||
buf.addr = addr;
|
||||
buf.len = skb->len;
|
||||
spin_lock_bh(&q->lock);
|
||||
idx = mt76_queue_add_buf(dev, q, &buf, 1, 0, skb, NULL);
|
||||
mt76_queue_add_buf(dev, q, &buf, 1, 0, skb, NULL);
|
||||
mt76_queue_kick(dev, q);
|
||||
spin_unlock_bh(&q->lock);
|
||||
|
||||
|
||||
@@ -200,20 +200,20 @@ int mt76x2_tx_queue_mcu(struct mt76x2_dev *dev, enum mt76_txq_id qid,
|
||||
void mt76x2_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
|
||||
struct sk_buff *skb);
|
||||
void mt76x2_tx_complete(struct mt76x2_dev *dev, struct sk_buff *skb);
|
||||
int mt76x2_tx_prepare_skb(struct mt76_dev *dev, void *txwi_ptr,
|
||||
int mt76x2_tx_prepare_skb(struct mt76_dev *mdev, void *txwi,
|
||||
struct sk_buff *skb, struct mt76_queue *q,
|
||||
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
|
||||
u32 *tx_info);
|
||||
void mt76x2_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
|
||||
struct mt76_queue_entry *e, bool flush);
|
||||
|
||||
void mt76x2_pre_tbtt_tasklet(unsigned long data);
|
||||
void mt76x2_pre_tbtt_tasklet(unsigned long arg);
|
||||
|
||||
void mt76x2_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q);
|
||||
void mt76x2_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q);
|
||||
void mt76x2_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
|
||||
struct sk_buff *skb);
|
||||
|
||||
void mt76x2_update_channel(struct mt76_dev *dev);
|
||||
void mt76x2_update_channel(struct mt76_dev *mdev);
|
||||
|
||||
s8 mt76x2_tx_get_max_txpwr_adj(struct mt76x2_dev *dev,
|
||||
const struct ieee80211_tx_rate *rate);
|
||||
|
||||
+1
-1
@@ -295,7 +295,7 @@ static bool mt76x2_dfs_check_hw_pulse(struct mt76x2_dev *dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
void mt76x2_dfs_tasklet(unsigned long arg)
|
||||
static void mt76x2_dfs_tasklet(unsigned long arg)
|
||||
{
|
||||
struct mt76x2_dev *dev = (struct mt76x2_dev *)arg;
|
||||
struct mt76x2_dfs_pattern_detector *dfs_pd = &dev->dfs_pd;
|
||||
|
||||
+1
-2
@@ -25,7 +25,6 @@ mt76x2_tx_queue_mcu(struct mt76x2_dev *dev, enum mt76_txq_id qid,
|
||||
struct mt76_queue_buf buf;
|
||||
dma_addr_t addr;
|
||||
u32 tx_info;
|
||||
int idx;
|
||||
|
||||
tx_info = MT_MCU_MSG_TYPE_CMD |
|
||||
FIELD_PREP(MT_MCU_MSG_CMD_TYPE, cmd) |
|
||||
@@ -41,7 +40,7 @@ mt76x2_tx_queue_mcu(struct mt76x2_dev *dev, enum mt76_txq_id qid,
|
||||
buf.addr = addr;
|
||||
buf.len = skb->len;
|
||||
spin_lock_bh(&q->lock);
|
||||
idx = mt76_queue_add_buf(dev, q, &buf, 1, tx_info, skb, NULL);
|
||||
mt76_queue_add_buf(dev, q, &buf, 1, tx_info, skb, NULL);
|
||||
mt76_queue_kick(dev, q);
|
||||
spin_unlock_bh(&q->lock);
|
||||
|
||||
|
||||
+1
-1
@@ -424,7 +424,7 @@ mt76x2_rate_power_val(u8 val)
|
||||
|
||||
void mt76x2_get_rate_power(struct mt76x2_dev *dev, struct mt76_rate_power *t)
|
||||
{
|
||||
bool is_5ghz = false;
|
||||
bool is_5ghz;
|
||||
u16 val;
|
||||
|
||||
is_5ghz = dev->mt76.chandef.chan->band == NL80211_BAND_5GHZ;
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ void mt76x2_mac_resume(struct mt76x2_dev *dev);
|
||||
void mt76x2_mac_set_bssid(struct mt76x2_dev *dev, u8 idx, const u8 *addr);
|
||||
|
||||
int mt76x2_mac_process_rx(struct mt76x2_dev *dev, struct sk_buff *skb,
|
||||
void *rxwi);
|
||||
void *rxi);
|
||||
void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi,
|
||||
struct sk_buff *skb, struct mt76_wcid *wcid,
|
||||
struct ieee80211_sta *sta);
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ struct mt76x2_tssi_comp {
|
||||
|
||||
int mt76x2_mcu_calibrate(struct mt76x2_dev *dev, enum mcu_calibration type,
|
||||
u32 param);
|
||||
int mt76x2_mcu_tssi_comp(struct mt76x2_dev *dev, struct mt76x2_tssi_comp *data);
|
||||
int mt76x2_mcu_tssi_comp(struct mt76x2_dev *dev, struct mt76x2_tssi_comp *tssi_data);
|
||||
int mt76x2_mcu_init_gain(struct mt76x2_dev *dev, u8 channel, u32 gain,
|
||||
bool force);
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
|
||||
struct ieee80211_txq *txq = mtxq_to_txq(mtxq);
|
||||
struct ieee80211_tx_info *info;
|
||||
struct mt76_wcid *wcid = mtxq->wcid;
|
||||
struct sk_buff *skb = NULL;
|
||||
struct sk_buff *skb;
|
||||
int n_frames = 1, limit;
|
||||
struct ieee80211_tx_rate tx_rate;
|
||||
bool ampdu;
|
||||
|
||||
Reference in New Issue
Block a user