Skip to content

Commit 8a8656f

Browse files
jmberg-intellinvjw
authored andcommitted
mac80211: clear more-data bit on filtered frames
It doesn't seem likely, but maybe possible, that the more-data bit needs to be recomputed due to changes in the queued frames. Clear it for filtered frames to ensure that we never send it incorrectly. It'll be set again as necessary when we retransmit this frame. The more likely case is maybe where the station woke up after the filtered frame in which case more-data should be clear when the frame is transmitted to the station since it is now awake. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent b0b97a8 commit 8a8656f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎net/mac80211/status.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
6565

6666
sta->tx_filtered_count++;
6767

68+
/*
69+
* Clear more-data bit on filtered frames, it might be set
70+
* but later frames might time out so it might have to be
71+
* clear again ... It's all rather unlikely (this frame
72+
* should time out first, right?) but let's not confuse
73+
* peers unnecessarily.
74+
*/
75+
if (hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_MOREDATA))
76+
hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_MOREDATA);
77+
6878
if (ieee80211_is_data_qos(hdr->frame_control)) {
6979
int tid = *ieee80211_get_qos_ctl(hdr) &
7080
IEEE80211_QOS_CTL_TID_MASK;

0 commit comments

Comments
 (0)