Skip to content

Commit

Permalink
mt76: mt7603: set moredata flag when queueing ps-filtered packets
Browse files Browse the repository at this point in the history
Clients should poll for more packets afterwards

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Mar 4, 2019
1 parent 461f3b0 commit 1d7760d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mt7603/main.c
Expand Up @@ -5,6 +5,7 @@
#include <linux/pci.h>
#include <linux/module.h>
#include "mt7603.h"
#include "mac.h"
#include "eeprom.h"

static int
Expand Down Expand Up @@ -385,6 +386,15 @@ mt7603_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps)
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
mt7603_release_buffered_frames(struct ieee80211_hw *hw,
struct ieee80211_sta *sta,
Expand All @@ -411,6 +421,7 @@ mt7603_release_buffered_frames(struct ieee80211_hw *hw,

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

0 comments on commit 1d7760d

Please sign in to comment.