wlan-ap-Telecominfraproject/feeds/ipq95xx/mac80211/patches/qca/703-02-mac80211-add-support-for-set-bit-rate.patch
John Crispin 144c5d00f4 ipq95xx/mac80211: update to ATH12.3-CS
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00

89 lines
3.1 KiB
Diff

From 994697af6b74606178c8672fd51247d2019024c1 Mon Sep 17 00:00:00 2001
From: Aaradhana Sahu <quic_aarasahu@quicinc.com>
Date: Wed, 4 Jan 2023 16:04:10 +0530
Subject: [PATCH] mac80211: add support for set bit rate
Currently, we set bit rate form user space according to phy.
But, in multi-link operation each phy has more than one link
and each link is work on different bit rate.
So, add support to set bit rate according to link id.
Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
---
include/net/mac80211.h | 1 +
net/mac80211/cfg.c | 2 +-
net/mac80211/driver-ops.h | 5 +++--
net/mac80211/trace.h | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 550c294..a949d20 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -4474,6 +4474,7 @@ struct ieee80211_ops {
u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
bool (*tx_frames_pending)(struct ieee80211_hw *hw);
int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ unsigned int link_id,
const struct cfg80211_bitrate_mask *mask);
void (*event_callback)(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index deb08a1..52055dd 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3398,7 +3398,7 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
return -ENETDOWN;
if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
- ret = drv_set_bitrate_mask(local, sdata, mask);
+ ret = drv_set_bitrate_mask(local, sdata, link_id, mask);
if (ret)
return ret;
}
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 7a3b7cc..52325f1 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -748,6 +748,7 @@ static inline bool drv_tx_frames_pending(struct ieee80211_local *local)
static inline int drv_set_bitrate_mask(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
+ unsigned int link_id,
const struct cfg80211_bitrate_mask *mask)
{
int ret = -EOPNOTSUPP;
@@ -757,10 +758,10 @@ static inline int drv_set_bitrate_mask(struct ieee80211_local *local,
if (!check_sdata_in_driver(sdata))
return -EIO;
- trace_drv_set_bitrate_mask(local, sdata, mask);
+ trace_drv_set_bitrate_mask(local, sdata, link_id, mask);
if (local->ops->set_bitrate_mask)
ret = local->ops->set_bitrate_mask(&local->hw,
- &sdata->vif, mask);
+ &sdata->vif, link_id, mask);
trace_drv_return_int(local, ret);
return ret;
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index a7c98ac..c78ffad 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -1426,9 +1426,10 @@ DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
TRACE_EVENT(drv_set_bitrate_mask,
TP_PROTO(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
+ unsigned int link_id,
const struct cfg80211_bitrate_mask *mask),
- TP_ARGS(local, sdata, mask),
+ TP_ARGS(local, sdata, link_id, mask),
TP_STRUCT__entry(
LOCAL_ENTRY
--
2.17.1