diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-08-26 09:43:47 -0400 |
---|---|---|
committer | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 06:26:28 -0500 |
commit | ebf0d90d12cf013019005a8ee7d1bc8599935356 (patch) | |
tree | f27891764f31133a39f2a6f3280987e3612a75e7 /drivers/net/wireless/iwlegacy | |
parent | b73bb5f13bb60735a846b73125e297ab6e3eece5 (diff) |
iwlegacy: s/statistics/stats/
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
20 files changed, 304 insertions, 304 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-debugfs.c b/drivers/net/wireless/iwlegacy/iwl-3945-debugfs.c index 40e3a7065f23..88b3d8fc38f8 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945-debugfs.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945-debugfs.c | |||
@@ -29,22 +29,22 @@ | |||
29 | #include "iwl-3945-debugfs.h" | 29 | #include "iwl-3945-debugfs.h" |
30 | 30 | ||
31 | 31 | ||
32 | static int il3945_statistics_flag(struct il_priv *il, char *buf, int bufsz) | 32 | static int il3945_stats_flag(struct il_priv *il, char *buf, int bufsz) |
33 | { | 33 | { |
34 | int p = 0; | 34 | int p = 0; |
35 | 35 | ||
36 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", | 36 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", |
37 | le32_to_cpu(il->_3945.statistics.flag)); | 37 | le32_to_cpu(il->_3945.stats.flag)); |
38 | if (le32_to_cpu(il->_3945.statistics.flag) & | 38 | if (le32_to_cpu(il->_3945.stats.flag) & |
39 | UCODE_STATISTICS_CLEAR_MSK) | 39 | UCODE_STATISTICS_CLEAR_MSK) |
40 | p += scnprintf(buf + p, bufsz - p, | 40 | p += scnprintf(buf + p, bufsz - p, |
41 | "\tStatistics have been cleared\n"); | 41 | "\tStatistics have been cleared\n"); |
42 | p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n", | 42 | p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n", |
43 | (le32_to_cpu(il->_3945.statistics.flag) & | 43 | (le32_to_cpu(il->_3945.stats.flag) & |
44 | UCODE_STATISTICS_FREQUENCY_MSK) | 44 | UCODE_STATISTICS_FREQUENCY_MSK) |
45 | ? "2.4 GHz" : "5.2 GHz"); | 45 | ? "2.4 GHz" : "5.2 GHz"); |
46 | p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n", | 46 | p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n", |
47 | (le32_to_cpu(il->_3945.statistics.flag) & | 47 | (le32_to_cpu(il->_3945.stats.flag) & |
48 | UCODE_STATISTICS_NARROW_BAND_MSK) | 48 | UCODE_STATISTICS_NARROW_BAND_MSK) |
49 | ? "enabled" : "disabled"); | 49 | ? "enabled" : "disabled"); |
50 | return p; | 50 | return p; |
@@ -57,14 +57,14 @@ ssize_t il3945_ucode_rx_stats_read(struct file *file, | |||
57 | struct il_priv *il = file->private_data; | 57 | struct il_priv *il = file->private_data; |
58 | int pos = 0; | 58 | int pos = 0; |
59 | char *buf; | 59 | char *buf; |
60 | int bufsz = sizeof(struct iwl39_statistics_rx_phy) * 40 + | 60 | int bufsz = sizeof(struct iwl39_stats_rx_phy) * 40 + |
61 | sizeof(struct iwl39_statistics_rx_non_phy) * 40 + 400; | 61 | sizeof(struct iwl39_stats_rx_non_phy) * 40 + 400; |
62 | ssize_t ret; | 62 | ssize_t ret; |
63 | struct iwl39_statistics_rx_phy *ofdm, *accum_ofdm, *delta_ofdm, | 63 | struct iwl39_stats_rx_phy *ofdm, *accum_ofdm, *delta_ofdm, |
64 | *max_ofdm; | 64 | *max_ofdm; |
65 | struct iwl39_statistics_rx_phy *cck, *accum_cck, *delta_cck, *max_cck; | 65 | struct iwl39_stats_rx_phy *cck, *accum_cck, *delta_cck, *max_cck; |
66 | struct iwl39_statistics_rx_non_phy *general, *accum_general; | 66 | struct iwl39_stats_rx_non_phy *general, *accum_general; |
67 | struct iwl39_statistics_rx_non_phy *delta_general, *max_general; | 67 | struct iwl39_stats_rx_non_phy *delta_general, *max_general; |
68 | 68 | ||
69 | if (!il_is_alive(il)) | 69 | if (!il_is_alive(il)) |
70 | return -EAGAIN; | 70 | return -EAGAIN; |
@@ -77,23 +77,23 @@ ssize_t il3945_ucode_rx_stats_read(struct file *file, | |||
77 | 77 | ||
78 | /* | 78 | /* |
79 | * The statistic information display here is based on | 79 | * The statistic information display here is based on |
80 | * the last statistics notification from uCode | 80 | * the last stats notification from uCode |
81 | * might not reflect the current uCode activity | 81 | * might not reflect the current uCode activity |
82 | */ | 82 | */ |
83 | ofdm = &il->_3945.statistics.rx.ofdm; | 83 | ofdm = &il->_3945.stats.rx.ofdm; |
84 | cck = &il->_3945.statistics.rx.cck; | 84 | cck = &il->_3945.stats.rx.cck; |
85 | general = &il->_3945.statistics.rx.general; | 85 | general = &il->_3945.stats.rx.general; |
86 | accum_ofdm = &il->_3945.accum_statistics.rx.ofdm; | 86 | accum_ofdm = &il->_3945.accum_stats.rx.ofdm; |
87 | accum_cck = &il->_3945.accum_statistics.rx.cck; | 87 | accum_cck = &il->_3945.accum_stats.rx.cck; |
88 | accum_general = &il->_3945.accum_statistics.rx.general; | 88 | accum_general = &il->_3945.accum_stats.rx.general; |
89 | delta_ofdm = &il->_3945.delta_statistics.rx.ofdm; | 89 | delta_ofdm = &il->_3945.delta_stats.rx.ofdm; |
90 | delta_cck = &il->_3945.delta_statistics.rx.cck; | 90 | delta_cck = &il->_3945.delta_stats.rx.cck; |
91 | delta_general = &il->_3945.delta_statistics.rx.general; | 91 | delta_general = &il->_3945.delta_stats.rx.general; |
92 | max_ofdm = &il->_3945.max_delta.rx.ofdm; | 92 | max_ofdm = &il->_3945.max_delta.rx.ofdm; |
93 | max_cck = &il->_3945.max_delta.rx.cck; | 93 | max_cck = &il->_3945.max_delta.rx.cck; |
94 | max_general = &il->_3945.max_delta.rx.general; | 94 | max_general = &il->_3945.max_delta.rx.general; |
95 | 95 | ||
96 | pos += il3945_statistics_flag(il, buf, bufsz); | 96 | pos += il3945_stats_flag(il, buf, bufsz); |
97 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 97 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
98 | "acumulative delta max\n", | 98 | "acumulative delta max\n", |
99 | "Statistics_Rx - OFDM:"); | 99 | "Statistics_Rx - OFDM:"); |
@@ -332,9 +332,9 @@ ssize_t il3945_ucode_tx_stats_read(struct file *file, | |||
332 | struct il_priv *il = file->private_data; | 332 | struct il_priv *il = file->private_data; |
333 | int pos = 0; | 333 | int pos = 0; |
334 | char *buf; | 334 | char *buf; |
335 | int bufsz = (sizeof(struct iwl39_statistics_tx) * 48) + 250; | 335 | int bufsz = (sizeof(struct iwl39_stats_tx) * 48) + 250; |
336 | ssize_t ret; | 336 | ssize_t ret; |
337 | struct iwl39_statistics_tx *tx, *accum_tx, *delta_tx, *max_tx; | 337 | struct iwl39_stats_tx *tx, *accum_tx, *delta_tx, *max_tx; |
338 | 338 | ||
339 | if (!il_is_alive(il)) | 339 | if (!il_is_alive(il)) |
340 | return -EAGAIN; | 340 | return -EAGAIN; |
@@ -347,14 +347,14 @@ ssize_t il3945_ucode_tx_stats_read(struct file *file, | |||
347 | 347 | ||
348 | /* | 348 | /* |
349 | * The statistic information display here is based on | 349 | * The statistic information display here is based on |
350 | * the last statistics notification from uCode | 350 | * the last stats notification from uCode |
351 | * might not reflect the current uCode activity | 351 | * might not reflect the current uCode activity |
352 | */ | 352 | */ |
353 | tx = &il->_3945.statistics.tx; | 353 | tx = &il->_3945.stats.tx; |
354 | accum_tx = &il->_3945.accum_statistics.tx; | 354 | accum_tx = &il->_3945.accum_stats.tx; |
355 | delta_tx = &il->_3945.delta_statistics.tx; | 355 | delta_tx = &il->_3945.delta_stats.tx; |
356 | max_tx = &il->_3945.max_delta.tx; | 356 | max_tx = &il->_3945.max_delta.tx; |
357 | pos += il3945_statistics_flag(il, buf, bufsz); | 357 | pos += il3945_stats_flag(il, buf, bufsz); |
358 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 358 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
359 | "acumulative delta max\n", | 359 | "acumulative delta max\n", |
360 | "Statistics_Tx:"); | 360 | "Statistics_Tx:"); |
@@ -428,12 +428,12 @@ ssize_t il3945_ucode_general_stats_read(struct file *file, | |||
428 | struct il_priv *il = file->private_data; | 428 | struct il_priv *il = file->private_data; |
429 | int pos = 0; | 429 | int pos = 0; |
430 | char *buf; | 430 | char *buf; |
431 | int bufsz = sizeof(struct iwl39_statistics_general) * 10 + 300; | 431 | int bufsz = sizeof(struct iwl39_stats_general) * 10 + 300; |
432 | ssize_t ret; | 432 | ssize_t ret; |
433 | struct iwl39_statistics_general *general, *accum_general; | 433 | struct iwl39_stats_general *general, *accum_general; |
434 | struct iwl39_statistics_general *delta_general, *max_general; | 434 | struct iwl39_stats_general *delta_general, *max_general; |
435 | struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg; | 435 | struct stats_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg; |
436 | struct iwl39_statistics_div *div, *accum_div, *delta_div, *max_div; | 436 | struct iwl39_stats_div *div, *accum_div, *delta_div, *max_div; |
437 | 437 | ||
438 | if (!il_is_alive(il)) | 438 | if (!il_is_alive(il)) |
439 | return -EAGAIN; | 439 | return -EAGAIN; |
@@ -446,22 +446,22 @@ ssize_t il3945_ucode_general_stats_read(struct file *file, | |||
446 | 446 | ||
447 | /* | 447 | /* |
448 | * The statistic information display here is based on | 448 | * The statistic information display here is based on |
449 | * the last statistics notification from uCode | 449 | * the last stats notification from uCode |
450 | * might not reflect the current uCode activity | 450 | * might not reflect the current uCode activity |
451 | */ | 451 | */ |
452 | general = &il->_3945.statistics.general; | 452 | general = &il->_3945.stats.general; |
453 | dbg = &il->_3945.statistics.general.dbg; | 453 | dbg = &il->_3945.stats.general.dbg; |
454 | div = &il->_3945.statistics.general.div; | 454 | div = &il->_3945.stats.general.div; |
455 | accum_general = &il->_3945.accum_statistics.general; | 455 | accum_general = &il->_3945.accum_stats.general; |
456 | delta_general = &il->_3945.delta_statistics.general; | 456 | delta_general = &il->_3945.delta_stats.general; |
457 | max_general = &il->_3945.max_delta.general; | 457 | max_general = &il->_3945.max_delta.general; |
458 | accum_dbg = &il->_3945.accum_statistics.general.dbg; | 458 | accum_dbg = &il->_3945.accum_stats.general.dbg; |
459 | delta_dbg = &il->_3945.delta_statistics.general.dbg; | 459 | delta_dbg = &il->_3945.delta_stats.general.dbg; |
460 | max_dbg = &il->_3945.max_delta.general.dbg; | 460 | max_dbg = &il->_3945.max_delta.general.dbg; |
461 | accum_div = &il->_3945.accum_statistics.general.div; | 461 | accum_div = &il->_3945.accum_stats.general.div; |
462 | delta_div = &il->_3945.delta_statistics.general.div; | 462 | delta_div = &il->_3945.delta_stats.general.div; |
463 | max_div = &il->_3945.max_delta.general.div; | 463 | max_div = &il->_3945.max_delta.general.div; |
464 | pos += il3945_statistics_flag(il, buf, bufsz); | 464 | pos += il3945_stats_flag(il, buf, bufsz); |
465 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" | 465 | pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" |
466 | "acumulative delta max\n", | 466 | "acumulative delta max\n", |
467 | "Statistics_General:"); | 467 | "Statistics_General:"); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c index 070730183c9c..ebee6c350dbe 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c | |||
@@ -158,7 +158,7 @@ static int il3945_rate_scale_flush_windows(struct il3945_rs_sta *rs_sta) | |||
158 | /* | 158 | /* |
159 | * For each rate, if we have collected data on that rate | 159 | * For each rate, if we have collected data on that rate |
160 | * and it has been more than IL_RATE_WIN_FLUSH | 160 | * and it has been more than IL_RATE_WIN_FLUSH |
161 | * since we flushed, clear out the gathered statistics | 161 | * since we flushed, clear out the gathered stats |
162 | */ | 162 | */ |
163 | for (i = 0; i < IL_RATE_COUNT_3945; i++) { | 163 | for (i = 0; i < IL_RATE_COUNT_3945; i++) { |
164 | if (!rs_sta->win[i].counter) | 164 | if (!rs_sta->win[i].counter) |
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945.c b/drivers/net/wireless/iwlegacy/iwl-3945.c index ad78d3fb76f0..fa4c33a36f22 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945.c | |||
@@ -362,7 +362,7 @@ static void il3945_rx_reply_tx(struct il_priv *il, | |||
362 | * | 362 | * |
363 | *****************************************************************************/ | 363 | *****************************************************************************/ |
364 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 364 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
365 | static void il3945_accumulative_statistics(struct il_priv *il, | 365 | static void il3945_accumulative_stats(struct il_priv *il, |
366 | __le32 *stats) | 366 | __le32 *stats) |
367 | { | 367 | { |
368 | int i; | 368 | int i; |
@@ -370,12 +370,12 @@ static void il3945_accumulative_statistics(struct il_priv *il, | |||
370 | u32 *accum_stats; | 370 | u32 *accum_stats; |
371 | u32 *delta, *max_delta; | 371 | u32 *delta, *max_delta; |
372 | 372 | ||
373 | prev_stats = (__le32 *)&il->_3945.statistics; | 373 | prev_stats = (__le32 *)&il->_3945.stats; |
374 | accum_stats = (u32 *)&il->_3945.accum_statistics; | 374 | accum_stats = (u32 *)&il->_3945.accum_stats; |
375 | delta = (u32 *)&il->_3945.delta_statistics; | 375 | delta = (u32 *)&il->_3945.delta_stats; |
376 | max_delta = (u32 *)&il->_3945.max_delta; | 376 | max_delta = (u32 *)&il->_3945.max_delta; |
377 | 377 | ||
378 | for (i = sizeof(__le32); i < sizeof(struct il3945_notif_statistics); | 378 | for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats); |
379 | i += sizeof(__le32), stats++, prev_stats++, delta++, | 379 | i += sizeof(__le32), stats++, prev_stats++, delta++, |
380 | max_delta++, accum_stats++) { | 380 | max_delta++, accum_stats++) { |
381 | if (le32_to_cpu(*stats) > le32_to_cpu(*prev_stats)) { | 381 | if (le32_to_cpu(*stats) > le32_to_cpu(*prev_stats)) { |
@@ -387,30 +387,30 @@ static void il3945_accumulative_statistics(struct il_priv *il, | |||
387 | } | 387 | } |
388 | } | 388 | } |
389 | 389 | ||
390 | /* reset accumulative statistics for "no-counter" type statistics */ | 390 | /* reset accumulative stats for "no-counter" type stats */ |
391 | il->_3945.accum_statistics.general.temperature = | 391 | il->_3945.accum_stats.general.temperature = |
392 | il->_3945.statistics.general.temperature; | 392 | il->_3945.stats.general.temperature; |
393 | il->_3945.accum_statistics.general.ttl_timestamp = | 393 | il->_3945.accum_stats.general.ttl_timestamp = |
394 | il->_3945.statistics.general.ttl_timestamp; | 394 | il->_3945.stats.general.ttl_timestamp; |
395 | } | 395 | } |
396 | #endif | 396 | #endif |
397 | 397 | ||
398 | void il3945_hw_rx_statistics(struct il_priv *il, | 398 | void il3945_hw_rx_stats(struct il_priv *il, |
399 | struct il_rx_buf *rxb) | 399 | struct il_rx_buf *rxb) |
400 | { | 400 | { |
401 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 401 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
402 | 402 | ||
403 | D_RX("Statistics notification received (%d vs %d).\n", | 403 | D_RX("Statistics notification received (%d vs %d).\n", |
404 | (int)sizeof(struct il3945_notif_statistics), | 404 | (int)sizeof(struct il3945_notif_stats), |
405 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); | 405 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); |
406 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 406 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
407 | il3945_accumulative_statistics(il, (__le32 *)&pkt->u.raw); | 407 | il3945_accumulative_stats(il, (__le32 *)&pkt->u.raw); |
408 | #endif | 408 | #endif |
409 | 409 | ||
410 | memcpy(&il->_3945.statistics, pkt->u.raw, sizeof(il->_3945.statistics)); | 410 | memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats)); |
411 | } | 411 | } |
412 | 412 | ||
413 | void il3945_reply_statistics(struct il_priv *il, | 413 | void il3945_reply_stats(struct il_priv *il, |
414 | struct il_rx_buf *rxb) | 414 | struct il_rx_buf *rxb) |
415 | { | 415 | { |
416 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 416 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
@@ -418,16 +418,16 @@ void il3945_reply_statistics(struct il_priv *il, | |||
418 | 418 | ||
419 | if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) { | 419 | if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) { |
420 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 420 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
421 | memset(&il->_3945.accum_statistics, 0, | 421 | memset(&il->_3945.accum_stats, 0, |
422 | sizeof(struct il3945_notif_statistics)); | 422 | sizeof(struct il3945_notif_stats)); |
423 | memset(&il->_3945.delta_statistics, 0, | 423 | memset(&il->_3945.delta_stats, 0, |
424 | sizeof(struct il3945_notif_statistics)); | 424 | sizeof(struct il3945_notif_stats)); |
425 | memset(&il->_3945.max_delta, 0, | 425 | memset(&il->_3945.max_delta, 0, |
426 | sizeof(struct il3945_notif_statistics)); | 426 | sizeof(struct il3945_notif_stats)); |
427 | #endif | 427 | #endif |
428 | D_RX("Statistics have been cleared\n"); | 428 | D_RX("Statistics have been cleared\n"); |
429 | } | 429 | } |
430 | il3945_hw_rx_statistics(il, rxb); | 430 | il3945_hw_rx_stats(il, rxb); |
431 | } | 431 | } |
432 | 432 | ||
433 | 433 | ||
@@ -437,7 +437,7 @@ void il3945_reply_statistics(struct il_priv *il, | |||
437 | * | 437 | * |
438 | ******************************************************************************/ | 438 | ******************************************************************************/ |
439 | 439 | ||
440 | /* This is necessary only for a number of statistics, see the caller. */ | 440 | /* This is necessary only for a number of stats, see the caller. */ |
441 | static int il3945_is_network_packet(struct il_priv *il, | 441 | static int il3945_is_network_packet(struct il_priv *il, |
442 | struct ieee80211_hdr *header) | 442 | struct ieee80211_hdr *header) |
443 | { | 443 | { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945.h b/drivers/net/wireless/iwlegacy/iwl-3945.h index 8a294ca5d07a..967e73357e9c 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945.h +++ b/drivers/net/wireless/iwlegacy/iwl-3945.h | |||
@@ -60,7 +60,7 @@ extern const struct pci_device_id il3945_hw_card_ids[]; | |||
60 | 60 | ||
61 | /* Default noise level to report when noise measurement is not available. | 61 | /* Default noise level to report when noise measurement is not available. |
62 | * This may be because we're: | 62 | * This may be because we're: |
63 | * 1) Not associated (4965, no beacon statistics being sent to driver) | 63 | * 1) Not associated (4965, no beacon stats being sent to driver) |
64 | * 2) Scanning (noise measurement does not apply to associated channel) | 64 | * 2) Scanning (noise measurement does not apply to associated channel) |
65 | * 3) Receiving CCK (3945 delivers noise info only for OFDM frames) | 65 | * 3) Receiving CCK (3945 delivers noise info only for OFDM frames) |
66 | * Use default noise value of -127 ... this is below the range of measurable | 66 | * Use default noise value of -127 ... this is below the range of measurable |
@@ -258,9 +258,9 @@ void il3945_hw_build_tx_cmd_rate(struct il_priv *il, | |||
258 | int sta_id, int tx_id); | 258 | int sta_id, int tx_id); |
259 | extern int il3945_hw_reg_send_txpower(struct il_priv *il); | 259 | extern int il3945_hw_reg_send_txpower(struct il_priv *il); |
260 | extern int il3945_hw_reg_set_txpower(struct il_priv *il, s8 power); | 260 | extern int il3945_hw_reg_set_txpower(struct il_priv *il, s8 power); |
261 | extern void il3945_hw_rx_statistics(struct il_priv *il, | 261 | extern void il3945_hw_rx_stats(struct il_priv *il, |
262 | struct il_rx_buf *rxb); | 262 | struct il_rx_buf *rxb); |
263 | void il3945_reply_statistics(struct il_priv *il, | 263 | void il3945_reply_stats(struct il_priv *il, |
264 | struct il_rx_buf *rxb); | 264 | struct il_rx_buf *rxb); |
265 | extern void il3945_disable_events(struct il_priv *il); | 265 | extern void il3945_disable_events(struct il_priv *il); |
266 | extern int il4965_get_temperature(const struct il_priv *il); | 266 | extern int il4965_get_temperature(const struct il_priv *il); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-calib.c b/drivers/net/wireless/iwlegacy/iwl-4965-calib.c index 4c2b491b4c27..bb3bc15c3a36 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-calib.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-calib.c | |||
@@ -71,7 +71,7 @@ | |||
71 | * INIT calibrations framework | 71 | * INIT calibrations framework |
72 | *****************************************************************************/ | 72 | *****************************************************************************/ |
73 | 73 | ||
74 | struct statistics_general_data { | 74 | struct stats_general_data { |
75 | u32 beacon_silence_rssi_a; | 75 | u32 beacon_silence_rssi_a; |
76 | u32 beacon_silence_rssi_b; | 76 | u32 beacon_silence_rssi_b; |
77 | u32 beacon_silence_rssi_c; | 77 | u32 beacon_silence_rssi_c; |
@@ -106,7 +106,7 @@ void il4965_calib_free_results(struct il_priv *il) | |||
106 | static int il4965_sens_energy_cck(struct il_priv *il, | 106 | static int il4965_sens_energy_cck(struct il_priv *il, |
107 | u32 norm_fa, | 107 | u32 norm_fa, |
108 | u32 rx_enable_time, | 108 | u32 rx_enable_time, |
109 | struct statistics_general_data *rx_info) | 109 | struct stats_general_data *rx_info) |
110 | { | 110 | { |
111 | u32 max_nrg_cck = 0; | 111 | u32 max_nrg_cck = 0; |
112 | int i = 0; | 112 | int i = 0; |
@@ -509,10 +509,10 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp) | |||
509 | u32 norm_fa_ofdm; | 509 | u32 norm_fa_ofdm; |
510 | u32 norm_fa_cck; | 510 | u32 norm_fa_cck; |
511 | struct il_sensitivity_data *data = NULL; | 511 | struct il_sensitivity_data *data = NULL; |
512 | struct statistics_rx_non_phy *rx_info; | 512 | struct stats_rx_non_phy *rx_info; |
513 | struct statistics_rx_phy *ofdm, *cck; | 513 | struct stats_rx_phy *ofdm, *cck; |
514 | unsigned long flags; | 514 | unsigned long flags; |
515 | struct statistics_general_data statis; | 515 | struct stats_general_data statis; |
516 | 516 | ||
517 | if (il->disable_sens_cal) | 517 | if (il->disable_sens_cal) |
518 | return; | 518 | return; |
@@ -526,9 +526,9 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp) | |||
526 | 526 | ||
527 | spin_lock_irqsave(&il->lock, flags); | 527 | spin_lock_irqsave(&il->lock, flags); |
528 | 528 | ||
529 | rx_info = &(((struct il_notif_statistics *)resp)->rx.general); | 529 | rx_info = &(((struct il_notif_stats *)resp)->rx.general); |
530 | ofdm = &(((struct il_notif_statistics *)resp)->rx.ofdm); | 530 | ofdm = &(((struct il_notif_stats *)resp)->rx.ofdm); |
531 | cck = &(((struct il_notif_statistics *)resp)->rx.cck); | 531 | cck = &(((struct il_notif_stats *)resp)->rx.cck); |
532 | 532 | ||
533 | if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { | 533 | if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { |
534 | D_CALIB("<< invalid data.\n"); | 534 | D_CALIB("<< invalid data.\n"); |
@@ -565,9 +565,9 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp) | |||
565 | return; | 565 | return; |
566 | } | 566 | } |
567 | 567 | ||
568 | /* These statistics increase monotonically, and do not reset | 568 | /* These stats increase monotonically, and do not reset |
569 | * at each beacon. Calculate difference from last value, or just | 569 | * at each beacon. Calculate difference from last value, or just |
570 | * use the new statistics value if it has reset or wrapped around. */ | 570 | * use the new stats value if it has reset or wrapped around. */ |
571 | if (data->last_bad_plcp_cnt_cck > bad_plcp_cck) | 571 | if (data->last_bad_plcp_cnt_cck > bad_plcp_cck) |
572 | data->last_bad_plcp_cnt_cck = bad_plcp_cck; | 572 | data->last_bad_plcp_cnt_cck = bad_plcp_cck; |
573 | else { | 573 | else { |
@@ -793,7 +793,7 @@ static void il4965_gain_computation(struct il_priv *il, | |||
793 | 793 | ||
794 | 794 | ||
795 | /* | 795 | /* |
796 | * Accumulate 16 beacons of signal and noise statistics for each of | 796 | * Accumulate 16 beacons of signal and noise stats for each of |
797 | * 3 receivers/antennas/rx-chains, then figure out: | 797 | * 3 receivers/antennas/rx-chains, then figure out: |
798 | * 1) Which antennas are connected. | 798 | * 1) Which antennas are connected. |
799 | * 2) Differential rx gain settings to balance the 3 receivers. | 799 | * 2) Differential rx gain settings to balance the 3 receivers. |
@@ -818,7 +818,7 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
818 | u8 rxon_band24; | 818 | u8 rxon_band24; |
819 | u8 stat_band24; | 819 | u8 stat_band24; |
820 | unsigned long flags; | 820 | unsigned long flags; |
821 | struct statistics_rx_non_phy *rx_info; | 821 | struct stats_rx_non_phy *rx_info; |
822 | 822 | ||
823 | struct il_rxon_context *ctx = &il->ctx; | 823 | struct il_rxon_context *ctx = &il->ctx; |
824 | 824 | ||
@@ -839,7 +839,7 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
839 | 839 | ||
840 | spin_lock_irqsave(&il->lock, flags); | 840 | spin_lock_irqsave(&il->lock, flags); |
841 | 841 | ||
842 | rx_info = &(((struct il_notif_statistics *)stat_resp)-> | 842 | rx_info = &(((struct il_notif_stats *)stat_resp)-> |
843 | rx.general); | 843 | rx.general); |
844 | 844 | ||
845 | if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { | 845 | if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { |
@@ -851,10 +851,10 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
851 | rxon_band24 = !!(ctx->staging.flags & RXON_FLG_BAND_24G_MSK); | 851 | rxon_band24 = !!(ctx->staging.flags & RXON_FLG_BAND_24G_MSK); |
852 | rxon_chnum = le16_to_cpu(ctx->staging.channel); | 852 | rxon_chnum = le16_to_cpu(ctx->staging.channel); |
853 | 853 | ||
854 | stat_band24 = !!(((struct il_notif_statistics *) | 854 | stat_band24 = !!(((struct il_notif_stats *) |
855 | stat_resp)->flag & | 855 | stat_resp)->flag & |
856 | STATISTICS_REPLY_FLG_BAND_24G_MSK); | 856 | STATISTICS_REPLY_FLG_BAND_24G_MSK); |
857 | stat_chnum = le32_to_cpu(((struct il_notif_statistics *) | 857 | stat_chnum = le32_to_cpu(((struct il_notif_stats *) |
858 | stat_resp)->flag) >> 16; | 858 | stat_resp)->flag) >> 16; |
859 | 859 | ||
860 | /* Make sure we accumulate data for just the associated channel | 860 | /* Make sure we accumulate data for just the associated channel |
@@ -867,7 +867,7 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
867 | } | 867 | } |
868 | 868 | ||
869 | /* | 869 | /* |
870 | * Accumulate beacon statistics values across | 870 | * Accumulate beacon stats values across |
871 | * "chain_noise_num_beacons" | 871 | * "chain_noise_num_beacons" |
872 | */ | 872 | */ |
873 | chain_noise_a = le32_to_cpu(rx_info->beacon_silence_rssi_a) & | 873 | chain_noise_a = le32_to_cpu(rx_info->beacon_silence_rssi_a) & |
@@ -960,7 +960,7 @@ void il4965_reset_run_time_calib(struct il_priv *il) | |||
960 | il->chain_noise_data.delta_gain_code[i] = | 960 | il->chain_noise_data.delta_gain_code[i] = |
961 | CHAIN_NOISE_DELTA_GAIN_INIT_VAL; | 961 | CHAIN_NOISE_DELTA_GAIN_INIT_VAL; |
962 | 962 | ||
963 | /* Ask for statistics now, the uCode will send notification | 963 | /* Ask for stats now, the uCode will send notification |
964 | * periodically after association */ | 964 | * periodically after association */ |
965 | il_send_statistics_request(il, CMD_ASYNC, true); | 965 | il_send_stats_request(il, CMD_ASYNC, true); |
966 | } | 966 | } |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c b/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c index ebb71a685101..89e5828ce383 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c | |||
@@ -33,12 +33,12 @@ static const char *fmt_table = " %-30s %10u %10u %10u %10u\n"; | |||
33 | static const char *fmt_header = | 33 | static const char *fmt_header = |
34 | "%-32s current cumulative delta max\n"; | 34 | "%-32s current cumulative delta max\n"; |
35 | 35 | ||
36 | static int il4965_statistics_flag(struct il_priv *il, char *buf, int bufsz) | 36 | static int il4965_stats_flag(struct il_priv *il, char *buf, int bufsz) |
37 | { | 37 | { |
38 | int p = 0; | 38 | int p = 0; |
39 | u32 flag; | 39 | u32 flag; |
40 | 40 | ||
41 | flag = le32_to_cpu(il->_4965.statistics.flag); | 41 | flag = le32_to_cpu(il->_4965.stats.flag); |
42 | 42 | ||
43 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", flag); | 43 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", flag); |
44 | if (flag & UCODE_STATISTICS_CLEAR_MSK) | 44 | if (flag & UCODE_STATISTICS_CLEAR_MSK) |
@@ -60,15 +60,15 @@ ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, | |||
60 | struct il_priv *il = file->private_data; | 60 | struct il_priv *il = file->private_data; |
61 | int pos = 0; | 61 | int pos = 0; |
62 | char *buf; | 62 | char *buf; |
63 | int bufsz = sizeof(struct statistics_rx_phy) * 40 + | 63 | int bufsz = sizeof(struct stats_rx_phy) * 40 + |
64 | sizeof(struct statistics_rx_non_phy) * 40 + | 64 | sizeof(struct stats_rx_non_phy) * 40 + |
65 | sizeof(struct statistics_rx_ht_phy) * 40 + 400; | 65 | sizeof(struct stats_rx_ht_phy) * 40 + 400; |
66 | ssize_t ret; | 66 | ssize_t ret; |
67 | struct statistics_rx_phy *ofdm, *accum_ofdm, *delta_ofdm, *max_ofdm; | 67 | struct stats_rx_phy *ofdm, *accum_ofdm, *delta_ofdm, *max_ofdm; |
68 | struct statistics_rx_phy *cck, *accum_cck, *delta_cck, *max_cck; | 68 | struct stats_rx_phy *cck, *accum_cck, *delta_cck, *max_cck; |
69 | struct statistics_rx_non_phy *general, *accum_general; | 69 | struct stats_rx_non_phy *general, *accum_general; |
70 | struct statistics_rx_non_phy *delta_general, *max_general; | 70 | struct stats_rx_non_phy *delta_general, *max_general; |
71 | struct statistics_rx_ht_phy *ht, *accum_ht, *delta_ht, *max_ht; | 71 | struct stats_rx_ht_phy *ht, *accum_ht, *delta_ht, *max_ht; |
72 | 72 | ||
73 | if (!il_is_alive(il)) | 73 | if (!il_is_alive(il)) |
74 | return -EAGAIN; | 74 | return -EAGAIN; |
@@ -81,27 +81,27 @@ ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, | |||
81 | 81 | ||
82 | /* | 82 | /* |
83 | * the statistic information display here is based on | 83 | * the statistic information display here is based on |
84 | * the last statistics notification from uCode | 84 | * the last stats notification from uCode |
85 | * might not reflect the current uCode activity | 85 | * might not reflect the current uCode activity |
86 | */ | 86 | */ |
87 | ofdm = &il->_4965.statistics.rx.ofdm; | 87 | ofdm = &il->_4965.stats.rx.ofdm; |
88 | cck = &il->_4965.statistics.rx.cck; | 88 | cck = &il->_4965.stats.rx.cck; |
89 | general = &il->_4965.statistics.rx.general; | 89 | general = &il->_4965.stats.rx.general; |
90 | ht = &il->_4965.statistics.rx.ofdm_ht; | 90 | ht = &il->_4965.stats.rx.ofdm_ht; |
91 | accum_ofdm = &il->_4965.accum_statistics.rx.ofdm; | 91 | accum_ofdm = &il->_4965.accum_stats.rx.ofdm; |
92 | accum_cck = &il->_4965.accum_statistics.rx.cck; | 92 | accum_cck = &il->_4965.accum_stats.rx.cck; |
93 | accum_general = &il->_4965.accum_statistics.rx.general; | 93 | accum_general = &il->_4965.accum_stats.rx.general; |
94 | accum_ht = &il->_4965.accum_statistics.rx.ofdm_ht; | 94 | accum_ht = &il->_4965.accum_stats.rx.ofdm_ht; |
95 | delta_ofdm = &il->_4965.delta_statistics.rx.ofdm; | 95 | delta_ofdm = &il->_4965.delta_stats.rx.ofdm; |
96 | delta_cck = &il->_4965.delta_statistics.rx.cck; | 96 | delta_cck = &il->_4965.delta_stats.rx.cck; |
97 | delta_general = &il->_4965.delta_statistics.rx.general; | 97 | delta_general = &il->_4965.delta_stats.rx.general; |
98 | delta_ht = &il->_4965.delta_statistics.rx.ofdm_ht; | 98 | delta_ht = &il->_4965.delta_stats.rx.ofdm_ht; |
99 | max_ofdm = &il->_4965.max_delta.rx.ofdm; | 99 | max_ofdm = &il->_4965.max_delta.rx.ofdm; |
100 | max_cck = &il->_4965.max_delta.rx.cck; | 100 | max_cck = &il->_4965.max_delta.rx.cck; |
101 | max_general = &il->_4965.max_delta.rx.general; | 101 | max_general = &il->_4965.max_delta.rx.general; |
102 | max_ht = &il->_4965.max_delta.rx.ofdm_ht; | 102 | max_ht = &il->_4965.max_delta.rx.ofdm_ht; |
103 | 103 | ||
104 | pos += il4965_statistics_flag(il, buf, bufsz); | 104 | pos += il4965_stats_flag(il, buf, bufsz); |
105 | pos += scnprintf(buf + pos, bufsz - pos, | 105 | pos += scnprintf(buf + pos, bufsz - pos, |
106 | fmt_header, "Statistics_Rx - OFDM:"); | 106 | fmt_header, "Statistics_Rx - OFDM:"); |
107 | pos += scnprintf(buf + pos, bufsz - pos, | 107 | pos += scnprintf(buf + pos, bufsz - pos, |
@@ -492,9 +492,9 @@ ssize_t il4965_ucode_tx_stats_read(struct file *file, | |||
492 | struct il_priv *il = file->private_data; | 492 | struct il_priv *il = file->private_data; |
493 | int pos = 0; | 493 | int pos = 0; |
494 | char *buf; | 494 | char *buf; |
495 | int bufsz = (sizeof(struct statistics_tx) * 48) + 250; | 495 | int bufsz = (sizeof(struct stats_tx) * 48) + 250; |
496 | ssize_t ret; | 496 | ssize_t ret; |
497 | struct statistics_tx *tx, *accum_tx, *delta_tx, *max_tx; | 497 | struct stats_tx *tx, *accum_tx, *delta_tx, *max_tx; |
498 | 498 | ||
499 | if (!il_is_alive(il)) | 499 | if (!il_is_alive(il)) |
500 | return -EAGAIN; | 500 | return -EAGAIN; |
@@ -506,15 +506,15 @@ ssize_t il4965_ucode_tx_stats_read(struct file *file, | |||
506 | } | 506 | } |
507 | 507 | ||
508 | /* the statistic information display here is based on | 508 | /* the statistic information display here is based on |
509 | * the last statistics notification from uCode | 509 | * the last stats notification from uCode |
510 | * might not reflect the current uCode activity | 510 | * might not reflect the current uCode activity |
511 | */ | 511 | */ |
512 | tx = &il->_4965.statistics.tx; | 512 | tx = &il->_4965.stats.tx; |
513 | accum_tx = &il->_4965.accum_statistics.tx; | 513 | accum_tx = &il->_4965.accum_stats.tx; |
514 | delta_tx = &il->_4965.delta_statistics.tx; | 514 | delta_tx = &il->_4965.delta_stats.tx; |
515 | max_tx = &il->_4965.max_delta.tx; | 515 | max_tx = &il->_4965.max_delta.tx; |
516 | 516 | ||
517 | pos += il4965_statistics_flag(il, buf, bufsz); | 517 | pos += il4965_stats_flag(il, buf, bufsz); |
518 | pos += scnprintf(buf + pos, bufsz - pos, | 518 | pos += scnprintf(buf + pos, bufsz - pos, |
519 | fmt_header, "Statistics_Tx:"); | 519 | fmt_header, "Statistics_Tx:"); |
520 | pos += scnprintf(buf + pos, bufsz - pos, | 520 | pos += scnprintf(buf + pos, bufsz - pos, |
@@ -667,12 +667,12 @@ il4965_ucode_general_stats_read(struct file *file, char __user *user_buf, | |||
667 | struct il_priv *il = file->private_data; | 667 | struct il_priv *il = file->private_data; |
668 | int pos = 0; | 668 | int pos = 0; |
669 | char *buf; | 669 | char *buf; |
670 | int bufsz = sizeof(struct statistics_general) * 10 + 300; | 670 | int bufsz = sizeof(struct stats_general) * 10 + 300; |
671 | ssize_t ret; | 671 | ssize_t ret; |
672 | struct statistics_general_common *general, *accum_general; | 672 | struct stats_general_common *general, *accum_general; |
673 | struct statistics_general_common *delta_general, *max_general; | 673 | struct stats_general_common *delta_general, *max_general; |
674 | struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg; | 674 | struct stats_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg; |
675 | struct statistics_div *div, *accum_div, *delta_div, *max_div; | 675 | struct stats_div *div, *accum_div, *delta_div, *max_div; |
676 | 676 | ||
677 | if (!il_is_alive(il)) | 677 | if (!il_is_alive(il)) |
678 | return -EAGAIN; | 678 | return -EAGAIN; |
@@ -684,23 +684,23 @@ il4965_ucode_general_stats_read(struct file *file, char __user *user_buf, | |||
684 | } | 684 | } |
685 | 685 | ||
686 | /* the statistic information display here is based on | 686 | /* the statistic information display here is based on |
687 | * the last statistics notification from uCode | 687 | * the last stats notification from uCode |
688 | * might not reflect the current uCode activity | 688 | * might not reflect the current uCode activity |
689 | */ | 689 | */ |
690 | general = &il->_4965.statistics.general.common; | 690 | general = &il->_4965.stats.general.common; |
691 | dbg = &il->_4965.statistics.general.common.dbg; | 691 | dbg = &il->_4965.stats.general.common.dbg; |
692 | div = &il->_4965.statistics.general.common.div; | 692 | div = &il->_4965.stats.general.common.div; |
693 | accum_general = &il->_4965.accum_statistics.general.common; | 693 | accum_general = &il->_4965.accum_stats.general.common; |
694 | accum_dbg = &il->_4965.accum_statistics.general.common.dbg; | 694 | accum_dbg = &il->_4965.accum_stats.general.common.dbg; |
695 | accum_div = &il->_4965.accum_statistics.general.common.div; | 695 | accum_div = &il->_4965.accum_stats.general.common.div; |
696 | delta_general = &il->_4965.delta_statistics.general.common; | 696 | delta_general = &il->_4965.delta_stats.general.common; |
697 | max_general = &il->_4965.max_delta.general.common; | 697 | max_general = &il->_4965.max_delta.general.common; |
698 | delta_dbg = &il->_4965.delta_statistics.general.common.dbg; | 698 | delta_dbg = &il->_4965.delta_stats.general.common.dbg; |
699 | max_dbg = &il->_4965.max_delta.general.common.dbg; | 699 | max_dbg = &il->_4965.max_delta.general.common.dbg; |
700 | delta_div = &il->_4965.delta_statistics.general.common.div; | 700 | delta_div = &il->_4965.delta_stats.general.common.div; |
701 | max_div = &il->_4965.max_delta.general.common.div; | 701 | max_div = &il->_4965.max_delta.general.common.div; |
702 | 702 | ||
703 | pos += il4965_statistics_flag(il, buf, bufsz); | 703 | pos += il4965_stats_flag(il, buf, bufsz); |
704 | pos += scnprintf(buf + pos, bufsz - pos, | 704 | pos += scnprintf(buf + pos, bufsz - pos, |
705 | fmt_header, "Statistics_General:"); | 705 | fmt_header, "Statistics_General:"); |
706 | pos += scnprintf(buf + pos, bufsz - pos, | 706 | pos += scnprintf(buf + pos, bufsz - pos, |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-hw.h b/drivers/net/wireless/iwlegacy/iwl-4965-hw.h index ecebc6923125..21ff694421a9 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-hw.h +++ b/drivers/net/wireless/iwlegacy/iwl-4965-hw.h | |||
@@ -119,7 +119,7 @@ static inline int il4965_hw_valid_rtc_data_addr(u32 addr) | |||
119 | * | 119 | * |
120 | * uCode provides all 4 values to the driver via the "initialize alive" | 120 | * uCode provides all 4 values to the driver via the "initialize alive" |
121 | * notification (see struct il4965_init_alive_resp). After the runtime uCode | 121 | * notification (see struct il4965_init_alive_resp). After the runtime uCode |
122 | * image loads, uCode updates the R4 value via statistics notifications | 122 | * image loads, uCode updates the R4 value via stats notifications |
123 | * (see STATISTICS_NOTIFICATION), which occur after each received beacon | 123 | * (see STATISTICS_NOTIFICATION), which occur after each received beacon |
124 | * when associated, or can be requested via REPLY_STATISTICS_CMD. | 124 | * when associated, or can be requested via REPLY_STATISTICS_CMD. |
125 | * | 125 | * |
@@ -159,7 +159,7 @@ static inline int il4965_hw_valid_rtc_data_addr(u32 addr) | |||
159 | * | 159 | * |
160 | * 1) EEPROM | 160 | * 1) EEPROM |
161 | * 2) "initialize" alive notification | 161 | * 2) "initialize" alive notification |
162 | * 3) statistics notifications | 162 | * 3) stats notifications |
163 | * | 163 | * |
164 | * EEPROM data consists of: | 164 | * EEPROM data consists of: |
165 | * | 165 | * |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-rs.c b/drivers/net/wireless/iwlegacy/iwl-4965-rs.c index 9c8cc320832e..e99a20c8891d 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-rs.c | |||
@@ -242,7 +242,7 @@ static inline u8 il4965_rs_is_valid_ant(u8 valid_antenna, u8 ant_type) | |||
242 | } | 242 | } |
243 | 243 | ||
244 | /* | 244 | /* |
245 | * removes the old data from the statistics. All data that is older than | 245 | * removes the old data from the stats. All data that is older than |
246 | * TID_MAX_TIME_DIFF, will be deleted. | 246 | * TID_MAX_TIME_DIFF, will be deleted. |
247 | */ | 247 | */ |
248 | static void | 248 | static void |
@@ -991,7 +991,7 @@ done: | |||
991 | * Begin a period of staying with a selected modulation mode. | 991 | * Begin a period of staying with a selected modulation mode. |
992 | * Set "stay_in_tbl" flag to prevent any mode switches. | 992 | * Set "stay_in_tbl" flag to prevent any mode switches. |
993 | * Set frame tx success limits according to legacy vs. high-throughput, | 993 | * Set frame tx success limits according to legacy vs. high-throughput, |
994 | * and reset overall (spanning all rates) tx success history statistics. | 994 | * and reset overall (spanning all rates) tx success history stats. |
995 | * These control how long we stay using same modulation mode before | 995 | * These control how long we stay using same modulation mode before |
996 | * searching for a new mode. | 996 | * searching for a new mode. |
997 | */ | 997 | */ |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-rx.c b/drivers/net/wireless/iwlegacy/iwl-4965-rx.c index 9ccec09c32be..b32295747851 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-rx.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-rx.c | |||
@@ -67,13 +67,13 @@ void il4965_rx_missed_beacon_notif(struct il_priv *il, | |||
67 | * exactly when to expect beacons, therefore only when we're associated. */ | 67 | * exactly when to expect beacons, therefore only when we're associated. */ |
68 | static void il4965_rx_calc_noise(struct il_priv *il) | 68 | static void il4965_rx_calc_noise(struct il_priv *il) |
69 | { | 69 | { |
70 | struct statistics_rx_non_phy *rx_info; | 70 | struct stats_rx_non_phy *rx_info; |
71 | int num_active_rx = 0; | 71 | int num_active_rx = 0; |
72 | int total_silence = 0; | 72 | int total_silence = 0; |
73 | int bcn_silence_a, bcn_silence_b, bcn_silence_c; | 73 | int bcn_silence_a, bcn_silence_b, bcn_silence_c; |
74 | int last_rx_noise; | 74 | int last_rx_noise; |
75 | 75 | ||
76 | rx_info = &(il->_4965.statistics.rx.general); | 76 | rx_info = &(il->_4965.stats.rx.general); |
77 | bcn_silence_a = | 77 | bcn_silence_a = |
78 | le32_to_cpu(rx_info->beacon_silence_rssi_a) & IN_BAND_FILTER; | 78 | le32_to_cpu(rx_info->beacon_silence_rssi_a) & IN_BAND_FILTER; |
79 | bcn_silence_b = | 79 | bcn_silence_b = |
@@ -107,28 +107,28 @@ static void il4965_rx_calc_noise(struct il_priv *il) | |||
107 | 107 | ||
108 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 108 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
109 | /* | 109 | /* |
110 | * based on the assumption of all statistics counter are in DWORD | 110 | * based on the assumption of all stats counter are in DWORD |
111 | * FIXME: This function is for debugging, do not deal with | 111 | * FIXME: This function is for debugging, do not deal with |
112 | * the case of counters roll-over. | 112 | * the case of counters roll-over. |
113 | */ | 113 | */ |
114 | static void il4965_accumulative_statistics(struct il_priv *il, | 114 | static void il4965_accumulative_stats(struct il_priv *il, |
115 | __le32 *stats) | 115 | __le32 *stats) |
116 | { | 116 | { |
117 | int i, size; | 117 | int i, size; |
118 | __le32 *prev_stats; | 118 | __le32 *prev_stats; |
119 | u32 *accum_stats; | 119 | u32 *accum_stats; |
120 | u32 *delta, *max_delta; | 120 | u32 *delta, *max_delta; |
121 | struct statistics_general_common *general, *accum_general; | 121 | struct stats_general_common *general, *accum_general; |
122 | struct statistics_tx *tx, *accum_tx; | 122 | struct stats_tx *tx, *accum_tx; |
123 | 123 | ||
124 | prev_stats = (__le32 *)&il->_4965.statistics; | 124 | prev_stats = (__le32 *)&il->_4965.stats; |
125 | accum_stats = (u32 *)&il->_4965.accum_statistics; | 125 | accum_stats = (u32 *)&il->_4965.accum_stats; |
126 | size = sizeof(struct il_notif_statistics); | 126 | size = sizeof(struct il_notif_stats); |
127 | general = &il->_4965.statistics.general.common; | 127 | general = &il->_4965.stats.general.common; |
128 | accum_general = &il->_4965.accum_statistics.general.common; | 128 | accum_general = &il->_4965.accum_stats.general.common; |
129 | tx = &il->_4965.statistics.tx; | 129 | tx = &il->_4965.stats.tx; |
130 | accum_tx = &il->_4965.accum_statistics.tx; | 130 | accum_tx = &il->_4965.accum_stats.tx; |
131 | delta = (u32 *)&il->_4965.delta_statistics; | 131 | delta = (u32 *)&il->_4965.delta_stats; |
132 | max_delta = (u32 *)&il->_4965.max_delta; | 132 | max_delta = (u32 *)&il->_4965.max_delta; |
133 | 133 | ||
134 | for (i = sizeof(__le32); i < size; | 134 | for (i = sizeof(__le32); i < size; |
@@ -143,7 +143,7 @@ static void il4965_accumulative_statistics(struct il_priv *il, | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | /* reset accumulative statistics for "no-counter" type statistics */ | 146 | /* reset accumulative stats for "no-counter" type stats */ |
147 | accum_general->temperature = general->temperature; | 147 | accum_general->temperature = general->temperature; |
148 | accum_general->ttl_timestamp = general->ttl_timestamp; | 148 | accum_general->ttl_timestamp = general->ttl_timestamp; |
149 | } | 149 | } |
@@ -151,7 +151,7 @@ static void il4965_accumulative_statistics(struct il_priv *il, | |||
151 | 151 | ||
152 | #define REG_RECALIB_PERIOD (60) | 152 | #define REG_RECALIB_PERIOD (60) |
153 | 153 | ||
154 | void il4965_rx_statistics(struct il_priv *il, | 154 | void il4965_rx_stats(struct il_priv *il, |
155 | struct il_rx_buf *rxb) | 155 | struct il_rx_buf *rxb) |
156 | { | 156 | { |
157 | int change; | 157 | int change; |
@@ -159,31 +159,31 @@ void il4965_rx_statistics(struct il_priv *il, | |||
159 | 159 | ||
160 | D_RX( | 160 | D_RX( |
161 | "Statistics notification received (%d vs %d).\n", | 161 | "Statistics notification received (%d vs %d).\n", |
162 | (int)sizeof(struct il_notif_statistics), | 162 | (int)sizeof(struct il_notif_stats), |
163 | le32_to_cpu(pkt->len_n_flags) & | 163 | le32_to_cpu(pkt->len_n_flags) & |
164 | FH_RSCSR_FRAME_SIZE_MSK); | 164 | FH_RSCSR_FRAME_SIZE_MSK); |
165 | 165 | ||
166 | change = ((il->_4965.statistics.general.common.temperature != | 166 | change = ((il->_4965.stats.general.common.temperature != |
167 | pkt->u.stats.general.common.temperature) || | 167 | pkt->u.stats.general.common.temperature) || |
168 | ((il->_4965.statistics.flag & | 168 | ((il->_4965.stats.flag & |
169 | STATISTICS_REPLY_FLG_HT40_MODE_MSK) != | 169 | STATISTICS_REPLY_FLG_HT40_MODE_MSK) != |
170 | (pkt->u.stats.flag & | 170 | (pkt->u.stats.flag & |
171 | STATISTICS_REPLY_FLG_HT40_MODE_MSK))); | 171 | STATISTICS_REPLY_FLG_HT40_MODE_MSK))); |
172 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 172 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
173 | il4965_accumulative_statistics(il, (__le32 *)&pkt->u.stats); | 173 | il4965_accumulative_stats(il, (__le32 *)&pkt->u.stats); |
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | /* TODO: reading some of statistics is unneeded */ | 176 | /* TODO: reading some of stats is unneeded */ |
177 | memcpy(&il->_4965.statistics, &pkt->u.stats, | 177 | memcpy(&il->_4965.stats, &pkt->u.stats, |
178 | sizeof(il->_4965.statistics)); | 178 | sizeof(il->_4965.stats)); |
179 | 179 | ||
180 | set_bit(STATUS_STATISTICS, &il->status); | 180 | set_bit(STATUS_STATISTICS, &il->status); |
181 | 181 | ||
182 | /* Reschedule the statistics timer to occur in | 182 | /* Reschedule the stats timer to occur in |
183 | * REG_RECALIB_PERIOD seconds to ensure we get a | 183 | * REG_RECALIB_PERIOD seconds to ensure we get a |
184 | * thermal update even if the uCode doesn't give | 184 | * thermal update even if the uCode doesn't give |
185 | * us one */ | 185 | * us one */ |
186 | mod_timer(&il->statistics_periodic, jiffies + | 186 | mod_timer(&il->stats_periodic, jiffies + |
187 | msecs_to_jiffies(REG_RECALIB_PERIOD * 1000)); | 187 | msecs_to_jiffies(REG_RECALIB_PERIOD * 1000)); |
188 | 188 | ||
189 | if (unlikely(!test_bit(STATUS_SCANNING, &il->status)) && | 189 | if (unlikely(!test_bit(STATUS_SCANNING, &il->status)) && |
@@ -195,21 +195,21 @@ void il4965_rx_statistics(struct il_priv *il, | |||
195 | il->cfg->ops->lib->temp_ops.temperature(il); | 195 | il->cfg->ops->lib->temp_ops.temperature(il); |
196 | } | 196 | } |
197 | 197 | ||
198 | void il4965_reply_statistics(struct il_priv *il, | 198 | void il4965_reply_stats(struct il_priv *il, |
199 | struct il_rx_buf *rxb) | 199 | struct il_rx_buf *rxb) |
200 | { | 200 | { |
201 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 201 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
202 | 202 | ||
203 | if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { | 203 | if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { |
204 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 204 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
205 | memset(&il->_4965.accum_statistics, 0, | 205 | memset(&il->_4965.accum_stats, 0, |
206 | sizeof(struct il_notif_statistics)); | 206 | sizeof(struct il_notif_stats)); |
207 | memset(&il->_4965.delta_statistics, 0, | 207 | memset(&il->_4965.delta_stats, 0, |
208 | sizeof(struct il_notif_statistics)); | 208 | sizeof(struct il_notif_stats)); |
209 | memset(&il->_4965.max_delta, 0, | 209 | memset(&il->_4965.max_delta, 0, |
210 | sizeof(struct il_notif_statistics)); | 210 | sizeof(struct il_notif_stats)); |
211 | #endif | 211 | #endif |
212 | D_RX("Statistics have been cleared\n"); | 212 | D_RX("Statistics have been cleared\n"); |
213 | } | 213 | } |
214 | il4965_rx_statistics(il, rxb); | 214 | il4965_rx_stats(il, rxb); |
215 | } | 215 | } |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.c b/drivers/net/wireless/iwlegacy/iwl-4965.c index 5dd963e88643..9cfc14001d3d 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965.c | |||
@@ -1436,9 +1436,9 @@ static void il4965_txq_update_byte_cnt_tbl(struct il_priv *il, | |||
1436 | 1436 | ||
1437 | /** | 1437 | /** |
1438 | * il4965_hw_get_temperature - return the calibrated temperature (in Kelvin) | 1438 | * il4965_hw_get_temperature - return the calibrated temperature (in Kelvin) |
1439 | * @statistics: Provides the temperature reading from the uCode | 1439 | * @stats: Provides the temperature reading from the uCode |
1440 | * | 1440 | * |
1441 | * A return of <0 indicates bogus data in the statistics | 1441 | * A return of <0 indicates bogus data in the stats |
1442 | */ | 1442 | */ |
1443 | static int il4965_hw_get_temperature(struct il_priv *il) | 1443 | static int il4965_hw_get_temperature(struct il_priv *il) |
1444 | { | 1444 | { |
@@ -1448,7 +1448,7 @@ static int il4965_hw_get_temperature(struct il_priv *il) | |||
1448 | u32 R4; | 1448 | u32 R4; |
1449 | 1449 | ||
1450 | if (test_bit(STATUS_TEMPERATURE, &il->status) && | 1450 | if (test_bit(STATUS_TEMPERATURE, &il->status) && |
1451 | (il->_4965.statistics.flag & | 1451 | (il->_4965.stats.flag & |
1452 | STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { | 1452 | STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { |
1453 | D_TEMP("Running HT40 temperature calibration\n"); | 1453 | D_TEMP("Running HT40 temperature calibration\n"); |
1454 | R1 = (s32)le32_to_cpu(il->card_alive_init.therm_r1[1]); | 1454 | R1 = (s32)le32_to_cpu(il->card_alive_init.therm_r1[1]); |
@@ -1466,14 +1466,14 @@ static int il4965_hw_get_temperature(struct il_priv *il) | |||
1466 | /* | 1466 | /* |
1467 | * Temperature is only 23 bits, so sign extend out to 32. | 1467 | * Temperature is only 23 bits, so sign extend out to 32. |
1468 | * | 1468 | * |
1469 | * NOTE If we haven't received a statistics notification yet | 1469 | * NOTE If we haven't received a stats notification yet |
1470 | * with an updated temperature, use R4 provided to us in the | 1470 | * with an updated temperature, use R4 provided to us in the |
1471 | * "initialize" ALIVE response. | 1471 | * "initialize" ALIVE response. |
1472 | */ | 1472 | */ |
1473 | if (!test_bit(STATUS_TEMPERATURE, &il->status)) | 1473 | if (!test_bit(STATUS_TEMPERATURE, &il->status)) |
1474 | vt = sign_extend32(R4, 23); | 1474 | vt = sign_extend32(R4, 23); |
1475 | else | 1475 | else |
1476 | vt = sign_extend32(le32_to_cpu(il->_4965.statistics. | 1476 | vt = sign_extend32(le32_to_cpu(il->_4965.stats. |
1477 | general.common.temperature), 23); | 1477 | general.common.temperature), 23); |
1478 | 1478 | ||
1479 | D_TEMP("Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt); | 1479 | D_TEMP("Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt); |
@@ -1512,7 +1512,7 @@ static int il4965_is_temp_calib_needed(struct il_priv *il) | |||
1512 | int temp_diff; | 1512 | int temp_diff; |
1513 | 1513 | ||
1514 | if (!test_bit(STATUS_STATISTICS, &il->status)) { | 1514 | if (!test_bit(STATUS_STATISTICS, &il->status)) { |
1515 | D_TEMP("Temperature not updated -- no statistics.\n"); | 1515 | D_TEMP("Temperature not updated -- no stats.\n"); |
1516 | return 0; | 1516 | return 0; |
1517 | } | 1517 | } |
1518 | 1518 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.h b/drivers/net/wireless/iwlegacy/iwl-4965.h index b5b27f45e99b..a75b62cd61f7 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965.h +++ b/drivers/net/wireless/iwlegacy/iwl-4965.h | |||
@@ -174,9 +174,9 @@ void il4965_rx_missed_beacon_notif(struct il_priv *il, | |||
174 | struct il_rx_buf *rxb); | 174 | struct il_rx_buf *rxb); |
175 | bool il4965_good_plcp_health(struct il_priv *il, | 175 | bool il4965_good_plcp_health(struct il_priv *il, |
176 | struct il_rx_pkt *pkt); | 176 | struct il_rx_pkt *pkt); |
177 | void il4965_rx_statistics(struct il_priv *il, | 177 | void il4965_rx_stats(struct il_priv *il, |
178 | struct il_rx_buf *rxb); | 178 | struct il_rx_buf *rxb); |
179 | void il4965_reply_statistics(struct il_priv *il, | 179 | void il4965_reply_stats(struct il_priv *il, |
180 | struct il_rx_buf *rxb); | 180 | struct il_rx_buf *rxb); |
181 | 181 | ||
182 | /* scan */ | 182 | /* scan */ |
diff --git a/drivers/net/wireless/iwlegacy/iwl-commands.h b/drivers/net/wireless/iwlegacy/iwl-commands.h index d9873cbfa80d..ea6c0f50ecf7 100644 --- a/drivers/net/wireless/iwlegacy/iwl-commands.h +++ b/drivers/net/wireless/iwlegacy/iwl-commands.h | |||
@@ -2016,7 +2016,7 @@ struct il_link_qual_agg_params { | |||
2016 | * good performance; higher rate is sure to have poorer success. | 2016 | * good performance; higher rate is sure to have poorer success. |
2017 | * | 2017 | * |
2018 | * 6) Re-evaluate the rate after each tx frame. If working with block- | 2018 | * 6) Re-evaluate the rate after each tx frame. If working with block- |
2019 | * acknowledge, history and statistics may be calculated for the entire | 2019 | * acknowledge, history and stats may be calculated for the entire |
2020 | * block (including prior history that fits within the history windows), | 2020 | * block (including prior history that fits within the history windows), |
2021 | * before re-evaluation. | 2021 | * before re-evaluation. |
2022 | * | 2022 | * |
@@ -2637,7 +2637,7 @@ struct il_scanresults_notification { | |||
2637 | u8 num_probe_not_sent; /* not enough time to send */ | 2637 | u8 num_probe_not_sent; /* not enough time to send */ |
2638 | __le32 tsf_low; | 2638 | __le32 tsf_low; |
2639 | __le32 tsf_high; | 2639 | __le32 tsf_high; |
2640 | __le32 statistics[NUMBER_OF_STATISTICS]; | 2640 | __le32 stats[NUMBER_OF_STATISTICS]; |
2641 | } __packed; | 2641 | } __packed; |
2642 | 2642 | ||
2643 | /* | 2643 | /* |
@@ -2727,9 +2727,9 @@ struct rate_histogram { | |||
2727 | } failed; | 2727 | } failed; |
2728 | } __packed; | 2728 | } __packed; |
2729 | 2729 | ||
2730 | /* statistics command response */ | 2730 | /* stats command response */ |
2731 | 2731 | ||
2732 | struct iwl39_statistics_rx_phy { | 2732 | struct iwl39_stats_rx_phy { |
2733 | __le32 ina_cnt; | 2733 | __le32 ina_cnt; |
2734 | __le32 fina_cnt; | 2734 | __le32 fina_cnt; |
2735 | __le32 plcp_err; | 2735 | __le32 plcp_err; |
@@ -2747,7 +2747,7 @@ struct iwl39_statistics_rx_phy { | |||
2747 | __le32 sent_cts_cnt; | 2747 | __le32 sent_cts_cnt; |
2748 | } __packed; | 2748 | } __packed; |
2749 | 2749 | ||
2750 | struct iwl39_statistics_rx_non_phy { | 2750 | struct iwl39_stats_rx_non_phy { |
2751 | __le32 bogus_cts; /* CTS received when not expecting CTS */ | 2751 | __le32 bogus_cts; /* CTS received when not expecting CTS */ |
2752 | __le32 bogus_ack; /* ACK received when not expecting ACK */ | 2752 | __le32 bogus_ack; /* ACK received when not expecting ACK */ |
2753 | __le32 non_bssid_frames; /* number of frames with BSSID that | 2753 | __le32 non_bssid_frames; /* number of frames with BSSID that |
@@ -2758,13 +2758,13 @@ struct iwl39_statistics_rx_non_phy { | |||
2758 | * our serving channel */ | 2758 | * our serving channel */ |
2759 | } __packed; | 2759 | } __packed; |
2760 | 2760 | ||
2761 | struct iwl39_statistics_rx { | 2761 | struct iwl39_stats_rx { |
2762 | struct iwl39_statistics_rx_phy ofdm; | 2762 | struct iwl39_stats_rx_phy ofdm; |
2763 | struct iwl39_statistics_rx_phy cck; | 2763 | struct iwl39_stats_rx_phy cck; |
2764 | struct iwl39_statistics_rx_non_phy general; | 2764 | struct iwl39_stats_rx_non_phy general; |
2765 | } __packed; | 2765 | } __packed; |
2766 | 2766 | ||
2767 | struct iwl39_statistics_tx { | 2767 | struct iwl39_stats_tx { |
2768 | __le32 preamble_cnt; | 2768 | __le32 preamble_cnt; |
2769 | __le32 rx_detected_cnt; | 2769 | __le32 rx_detected_cnt; |
2770 | __le32 bt_prio_defer_cnt; | 2770 | __le32 bt_prio_defer_cnt; |
@@ -2776,31 +2776,31 @@ struct iwl39_statistics_tx { | |||
2776 | __le32 actual_ack_cnt; | 2776 | __le32 actual_ack_cnt; |
2777 | } __packed; | 2777 | } __packed; |
2778 | 2778 | ||
2779 | struct statistics_dbg { | 2779 | struct stats_dbg { |
2780 | __le32 burst_check; | 2780 | __le32 burst_check; |
2781 | __le32 burst_count; | 2781 | __le32 burst_count; |
2782 | __le32 wait_for_silence_timeout_cnt; | 2782 | __le32 wait_for_silence_timeout_cnt; |
2783 | __le32 reserved[3]; | 2783 | __le32 reserved[3]; |
2784 | } __packed; | 2784 | } __packed; |
2785 | 2785 | ||
2786 | struct iwl39_statistics_div { | 2786 | struct iwl39_stats_div { |
2787 | __le32 tx_on_a; | 2787 | __le32 tx_on_a; |
2788 | __le32 tx_on_b; | 2788 | __le32 tx_on_b; |
2789 | __le32 exec_time; | 2789 | __le32 exec_time; |
2790 | __le32 probe_time; | 2790 | __le32 probe_time; |
2791 | } __packed; | 2791 | } __packed; |
2792 | 2792 | ||
2793 | struct iwl39_statistics_general { | 2793 | struct iwl39_stats_general { |
2794 | __le32 temperature; | 2794 | __le32 temperature; |
2795 | struct statistics_dbg dbg; | 2795 | struct stats_dbg dbg; |
2796 | __le32 sleep_time; | 2796 | __le32 sleep_time; |
2797 | __le32 slots_out; | 2797 | __le32 slots_out; |
2798 | __le32 slots_idle; | 2798 | __le32 slots_idle; |
2799 | __le32 ttl_timestamp; | 2799 | __le32 ttl_timestamp; |
2800 | struct iwl39_statistics_div div; | 2800 | struct iwl39_stats_div div; |
2801 | } __packed; | 2801 | } __packed; |
2802 | 2802 | ||
2803 | struct statistics_rx_phy { | 2803 | struct stats_rx_phy { |
2804 | __le32 ina_cnt; | 2804 | __le32 ina_cnt; |
2805 | __le32 fina_cnt; | 2805 | __le32 fina_cnt; |
2806 | __le32 plcp_err; | 2806 | __le32 plcp_err; |
@@ -2823,7 +2823,7 @@ struct statistics_rx_phy { | |||
2823 | __le32 reserved3; | 2823 | __le32 reserved3; |
2824 | } __packed; | 2824 | } __packed; |
2825 | 2825 | ||
2826 | struct statistics_rx_ht_phy { | 2826 | struct stats_rx_ht_phy { |
2827 | __le32 plcp_err; | 2827 | __le32 plcp_err; |
2828 | __le32 overrun_err; | 2828 | __le32 overrun_err; |
2829 | __le32 early_overrun_err; | 2829 | __le32 early_overrun_err; |
@@ -2838,7 +2838,7 @@ struct statistics_rx_ht_phy { | |||
2838 | 2838 | ||
2839 | #define INTERFERENCE_DATA_AVAILABLE cpu_to_le32(1) | 2839 | #define INTERFERENCE_DATA_AVAILABLE cpu_to_le32(1) |
2840 | 2840 | ||
2841 | struct statistics_rx_non_phy { | 2841 | struct stats_rx_non_phy { |
2842 | __le32 bogus_cts; /* CTS received when not expecting CTS */ | 2842 | __le32 bogus_cts; /* CTS received when not expecting CTS */ |
2843 | __le32 bogus_ack; /* ACK received when not expecting ACK */ | 2843 | __le32 bogus_ack; /* ACK received when not expecting ACK */ |
2844 | __le32 non_bssid_frames; /* number of frames with BSSID that | 2844 | __le32 non_bssid_frames; /* number of frames with BSSID that |
@@ -2871,28 +2871,28 @@ struct statistics_rx_non_phy { | |||
2871 | __le32 beacon_energy_c; | 2871 | __le32 beacon_energy_c; |
2872 | } __packed; | 2872 | } __packed; |
2873 | 2873 | ||
2874 | struct statistics_rx { | 2874 | struct stats_rx { |
2875 | struct statistics_rx_phy ofdm; | 2875 | struct stats_rx_phy ofdm; |
2876 | struct statistics_rx_phy cck; | 2876 | struct stats_rx_phy cck; |
2877 | struct statistics_rx_non_phy general; | 2877 | struct stats_rx_non_phy general; |
2878 | struct statistics_rx_ht_phy ofdm_ht; | 2878 | struct stats_rx_ht_phy ofdm_ht; |
2879 | } __packed; | 2879 | } __packed; |
2880 | 2880 | ||
2881 | /** | 2881 | /** |
2882 | * struct statistics_tx_power - current tx power | 2882 | * struct stats_tx_power - current tx power |
2883 | * | 2883 | * |
2884 | * @ant_a: current tx power on chain a in 1/2 dB step | 2884 | * @ant_a: current tx power on chain a in 1/2 dB step |
2885 | * @ant_b: current tx power on chain b in 1/2 dB step | 2885 | * @ant_b: current tx power on chain b in 1/2 dB step |
2886 | * @ant_c: current tx power on chain c in 1/2 dB step | 2886 | * @ant_c: current tx power on chain c in 1/2 dB step |
2887 | */ | 2887 | */ |
2888 | struct statistics_tx_power { | 2888 | struct stats_tx_power { |
2889 | u8 ant_a; | 2889 | u8 ant_a; |
2890 | u8 ant_b; | 2890 | u8 ant_b; |
2891 | u8 ant_c; | 2891 | u8 ant_c; |
2892 | u8 reserved; | 2892 | u8 reserved; |
2893 | } __packed; | 2893 | } __packed; |
2894 | 2894 | ||
2895 | struct statistics_tx_non_phy_agg { | 2895 | struct stats_tx_non_phy_agg { |
2896 | __le32 ba_timeout; | 2896 | __le32 ba_timeout; |
2897 | __le32 ba_reschedule_frames; | 2897 | __le32 ba_reschedule_frames; |
2898 | __le32 scd_query_agg_frame_cnt; | 2898 | __le32 scd_query_agg_frame_cnt; |
@@ -2905,7 +2905,7 @@ struct statistics_tx_non_phy_agg { | |||
2905 | __le32 rx_ba_rsp_cnt; | 2905 | __le32 rx_ba_rsp_cnt; |
2906 | } __packed; | 2906 | } __packed; |
2907 | 2907 | ||
2908 | struct statistics_tx { | 2908 | struct stats_tx { |
2909 | __le32 preamble_cnt; | 2909 | __le32 preamble_cnt; |
2910 | __le32 rx_detected_cnt; | 2910 | __le32 rx_detected_cnt; |
2911 | __le32 bt_prio_defer_cnt; | 2911 | __le32 bt_prio_defer_cnt; |
@@ -2920,13 +2920,13 @@ struct statistics_tx { | |||
2920 | __le32 burst_abort_missing_next_frame_cnt; | 2920 | __le32 burst_abort_missing_next_frame_cnt; |
2921 | __le32 cts_timeout_collision; | 2921 | __le32 cts_timeout_collision; |
2922 | __le32 ack_or_ba_timeout_collision; | 2922 | __le32 ack_or_ba_timeout_collision; |
2923 | struct statistics_tx_non_phy_agg agg; | 2923 | struct stats_tx_non_phy_agg agg; |
2924 | 2924 | ||
2925 | __le32 reserved1; | 2925 | __le32 reserved1; |
2926 | } __packed; | 2926 | } __packed; |
2927 | 2927 | ||
2928 | 2928 | ||
2929 | struct statistics_div { | 2929 | struct stats_div { |
2930 | __le32 tx_on_a; | 2930 | __le32 tx_on_a; |
2931 | __le32 tx_on_b; | 2931 | __le32 tx_on_b; |
2932 | __le32 exec_time; | 2932 | __le32 exec_time; |
@@ -2935,14 +2935,14 @@ struct statistics_div { | |||
2935 | __le32 reserved2; | 2935 | __le32 reserved2; |
2936 | } __packed; | 2936 | } __packed; |
2937 | 2937 | ||
2938 | struct statistics_general_common { | 2938 | struct stats_general_common { |
2939 | __le32 temperature; /* radio temperature */ | 2939 | __le32 temperature; /* radio temperature */ |
2940 | struct statistics_dbg dbg; | 2940 | struct stats_dbg dbg; |
2941 | __le32 sleep_time; | 2941 | __le32 sleep_time; |
2942 | __le32 slots_out; | 2942 | __le32 slots_out; |
2943 | __le32 slots_idle; | 2943 | __le32 slots_idle; |
2944 | __le32 ttl_timestamp; | 2944 | __le32 ttl_timestamp; |
2945 | struct statistics_div div; | 2945 | struct stats_div div; |
2946 | __le32 rx_enable_counter; | 2946 | __le32 rx_enable_counter; |
2947 | /* | 2947 | /* |
2948 | * num_of_sos_states: | 2948 | * num_of_sos_states: |
@@ -2952,8 +2952,8 @@ struct statistics_general_common { | |||
2952 | __le32 num_of_sos_states; | 2952 | __le32 num_of_sos_states; |
2953 | } __packed; | 2953 | } __packed; |
2954 | 2954 | ||
2955 | struct statistics_general { | 2955 | struct stats_general { |
2956 | struct statistics_general_common common; | 2956 | struct stats_general_common common; |
2957 | __le32 reserved2; | 2957 | __le32 reserved2; |
2958 | __le32 reserved3; | 2958 | __le32 reserved3; |
2959 | } __packed; | 2959 | } __packed; |
@@ -2966,11 +2966,11 @@ struct statistics_general { | |||
2966 | * REPLY_STATISTICS_CMD = 0x9c, | 2966 | * REPLY_STATISTICS_CMD = 0x9c, |
2967 | * all devices identical. | 2967 | * all devices identical. |
2968 | * | 2968 | * |
2969 | * This command triggers an immediate response containing uCode statistics. | 2969 | * This command triggers an immediate response containing uCode stats. |
2970 | * The response is in the same format as STATISTICS_NOTIFICATION 0x9d, below. | 2970 | * The response is in the same format as STATISTICS_NOTIFICATION 0x9d, below. |
2971 | * | 2971 | * |
2972 | * If the CLEAR_STATS configuration flag is set, uCode will clear its | 2972 | * If the CLEAR_STATS configuration flag is set, uCode will clear its |
2973 | * internal copy of the statistics (counters) after issuing the response. | 2973 | * internal copy of the stats (counters) after issuing the response. |
2974 | * This flag does not affect STATISTICS_NOTIFICATIONs after beacons (see below). | 2974 | * This flag does not affect STATISTICS_NOTIFICATIONs after beacons (see below). |
2975 | * | 2975 | * |
2976 | * If the DISABLE_NOTIF configuration flag is set, uCode will not issue | 2976 | * If the DISABLE_NOTIF configuration flag is set, uCode will not issue |
@@ -2979,7 +2979,7 @@ struct statistics_general { | |||
2979 | */ | 2979 | */ |
2980 | #define IL_STATS_CONF_CLEAR_STATS cpu_to_le32(0x1) /* see above */ | 2980 | #define IL_STATS_CONF_CLEAR_STATS cpu_to_le32(0x1) /* see above */ |
2981 | #define IL_STATS_CONF_DISABLE_NOTIF cpu_to_le32(0x2)/* see above */ | 2981 | #define IL_STATS_CONF_DISABLE_NOTIF cpu_to_le32(0x2)/* see above */ |
2982 | struct il_statistics_cmd { | 2982 | struct il_stats_cmd { |
2983 | __le32 configuration_flags; /* IL_STATS_CONF_* */ | 2983 | __le32 configuration_flags; /* IL_STATS_CONF_* */ |
2984 | } __packed; | 2984 | } __packed; |
2985 | 2985 | ||
@@ -2994,25 +2994,25 @@ struct il_statistics_cmd { | |||
2994 | * cleared when changing channels or when driver issues REPLY_STATISTICS_CMD | 2994 | * cleared when changing channels or when driver issues REPLY_STATISTICS_CMD |
2995 | * 0x9c with CLEAR_STATS bit set (see above). | 2995 | * 0x9c with CLEAR_STATS bit set (see above). |
2996 | * | 2996 | * |
2997 | * uCode also issues this notification during scans. uCode clears statistics | 2997 | * uCode also issues this notification during scans. uCode clears stats |
2998 | * appropriately so that each notification contains statistics for only the | 2998 | * appropriately so that each notification contains stats for only the |
2999 | * one channel that has just been scanned. | 2999 | * one channel that has just been scanned. |
3000 | */ | 3000 | */ |
3001 | #define STATISTICS_REPLY_FLG_BAND_24G_MSK cpu_to_le32(0x2) | 3001 | #define STATISTICS_REPLY_FLG_BAND_24G_MSK cpu_to_le32(0x2) |
3002 | #define STATISTICS_REPLY_FLG_HT40_MODE_MSK cpu_to_le32(0x8) | 3002 | #define STATISTICS_REPLY_FLG_HT40_MODE_MSK cpu_to_le32(0x8) |
3003 | 3003 | ||
3004 | struct il3945_notif_statistics { | 3004 | struct il3945_notif_stats { |
3005 | __le32 flag; | 3005 | __le32 flag; |
3006 | struct iwl39_statistics_rx rx; | 3006 | struct iwl39_stats_rx rx; |
3007 | struct iwl39_statistics_tx tx; | 3007 | struct iwl39_stats_tx tx; |
3008 | struct iwl39_statistics_general general; | 3008 | struct iwl39_stats_general general; |
3009 | } __packed; | 3009 | } __packed; |
3010 | 3010 | ||
3011 | struct il_notif_statistics { | 3011 | struct il_notif_stats { |
3012 | __le32 flag; | 3012 | __le32 flag; |
3013 | struct statistics_rx rx; | 3013 | struct stats_rx rx; |
3014 | struct statistics_tx tx; | 3014 | struct stats_tx tx; |
3015 | struct statistics_general general; | 3015 | struct stats_general general; |
3016 | } __packed; | 3016 | } __packed; |
3017 | 3017 | ||
3018 | /* | 3018 | /* |
@@ -3078,10 +3078,10 @@ struct il_missed_beacon_notif { | |||
3078 | * | 3078 | * |
3079 | * While associated, uCode delivers STATISTICS_NOTIFICATIONs after each | 3079 | * While associated, uCode delivers STATISTICS_NOTIFICATIONs after each |
3080 | * received beacon. These provide information to the driver to analyze the | 3080 | * received beacon. These provide information to the driver to analyze the |
3081 | * sensitivity. Don't analyze statistics that come in from scanning, or any | 3081 | * sensitivity. Don't analyze stats that come in from scanning, or any |
3082 | * other non-associated-network source. Pertinent statistics include: | 3082 | * other non-associated-network source. Pertinent stats include: |
3083 | * | 3083 | * |
3084 | * From "general" statistics (struct statistics_rx_non_phy): | 3084 | * From "general" stats (struct stats_rx_non_phy): |
3085 | * | 3085 | * |
3086 | * (beacon_energy_[abc] & 0x0FF00) >> 8 (unsigned, higher value is lower level) | 3086 | * (beacon_energy_[abc] & 0x0FF00) >> 8 (unsigned, higher value is lower level) |
3087 | * Measure of energy of desired signal. Used for establishing a level | 3087 | * Measure of energy of desired signal. Used for establishing a level |
@@ -3094,7 +3094,7 @@ struct il_missed_beacon_notif { | |||
3094 | * uSecs of actual Rx time during beacon period (varies according to | 3094 | * uSecs of actual Rx time during beacon period (varies according to |
3095 | * how much time was spent transmitting). | 3095 | * how much time was spent transmitting). |
3096 | * | 3096 | * |
3097 | * From "cck" and "ofdm" statistics (struct statistics_rx_phy), separately: | 3097 | * From "cck" and "ofdm" stats (struct stats_rx_phy), separately: |
3098 | * | 3098 | * |
3099 | * false_alarm_cnt | 3099 | * false_alarm_cnt |
3100 | * Signal locks abandoned early (before phy-level header). | 3100 | * Signal locks abandoned early (before phy-level header). |
@@ -3255,8 +3255,8 @@ struct il_sensitivity_cmd { | |||
3255 | * This command sets the relative gains of 4965 device's 3 radio receiver chains. | 3255 | * This command sets the relative gains of 4965 device's 3 radio receiver chains. |
3256 | * | 3256 | * |
3257 | * After the first association, driver should accumulate signal and noise | 3257 | * After the first association, driver should accumulate signal and noise |
3258 | * statistics from the STATISTICS_NOTIFICATIONs that follow the first 20 | 3258 | * stats from the STATISTICS_NOTIFICATIONs that follow the first 20 |
3259 | * beacons from the associated network (don't collect statistics that come | 3259 | * beacons from the associated network (don't collect stats that come |
3260 | * in from scanning, or any other non-network source). | 3260 | * in from scanning, or any other non-network source). |
3261 | * | 3261 | * |
3262 | * DISCONNECTED ANTENNA: | 3262 | * DISCONNECTED ANTENNA: |
@@ -3264,7 +3264,7 @@ struct il_sensitivity_cmd { | |||
3264 | * Driver should determine which antennas are actually connected, by comparing | 3264 | * Driver should determine which antennas are actually connected, by comparing |
3265 | * average beacon signal levels for the 3 Rx chains. Accumulate (add) the | 3265 | * average beacon signal levels for the 3 Rx chains. Accumulate (add) the |
3266 | * following values over 20 beacons, one accumulator for each of the chains | 3266 | * following values over 20 beacons, one accumulator for each of the chains |
3267 | * a/b/c, from struct statistics_rx_non_phy: | 3267 | * a/b/c, from struct stats_rx_non_phy: |
3268 | * | 3268 | * |
3269 | * beacon_rssi_[abc] & 0x0FF (unsigned, units in dB) | 3269 | * beacon_rssi_[abc] & 0x0FF (unsigned, units in dB) |
3270 | * | 3270 | * |
@@ -3283,7 +3283,7 @@ struct il_sensitivity_cmd { | |||
3283 | * to antennas, see above) for gain, by comparing the average signal levels | 3283 | * to antennas, see above) for gain, by comparing the average signal levels |
3284 | * detected during the silence after each beacon (background noise). | 3284 | * detected during the silence after each beacon (background noise). |
3285 | * Accumulate (add) the following values over 20 beacons, one accumulator for | 3285 | * Accumulate (add) the following values over 20 beacons, one accumulator for |
3286 | * each of the chains a/b/c, from struct statistics_rx_non_phy: | 3286 | * each of the chains a/b/c, from struct stats_rx_non_phy: |
3287 | * | 3287 | * |
3288 | * beacon_silence_rssi_[abc] & 0x0FF (unsigned, units in dB) | 3288 | * beacon_silence_rssi_[abc] & 0x0FF (unsigned, units in dB) |
3289 | * | 3289 | * |
@@ -3387,7 +3387,7 @@ struct il_rx_pkt { | |||
3387 | struct il_rem_sta_resp rem_sta; | 3387 | struct il_rem_sta_resp rem_sta; |
3388 | struct il_sleep_notification sleep_notif; | 3388 | struct il_sleep_notification sleep_notif; |
3389 | struct il_spectrum_resp spectrum; | 3389 | struct il_spectrum_resp spectrum; |
3390 | struct il_notif_statistics stats; | 3390 | struct il_notif_stats stats; |
3391 | struct il_compressed_ba_resp compressed_ba; | 3391 | struct il_compressed_ba_resp compressed_ba; |
3392 | struct il_missed_beacon_notif missed_beacon; | 3392 | struct il_missed_beacon_notif missed_beacon; |
3393 | __le32 status; | 3393 | __le32 status; |
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index 8feb2dde09b5..475bcac7aa9e 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
@@ -1187,23 +1187,23 @@ void il_send_bt_config(struct il_priv *il) | |||
1187 | } | 1187 | } |
1188 | EXPORT_SYMBOL(il_send_bt_config); | 1188 | EXPORT_SYMBOL(il_send_bt_config); |
1189 | 1189 | ||
1190 | int il_send_statistics_request(struct il_priv *il, u8 flags, bool clear) | 1190 | int il_send_stats_request(struct il_priv *il, u8 flags, bool clear) |
1191 | { | 1191 | { |
1192 | struct il_statistics_cmd statistics_cmd = { | 1192 | struct il_stats_cmd stats_cmd = { |
1193 | .configuration_flags = | 1193 | .configuration_flags = |
1194 | clear ? IL_STATS_CONF_CLEAR_STATS : 0, | 1194 | clear ? IL_STATS_CONF_CLEAR_STATS : 0, |
1195 | }; | 1195 | }; |
1196 | 1196 | ||
1197 | if (flags & CMD_ASYNC) | 1197 | if (flags & CMD_ASYNC) |
1198 | return il_send_cmd_pdu_async(il, REPLY_STATISTICS_CMD, | 1198 | return il_send_cmd_pdu_async(il, REPLY_STATISTICS_CMD, |
1199 | sizeof(struct il_statistics_cmd), | 1199 | sizeof(struct il_stats_cmd), |
1200 | &statistics_cmd, NULL); | 1200 | &stats_cmd, NULL); |
1201 | else | 1201 | else |
1202 | return il_send_cmd_pdu(il, REPLY_STATISTICS_CMD, | 1202 | return il_send_cmd_pdu(il, REPLY_STATISTICS_CMD, |
1203 | sizeof(struct il_statistics_cmd), | 1203 | sizeof(struct il_stats_cmd), |
1204 | &statistics_cmd); | 1204 | &stats_cmd); |
1205 | } | 1205 | } |
1206 | EXPORT_SYMBOL(il_send_statistics_request); | 1206 | EXPORT_SYMBOL(il_send_stats_request); |
1207 | 1207 | ||
1208 | void il_rx_pm_sleep_notif(struct il_priv *il, | 1208 | void il_rx_pm_sleep_notif(struct il_priv *il, |
1209 | struct il_rx_buf *rxb) | 1209 | struct il_rx_buf *rxb) |
@@ -1217,7 +1217,7 @@ void il_rx_pm_sleep_notif(struct il_priv *il, | |||
1217 | } | 1217 | } |
1218 | EXPORT_SYMBOL(il_rx_pm_sleep_notif); | 1218 | EXPORT_SYMBOL(il_rx_pm_sleep_notif); |
1219 | 1219 | ||
1220 | void il_rx_pm_debug_statistics_notif(struct il_priv *il, | 1220 | void il_rx_pm_debug_stats_notif(struct il_priv *il, |
1221 | struct il_rx_buf *rxb) | 1221 | struct il_rx_buf *rxb) |
1222 | { | 1222 | { |
1223 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 1223 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
@@ -1227,7 +1227,7 @@ void il_rx_pm_debug_statistics_notif(struct il_priv *il, | |||
1227 | il_get_cmd_string(pkt->hdr.cmd)); | 1227 | il_get_cmd_string(pkt->hdr.cmd)); |
1228 | il_print_hex_dump(il, IL_DL_RADIO, pkt->u.raw, len); | 1228 | il_print_hex_dump(il, IL_DL_RADIO, pkt->u.raw, len); |
1229 | } | 1229 | } |
1230 | EXPORT_SYMBOL(il_rx_pm_debug_statistics_notif); | 1230 | EXPORT_SYMBOL(il_rx_pm_debug_stats_notif); |
1231 | 1231 | ||
1232 | void il_rx_reply_error(struct il_priv *il, | 1232 | void il_rx_reply_error(struct il_priv *il, |
1233 | struct il_rx_buf *rxb) | 1233 | struct il_rx_buf *rxb) |
@@ -1614,7 +1614,7 @@ void il_clear_traffic_stats(struct il_priv *il) | |||
1614 | * if CONFIG_IWLEGACY_DEBUGFS defined, | 1614 | * if CONFIG_IWLEGACY_DEBUGFS defined, |
1615 | * il_update_stats function will | 1615 | * il_update_stats function will |
1616 | * record all the MGMT, CTRL and DATA pkt for both TX and Rx pass | 1616 | * record all the MGMT, CTRL and DATA pkt for both TX and Rx pass |
1617 | * Use debugFs to display the rx/rx_statistics | 1617 | * Use debugFs to display the rx/rx_stats |
1618 | * if CONFIG_IWLEGACY_DEBUGFS not being defined, then no MGMT and CTRL | 1618 | * if CONFIG_IWLEGACY_DEBUGFS not being defined, then no MGMT and CTRL |
1619 | * information will be recorded, but DATA pkt still will be recorded | 1619 | * information will be recorded, but DATA pkt still will be recorded |
1620 | * for the reason of il_led.c need to control the led blinking based on | 1620 | * for the reason of il_led.c need to control the led blinking based on |
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.h b/drivers/net/wireless/iwlegacy/iwl-core.h index bc2ae06bf4a6..833376171207 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.h +++ b/drivers/net/wireless/iwlegacy/iwl-core.h | |||
@@ -371,7 +371,7 @@ static inline void il_update_stats(struct il_priv *il, bool is_tx, | |||
371 | * **************************************************/ | 371 | * **************************************************/ |
372 | void il_rx_pm_sleep_notif(struct il_priv *il, | 372 | void il_rx_pm_sleep_notif(struct il_priv *il, |
373 | struct il_rx_buf *rxb); | 373 | struct il_rx_buf *rxb); |
374 | void il_rx_pm_debug_statistics_notif(struct il_priv *il, | 374 | void il_rx_pm_debug_stats_notif(struct il_priv *il, |
375 | struct il_rx_buf *rxb); | 375 | struct il_rx_buf *rxb); |
376 | void il_rx_reply_error(struct il_priv *il, | 376 | void il_rx_reply_error(struct il_priv *il, |
377 | struct il_rx_buf *rxb); | 377 | struct il_rx_buf *rxb); |
@@ -390,7 +390,7 @@ void il_tx_cmd_complete(struct il_priv *il, | |||
390 | /* Handlers */ | 390 | /* Handlers */ |
391 | void il_rx_spectrum_measure_notif(struct il_priv *il, | 391 | void il_rx_spectrum_measure_notif(struct il_priv *il, |
392 | struct il_rx_buf *rxb); | 392 | struct il_rx_buf *rxb); |
393 | void il_recover_from_statistics(struct il_priv *il, | 393 | void il_recover_from_stats(struct il_priv *il, |
394 | struct il_rx_pkt *pkt); | 394 | struct il_rx_pkt *pkt); |
395 | void il_chswitch_done(struct il_priv *il, bool is_success); | 395 | void il_chswitch_done(struct il_priv *il, bool is_success); |
396 | void il_rx_csa(struct il_priv *il, struct il_rx_buf *rxb); | 396 | void il_rx_csa(struct il_priv *il, struct il_rx_buf *rxb); |
@@ -596,7 +596,7 @@ static inline int il_is_ready_rf(struct il_priv *il) | |||
596 | } | 596 | } |
597 | 597 | ||
598 | extern void il_send_bt_config(struct il_priv *il); | 598 | extern void il_send_bt_config(struct il_priv *il); |
599 | extern int il_send_statistics_request(struct il_priv *il, | 599 | extern int il_send_stats_request(struct il_priv *il, |
600 | u8 flags, bool clear); | 600 | u8 flags, bool clear); |
601 | void il_apm_stop(struct il_priv *il); | 601 | void il_apm_stop(struct il_priv *il); |
602 | int il_apm_init(struct il_priv *il); | 602 | int il_apm_init(struct il_priv *il); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-debugfs.c b/drivers/net/wireless/iwlegacy/iwl-debugfs.c index a4b1f37f48e5..e8153b0dc5b7 100644 --- a/drivers/net/wireless/iwlegacy/iwl-debugfs.c +++ b/drivers/net/wireless/iwlegacy/iwl-debugfs.c | |||
@@ -102,7 +102,7 @@ static const struct file_operations il_dbgfs_##name##_ops = { \ | |||
102 | .llseek = generic_file_llseek, \ | 102 | .llseek = generic_file_llseek, \ |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static ssize_t il_dbgfs_tx_statistics_read(struct file *file, | 105 | static ssize_t il_dbgfs_tx_stats_read(struct file *file, |
106 | char __user *user_buf, | 106 | char __user *user_buf, |
107 | size_t count, loff_t *ppos) { | 107 | size_t count, loff_t *ppos) { |
108 | 108 | ||
@@ -142,7 +142,7 @@ static ssize_t il_dbgfs_tx_statistics_read(struct file *file, | |||
142 | } | 142 | } |
143 | 143 | ||
144 | static ssize_t | 144 | static ssize_t |
145 | il_dbgfs_clear_traffic_statistics_write(struct file *file, | 145 | il_dbgfs_clear_traffic_stats_write(struct file *file, |
146 | const char __user *user_buf, | 146 | const char __user *user_buf, |
147 | size_t count, loff_t *ppos) | 147 | size_t count, loff_t *ppos) |
148 | { | 148 | { |
@@ -162,7 +162,7 @@ il_dbgfs_clear_traffic_statistics_write(struct file *file, | |||
162 | return count; | 162 | return count; |
163 | } | 163 | } |
164 | 164 | ||
165 | static ssize_t il_dbgfs_rx_statistics_read(struct file *file, | 165 | static ssize_t il_dbgfs_rx_stats_read(struct file *file, |
166 | char __user *user_buf, | 166 | char __user *user_buf, |
167 | size_t count, loff_t *ppos) { | 167 | size_t count, loff_t *ppos) { |
168 | 168 | ||
@@ -1031,7 +1031,7 @@ static ssize_t il_dbgfs_power_save_status_read(struct file *file, | |||
1031 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 1031 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | static ssize_t il_dbgfs_clear_ucode_statistics_write(struct file *file, | 1034 | static ssize_t il_dbgfs_clear_ucode_stats_write(struct file *file, |
1035 | const char __user *user_buf, | 1035 | const char __user *user_buf, |
1036 | size_t count, loff_t *ppos) | 1036 | size_t count, loff_t *ppos) |
1037 | { | 1037 | { |
@@ -1047,9 +1047,9 @@ static ssize_t il_dbgfs_clear_ucode_statistics_write(struct file *file, | |||
1047 | if (sscanf(buf, "%d", &clear) != 1) | 1047 | if (sscanf(buf, "%d", &clear) != 1) |
1048 | return -EFAULT; | 1048 | return -EFAULT; |
1049 | 1049 | ||
1050 | /* make request to uCode to retrieve statistics information */ | 1050 | /* make request to uCode to retrieve stats information */ |
1051 | mutex_lock(&il->mutex); | 1051 | mutex_lock(&il->mutex); |
1052 | il_send_statistics_request(il, CMD_SYNC, true); | 1052 | il_send_stats_request(il, CMD_SYNC, true); |
1053 | mutex_unlock(&il->mutex); | 1053 | mutex_unlock(&il->mutex); |
1054 | 1054 | ||
1055 | return count; | 1055 | return count; |
@@ -1206,8 +1206,8 @@ static ssize_t il_dbgfs_wd_timeout_write(struct file *file, | |||
1206 | return count; | 1206 | return count; |
1207 | } | 1207 | } |
1208 | 1208 | ||
1209 | DEBUGFS_READ_FILE_OPS(rx_statistics); | 1209 | DEBUGFS_READ_FILE_OPS(rx_stats); |
1210 | DEBUGFS_READ_FILE_OPS(tx_statistics); | 1210 | DEBUGFS_READ_FILE_OPS(tx_stats); |
1211 | DEBUGFS_READ_WRITE_FILE_OPS(traffic_log); | 1211 | DEBUGFS_READ_WRITE_FILE_OPS(traffic_log); |
1212 | DEBUGFS_READ_FILE_OPS(rx_queue); | 1212 | DEBUGFS_READ_FILE_OPS(rx_queue); |
1213 | DEBUGFS_READ_FILE_OPS(tx_queue); | 1213 | DEBUGFS_READ_FILE_OPS(tx_queue); |
@@ -1217,8 +1217,8 @@ DEBUGFS_READ_FILE_OPS(ucode_general_stats); | |||
1217 | DEBUGFS_READ_FILE_OPS(sensitivity); | 1217 | DEBUGFS_READ_FILE_OPS(sensitivity); |
1218 | DEBUGFS_READ_FILE_OPS(chain_noise); | 1218 | DEBUGFS_READ_FILE_OPS(chain_noise); |
1219 | DEBUGFS_READ_FILE_OPS(power_save_status); | 1219 | DEBUGFS_READ_FILE_OPS(power_save_status); |
1220 | DEBUGFS_WRITE_FILE_OPS(clear_ucode_statistics); | 1220 | DEBUGFS_WRITE_FILE_OPS(clear_ucode_stats); |
1221 | DEBUGFS_WRITE_FILE_OPS(clear_traffic_statistics); | 1221 | DEBUGFS_WRITE_FILE_OPS(clear_traffic_stats); |
1222 | DEBUGFS_READ_FILE_OPS(fh_reg); | 1222 | DEBUGFS_READ_FILE_OPS(fh_reg); |
1223 | DEBUGFS_READ_WRITE_FILE_OPS(missed_beacon); | 1223 | DEBUGFS_READ_WRITE_FILE_OPS(missed_beacon); |
1224 | DEBUGFS_READ_WRITE_FILE_OPS(force_reset); | 1224 | DEBUGFS_READ_WRITE_FILE_OPS(force_reset); |
@@ -1259,14 +1259,14 @@ int il_dbgfs_register(struct il_priv *il, const char *name) | |||
1259 | DEBUGFS_ADD_FILE(interrupt, dir_data, S_IWUSR | S_IRUSR); | 1259 | DEBUGFS_ADD_FILE(interrupt, dir_data, S_IWUSR | S_IRUSR); |
1260 | DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR); | 1260 | DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR); |
1261 | DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); | 1261 | DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); |
1262 | DEBUGFS_ADD_FILE(rx_statistics, dir_debug, S_IRUSR); | 1262 | DEBUGFS_ADD_FILE(rx_stats, dir_debug, S_IRUSR); |
1263 | DEBUGFS_ADD_FILE(tx_statistics, dir_debug, S_IRUSR); | 1263 | DEBUGFS_ADD_FILE(tx_stats, dir_debug, S_IRUSR); |
1264 | DEBUGFS_ADD_FILE(traffic_log, dir_debug, S_IWUSR | S_IRUSR); | 1264 | DEBUGFS_ADD_FILE(traffic_log, dir_debug, S_IWUSR | S_IRUSR); |
1265 | DEBUGFS_ADD_FILE(rx_queue, dir_debug, S_IRUSR); | 1265 | DEBUGFS_ADD_FILE(rx_queue, dir_debug, S_IRUSR); |
1266 | DEBUGFS_ADD_FILE(tx_queue, dir_debug, S_IRUSR); | 1266 | DEBUGFS_ADD_FILE(tx_queue, dir_debug, S_IRUSR); |
1267 | DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); | 1267 | DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); |
1268 | DEBUGFS_ADD_FILE(clear_ucode_statistics, dir_debug, S_IWUSR); | 1268 | DEBUGFS_ADD_FILE(clear_ucode_stats, dir_debug, S_IWUSR); |
1269 | DEBUGFS_ADD_FILE(clear_traffic_statistics, dir_debug, S_IWUSR); | 1269 | DEBUGFS_ADD_FILE(clear_traffic_stats, dir_debug, S_IWUSR); |
1270 | DEBUGFS_ADD_FILE(fh_reg, dir_debug, S_IRUSR); | 1270 | DEBUGFS_ADD_FILE(fh_reg, dir_debug, S_IRUSR); |
1271 | DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); | 1271 | DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); |
1272 | DEBUGFS_ADD_FILE(force_reset, dir_debug, S_IWUSR | S_IRUSR); | 1272 | DEBUGFS_ADD_FILE(force_reset, dir_debug, S_IWUSR | S_IRUSR); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h index ad72d3986147..4388538b9de8 100644 --- a/drivers/net/wireless/iwlegacy/iwl-dev.h +++ b/drivers/net/wireless/iwlegacy/iwl-dev.h | |||
@@ -57,7 +57,7 @@ struct il_tx_queue; | |||
57 | 57 | ||
58 | /* Default noise level to report when noise measurement is not available. | 58 | /* Default noise level to report when noise measurement is not available. |
59 | * This may be because we're: | 59 | * This may be because we're: |
60 | * 1) Not associated (4965, no beacon statistics being sent to driver) | 60 | * 1) Not associated (4965, no beacon stats being sent to driver) |
61 | * 2) Scanning (noise measurement does not apply to associated channel) | 61 | * 2) Scanning (noise measurement does not apply to associated channel) |
62 | * 3) Receiving CCK (3945 delivers noise info only for OFDM frames) | 62 | * 3) Receiving CCK (3945 delivers noise info only for OFDM frames) |
63 | * Use default noise value of -127 ... this is below the range of measurable | 63 | * Use default noise value of -127 ... this is below the range of measurable |
@@ -801,8 +801,8 @@ enum { | |||
801 | MEASUREMENT_ACTIVE = (1 << 1), | 801 | MEASUREMENT_ACTIVE = (1 << 1), |
802 | }; | 802 | }; |
803 | 803 | ||
804 | /* interrupt statistics */ | 804 | /* interrupt stats */ |
805 | struct isr_statistics { | 805 | struct isr_stats { |
806 | u32 hw; | 806 | u32 hw; |
807 | u32 sw; | 807 | u32 sw; |
808 | u32 err_code; | 808 | u32 err_code; |
@@ -817,7 +817,7 @@ struct isr_statistics { | |||
817 | u32 unhandled; | 817 | u32 unhandled; |
818 | }; | 818 | }; |
819 | 819 | ||
820 | /* management statistics */ | 820 | /* management stats */ |
821 | enum il_mgmt_stats { | 821 | enum il_mgmt_stats { |
822 | MANAGEMENT_ASSOC_REQ = 0, | 822 | MANAGEMENT_ASSOC_REQ = 0, |
823 | MANAGEMENT_ASSOC_RESP, | 823 | MANAGEMENT_ASSOC_RESP, |
@@ -833,7 +833,7 @@ enum il_mgmt_stats { | |||
833 | MANAGEMENT_ACTION, | 833 | MANAGEMENT_ACTION, |
834 | MANAGEMENT_MAX, | 834 | MANAGEMENT_MAX, |
835 | }; | 835 | }; |
836 | /* control statistics */ | 836 | /* control stats */ |
837 | enum il_ctrl_stats { | 837 | enum il_ctrl_stats { |
838 | CONTROL_BACK_REQ = 0, | 838 | CONTROL_BACK_REQ = 0, |
839 | CONTROL_BACK, | 839 | CONTROL_BACK, |
@@ -1087,7 +1087,7 @@ struct il_priv { | |||
1087 | struct traffic_stats rx_stats; | 1087 | struct traffic_stats rx_stats; |
1088 | 1088 | ||
1089 | /* counts interrupts */ | 1089 | /* counts interrupts */ |
1090 | struct isr_statistics isr_stats; | 1090 | struct isr_stats isr_stats; |
1091 | 1091 | ||
1092 | struct il_power_mgr power_data; | 1092 | struct il_power_mgr power_data; |
1093 | 1093 | ||
@@ -1131,15 +1131,15 @@ struct il_priv { | |||
1131 | struct delayed_work thermal_periodic; | 1131 | struct delayed_work thermal_periodic; |
1132 | struct delayed_work rfkill_poll; | 1132 | struct delayed_work rfkill_poll; |
1133 | 1133 | ||
1134 | struct il3945_notif_statistics statistics; | 1134 | struct il3945_notif_stats stats; |
1135 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 1135 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
1136 | struct il3945_notif_statistics accum_statistics; | 1136 | struct il3945_notif_stats accum_stats; |
1137 | struct il3945_notif_statistics delta_statistics; | 1137 | struct il3945_notif_stats delta_stats; |
1138 | struct il3945_notif_statistics max_delta; | 1138 | struct il3945_notif_stats max_delta; |
1139 | #endif | 1139 | #endif |
1140 | 1140 | ||
1141 | u32 sta_supp_rates; | 1141 | u32 sta_supp_rates; |
1142 | int last_rx_rssi; /* From Rx packet statistics */ | 1142 | int last_rx_rssi; /* From Rx packet stats */ |
1143 | 1143 | ||
1144 | /* Rx'd packet timing information */ | 1144 | /* Rx'd packet timing information */ |
1145 | u32 last_beacon_time; | 1145 | u32 last_beacon_time; |
@@ -1169,11 +1169,11 @@ struct il_priv { | |||
1169 | u8 phy_calib_chain_noise_reset_cmd; | 1169 | u8 phy_calib_chain_noise_reset_cmd; |
1170 | u8 phy_calib_chain_noise_gain_cmd; | 1170 | u8 phy_calib_chain_noise_gain_cmd; |
1171 | 1171 | ||
1172 | struct il_notif_statistics statistics; | 1172 | struct il_notif_stats stats; |
1173 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 1173 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
1174 | struct il_notif_statistics accum_statistics; | 1174 | struct il_notif_stats accum_stats; |
1175 | struct il_notif_statistics delta_statistics; | 1175 | struct il_notif_stats delta_stats; |
1176 | struct il_notif_statistics max_delta; | 1176 | struct il_notif_stats max_delta; |
1177 | #endif | 1177 | #endif |
1178 | 1178 | ||
1179 | } _4965; | 1179 | } _4965; |
@@ -1229,7 +1229,7 @@ struct il_priv { | |||
1229 | u32 disable_chain_noise_cal; | 1229 | u32 disable_chain_noise_cal; |
1230 | u32 disable_tx_power_cal; | 1230 | u32 disable_tx_power_cal; |
1231 | struct work_struct run_time_calib_work; | 1231 | struct work_struct run_time_calib_work; |
1232 | struct timer_list statistics_periodic; | 1232 | struct timer_list stats_periodic; |
1233 | struct timer_list watchdog; | 1233 | struct timer_list watchdog; |
1234 | bool hw_ready; | 1234 | bool hw_ready; |
1235 | 1235 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-legacy-rs.h b/drivers/net/wireless/iwlegacy/iwl-legacy-rs.h index f24b6b847fb4..19fa92d0e29f 100644 --- a/drivers/net/wireless/iwlegacy/iwl-legacy-rs.h +++ b/drivers/net/wireless/iwlegacy/iwl-legacy-rs.h | |||
@@ -335,7 +335,7 @@ struct il_scale_tbl_info { | |||
335 | }; | 335 | }; |
336 | 336 | ||
337 | struct il_traffic_load { | 337 | struct il_traffic_load { |
338 | unsigned long time_stamp; /* age of the oldest statistics */ | 338 | unsigned long time_stamp; /* age of the oldest stats */ |
339 | u32 packet_count[TID_QUEUE_MAX_SIZE]; /* packet count in this time | 339 | u32 packet_count[TID_QUEUE_MAX_SIZE]; /* packet count in this time |
340 | * slice */ | 340 | * slice */ |
341 | u32 total; /* total num of packets during the | 341 | u32 total; /* total num of packets during the |
diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c index dfc1431072b3..71b2fac1b5d3 100644 --- a/drivers/net/wireless/iwlegacy/iwl-scan.c +++ b/drivers/net/wireless/iwlegacy/iwl-scan.c | |||
@@ -229,7 +229,7 @@ static void il_rx_scan_results_notif(struct il_priv *il, | |||
229 | notif->band ? "bg" : "a", | 229 | notif->band ? "bg" : "a", |
230 | le32_to_cpu(notif->tsf_high), | 230 | le32_to_cpu(notif->tsf_high), |
231 | le32_to_cpu(notif->tsf_low), | 231 | le32_to_cpu(notif->tsf_low), |
232 | le32_to_cpu(notif->statistics[0]), | 232 | le32_to_cpu(notif->stats[0]), |
233 | le32_to_cpu(notif->tsf_low) - il->scan_start_tsf); | 233 | le32_to_cpu(notif->tsf_low) - il->scan_start_tsf); |
234 | #endif | 234 | #endif |
235 | } | 235 | } |
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c index 446bdb5f8624..c602570a3408 100644 --- a/drivers/net/wireless/iwlegacy/iwl3945-base.c +++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c | |||
@@ -862,16 +862,16 @@ static void il3945_setup_rx_handlers(struct il_priv *il) | |||
862 | il_rx_spectrum_measure_notif; | 862 | il_rx_spectrum_measure_notif; |
863 | il->rx_handlers[PM_SLEEP_NOTIFICATION] = il_rx_pm_sleep_notif; | 863 | il->rx_handlers[PM_SLEEP_NOTIFICATION] = il_rx_pm_sleep_notif; |
864 | il->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = | 864 | il->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = |
865 | il_rx_pm_debug_statistics_notif; | 865 | il_rx_pm_debug_stats_notif; |
866 | il->rx_handlers[BEACON_NOTIFICATION] = il3945_rx_beacon_notif; | 866 | il->rx_handlers[BEACON_NOTIFICATION] = il3945_rx_beacon_notif; |
867 | 867 | ||
868 | /* | 868 | /* |
869 | * The same handler is used for both the REPLY to a discrete | 869 | * The same handler is used for both the REPLY to a discrete |
870 | * statistics request from the host as well as for the periodic | 870 | * stats request from the host as well as for the periodic |
871 | * statistics notifications (after received beacons) from the uCode. | 871 | * stats notifications (after received beacons) from the uCode. |
872 | */ | 872 | */ |
873 | il->rx_handlers[REPLY_STATISTICS_CMD] = il3945_reply_statistics; | 873 | il->rx_handlers[REPLY_STATISTICS_CMD] = il3945_reply_stats; |
874 | il->rx_handlers[STATISTICS_NOTIFICATION] = il3945_hw_rx_statistics; | 874 | il->rx_handlers[STATISTICS_NOTIFICATION] = il3945_hw_rx_stats; |
875 | 875 | ||
876 | il_setup_rx_scan_handlers(il); | 876 | il_setup_rx_scan_handlers(il); |
877 | il->rx_handlers[CARD_STATE_NOTIFICATION] = il3945_rx_card_state_notif; | 877 | il->rx_handlers[CARD_STATE_NOTIFICATION] = il3945_rx_card_state_notif; |
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c index 81613ed20449..736c2f540b16 100644 --- a/drivers/net/wireless/iwlegacy/iwl4965-base.c +++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c | |||
@@ -464,16 +464,16 @@ static void il4965_rx_reply_alive(struct il_priv *il, | |||
464 | } | 464 | } |
465 | 465 | ||
466 | /** | 466 | /** |
467 | * il4965_bg_statistics_periodic - Timer callback to queue statistics | 467 | * il4965_bg_stats_periodic - Timer callback to queue stats |
468 | * | 468 | * |
469 | * This callback is provided in order to send a statistics request. | 469 | * This callback is provided in order to send a stats request. |
470 | * | 470 | * |
471 | * This timer function is continually reset to execute within | 471 | * This timer function is continually reset to execute within |
472 | * REG_RECALIB_PERIOD seconds since the last STATISTICS_NOTIFICATION | 472 | * REG_RECALIB_PERIOD seconds since the last STATISTICS_NOTIFICATION |
473 | * was received. We need to ensure we receive the statistics in order | 473 | * was received. We need to ensure we receive the stats in order |
474 | * to update the temperature used for calibrating the TXPOWER. | 474 | * to update the temperature used for calibrating the TXPOWER. |
475 | */ | 475 | */ |
476 | static void il4965_bg_statistics_periodic(unsigned long data) | 476 | static void il4965_bg_stats_periodic(unsigned long data) |
477 | { | 477 | { |
478 | struct il_priv *il = (struct il_priv *)data; | 478 | struct il_priv *il = (struct il_priv *)data; |
479 | 479 | ||
@@ -484,7 +484,7 @@ static void il4965_bg_statistics_periodic(unsigned long data) | |||
484 | if (!il_is_ready_rf(il)) | 484 | if (!il_is_ready_rf(il)) |
485 | return; | 485 | return; |
486 | 486 | ||
487 | il_send_statistics_request(il, CMD_ASYNC, false); | 487 | il_send_stats_request(il, CMD_ASYNC, false); |
488 | } | 488 | } |
489 | 489 | ||
490 | static void il4965_rx_beacon_notif(struct il_priv *il, | 490 | static void il4965_rx_beacon_notif(struct il_priv *il, |
@@ -596,16 +596,16 @@ static void il4965_setup_rx_handlers(struct il_priv *il) | |||
596 | il_rx_spectrum_measure_notif; | 596 | il_rx_spectrum_measure_notif; |
597 | il->rx_handlers[PM_SLEEP_NOTIFICATION] = il_rx_pm_sleep_notif; | 597 | il->rx_handlers[PM_SLEEP_NOTIFICATION] = il_rx_pm_sleep_notif; |
598 | il->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = | 598 | il->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = |
599 | il_rx_pm_debug_statistics_notif; | 599 | il_rx_pm_debug_stats_notif; |
600 | il->rx_handlers[BEACON_NOTIFICATION] = il4965_rx_beacon_notif; | 600 | il->rx_handlers[BEACON_NOTIFICATION] = il4965_rx_beacon_notif; |
601 | 601 | ||
602 | /* | 602 | /* |
603 | * The same handler is used for both the REPLY to a discrete | 603 | * The same handler is used for both the REPLY to a discrete |
604 | * statistics request from the host as well as for the periodic | 604 | * stats request from the host as well as for the periodic |
605 | * statistics notifications (after received beacons) from the uCode. | 605 | * stats notifications (after received beacons) from the uCode. |
606 | */ | 606 | */ |
607 | il->rx_handlers[REPLY_STATISTICS_CMD] = il4965_reply_statistics; | 607 | il->rx_handlers[REPLY_STATISTICS_CMD] = il4965_reply_stats; |
608 | il->rx_handlers[STATISTICS_NOTIFICATION] = il4965_rx_statistics; | 608 | il->rx_handlers[STATISTICS_NOTIFICATION] = il4965_rx_stats; |
609 | 609 | ||
610 | il_setup_rx_scan_handlers(il); | 610 | il_setup_rx_scan_handlers(il); |
611 | 611 | ||
@@ -2105,9 +2105,9 @@ static void il4965_bg_run_time_calib_work(struct work_struct *work) | |||
2105 | 2105 | ||
2106 | if (il->start_calib) { | 2106 | if (il->start_calib) { |
2107 | il4965_chain_noise_calibration(il, | 2107 | il4965_chain_noise_calibration(il, |
2108 | (void *)&il->_4965.statistics); | 2108 | (void *)&il->_4965.stats); |
2109 | il4965_sensitivity_calibration(il, | 2109 | il4965_sensitivity_calibration(il, |
2110 | (void *)&il->_4965.statistics); | 2110 | (void *)&il->_4965.stats); |
2111 | } | 2111 | } |
2112 | 2112 | ||
2113 | mutex_unlock(&il->mutex); | 2113 | mutex_unlock(&il->mutex); |
@@ -2647,7 +2647,7 @@ static void il4965_bg_txpower_work(struct work_struct *work) | |||
2647 | mutex_lock(&il->mutex); | 2647 | mutex_lock(&il->mutex); |
2648 | 2648 | ||
2649 | /* If a scan happened to start before we got here | 2649 | /* If a scan happened to start before we got here |
2650 | * then just return; the statistics notification will | 2650 | * then just return; the stats notification will |
2651 | * kick off another scheduled work to compensate for | 2651 | * kick off another scheduled work to compensate for |
2652 | * any temperature delta we missed here. */ | 2652 | * any temperature delta we missed here. */ |
2653 | if (test_bit(STATUS_EXIT_PENDING, &il->status) || | 2653 | if (test_bit(STATUS_EXIT_PENDING, &il->status) || |
@@ -2682,9 +2682,9 @@ static void il4965_setup_deferred_work(struct il_priv *il) | |||
2682 | 2682 | ||
2683 | INIT_WORK(&il->txpower_work, il4965_bg_txpower_work); | 2683 | INIT_WORK(&il->txpower_work, il4965_bg_txpower_work); |
2684 | 2684 | ||
2685 | init_timer(&il->statistics_periodic); | 2685 | init_timer(&il->stats_periodic); |
2686 | il->statistics_periodic.data = (unsigned long)il; | 2686 | il->stats_periodic.data = (unsigned long)il; |
2687 | il->statistics_periodic.function = il4965_bg_statistics_periodic; | 2687 | il->stats_periodic.function = il4965_bg_stats_periodic; |
2688 | 2688 | ||
2689 | init_timer(&il->watchdog); | 2689 | init_timer(&il->watchdog); |
2690 | il->watchdog.data = (unsigned long)il; | 2690 | il->watchdog.data = (unsigned long)il; |
@@ -2703,7 +2703,7 @@ static void il4965_cancel_deferred_work(struct il_priv *il) | |||
2703 | 2703 | ||
2704 | il_cancel_scan_deferred_work(il); | 2704 | il_cancel_scan_deferred_work(il); |
2705 | 2705 | ||
2706 | del_timer_sync(&il->statistics_periodic); | 2706 | del_timer_sync(&il->stats_periodic); |
2707 | } | 2707 | } |
2708 | 2708 | ||
2709 | static void il4965_init_hw_rates(struct il_priv *il, | 2709 | static void il4965_init_hw_rates(struct il_priv *il, |