All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] brcmfmac: allow specifying features per firmware version
@ 2018-05-22 13:18 Rafał Miłecki
  2018-05-22 13:18 ` [PATCH 2/3] brcmfmac: handle monitor mode marked msgbuf packets Rafał Miłecki
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Rafał Miłecki @ 2018-05-22 13:18 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, Pieter-Paul Giesberts, Chung-Hsien Hsu,
	linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

Some features supported by firmware aren't advertised and there is no
way for a driver to query them. This includes e.g. monitor mode details.
Some firmwares support tagging monitor frames, some build radiotap
header but there is no way to detect it.

This commit adds table that will allow specifying features like:
{ "01-abcdef01", BIT(BRCMF_FEAT_FOO) }

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
index 876731c57bf5..1194d31d3902 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
@@ -91,6 +91,28 @@ static int brcmf_feat_debugfs_read(struct seq_file *seq, void *data)
 }
 #endif /* DEBUG */
 
+struct brcmf_feat_fwfeat {
+	const char * const fwid;
+	u32 flags;
+};
+
+static const struct brcmf_feat_fwfeat brcmf_feat_fwfeat_map[] = {
+};
+
+static void brcmf_feat_firmware_features(struct brcmf_pub *pub)
+{
+	const struct brcmf_feat_fwfeat *e;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(brcmf_feat_fwfeat_map); i++) {
+		e = &brcmf_feat_fwfeat_map[i];
+		if (!strcmp(e->fwid, pub->fwver)) {
+			pub->feat_flags |= e->flags;
+			break;
+		}
+	}
+}
+
 /**
  * brcmf_feat_iovar_int_get() - determine feature through iovar query.
  *
@@ -216,6 +238,8 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
 	}
 	brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_FWSUP, "sup_wpa");
 
+	brcmf_feat_firmware_features(drvr);
+
 	/* set chip related quirks */
 	switch (drvr->bus_if->chip) {
 	case BRCM_CC_43236_CHIP_ID:
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-05-30 10:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-22 13:18 [PATCH 1/3] brcmfmac: allow specifying features per firmware version Rafał Miłecki
2018-05-22 13:18 ` [PATCH 2/3] brcmfmac: handle monitor mode marked msgbuf packets Rafał Miłecki
2018-05-23 10:30   ` kbuild test robot
2018-05-24 18:54   ` Arend van Spriel
2018-05-27  5:34     ` Julian Calaby
2018-05-30 10:05       ` Arend van Spriel
2018-05-30 10:25         ` Julian Calaby
2018-05-30 10:12   ` Arend van Spriel
2018-05-22 13:18 ` [PATCH 3/3] brcmfmac: add initial support for monitor mode interface Rafał Miłecki
2018-05-23  7:58 ` [PATCH 1/3] brcmfmac: allow specifying features per firmware version Arend van Spriel
2018-05-24  5:27   ` Rafał Miłecki
2018-05-24  7:52     ` Arend van Spriel
2018-05-24  8:21       ` Rafał Miłecki
2018-05-24 18:47         ` Arend van Spriel
2018-05-25 10:27 ` Arend van Spriel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.