Commit a643565e authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by John W. Linville
Browse files

iwlwifi: print rx_on config to help debug



To help debug rx related issues, if IWL_DEBUG_RADIO flag is set, print
the rxon configuration when rxon host command send to uCode.
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a3b6bd5b
...@@ -133,6 +133,7 @@ int iwl_commit_rxon(struct iwl_priv *priv) ...@@ -133,6 +133,7 @@ int iwl_commit_rxon(struct iwl_priv *priv)
} }
memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon));
iwl_print_rx_config_cmd(priv);
return 0; return 0;
} }
...@@ -228,6 +229,7 @@ int iwl_commit_rxon(struct iwl_priv *priv) ...@@ -228,6 +229,7 @@ int iwl_commit_rxon(struct iwl_priv *priv)
} }
memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon));
} }
iwl_print_rx_config_cmd(priv);
iwl_init_sensitivity(priv); iwl_init_sensitivity(priv);
......
...@@ -1328,7 +1328,7 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) ...@@ -1328,7 +1328,7 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
EXPORT_SYMBOL(iwl_rx_csa); EXPORT_SYMBOL(iwl_rx_csa);
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
static void iwl_print_rx_config_cmd(struct iwl_priv *priv) void iwl_print_rx_config_cmd(struct iwl_priv *priv)
{ {
struct iwl_rxon_cmd *rxon = &priv->staging_rxon; struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
...@@ -1346,6 +1346,7 @@ static void iwl_print_rx_config_cmd(struct iwl_priv *priv) ...@@ -1346,6 +1346,7 @@ static void iwl_print_rx_config_cmd(struct iwl_priv *priv)
IWL_DEBUG_RADIO(priv, "u8[6] bssid_addr: %pM\n", rxon->bssid_addr); IWL_DEBUG_RADIO(priv, "u8[6] bssid_addr: %pM\n", rxon->bssid_addr);
IWL_DEBUG_RADIO(priv, "u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); IWL_DEBUG_RADIO(priv, "u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
} }
EXPORT_SYMBOL(iwl_print_rx_config_cmd);
#endif #endif
/** /**
* iwl_irq_handle_error - called for HW or SW error interrupt from card * iwl_irq_handle_error - called for HW or SW error interrupt from card
......
...@@ -579,6 +579,7 @@ int iwl_pci_resume(struct pci_dev *pdev); ...@@ -579,6 +579,7 @@ int iwl_pci_resume(struct pci_dev *pdev);
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
void iwl_dump_nic_event_log(struct iwl_priv *priv); void iwl_dump_nic_event_log(struct iwl_priv *priv);
void iwl_dump_nic_error_log(struct iwl_priv *priv); void iwl_dump_nic_error_log(struct iwl_priv *priv);
void iwl_print_rx_config_cmd(struct iwl_priv *priv);
#else #else
static inline void iwl_dump_nic_event_log(struct iwl_priv *priv) static inline void iwl_dump_nic_event_log(struct iwl_priv *priv)
{ {
...@@ -587,6 +588,10 @@ static inline void iwl_dump_nic_event_log(struct iwl_priv *priv) ...@@ -587,6 +588,10 @@ static inline void iwl_dump_nic_event_log(struct iwl_priv *priv)
static inline void iwl_dump_nic_error_log(struct iwl_priv *priv) static inline void iwl_dump_nic_error_log(struct iwl_priv *priv)
{ {
} }
static inline void iwl_print_rx_config_cmd(struct iwl_priv *priv)
{
}
#endif #endif
void iwl_clear_isr_stats(struct iwl_priv *priv); void iwl_clear_isr_stats(struct iwl_priv *priv);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment