From 05bc0bb7d7cafbcad1e24ce7c7ab08943c5751d8 Mon Sep 17 00:00:00 2001
From: Aleksander Jan Bajkowski <olek2@wp.pl>
Date: Sun, 18 Jan 2026 13:00:07 +0100
Subject: [PATCH] iw: survey: add BSS receive time to survey

Print channel BSS receive time in survey dump. This patch comes
from OpenWRT. It's been in use for 7 years.

Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://patch.msgid.link/20260118120013.4383-1-olek2@wp.pl
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 survey.c | 3 +++
 1 file changed, 3 insertions(+)

--- a/survey.c
+++ b/survey.c
@@ -60,6 +60,9 @@ static int print_survey_handler(struct n
 	if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX])
 		printf("\tchannel receive time:\t\t%llu ms\n",
 			(unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX]));
+	if (sinfo[NL80211_SURVEY_INFO_TIME_BSS_RX])
+		printf("\tchannel BSS receive time:\t%llu ms\n",
+			(unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_BSS_RX]));
 	if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX])
 		printf("\tchannel transmit time:\t\t%llu ms\n",
 			(unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX]));
