summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/cmdevt.c
diff options
context:
space:
mode:
authorXinming Hu <huxm@marvell.com>2016-09-02 13:05:06 +0530
committerKalle Valo <kvalo@codeaurora.org>2016-09-09 12:05:03 +0300
commitcf5383b088d07f304d189986fdbd4efbd7d41538 (patch)
treeed01d8a8bdc09c294a55a875e99204bff30997a5 /drivers/net/wireless/marvell/mwifiex/cmdevt.c
parentdefb893fffef89ac6db4e68fccae1783d7c93977 (diff)
mwifiex: add manufacturing mode support
By default normal mode is chosen when driver is loaded. This patch adds a provision to choose manufacturing mode via module parameters. Below command loads driver in manufacturing mode insmod mwifiex.ko mfg_mode=1. Tested-by: chunfan chen <jeffc@marvell.com> Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/cmdevt.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/cmdevt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
index d433aa01fdbb..53477280f39c 100644
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
@@ -595,6 +595,14 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
return -1;
}
}
+ /* We don't expect commands in manufacturing mode. They are cooked
+ * in application and ready to download buffer is passed to the driver
+ */
+ if (adapter->mfg_mode && cmd_no) {
+ dev_dbg(adapter->dev, "Ignoring commands in manufacturing mode\n");
+ return -1;
+ }
+
/* Get a new command node */
cmd_node = mwifiex_get_cmd_node(adapter);