lkml.org 
[lkml]   [2010]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: kernel BUG in iwl-agn-rs.c:2076, WAS: iwlagn + some accesspoint == hardlock

Hi Reinette,

Did the fix like the patch below, applied on top of yours. Builds well,
not tested yet.

Do you ACK this patch?

Thanks,

Nils


# 1) Error messages like:
# iwlagn 0000:03:00.0: expected_tpt should have been calculated by now
# To address (1), could you please run with attached debug patch and also
# enable rate scaling debugging. That will be "modprobe iwlagn
# debug=0x143fff).

# diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
# index b93e491..60e5323 100644
# --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
# +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
# @@ -361,6 +361,8 @@ static int rs_collect_tx_data(struct iwl_rate_scale_data *windows,
# * subtract "1" from the success counter (this is the main reason
# * we keep these bitmaps!).
# */
# + IWL_DEBUG_RATE(priv, "attempts = %d, window->counter = %d\n",
# + attempts, window->counter);
# while (attempts > 0) {
# if (window->counter >= IWL_RATE_MAX_WINDOW) {
#
# @@ -389,6 +391,7 @@ static int rs_collect_tx_data(struct iwl_rate_scale_data *windows,
# attempts--;
# }
#
# + IWL_DEBUG_RATE(priv, "window counter = %d \n", window->counter);
# /* Calculate current success ratio, avoid divide-by-0! */
# if (window->counter > 0)
# window->success_ratio = 128 * (100 * window->success_counter)
# @@ -849,6 +852,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
# * first index into rate scale table.
# */
# if (info->flags & IEEE80211_TX_STAT_AMPDU) {
# + IWL_DEBUG_RATE(priv, "Updating aggregation history\n");
# tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags);
# rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type,
# &rs_index);
# @@ -868,6 +872,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
# * For legacy, update frame history with for each Tx retry.
# */
# retries = info->status.rates[0].count - 1;
# + IWL_DEBUG_RATE(priv, "Updating legacy history. retries = %d \n", retries);
# /* HW doesn't send more than 15 retries */
# retries = min(retries, 15);
#

---

drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6.33.3_clean/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
===================================================================
--- linux-2.6.33.3_clean.orig/drivers/net/wireless/iwlwifi/iwl-agn-rs.c 2010-05-20 14:25:42.000000000 +0200
+++ linux-2.6.33.3_clean/drivers/net/wireless/iwlwifi/iwl-agn-rs.c 2010-05-20 14:26:50.000000000 +0200
@@ -341,7 +341,7 @@
*/
static int rs_collect_tx_data(struct iwl_rate_scale_data *windows,
int scale_index, s32 tpt, int attempts,
- int successes)
+ int successes, struct iwl_priv *priv)
{
struct iwl_rate_scale_data *window = NULL;
static const u64 mask = (((u64)1) << (IWL_RATE_MAX_WINDOW - 1));
@@ -859,7 +859,7 @@
tpt = get_expected_tpt(curr_tbl, rs_index);
rs_collect_tx_data(window, rs_index, tpt,
info->status.ampdu_ack_len,
- info->status.ampdu_ack_map);
+ info->status.ampdu_ack_map, priv);

/* Update success/fail counts if not searching for new mode */
if (lq_sta->stay_in_tbl) {
@@ -897,10 +897,10 @@
/* Constants mean 1 transmission, 0 successes */
if (i < retries)
rs_collect_tx_data(window, rs_index, tpt, 1,
- 0);
+ 0, priv);
else
rs_collect_tx_data(window, rs_index, tpt, 1,
- legacy_success);
+ legacy_success, priv);
}

/* Update success/fail counts if not searching for new mode */

\
 
 \ /
  Last update: 2010-05-20 16:35    [W:0.101 / U:1.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site