Added necessary function to pass through driver updated MU-EDCA
parameters to user space.
Signed-off-by: Muna Sinada <[email protected]>
---
include/net/mac80211.h | 15 +++++++++++++++
net/mac80211/mlme.c | 12 ++++++++++++
net/mac80211/trace.h | 20 ++++++++++++++++++++
3 files changed, 47 insertions(+)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 05c7524bab26..eeadddaf1f6a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -6695,4 +6695,19 @@ struct sk_buff *ieee80211_get_fils_discovery_tmpl(struct ieee80211_hw *hw,
struct sk_buff *
ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw,
struct ieee80211_vif *vif);
+
+/**
+ * ieee80211_update_muedca_params - update MU-EDCA parameters.
+ *
+ * This function is used to pass dynamically updated MU-EDCA parameters
+ * from driver to user space in order for parameters to be updated in beacon.
+ *
+ * @hw: pointer as obtained from ieee80211_alloc_hw()
+ * @params: updated MU-EDCA parameters
+ * @gfp: allocation flags
+ */
+void ieee80211_update_muedca_params(struct ieee80211_hw *hw,
+ struct ieee80211_mu_edca_param_set
+ *params, gfp_t gfp);
+
#endif /* MAC80211_H */
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 6adfcb9c06dc..aba8fecf8284 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -5934,3 +5934,15 @@ void ieee80211_cqm_beacon_loss_notify(struct ieee80211_vif *vif, gfp_t gfp)
cfg80211_cqm_beacon_loss_notify(sdata->dev, gfp);
}
EXPORT_SYMBOL(ieee80211_cqm_beacon_loss_notify);
+
+void ieee80211_update_muedca_params(struct ieee80211_hw *hw,
+ struct ieee80211_mu_edca_param_set
+ *params, gfp_t gfp)
+{
+ struct ieee80211_local *local = hw_to_local(hw);
+
+ trace_api_update_muedca_params(local, params);
+
+ cfg80211_update_muedca_params_event(local->hw.wiphy, params, gfp);
+}
+EXPORT_SYMBOL(ieee80211_update_muedca_params);
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 89723907a094..4ede71bea435 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -2767,6 +2767,26 @@ TRACE_EVENT(drv_sta_set_4addr,
)
);
+TRACE_EVENT(api_update_muedca_params,
+ TP_PROTO(struct ieee80211_local *local,
+ struct ieee80211_mu_edca_param_set *params),
+
+ TP_ARGS(local, params),
+
+ TP_STRUCT__entry(
+ LOCAL_ENTRY
+ ),
+
+ TP_fast_assign(
+ LOCAL_ASSIGN;
+ ),
+
+ TP_printk(
+ LOCAL_PR_FMT " updated MU-EDCA parameters",
+ LOCAL_PR_ARG
+ )
+);
+
#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
#undef TRACE_INCLUDE_PATH
--
2.7.4
> +void ieee80211_update_muedca_params(struct ieee80211_hw *hw,
> + struct ieee80211_mu_edca_param_set
> + *params, gfp_t gfp)
> +{
> + struct ieee80211_local *local = hw_to_local(hw);
> +
> + trace_api_update_muedca_params(local, params);
> +
> + cfg80211_update_muedca_params_event(local->hw.wiphy, params, gfp);
> +}
> +EXPORT_SYMBOL(ieee80211_update_muedca_params);
>
I see no reason to have this trivial wrapper.
johannes
Hello Johannes,
I saw on your review comment that this wrapper is not needed. I wanted to confirm with you if it would be ok to call a cfg80211 API from a mac80211 based driver, since that is what would be done if this wrapper is removed. Additionally, another reason I have this wrapper is so I can place a tracepoint. What are your thoughts about this?
Thank you,
Muna
-----Original Message-----
From: Johannes Berg <[email protected]>
Sent: Friday, February 12, 2021 12:49 AM
To: Muna Sinada <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 2/2] mac80211: Handling driver updated MU-EDCA params
> +void ieee80211_update_muedca_params(struct ieee80211_hw *hw,
> + struct ieee80211_mu_edca_param_set
> + *params, gfp_t gfp)
> +{
> + struct ieee80211_local *local = hw_to_local(hw);
> +
> + trace_api_update_muedca_params(local, params);
> +
> + cfg80211_update_muedca_params_event(local->hw.wiphy, params, gfp); }
> +EXPORT_SYMBOL(ieee80211_update_muedca_params);
>
I see no reason to have this trivial wrapper.
johannes
On Tue, 2021-08-10 at 19:48 -0700, Muna Sinada wrote:
> Hello Johannes,
>
> I saw on your review comment that this wrapper is not needed. I wanted
> to confirm with you if it would be ok to call a cfg80211 API from a
> mac80211 based driver, since that is what would be done if this
> wrapper is removed.
Yes, that's fine.
> Additionally, another reason I have this wrapper is so I can place a
> tracepoint. What are your thoughts about this?
You already have a tracepoint on cfg80211, seems sufficient?
johannes
Hello Johannes,
Please drop this patch.
Thank you,
Muna
-----Original Message-----
From: Johannes Berg <[email protected]>
Sent: Wednesday, August 11, 2021 3:07 AM
To: Muna Sinada <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 2/2] mac80211: Handling driver updated MU-EDCA params
On Tue, 2021-08-10 at 19:48 -0700, Muna Sinada wrote:
> Hello Johannes,
>
> I saw on your review comment that this wrapper is not needed. I wanted
> to confirm with you if it would be ok to call a cfg80211 API from a
> mac80211 based driver, since that is what would be done if this
> wrapper is removed.
Yes, that's fine.
> Additionally, another reason I have this wrapper is so I can place a
> tracepoint. What are your thoughts about this?
You already have a tracepoint on cfg80211, seems sufficient?
johannes