mt76: update to the latest version
[oweals/openwrt.git] / package / kernel / mac80211 / patches / 319-v4.17-0004-mac80211-support-station-4-addr-mode-fast-rx.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 23 Feb 2018 10:05:08 +0100
3 Subject: [PATCH] mac80211: support station 4-addr mode fast-rx
4
5 Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 ---
7
8 --- a/net/mac80211/rx.c
9 +++ b/net/mac80211/rx.c
10 @@ -3738,10 +3738,6 @@ void ieee80211_check_fast_rx(struct sta_
11  
12         switch (sdata->vif.type) {
13         case NL80211_IFTYPE_STATION:
14 -               /* 4-addr is harder to deal with, later maybe */
15 -               if (sdata->u.mgd.use_4addr)
16 -                       goto clear;
17 -
18                 if (sta->sta.tdls) {
19                         fastrx.da_offs = offsetof(struct ieee80211_hdr, addr1);
20                         fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr2);
21 @@ -3754,6 +3750,13 @@ void ieee80211_check_fast_rx(struct sta_
22                                 cpu_to_le16(IEEE80211_FCTL_FROMDS);
23                 }
24  
25 +               if (sdata->u.mgd.use_4addr && !sta->sta.tdls) {
26 +                       fastrx.expected_ds_bits |=
27 +                               cpu_to_le16(IEEE80211_FCTL_TODS);
28 +                       fastrx.da_offs = offsetof(struct ieee80211_hdr, addr3);
29 +                       fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr4);
30 +               }
31 +
32                 if (!sdata->u.mgd.powersave)
33                     break;
34