Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8300ee7c authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Felix Fietkau
Browse files

mt76x02u: add mt76_release_buffered_frames



Create software MT_TXQ_PSD queue for USB and map it to MT_TXQ_VO
since we do not have USB endpoint for PSD. This should make
mt76_release_buffered_frames() work by sending released frames
via MT_TXQ_VO.

Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent f2276c29
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ static const struct ieee80211_ops mt76x0u_ops = {
	.set_rts_threshold = mt76x02_set_rts_threshold,
	.wake_tx_queue = mt76_wake_tx_queue,
	.get_txpower = mt76_get_txpower,
	.release_buffered_frames = mt76_release_buffered_frames,
};

static int mt76x0u_init_hardware(struct mt76x02_dev *dev)
+1 −0
Original line number Diff line number Diff line
@@ -129,4 +129,5 @@ const struct ieee80211_ops mt76x2u_ops = {
	.sw_scan_complete = mt76x02_sw_scan_complete,
	.sta_rate_tbl_update = mt76x02_sta_rate_tbl_update,
	.get_txpower = mt76_get_txpower,
	.release_buffered_frames = mt76_release_buffered_frames,
};
+6 −1
Original line number Diff line number Diff line
@@ -792,9 +792,14 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
	struct mt76_queue *q;
	int i, j;

	for (i = 0; i < IEEE80211_NUM_ACS; i++) {
	for (i = 0; i <= MT_TXQ_PSD; i++) {
		INIT_LIST_HEAD(&dev->q_tx[i].swq);

		if (i >= IEEE80211_NUM_ACS) {
			dev->q_tx[i].q = dev->q_tx[0].q;
			continue;
		}

		q = devm_kzalloc(dev->dev, sizeof(*q), GFP_KERNEL);
		if (!q)
			return -ENOMEM;