aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lin <dlin@marvell.com>2016-06-01 15:19:02 +0800
committerDavid Lin <dlin@marvell.com>2016-06-01 15:19:02 +0800
commitaf93c39bdce22b3bd1a12e6fb2a1097f9a448ecf (patch)
tree36c24edf690b61f9fcfa33346d58bd8c64ebd852
parent6bacc5aa695a1f890a8842f58762a5e5e249ccea (diff)
Removed code related to MFG.
Signed-off-by: David Lin <dlin@marvell.com>
-rw-r--r--debugfs.c2
-rw-r--r--dev.h2
-rw-r--r--fwcmd.c27
-rw-r--r--fwdl.c23
-rw-r--r--main.c47
5 files changed, 14 insertions, 87 deletions
diff --git a/debugfs.c b/debugfs.c
index 1be3532..ecb7fd4 100644
--- a/debugfs.c
+++ b/debugfs.c
@@ -122,8 +122,6 @@ static ssize_t mwl_debugfs_info_read(struct file *file, char __user *ubuf,
"macid used: %08x\n", priv->macids_used);
len += scnprintf(p + len, size - len,
"qe trigger number: %d\n", priv->qe_trigger_num);
- len += scnprintf(p + len, size - len,
- "mfg mode: %s\n", priv->mfg_mode ? "true" : "false");
len += scnprintf(p + len, size - len, "\n");
ret = simple_read_from_buffer(ubuf, count, ppos, p, len);
diff --git a/dev.h b/dev.h
index 73a6089..8a58a6a 100644
--- a/dev.h
+++ b/dev.h
@@ -382,8 +382,6 @@ struct mwl_priv {
u32 quiet_period;
int temperature;
- bool mfg_mode;
-
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_phy;
u32 reg_type;
diff --git a/fwcmd.c b/fwcmd.c
index aff509a..241a43b 100644
--- a/fwcmd.c
+++ b/fwcmd.c
@@ -48,16 +48,6 @@ static bool mwl_fwcmd_chk_adapter(struct mwl_priv *priv)
static void mwl_fwcmd_send_cmd(struct mwl_priv *priv)
{
- if (priv->mfg_mode) {
- struct cmd_header *cmd_hdr =
- (struct cmd_header *)&priv->pcmd_buf[2];
- u16 len = le16_to_cpu(cmd_hdr->len);
-
- writel(priv->pphys_cmd_buf, priv->iobase1 + 0xcd0);
- writel(0x00, priv->iobase1 + 0xcd4);
- writel(0x00, priv->iobase1 + MACREG_REG_INT_CODE);
- writel(len + 4, priv->iobase1 + 0xc40);
- }
writel(priv->pphys_cmd_buf, priv->iobase1 + MACREG_REG_GEN_PTR);
writel(MACREG_H2ARIC_BIT_DOOR_BELL,
priv->iobase1 + MACREG_REG_H2A_INTERRUPT_EVENTS);
@@ -129,10 +119,7 @@ static int mwl_fwcmd_wait_complete(struct mwl_priv *priv, unsigned short cmd)
unsigned short int_code = 0;
do {
- if (priv->mfg_mode)
- int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[2]));
- else
- int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[0]));
+ int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[0]));
mdelay(1);
} while ((int_code != cmd) && (--curr_iteration));
@@ -847,9 +834,6 @@ int mwl_fwcmd_get_hw_specs(struct ieee80211_hw *hw)
int retry;
int i;
- if (priv->mfg_mode)
- return 0;
-
pcmd = (struct hostcmd_cmd_get_hw_spec *)&priv->pcmd_buf[0];
mutex_lock(&priv->fwcmd_mutex);
@@ -903,9 +887,6 @@ int mwl_fwcmd_set_hw_specs(struct ieee80211_hw *hw)
struct hostcmd_cmd_set_hw_spec *pcmd;
int i;
- if (priv->mfg_mode)
- return 0;
-
pcmd = (struct hostcmd_cmd_set_hw_spec *)&priv->pcmd_buf[0];
mutex_lock(&priv->fwcmd_mutex);
@@ -983,9 +964,6 @@ int mwl_fwcmd_set_radio_preamble(struct ieee80211_hw *hw, bool short_preamble)
struct mwl_priv *priv = hw->priv;
int rc;
- if (priv->mfg_mode)
- return 0;
-
priv->radio_short_preamble = short_preamble;
rc = mwl_fwcmd_802_11_radio_control(priv, true, true);
@@ -1246,9 +1224,6 @@ int mwl_fwcmd_rf_antenna(struct ieee80211_hw *hw, int dir, int antenna)
struct mwl_priv *priv = hw->priv;
struct hostcmd_cmd_802_11_rf_antenna *pcmd;
- if (priv->mfg_mode)
- return 0;
-
pcmd = (struct hostcmd_cmd_802_11_rf_antenna *)&priv->pcmd_buf[0];
mutex_lock(&priv->fwcmd_mutex);
diff --git a/fwdl.c b/fwdl.c
index e305031..4aad821 100644
--- a/fwdl.c
+++ b/fwdl.c
@@ -22,9 +22,6 @@
#include "sysadpt.h"
#include "dev.h"
#include "fwcmd.h"
-#ifdef SUPPORT_MFG
-#include "mfg.h"
-#endif
#include "fwdl.h"
#define FW_DOWNLOAD_BLOCK_SIZE 256
@@ -60,12 +57,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw)
u32 size_fw_downloaded = 0;
u32 int_code = 0;
u32 len = 0;
-#ifdef SUPPORT_MFG
- u32 fwreadysignature = (priv->mfg_mode && priv->chip_type == MWL8897) ?
- MFG_FW_READY_SIGNATURE : HOSTCMD_SOFTAP_FWRDY_SIGNATURE;
-#else
u32 fwreadysignature = HOSTCMD_SOFTAP_FWRDY_SIGNATURE;
-#endif
fw = priv->fw_ucode;
@@ -162,19 +154,12 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw)
*((u32 *)&priv->pcmd_buf[1]) = 0;
mwl_fwdl_trig_pcicmd(priv);
curr_iteration = FW_MAX_NUM_CHECKS;
- if (priv->mfg_mode && priv->chip_type == MWL8897)
- writel(fwreadysignature, priv->iobase1 + 0xcf0);
do {
curr_iteration--;
- if (priv->mfg_mode && priv->chip_type == MWL8897) {
- mdelay(FW_CHECK_MSECS);
- int_code = readl(priv->iobase1 + 0xc44);
- } else {
- writel(HOSTCMD_SOFTAP_MODE,
- priv->iobase1 + MACREG_REG_GEN_PTR);
- mdelay(FW_CHECK_MSECS);
- int_code = readl(priv->iobase1 + MACREG_REG_INT_CODE);
- }
+ writel(HOSTCMD_SOFTAP_MODE,
+ priv->iobase1 + MACREG_REG_GEN_PTR);
+ mdelay(FW_CHECK_MSECS);
+ int_code = readl(priv->iobase1 + MACREG_REG_INT_CODE);
if (!(curr_iteration % 0xff) && (int_code != 0))
wiphy_err(hw->wiphy, "%x;", int_code);
} while ((curr_iteration) &&
diff --git a/main.c b/main.c
index 30b3691..5d8b421 100644
--- a/main.c
+++ b/main.c
@@ -31,9 +31,6 @@
#ifdef CONFIG_DEBUG_FS
#include "debugfs.h"
#endif
-#ifdef SUPPORT_MFG
-#include "mfg.h"
-#endif
#define MWL_DESC "Marvell 802.11ac Wireless Network Driver"
#define MWL_DEV_NAME "Marvell 802.11ac Adapter"
@@ -208,32 +205,21 @@ static int mwl_init_firmware(struct mwl_priv *priv, const char *fw_name)
{
int rc = 0;
-#ifdef SUPPORT_MFG
- if (priv->mfg_mode)
- rc = mwl_mfg_request_firmware(priv);
- else
-#endif
- rc = request_firmware((const struct firmware **)&priv->fw_ucode,
- fw_name, priv->dev);
+ rc = request_firmware((const struct firmware **)&priv->fw_ucode,
+ fw_name, priv->dev);
if (rc) {
- if (priv->mfg_mode)
- wiphy_err(priv->hw->wiphy, "cannot find firmware\n");
- else
- wiphy_err(priv->hw->wiphy,
- "%s: cannot find firmware image <%s>\n",
+ wiphy_err(priv->hw->wiphy,
+ "%s: cannot find firmware image <%s>\n",
MWL_DRV_NAME, fw_name);
goto err_load_fw;
}
rc = mwl_fwdl_download_firmware(priv->hw);
if (rc) {
- if (priv->mfg_mode)
- wiphy_err(priv->hw->wiphy, "download firmware fail\n");
- else
- wiphy_err(priv->hw->wiphy,
- "%s: cannot download firmware image <%s>\n",
- MWL_DRV_NAME, fw_name);
+ wiphy_err(priv->hw->wiphy,
+ "%s: cannot download firmware image <%s>\n",
+ MWL_DRV_NAME, fw_name);
goto err_download_fw;
}
@@ -241,12 +227,7 @@ static int mwl_init_firmware(struct mwl_priv *priv, const char *fw_name)
err_download_fw:
-#ifdef SUPPORT_MFG
- if (priv->mfg_mode)
- mwl_mfg_release_firmware(priv);
- else
-#endif
- release_firmware(priv->fw_ucode);
+ release_firmware(priv->fw_ucode);
err_load_fw:
@@ -813,11 +794,6 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
fw_name = mwl_chip_tbl[priv->chip_type].fw_image;
-#ifdef SUPPORT_MFG
- if (mfg_mode)
- mwl_mfg_handler_init(priv);
-#endif
-
rc = mwl_init_firmware(priv, fw_name);
if (rc) {
@@ -827,12 +803,7 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
/* firmware is loaded to H/W, it can be released now */
-#ifdef SUPPORT_MFG
- if (priv->mfg_mode)
- mwl_mfg_release_firmware(priv);
- else
-#endif
- release_firmware(priv->fw_ucode);
+ release_firmware(priv->fw_ucode);
mwl_process_of_dts(priv);