iwlwifi: mvm: rs: add logs for the wrong antenna case

In case that rate's antenna is wrong at the init stage, it's
very hard to say what went wrong. Add debug data to the already
existing WARN_ON_ONCE.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
Gregory Greenman 2017-04-24 09:24:37 +03:00 committed by Luca Coelho
parent 28269897c6
commit 8f6438f72a
2 changed files with 6 additions and 1 deletions

View File

@ -131,6 +131,7 @@ enum iwl_led_mode {
/* Antenna presence definitions */
#define ANT_NONE 0x0
#define ANT_INVALID 0xff
#define ANT_A BIT(0)
#define ANT_B BIT(1)
#define ANT_C BIT(2)

View File

@ -2836,7 +2836,11 @@ static void rs_initialize_lq(struct iwl_mvm *mvm,
rs_get_initial_rate(mvm, sta, lq_sta, band, rate);
rs_init_optimal_rate(mvm, sta, lq_sta);
WARN_ON_ONCE(rate->ant != ANT_A && rate->ant != ANT_B);
WARN_ONCE(rate->ant != ANT_A && rate->ant != ANT_B,
"ant: 0x%x, chains 0x%x, fw tx ant: 0x%x, nvm tx ant: 0x%x\n",
rate->ant, lq_sta->pers.chains, mvm->fw->valid_tx_ant,
mvm->nvm_data ? mvm->nvm_data->valid_tx_ant : ANT_INVALID);
tbl->column = rs_get_column_from_rate(rate);
rs_set_expected_tpt_table(lq_sta, tbl);