diff options
author | David Lin <dlin@marvell.com> | 2016-06-01 15:19:02 +0800 |
---|---|---|
committer | David Lin <dlin@marvell.com> | 2016-06-01 15:19:02 +0800 |
commit | af93c39bdce22b3bd1a12e6fb2a1097f9a448ecf (patch) | |
tree | 36c24edf690b61f9fcfa33346d58bd8c64ebd852 | |
parent | 6bacc5aa695a1f890a8842f58762a5e5e249ccea (diff) |
Removed code related to MFG.
Signed-off-by: David Lin <dlin@marvell.com>
-rw-r--r-- | debugfs.c | 2 | ||||
-rw-r--r-- | dev.h | 2 | ||||
-rw-r--r-- | fwcmd.c | 27 | ||||
-rw-r--r-- | fwdl.c | 23 | ||||
-rw-r--r-- | main.c | 47 |
5 files changed, 14 insertions, 87 deletions
@@ -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); @@ -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; @@ -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); @@ -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) && @@ -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); |