1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 23 Feb 2018 10:01:53 +0100
3 Subject: [PATCH] mac80211: support fast-rx with incompatible PS
4 capabilities when PS is disabled
6 When powersave is disabled for the interface, we can do fast-rx anyway.
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 --- a/net/mac80211/cfg.c
12 +++ b/net/mac80211/cfg.c
13 @@ -2658,6 +2658,7 @@ static int ieee80211_set_power_mgmt(stru
15 ieee80211_recalc_ps(local);
16 ieee80211_recalc_ps_vif(sdata);
17 + ieee80211_check_fast_rx_iface(sdata);
21 --- a/net/mac80211/rx.c
22 +++ b/net/mac80211/rx.c
23 @@ -3741,12 +3741,7 @@ void ieee80211_check_fast_rx(struct sta_
24 /* 4-addr is harder to deal with, later maybe */
25 if (sdata->u.mgd.use_4addr)
27 - /* software powersave is a huge mess, avoid all of it */
28 - if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK))
30 - if (ieee80211_hw_check(&local->hw, SUPPORTS_PS) &&
31 - !ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS))
35 fastrx.da_offs = offsetof(struct ieee80211_hdr, addr1);
36 fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr2);
37 @@ -3758,6 +3753,16 @@ void ieee80211_check_fast_rx(struct sta_
38 fastrx.expected_ds_bits =
39 cpu_to_le16(IEEE80211_FCTL_FROMDS);
42 + if (!sdata->u.mgd.powersave)
45 + /* software powersave is a huge mess, avoid all of it */
46 + if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK))
48 + if (ieee80211_hw_check(&local->hw, SUPPORTS_PS) &&
49 + !ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS))
52 case NL80211_IFTYPE_AP_VLAN:
53 case NL80211_IFTYPE_AP: