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

Commit b126c889 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

mt76: mt7603: set moredata flag when queueing ps-filtered packets



Clients should poll for more packets afterwards

Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 643749d4
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -5,6 +5,7 @@
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/module.h>
#include "mt7603.h"
#include "mt7603.h"
#include "mac.h"
#include "eeprom.h"
#include "eeprom.h"


static int
static int
@@ -385,6 +386,15 @@ mt7603_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps)
	mt7603_ps_tx_list(dev, &list);
	mt7603_ps_tx_list(dev, &list);
}
}


static void
mt7603_ps_set_more_data(struct sk_buff *skb)
{
	struct ieee80211_hdr *hdr;

	hdr = (struct ieee80211_hdr *) &skb->data[MT_TXD_SIZE];
	hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA);
}

static void
static void
mt7603_release_buffered_frames(struct ieee80211_hw *hw,
mt7603_release_buffered_frames(struct ieee80211_hw *hw,
			       struct ieee80211_sta *sta,
			       struct ieee80211_sta *sta,
@@ -411,6 +421,7 @@ mt7603_release_buffered_frames(struct ieee80211_hw *hw,


		skb_set_queue_mapping(skb, MT_TXQ_PSD);
		skb_set_queue_mapping(skb, MT_TXQ_PSD);
		__skb_unlink(skb, &msta->psq);
		__skb_unlink(skb, &msta->psq);
		mt7603_ps_set_more_data(skb);
		__skb_queue_tail(&list, skb);
		__skb_queue_tail(&list, skb);
		nframes--;
		nframes--;
	}
	}