developer | 832d3a7 | 2022-01-18 20:59:06 +0800 | [diff] [blame] | 1 | From 27c6b56c3335614299cf1dcf5a8b5320f83f64d5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Tue, 18 Jan 2022 20:55:44 +0800 |
| 4 | Subject: [PATCH 1/2] mac80211: check twt responder when setup twt |
| 5 | |
| 6 | Change-Id: Iee987aaf9e907ea78367c8f1061d05bfacb5c1be |
| 7 | --- |
| 8 | ...11-check-twt-responder-when-setu-twt.patch | 26 +++++++++++++++++++ |
| 9 | 1 file changed, 26 insertions(+) |
| 10 | create mode 100644 package/kernel/mac80211/patches/subsys/901-mac80211-check-twt-responder-when-setu-twt.patch |
| 11 | |
| 12 | diff --git a/package/kernel/mac80211/patches/subsys/901-mac80211-check-twt-responder-when-setu-twt.patch b/package/kernel/mac80211/patches/subsys/901-mac80211-check-twt-responder-when-setu-twt.patch |
| 13 | new file mode 100644 |
| 14 | index 0000000..e2f24b4 |
| 15 | --- /dev/null |
| 16 | +++ b/package/kernel/mac80211/patches/subsys/901-mac80211-check-twt-responder-when-setu-twt.patch |
| 17 | @@ -0,0 +1,26 @@ |
| 18 | +From fa2d47980f56462c5767a0ad9537f3e58f5864f4 Mon Sep 17 00:00:00 2001 |
| 19 | +From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 20 | +Date: Tue, 18 Jan 2022 20:29:44 +0800 |
| 21 | +Subject: [PATCH] mac80211: do not setup twt when twt responder is false |
| 22 | + |
| 23 | +--- |
| 24 | + net/mac80211/rx.c | 3 +++ |
| 25 | + 1 file changed, 3 insertions(+) |
| 26 | + |
| 27 | +diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c |
| 28 | +index 41c3f22..3961270 100644 |
| 29 | +--- a/net/mac80211/rx.c |
| 30 | ++++ b/net/mac80211/rx.c |
| 31 | +@@ -3231,6 +3231,9 @@ ieee80211_process_rx_twt_action(struct ieee80211_rx_data *rx) |
| 32 | + if (sdata->vif.type != NL80211_IFTYPE_AP) |
| 33 | + return false; |
| 34 | + |
| 35 | ++ if (!sdata->vif.bss_conf.twt_responder) |
| 36 | ++ return false; |
| 37 | ++ |
| 38 | + if (!rx->local->ops->add_twt_setup) |
| 39 | + return false; |
| 40 | + |
| 41 | +-- |
| 42 | +2.29.2 |
| 43 | + |
| 44 | -- |
| 45 | 2.29.2 |
| 46 | |