Re: [PATCH 5/5] [brcmfmac] Add remaining support for 6G by supporting new scan structures.

From: Arend van Spriel
Date: Fri Oct 20 2023 - 06:00:19 EST


On 10/19/2023 3:42 AM, Daniel Berlin wrote:
Add support for netinfo v3 and other PNO v3 structures, which contains
a chanspec rather than just a channel.
Gate support for netinfo_v3 and other structures on the proper feature
caps in the firmware.

Unfortunately, the v3 structures are different enough that we have to
use different handling for them in places (even the same named fields
are in different places).

Reviewed-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Signed-off-by: Daniel Berlin <dberlin@xxxxxxxxxxx>
---
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 239 ++++++++++++++----
.../broadcom/brcm80211/brcmfmac/feature.c | 10 +
.../broadcom/brcm80211/brcmfmac/feature.h | 6 +-
.../broadcom/brcm80211/brcmfmac/fwil_types.h | 62 +++++
.../broadcom/brcm80211/brcmfmac/pno.c | 105 +++++++-
.../broadcom/brcm80211/brcmfmac/pno.h | 9 +
6 files changed, 371 insertions(+), 60 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index bc8355d7f9b5..3656790ec4c9 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -32,6 +32,7 @@
#include "vendor.h"
#include "bus.h"
#include "common.h"
+#include "feature.h"

Suspect this was already include, but no harm being explicit about it.

#define BRCMF_SCAN_IE_LEN_MAX 2048

[...]

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
index 81f2d77cb004..b35c27a64db1 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
@@ -1051,6 +1051,46 @@ struct brcmf_pno_param_le {
__le32 slow_freq;
};
+/**
+ * struct brcmf_pno_param_le - PNO scan configuration parameters

v3?

+ *
+ * @version: PNO parameters version.
+ * @length: Length of PNO structure
+ * @scan_freq: scan frequency.
+ * @lost_network_timeout: #sec. to declare discovered network as lost.
+ * @flags: Bit field to control features of PFN such as sort criteria auto
+ * enable switch and background scan.
+ * @rssi_margin: Margin to avoid jitter for choosing a PFN based on RSSI sort
+ * criteria.
+ * @bestn: number of best networks in each scan.
+ * @mscan: number of scans recorded.
+ * @repeat: minimum number of scan intervals before scan frequency changes
+ * in adaptive scan.
+ * @exp: exponent of 2 for maximum scan interval.
+ * @slow_freq: slow scan period.
+ * @min_bound: min bound for scan time randomization
+ * @max_bound: max bound for scan time randomization
+ * @pfn_lp_scan_disable: unused
+ * @pfn_lp_scan_cnt: allow interleaving lp scan with hp scan
+ */
+struct brcmf_pno_param_v3_le {

[...]

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature