summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin.berg@intel.com>2023-06-16 09:54:00 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-06-19 13:05:28 +0300
commit5db25290b77b4efcf26c2b25f288ca3f13ff2fc5 (patch)
treebd2860b1ec4af16875d1dc2967a50ec9ac37efc1 /net/wireless
parent6b7c93c1439c8833ada9068f612df2de0571fd00 (diff)
downloadlinux-5db25290b77b4efcf26c2b25f288ca3f13ff2fc5.tar.xz
wifi: cfg80211: add inform_bss op to update BSS
This new function is called from within the inform_bss(_frame)_data functions in order for the driver to update data that it is tracking. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230616094949.8d7781b0f965.I80041183072b75c081996a1a5a230b34aff5c668@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/rdev-ops.h12
-rw-r--r--net/wireless/scan.c4
-rw-r--r--net/wireless/trace.h17
3 files changed, 33 insertions, 0 deletions
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index f8c310849438..90bb7ac4b930 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -407,6 +407,18 @@ static inline int rdev_change_bss(struct cfg80211_registered_device *rdev,
return ret;
}
+static inline void rdev_inform_bss(struct cfg80211_registered_device *rdev,
+ struct cfg80211_bss *bss,
+ const struct cfg80211_bss_ies *ies,
+ void *drv_data)
+
+{
+ trace_rdev_inform_bss(&rdev->wiphy, bss);
+ if (rdev->ops->inform_bss)
+ rdev->ops->inform_bss(&rdev->wiphy, bss, ies, drv_data);
+ trace_rdev_return_void(&rdev->wiphy);
+}
+
static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev,
struct net_device *dev,
struct ieee80211_txq_params *params)
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 8984f74da891..d9abbf123ad1 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -2027,6 +2027,8 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,
if (!res)
goto drop;
+ rdev_inform_bss(rdev, &res->pub, ies, data->drv_data);
+
if (non_tx_data) {
/* this is a nontransmitting bss, we need to add it to
* transmitting bss' list if it is not there
@@ -2502,6 +2504,8 @@ cfg80211_inform_single_bss_frame_data(struct wiphy *wiphy,
if (!res)
goto drop;
+ rdev_inform_bss(rdev, &res->pub, ies, data->drv_data);
+
spin_unlock_bh(&rdev->bss_lock);
trace_cfg80211_return_bss(&res->pub);
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 73a4f8f57438..e63990b81249 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -1159,6 +1159,23 @@ TRACE_EVENT(rdev_change_bss,
__entry->ap_isolate, __entry->ht_opmode)
);
+TRACE_EVENT(rdev_inform_bss,
+ TP_PROTO(struct wiphy *wiphy, struct cfg80211_bss *bss),
+ TP_ARGS(wiphy, bss),
+ TP_STRUCT__entry(
+ WIPHY_ENTRY
+ MAC_ENTRY(bssid)
+ CHAN_ENTRY
+ ),
+ TP_fast_assign(
+ WIPHY_ASSIGN;
+ MAC_ASSIGN(bssid, bss->bssid);
+ CHAN_ASSIGN(bss->channel);
+ ),
+ TP_printk(WIPHY_PR_FMT ", %pM, " CHAN_PR_FMT,
+ WIPHY_PR_ARG, __entry->bssid, CHAN_PR_ARG)
+);
+
TRACE_EVENT(rdev_set_txq_params,
TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
struct ieee80211_txq_params *params),