diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-06-17 18:25:00 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-25 17:52:47 -0400 |
commit | 680788aca3dcc24b932eb7a4219ab921ac5bf2d0 (patch) | |
tree | f896dc83bd04df3c2fd001c844e4a6132b78fda3 | |
parent | 178d1596073e81927a24221dba6c55ae0048a207 (diff) |
iwlwifi: add a mechanism to disable plcp error checking
For some devices, especially the upcoming new devices, the plcp error
rate is different. Before the correct error rate can be determine, also
for the debugging purpose; add the mechanism to disable plcp error checking
which cause radio reset happen.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rx.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 3 |
4 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 93d513e14186..a07310fefcf2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -406,6 +406,11 @@ static bool iwl3945_good_plcp_health(struct iwl_priv *priv, | |||
406 | unsigned int plcp_msec; | 406 | unsigned int plcp_msec; |
407 | unsigned long plcp_received_jiffies; | 407 | unsigned long plcp_received_jiffies; |
408 | 408 | ||
409 | if (priv->cfg->plcp_delta_threshold == | ||
410 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { | ||
411 | IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); | ||
412 | return rc; | ||
413 | } | ||
409 | memcpy(¤t_stat, pkt->u.raw, sizeof(struct | 414 | memcpy(¤t_stat, pkt->u.raw, sizeof(struct |
410 | iwl3945_notif_statistics)); | 415 | iwl3945_notif_statistics)); |
411 | /* | 416 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index ad2bead25c82..d54edc326f81 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
@@ -166,6 +166,12 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
166 | unsigned int plcp_msec; | 166 | unsigned int plcp_msec; |
167 | unsigned long plcp_received_jiffies; | 167 | unsigned long plcp_received_jiffies; |
168 | 168 | ||
169 | if (priv->cfg->plcp_delta_threshold == | ||
170 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { | ||
171 | IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); | ||
172 | return rc; | ||
173 | } | ||
174 | |||
169 | /* | 175 | /* |
170 | * check for plcp_err and trigger radio reset if it exceeds | 176 | * check for plcp_err and trigger radio reset if it exceeds |
171 | * the plcp error threshold plcp_delta. | 177 | * the plcp error threshold plcp_delta. |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index cee3d12eb383..7d9ffc1575de 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -1430,10 +1430,10 @@ static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file, | |||
1430 | return -EFAULT; | 1430 | return -EFAULT; |
1431 | if (sscanf(buf, "%d", &plcp) != 1) | 1431 | if (sscanf(buf, "%d", &plcp) != 1) |
1432 | return -EINVAL; | 1432 | return -EINVAL; |
1433 | if ((plcp <= IWL_MAX_PLCP_ERR_THRESHOLD_MIN) || | 1433 | if ((plcp < IWL_MAX_PLCP_ERR_THRESHOLD_MIN) || |
1434 | (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX)) | 1434 | (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX)) |
1435 | priv->cfg->plcp_delta_threshold = | 1435 | priv->cfg->plcp_delta_threshold = |
1436 | IWL_MAX_PLCP_ERR_THRESHOLD_DEF; | 1436 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE; |
1437 | else | 1437 | else |
1438 | priv->cfg->plcp_delta_threshold = plcp; | 1438 | priv->cfg->plcp_delta_threshold = plcp; |
1439 | return count; | 1439 | return count; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 1af845c0f0b9..df07a144c786 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1036,11 +1036,12 @@ struct iwl_event_log { | |||
1036 | * This is the threshold value of plcp error rate per 100mSecs. It is | 1036 | * This is the threshold value of plcp error rate per 100mSecs. It is |
1037 | * used to set and check for the validity of plcp_delta. | 1037 | * used to set and check for the validity of plcp_delta. |
1038 | */ | 1038 | */ |
1039 | #define IWL_MAX_PLCP_ERR_THRESHOLD_MIN (0) | 1039 | #define IWL_MAX_PLCP_ERR_THRESHOLD_MIN (1) |
1040 | #define IWL_MAX_PLCP_ERR_THRESHOLD_DEF (50) | 1040 | #define IWL_MAX_PLCP_ERR_THRESHOLD_DEF (50) |
1041 | #define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF (100) | 1041 | #define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF (100) |
1042 | #define IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF (200) | 1042 | #define IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF (200) |
1043 | #define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255) | 1043 | #define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255) |
1044 | #define IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE (0) | ||
1044 | 1045 | ||
1045 | #define IWL_DELAY_NEXT_FORCE_RF_RESET (HZ*3) | 1046 | #define IWL_DELAY_NEXT_FORCE_RF_RESET (HZ*3) |
1046 | #define IWL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5) | 1047 | #define IWL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5) |