Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266727
b: refs/heads/master
c: 317d09f
h: refs/heads/master
i:
  266725: 9fefd95
  266723: 9d45071
  266719: bb1f479
v: v3
  • Loading branch information
Wey-Yi Guy authored and John W. Linville committed Oct 14, 2011
1 parent d06e01f commit f1c3b82
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05c89b917da27c15c82433bc6fc740548ee1cb35
refs/heads/master: 317d09f76976c5a0b1e758fe45474a47cbea1aef
23 changes: 22 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,10 +1732,31 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
return err;
}

int iwl_cmd_echo_test(struct iwl_priv *priv)
{
struct iwl_host_cmd cmd = {
.id = REPLY_ECHO,
.flags = CMD_SYNC,
};

return iwl_trans_send_cmd(trans(priv), &cmd);
}

static inline int iwl_check_stuck_queue(struct iwl_priv *priv, int txq)
{
if (iwl_trans_check_stuck_queue(trans(priv), txq)) {
int ret = iwl_force_reset(priv, IWL_FW_RESET, false);
int ret;
if (txq == priv->shrd->cmd_queue) {
/*
* validate command queue still working
* by sending "ECHO" command
*/
if (!iwl_cmd_echo_test(priv))
return 0;
else
IWL_DEBUG_HC(priv, "echo testing fail\n");
}
ret = iwl_force_reset(priv, IWL_FW_RESET, false);
return (ret == -EAGAIN) ? 0 : 1;
}
return 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
int iwl_mac_change_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
enum nl80211_iftype newtype, bool newp2p);
int iwl_cmd_echo_test(struct iwl_priv *priv);
#ifdef CONFIG_IWLWIFI_DEBUGFS
int iwl_alloc_traffic_mem(struct iwl_priv *priv);
void iwl_free_traffic_mem(struct iwl_priv *priv);
Expand Down

0 comments on commit f1c3b82

Please sign in to comment.