Commit 9fba6d07 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

mt76: add support for an extra wiphy in the main tx path



This is preparation for supporting multiple wiphys per device to support the
concurrent dual-band feature of MT7615D

Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent bfc394dd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -720,15 +720,15 @@ static inline bool mt76_is_skb_pktid(u8 pktid)
}

void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb);
void mt76_tx(struct mt76_dev *dev, struct ieee80211_sta *sta,
void mt76_tx(struct mt76_phy *dev, struct ieee80211_sta *sta,
	     struct mt76_wcid *wcid, struct sk_buff *skb);
void mt76_txq_init(struct mt76_dev *dev, struct ieee80211_txq *txq);
void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq);
void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta,
			 bool send_bar);
void mt76_txq_schedule(struct mt76_dev *dev, enum mt76_txq_id qid);
void mt76_txq_schedule_all(struct mt76_dev *dev);
void mt76_txq_schedule(struct mt76_phy *phy, enum mt76_txq_id qid);
void mt76_txq_schedule_all(struct mt76_phy *phy);
void mt76_tx_tasklet(unsigned long data);
void mt76_release_buffered_frames(struct ieee80211_hw *hw,
				  struct ieee80211_sta *sta,
+2 −2
Original line number Diff line number Diff line
@@ -1392,7 +1392,7 @@ static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
	set_bit(MT76_RESET, &dev->mt76.state);

	/* lock/unlock all queues to ensure that no tx is pending */
	mt76_txq_schedule_all(&dev->mt76);
	mt76_txq_schedule_all(&dev->mphy);

	tasklet_disable(&dev->mt76.tx_tasklet);
	tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
@@ -1456,7 +1456,7 @@ static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
	napi_schedule(&dev->mt76.napi[1]);

	ieee80211_wake_queues(dev->mt76.hw);
	mt76_txq_schedule_all(&dev->mt76);
	mt76_txq_schedule_all(&dev->mphy);
}

static u32 mt7603_dma_debug(struct mt7603_dev *dev, u8 index)
+2 −2
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def)

	clear_bit(MT76_RESET, &dev->mt76.state);

	mt76_txq_schedule_all(&dev->mt76);
	mt76_txq_schedule_all(&dev->mphy);

	ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mt76.mac_work,
				     msecs_to_jiffies(MT7603_WATCHDOG_TIME));
@@ -667,7 +667,7 @@ static void mt7603_tx(struct ieee80211_hw *hw,
		wcid = &mvif->sta.wcid;
	}

	mt76_tx(&dev->mt76, control->sta, wcid, skb);
	mt76_tx(&dev->mphy, control->sta, wcid, skb);
}

const struct ieee80211_ops mt7603_ops = {
+2 −2
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ static int mt7615_set_channel(struct mt7615_dev *dev)
	clear_bit(MT76_RESET, &dev->mt76.state);
	mutex_unlock(&dev->mt76.mutex);

	mt76_txq_schedule_all(&dev->mt76);
	mt76_txq_schedule_all(&dev->mphy);
	ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mt76.mac_work,
				     MT7615_WATCHDOG_TIME);
	return ret;
@@ -458,7 +458,7 @@ static void mt7615_tx(struct ieee80211_hw *hw,
		wcid = &mvif->sta.wcid;
	}

	mt76_tx(&dev->mt76, control->sta, wcid, skb);
	mt76_tx(&dev->mphy, control->sta, wcid, skb);
}

static int mt7615_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ mt76x0_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
	}
	mt76x02_pre_tbtt_enable(dev, true);

	mt76_txq_schedule_all(&dev->mt76);
	mt76_txq_schedule_all(&dev->mphy);
}

int mt76x0_config(struct ieee80211_hw *hw, u32 changed)
Loading