Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300983
b: refs/heads/master
c: 66cd9e3
h: refs/heads/master
i:
  300981: 9fd1b09
  300979: be0cef3
  300975: 7f88413
v: v3
  • Loading branch information
Meenakshi Venkataraman authored and Wey-Yi Guy committed Apr 12, 2012
1 parent e7d2953 commit fd48ead
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 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: 1591129d545760e6925bd48b15ce1ff7c25a5df8
refs/heads/master: 66cd9e39c6c0a870f12828b5f5b9e1d2e7c70313
39 changes: 39 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,45 @@ static bool iwlagn_good_plcp_health(struct iwl_priv *priv,
return true;
}

int iwl_force_rf_reset(struct iwl_priv *priv, bool external)
{
struct iwl_rf_reset *rf_reset;

if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return -EAGAIN;

if (!iwl_is_any_associated(priv)) {
IWL_DEBUG_SCAN(priv, "force reset rejected: not associated\n");
return -ENOLINK;
}

rf_reset = &priv->rf_reset;
rf_reset->reset_request_count++;
if (!external && rf_reset->last_reset_jiffies &&
time_after(rf_reset->last_reset_jiffies +
IWL_DELAY_NEXT_FORCE_RF_RESET, jiffies)) {
IWL_DEBUG_INFO(priv, "RF reset rejected\n");
rf_reset->reset_reject_count++;
return -EAGAIN;
}
rf_reset->reset_success_count++;
rf_reset->last_reset_jiffies = jiffies;

/*
* There is no easy and better way to force reset the radio,
* the only known method is switching channel which will force to
* reset and tune the radio.
* Use internal short scan (single channel) operation to should
* achieve this objective.
* Driver should reset the radio when number of consecutive missed
* beacon, or any other uCode error condition detected.
*/
IWL_DEBUG_INFO(priv, "perform radio reset.\n");
iwl_internal_short_hw_scan(priv);
return 0;
}


static void iwlagn_recover_from_statistics(struct iwl_priv *priv,
struct statistics_rx_phy *cur_ofdm,
struct statistics_rx_ht_phy *cur_ofdm_ht,
Expand Down
39 changes: 0 additions & 39 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,45 +277,6 @@ void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len)
}
#endif

int iwl_force_rf_reset(struct iwl_priv *priv, bool external)
{
struct iwl_rf_reset *rf_reset;

if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return -EAGAIN;

if (!iwl_is_any_associated(priv)) {
IWL_DEBUG_SCAN(priv, "force reset rejected: not associated\n");
return -ENOLINK;
}

rf_reset = &priv->rf_reset;
rf_reset->reset_request_count++;
if (!external && rf_reset->last_reset_jiffies &&
time_after(rf_reset->last_reset_jiffies +
IWL_DELAY_NEXT_FORCE_RF_RESET, jiffies)) {
IWL_DEBUG_INFO(priv, "RF reset rejected\n");
rf_reset->reset_reject_count++;
return -EAGAIN;
}
rf_reset->reset_success_count++;
rf_reset->last_reset_jiffies = jiffies;

/*
* There is no easy and better way to force reset the radio,
* the only known method is switching channel which will force to
* reset and tune the radio.
* Use internal short scan (single channel) operation to should
* achieve this objective.
* Driver should reset the radio when number of consecutive missed
* beacon, or any other uCode error condition detected.
*/
IWL_DEBUG_INFO(priv, "perform radio reset.\n");
iwl_internal_short_hw_scan(priv);
return 0;
}


int iwl_cmd_echo_test(struct iwl_priv *priv)
{
int ret;
Expand Down

0 comments on commit fd48ead

Please sign in to comment.