2019-06-12 19:36:54

by James Prestwood

[permalink] [raw]
Subject: [PATCH 1/3] net: wireless: trace: add trace for tx_mgmt_expired

Signed-off-by: James Prestwood <[email protected]>
---
net/wireless/trace.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 2abfff925aac..4fbb91a511ae 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2752,6 +2752,24 @@ TRACE_EVENT(cfg80211_ready_on_channel_expired,
WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
);

+TRACE_EVENT(cfg80211_tx_mgmt_expired,
+ TP_PROTO(struct wireless_dev *wdev, u64 cookie,
+ struct ieee80211_channel *chan),
+ TP_ARGS(wdev, cookie, chan),
+ TP_STRUCT__entry(
+ WDEV_ENTRY
+ __field(u64, cookie)
+ CHAN_ENTRY
+ ),
+ TP_fast_assign(
+ WDEV_ASSIGN;
+ __entry->cookie = cookie;
+ CHAN_ASSIGN(chan);
+ ),
+ TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
+ WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
+);
+
TRACE_EVENT(cfg80211_new_sta,
TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
struct station_info *sinfo),
--
2.17.1


2019-06-12 19:36:55

by James Prestwood

[permalink] [raw]
Subject: [PATCH 3/3] mac80211: notify offchannel expire on mgmt_tx

Signed-off-by: James Prestwood <[email protected]>
---
net/mac80211/offchannel.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 8ef4153cd299..b07aec5e7da4 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -202,6 +202,11 @@ static void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc)
cfg80211_remain_on_channel_expired(&roc->sdata->wdev,
roc->cookie, roc->chan,
GFP_KERNEL);
+ else
+ cfg80211_tx_mgmt_expired(&roc->sdata->wdev,
+ roc->mgmt_tx_cookie,
+ roc->chan,
+ GFP_KERNEL);

list_del(&roc->list);
kfree(roc);
--
2.17.1

2019-06-14 13:43:17

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/3] net: wireless: trace: add trace for tx_mgmt_expired

Applied, but

* I squashed 1 and 2, there's no point in 1 standalone
* please be more careful with indentation in the future,
I fixed a few places.

johannes