diff options
author | David Lin <dlin@marvell.com> | 2015-12-16 09:57:13 +0800 |
---|---|---|
committer | David Lin <dlin@marvell.com> | 2015-12-16 09:57:13 +0800 |
commit | 1f938d717ace43ba0df2245b29a5bf154b515e60 (patch) | |
tree | 336e6a55f7375a6d4b41c22a066d3fa574ae2220 | |
parent | c8165c47910169d6d73983b11743fa75941b5b76 (diff) |
Let messages printed out be more user friendly.
Signed-off-by: David Lin <dlin@marvell.com>
-rw-r--r-- | fwdl.c | 12 | ||||
-rw-r--r-- | main.c | 39 |
2 files changed, 20 insertions, 31 deletions
@@ -88,7 +88,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) * reside on its respective blocks such as ITCM, DTCM, SQRAM, * (or even DDR, AFTER DDR is init'd before fw download */ - wiphy_info(hw->wiphy, "fw download start 88\n"); + wiphy_debug(hw->wiphy, "fw download start\n"); /* Disable PFU before FWDL */ writel(0x100, priv->iobase1 + 0xE0E4); @@ -149,9 +149,9 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) size_fw_downloaded += len; } - wiphy_info(hw->wiphy, - "FwSize = %d downloaded Size = %d curr_iteration %d\n", - (int)fw->size, size_fw_downloaded, curr_iteration); + wiphy_debug(hw->wiphy, + "FwSize = %d downloaded Size = %d curr_iteration %d\n", + (int)fw->size, size_fw_downloaded, curr_iteration); /* Now firware is downloaded successfully, so this part is to check * whether fw can properly execute to an extent that write back @@ -175,7 +175,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) mdelay(FW_CHECK_MSECS); int_code = readl(priv->iobase1 + 0xc44); } - if (!(curr_iteration % 0xff)) + if (!(curr_iteration % 0xff) && (int_code != 0)) wiphy_err(hw->wiphy, "%x;", int_code); } while ((curr_iteration) && (int_code != fwreadysignature)); @@ -186,7 +186,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) goto err_download; } - wiphy_info(hw->wiphy, "complete\n"); + wiphy_debug(hw->wiphy, "fw download complete\n"); writel(0x00, priv->iobase1 + MACREG_REG_INT_CODE); return 0; @@ -338,8 +338,7 @@ static void mwl_reg_notifier(struct wiphy *wiphy, } /* Dump loaded power tabel */ - wiphy_info(hw->wiphy, "%s: %s\n", dev_name(&wiphy->dev), - prop->name); + wiphy_debug(hw->wiphy, "regdomain: %s\n", prop->name); for (i = 0; i < SYSADPT_MAX_NUM_CHANNELS; i++) { struct mwl_tx_pwr_tbl *pwr_tbl; char disp_buf[64]; @@ -348,12 +347,12 @@ static void mwl_reg_notifier(struct wiphy *wiphy, pwr_tbl = &priv->tx_pwr_tbl[i]; if (pwr_tbl->channel == 0) break; - wiphy_info(hw->wiphy, - "Channel: %d: 0x%x 0x%x 0x%x\n", - pwr_tbl->channel, - pwr_tbl->setcap, - pwr_tbl->cdd, - pwr_tbl->txantenna2); + wiphy_debug(hw->wiphy, + "Channel: %d: 0x%x 0x%x 0x%x\n", + pwr_tbl->channel, + pwr_tbl->setcap, + pwr_tbl->cdd, + pwr_tbl->txantenna2); disp_ptr = disp_buf; for (j = 0; j < SYSADPT_TX_POWER_LEVEL_TOTAL; j++) { @@ -361,7 +360,7 @@ static void mwl_reg_notifier(struct wiphy *wiphy, sprintf(disp_ptr, "%x ", pwr_tbl->tx_power[j]); } - wiphy_info(hw->wiphy, "%s\n", disp_buf); + wiphy_debug(hw->wiphy, "%s\n", disp_buf); } } } @@ -799,23 +798,13 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto err_wl_init; } - wiphy_info(priv->hw->wiphy, - "2G: %s\n", priv->disable_2g ? "disable" : "enable"); - wiphy_info(priv->hw->wiphy, - "5G: %s\n", priv->disable_5g ? "disable" : "enable"); + wiphy_info(priv->hw->wiphy, "2G %s, 5G %s\n", + priv->disable_2g ? "disabled" : "enabled", + priv->disable_5g ? "disabled" : "enabled"); - if (priv->antenna_tx == ANTENNA_TX_4_AUTO) - wiphy_info(priv->hw->wiphy, "TX: 4 antennas\n"); - else if (priv->antenna_tx == ANTENNA_TX_2) - wiphy_info(priv->hw->wiphy, "TX: 2 antennas\n"); - else - wiphy_info(priv->hw->wiphy, "TX: unknown\n"); - if (priv->antenna_rx == ANTENNA_RX_4_AUTO) - wiphy_info(priv->hw->wiphy, "RX: 4 antennas\n"); - else if (priv->antenna_rx == ANTENNA_RX_2) - wiphy_info(priv->hw->wiphy, "RX: 2 antennas\n"); - else - wiphy_info(priv->hw->wiphy, "RX: unknown\n"); + wiphy_info(priv->hw->wiphy, "%s TX antennas, %s RX antennas\n", + (priv->antenna_tx == ANTENNA_TX_4_AUTO) ? "4" : "2", + (priv->antenna_rx == ANTENNA_RX_4_AUTO) ? "4" : "2"); #ifdef CONFIG_DEBUG_FS mwl_debugfs_init(hw); |