@@ -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)
@@ -125,4 +125,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,
};
@@ -632,7 +632,7 @@ static void mt76u_tx_tasklet(unsigned long data)
bool wake;
int i;
- for (i = 0; i < IEEE80211_NUM_ACS; i++) {
+ for (i = 0; i <= MT_TXQ_PSD; i++) {
q = &dev->q_tx[i];
spin_lock_bh(&q->lock);
@@ -785,11 +785,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++) {
q = &dev->q_tx[i];
spin_lock_init(&q->lock);
INIT_LIST_HEAD(&q->swq);
- q->hw_idx = mt76_ac_to_hwq(i);
+ if (i < IEEE80211_NUM_ACS)
+ q->hw_idx = mt76_ac_to_hwq(i);
+ else
+ q->hw_idx = 0;
q->entry = devm_kcalloc(dev->dev,
MT_NUM_TX_ENTRIES, sizeof(*q->entry),
@@ -825,7 +828,7 @@ static void mt76u_free_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++) {
q = &dev->q_tx[i];
for (j = 0; j < q->ndesc; j++)
usb_free_urb(q->entry[j].ubuf.urb);
@@ -837,7 +840,7 @@ static void mt76u_stop_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++) {
q = &dev->q_tx[i];
for (j = 0; j < q->ndesc; j++)
usb_kill_urb(q->entry[j].ubuf.urb);
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: Stanislaw Gruszka <sgruszka@redhat.com> --- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 1 + .../net/wireless/mediatek/mt76/mt76x2/usb_main.c | 1 + drivers/net/wireless/mediatek/mt76/usb.c | 13 ++++++++----- 3 files changed, 10 insertions(+), 5 deletions(-)