|
@@ -23,6 +23,7 @@
|
|
#include "11n.h"
|
|
#include "11n.h"
|
|
|
|
|
|
#define VERSION "1.0"
|
|
#define VERSION "1.0"
|
|
|
|
+#define MFG_FIRMWARE "mwifiex_mfg.bin"
|
|
|
|
|
|
static unsigned int debug_mask = MWIFIEX_DEFAULT_DEBUG_MASK;
|
|
static unsigned int debug_mask = MWIFIEX_DEFAULT_DEBUG_MASK;
|
|
module_param(debug_mask, uint, 0);
|
|
module_param(debug_mask, uint, 0);
|
|
@@ -37,6 +38,10 @@ module_param(driver_mode, ushort, 0);
|
|
MODULE_PARM_DESC(driver_mode,
|
|
MODULE_PARM_DESC(driver_mode,
|
|
"station=0x1(default), ap-sta=0x3, station-p2p=0x5, ap-sta-p2p=0x7");
|
|
"station=0x1(default), ap-sta=0x3, station-p2p=0x5, ap-sta-p2p=0x7");
|
|
|
|
|
|
|
|
+bool mfg_mode;
|
|
|
|
+module_param(mfg_mode, bool, 0);
|
|
|
|
+MODULE_PARM_DESC(mfg_mode, "manufacturing mode enable:1, disable:0");
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* This function registers the device and performs all the necessary
|
|
* This function registers the device and performs all the necessary
|
|
* initializations.
|
|
* initializations.
|
|
@@ -561,10 +566,12 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
|
|
goto done;
|
|
goto done;
|
|
}
|
|
}
|
|
/* Wait for mwifiex_init to complete */
|
|
/* Wait for mwifiex_init to complete */
|
|
- wait_event_interruptible(adapter->init_wait_q,
|
|
|
|
- adapter->init_wait_q_woken);
|
|
|
|
- if (adapter->hw_status != MWIFIEX_HW_STATUS_READY)
|
|
|
|
- goto err_init_fw;
|
|
|
|
|
|
+ if (!adapter->mfg_mode) {
|
|
|
|
+ wait_event_interruptible(adapter->init_wait_q,
|
|
|
|
+ adapter->init_wait_q_woken);
|
|
|
|
+ if (adapter->hw_status != MWIFIEX_HW_STATUS_READY)
|
|
|
|
+ goto err_init_fw;
|
|
|
|
+ }
|
|
|
|
|
|
priv = adapter->priv[MWIFIEX_BSS_ROLE_STA];
|
|
priv = adapter->priv[MWIFIEX_BSS_ROLE_STA];
|
|
if (mwifiex_register_cfg80211(adapter)) {
|
|
if (mwifiex_register_cfg80211(adapter)) {
|
|
@@ -668,6 +675,17 @@ static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter)
|
|
{
|
|
{
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
|
|
+ /* Override default firmware with manufacturing one if
|
|
|
|
+ * manufacturing mode is enabled
|
|
|
|
+ */
|
|
|
|
+ if (mfg_mode) {
|
|
|
|
+ if (strlcpy(adapter->fw_name, MFG_FIRMWARE,
|
|
|
|
+ sizeof(adapter->fw_name)) >=
|
|
|
|
+ sizeof(adapter->fw_name)) {
|
|
|
|
+ pr_err("%s: fw_name too long!\n", __func__);
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
ret = request_firmware_nowait(THIS_MODULE, 1, adapter->fw_name,
|
|
ret = request_firmware_nowait(THIS_MODULE, 1, adapter->fw_name,
|
|
adapter->dev, GFP_KERNEL, adapter,
|
|
adapter->dev, GFP_KERNEL, adapter,
|
|
mwifiex_fw_dpc);
|
|
mwifiex_fw_dpc);
|