diff options
author | Yogesh Ashok Powar <yogeshp@marvell.com> | 2013-01-25 05:47:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-30 15:06:48 -0500 |
commit | a246ac38cdd886bf053f67d5275a20e1a99ff586 (patch) | |
tree | cab0c425579802eb8fecf923596b1297af643cce /drivers/net | |
parent | 0f4316b97d045e9b5b270cafa4b924769699eb3d (diff) |
mwl8k: Move tx/rx antenna configuration to mwl8k_probe_hw
This avoids calling mwl8k_cmd_rf_antenna functions every
time mwl8k_config function is called.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 78a89f6426b1..b17ef49f9303 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -4814,12 +4814,6 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed) | |||
4814 | goto out; | 4814 | goto out; |
4815 | } | 4815 | } |
4816 | 4816 | ||
4817 | rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_RX, 0x3); | ||
4818 | if (rc) | ||
4819 | wiphy_warn(hw->wiphy, "failed to set # of RX antennas"); | ||
4820 | rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_TX, 0x7); | ||
4821 | if (rc) | ||
4822 | wiphy_warn(hw->wiphy, "failed to set # of TX antennas"); | ||
4823 | 4817 | ||
4824 | } else { | 4818 | } else { |
4825 | rc = mwl8k_cmd_rf_tx_power(hw, conf->power_level); | 4819 | rc = mwl8k_cmd_rf_tx_power(hw, conf->power_level); |
@@ -5709,6 +5703,15 @@ static int mwl8k_probe_hw(struct ieee80211_hw *hw) | |||
5709 | goto err_free_irq; | 5703 | goto err_free_irq; |
5710 | } | 5704 | } |
5711 | 5705 | ||
5706 | /* Configure Antennas */ | ||
5707 | rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_RX, 0x3); | ||
5708 | if (rc) | ||
5709 | wiphy_warn(hw->wiphy, "failed to set # of RX antennas"); | ||
5710 | rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_TX, 0x7); | ||
5711 | if (rc) | ||
5712 | wiphy_warn(hw->wiphy, "failed to set # of TX antennas"); | ||
5713 | |||
5714 | |||
5712 | /* Disable interrupts */ | 5715 | /* Disable interrupts */ |
5713 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); | 5716 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); |
5714 | free_irq(priv->pdev->irq, hw); | 5717 | free_irq(priv->pdev->irq, hw); |