Skip to content

Commit

Permalink
mwl8k: Move tx/rx antenna configuration to mwl8k_probe_hw
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yogesh Ashok Powar authored and John W. Linville committed Jan 30, 2013
1 parent 0f4316b commit a246ac3
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -4814,12 +4814,6 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
goto out;
}

rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_RX, 0x3);
if (rc)
wiphy_warn(hw->wiphy, "failed to set # of RX antennas");
rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_TX, 0x7);
if (rc)
wiphy_warn(hw->wiphy, "failed to set # of TX antennas");

} else {
rc = mwl8k_cmd_rf_tx_power(hw, conf->power_level);
Expand Down Expand Up @@ -5709,6 +5703,15 @@ static int mwl8k_probe_hw(struct ieee80211_hw *hw)
goto err_free_irq;
}

/* Configure Antennas */
rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_RX, 0x3);
if (rc)
wiphy_warn(hw->wiphy, "failed to set # of RX antennas");
rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_TX, 0x7);
if (rc)
wiphy_warn(hw->wiphy, "failed to set # of TX antennas");


/* Disable interrupts */
iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
free_irq(priv->pdev->irq, hw);
Expand Down

0 comments on commit a246ac3

Please sign in to comment.