diff options
author | Oren Givon <oren.givon@intel.com> | 2013-08-19 08:36:48 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-02 18:00:32 +0200 |
commit | 91b05d103545500285790a09d02e763a61f2020f (patch) | |
tree | 524142d71960fcd2c1b964c7cf7a963d0d9d8360 /drivers/net/wireless/iwlwifi/mvm/scan.c | |
parent | 4ac6cb59faefc3143d8d4589549a6c2a7ccaefe9 (diff) | |
download | op-kernel-dev-91b05d103545500285790a09d02e763a61f2020f.zip op-kernel-dev-91b05d103545500285790a09d02e763a61f2020f.tar.gz |
iwlwifi: mvm: debugfs: add an option to set antennas for scan command
Add an option to set rx antennas for the scan command from debugfs.
Create a file called ant_rxchain in the mvm debugfs directory.
To choose antennas, write a number between 1-7 to ant_rxchain.
Write 1 for A, 2 for B, 3 for AB and so on.
Signed-off-by: Oren Givon <oren.givon@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index 9a7ab84..71170fc 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c @@ -74,8 +74,12 @@ static inline __le16 iwl_mvm_scan_rx_chain(struct iwl_mvm *mvm) { u16 rx_chain; - u8 rx_ant = iwl_fw_valid_rx_ant(mvm->fw); + u8 rx_ant; + if (mvm->scan_rx_ant != ANT_NONE) + rx_ant = mvm->scan_rx_ant; + else + rx_ant = iwl_fw_valid_rx_ant(mvm->fw); rx_chain = rx_ant << PHY_RX_CHAIN_VALID_POS; rx_chain |= rx_ant << PHY_RX_CHAIN_FORCE_MIMO_SEL_POS; rx_chain |= rx_ant << PHY_RX_CHAIN_FORCE_SEL_POS; |