1 From: Hante Meuleman <meuleman@broadcom.com>
2 Date: Fri, 18 Sep 2015 22:08:15 +0200
3 Subject: [PATCH] brcmfmac: Add module parameter to disable features.
5 For debugging purpose it is very handy to be able to disable
6 features. It has happened a few times that new features turned
7 out not always being properly detected for all devices/firmwares.
8 Making it possible to disable the feature with a module parameter
9 will make testing/debugging easier.
11 Reviewed-by: Arend Van Spriel <arend@broadcom.com>
12 Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
13 Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
14 Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
15 Signed-off-by: Arend van Spriel <arend@broadcom.com>
16 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
19 --- a/drivers/net/wireless/brcm80211/brcmfmac/feature.c
20 +++ b/drivers/net/wireless/brcm80211/brcmfmac/feature.c
24 #include <linux/netdevice.h>
25 +#include <linux/module.h>
27 #include <brcm_hw_ids.h>
34 +/* Module param feature_disable (global for all devices) */
35 +static int brcmf_feature_disable;
36 +module_param_named(feature_disable, brcmf_feature_disable, int, 0);
37 +MODULE_PARM_DESC(feature_disable, "Disable features");
40 * expand feature list to array of feature strings.
42 @@ -131,6 +138,12 @@ void brcmf_feat_attach(struct brcmf_pub
43 brcmf_feat_iovar_int_set(ifp, BRCMF_FEAT_MBSS, "mbss", 0);
44 brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_P2P, "p2p");
46 + if (brcmf_feature_disable) {
47 + brcmf_dbg(INFO, "Features: 0x%02x, disable: 0x%02x\n",
48 + ifp->drvr->feat_flags, brcmf_feature_disable);
49 + ifp->drvr->feat_flags &= ~brcmf_feature_disable;
52 /* set chip related quirks */
53 switch (drvr->bus_if->chip) {
54 case BRCM_CC_43236_CHIP_ID: