Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278157
b: refs/heads/master
c: ebf0d90
h: refs/heads/master
i:
  278155: 4558d57
v: v3
  • Loading branch information
Stanislaw Gruszka committed Nov 15, 2011
1 parent a42dbf6 commit 6122903
Show file tree
Hide file tree
Showing 21 changed files with 305 additions and 305 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b73bb5f13bb60735a846b73125e297ab6e3eece5
refs/heads/master: ebf0d90d12cf013019005a8ee7d1bc8599935356
90 changes: 45 additions & 45 deletions trunk/drivers/net/wireless/iwlegacy/iwl-3945-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@
#include "iwl-3945-debugfs.h"


static int il3945_statistics_flag(struct il_priv *il, char *buf, int bufsz)
static int il3945_stats_flag(struct il_priv *il, char *buf, int bufsz)
{
int p = 0;

p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n",
le32_to_cpu(il->_3945.statistics.flag));
if (le32_to_cpu(il->_3945.statistics.flag) &
le32_to_cpu(il->_3945.stats.flag));
if (le32_to_cpu(il->_3945.stats.flag) &
UCODE_STATISTICS_CLEAR_MSK)
p += scnprintf(buf + p, bufsz - p,
"\tStatistics have been cleared\n");
p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n",
(le32_to_cpu(il->_3945.statistics.flag) &
(le32_to_cpu(il->_3945.stats.flag) &
UCODE_STATISTICS_FREQUENCY_MSK)
? "2.4 GHz" : "5.2 GHz");
p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n",
(le32_to_cpu(il->_3945.statistics.flag) &
(le32_to_cpu(il->_3945.stats.flag) &
UCODE_STATISTICS_NARROW_BAND_MSK)
? "enabled" : "disabled");
return p;
Expand All @@ -57,14 +57,14 @@ ssize_t il3945_ucode_rx_stats_read(struct file *file,
struct il_priv *il = file->private_data;
int pos = 0;
char *buf;
int bufsz = sizeof(struct iwl39_statistics_rx_phy) * 40 +
sizeof(struct iwl39_statistics_rx_non_phy) * 40 + 400;
int bufsz = sizeof(struct iwl39_stats_rx_phy) * 40 +
sizeof(struct iwl39_stats_rx_non_phy) * 40 + 400;
ssize_t ret;
struct iwl39_statistics_rx_phy *ofdm, *accum_ofdm, *delta_ofdm,
struct iwl39_stats_rx_phy *ofdm, *accum_ofdm, *delta_ofdm,
*max_ofdm;
struct iwl39_statistics_rx_phy *cck, *accum_cck, *delta_cck, *max_cck;
struct iwl39_statistics_rx_non_phy *general, *accum_general;
struct iwl39_statistics_rx_non_phy *delta_general, *max_general;
struct iwl39_stats_rx_phy *cck, *accum_cck, *delta_cck, *max_cck;
struct iwl39_stats_rx_non_phy *general, *accum_general;
struct iwl39_stats_rx_non_phy *delta_general, *max_general;

if (!il_is_alive(il))
return -EAGAIN;
Expand All @@ -77,23 +77,23 @@ ssize_t il3945_ucode_rx_stats_read(struct file *file,

/*
* The statistic information display here is based on
* the last statistics notification from uCode
* the last stats notification from uCode
* might not reflect the current uCode activity
*/
ofdm = &il->_3945.statistics.rx.ofdm;
cck = &il->_3945.statistics.rx.cck;
general = &il->_3945.statistics.rx.general;
accum_ofdm = &il->_3945.accum_statistics.rx.ofdm;
accum_cck = &il->_3945.accum_statistics.rx.cck;
accum_general = &il->_3945.accum_statistics.rx.general;
delta_ofdm = &il->_3945.delta_statistics.rx.ofdm;
delta_cck = &il->_3945.delta_statistics.rx.cck;
delta_general = &il->_3945.delta_statistics.rx.general;
ofdm = &il->_3945.stats.rx.ofdm;
cck = &il->_3945.stats.rx.cck;
general = &il->_3945.stats.rx.general;
accum_ofdm = &il->_3945.accum_stats.rx.ofdm;
accum_cck = &il->_3945.accum_stats.rx.cck;
accum_general = &il->_3945.accum_stats.rx.general;
delta_ofdm = &il->_3945.delta_stats.rx.ofdm;
delta_cck = &il->_3945.delta_stats.rx.cck;
delta_general = &il->_3945.delta_stats.rx.general;
max_ofdm = &il->_3945.max_delta.rx.ofdm;
max_cck = &il->_3945.max_delta.rx.cck;
max_general = &il->_3945.max_delta.rx.general;

pos += il3945_statistics_flag(il, buf, bufsz);
pos += il3945_stats_flag(il, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
"acumulative delta max\n",
"Statistics_Rx - OFDM:");
Expand Down Expand Up @@ -332,9 +332,9 @@ ssize_t il3945_ucode_tx_stats_read(struct file *file,
struct il_priv *il = file->private_data;
int pos = 0;
char *buf;
int bufsz = (sizeof(struct iwl39_statistics_tx) * 48) + 250;
int bufsz = (sizeof(struct iwl39_stats_tx) * 48) + 250;
ssize_t ret;
struct iwl39_statistics_tx *tx, *accum_tx, *delta_tx, *max_tx;
struct iwl39_stats_tx *tx, *accum_tx, *delta_tx, *max_tx;

if (!il_is_alive(il))
return -EAGAIN;
Expand All @@ -347,14 +347,14 @@ ssize_t il3945_ucode_tx_stats_read(struct file *file,

/*
* The statistic information display here is based on
* the last statistics notification from uCode
* the last stats notification from uCode
* might not reflect the current uCode activity
*/
tx = &il->_3945.statistics.tx;
accum_tx = &il->_3945.accum_statistics.tx;
delta_tx = &il->_3945.delta_statistics.tx;
tx = &il->_3945.stats.tx;
accum_tx = &il->_3945.accum_stats.tx;
delta_tx = &il->_3945.delta_stats.tx;
max_tx = &il->_3945.max_delta.tx;
pos += il3945_statistics_flag(il, buf, bufsz);
pos += il3945_stats_flag(il, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
"acumulative delta max\n",
"Statistics_Tx:");
Expand Down Expand Up @@ -428,12 +428,12 @@ ssize_t il3945_ucode_general_stats_read(struct file *file,
struct il_priv *il = file->private_data;
int pos = 0;
char *buf;
int bufsz = sizeof(struct iwl39_statistics_general) * 10 + 300;
int bufsz = sizeof(struct iwl39_stats_general) * 10 + 300;
ssize_t ret;
struct iwl39_statistics_general *general, *accum_general;
struct iwl39_statistics_general *delta_general, *max_general;
struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg;
struct iwl39_statistics_div *div, *accum_div, *delta_div, *max_div;
struct iwl39_stats_general *general, *accum_general;
struct iwl39_stats_general *delta_general, *max_general;
struct stats_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg;
struct iwl39_stats_div *div, *accum_div, *delta_div, *max_div;

if (!il_is_alive(il))
return -EAGAIN;
Expand All @@ -446,22 +446,22 @@ ssize_t il3945_ucode_general_stats_read(struct file *file,

/*
* The statistic information display here is based on
* the last statistics notification from uCode
* the last stats notification from uCode
* might not reflect the current uCode activity
*/
general = &il->_3945.statistics.general;
dbg = &il->_3945.statistics.general.dbg;
div = &il->_3945.statistics.general.div;
accum_general = &il->_3945.accum_statistics.general;
delta_general = &il->_3945.delta_statistics.general;
general = &il->_3945.stats.general;
dbg = &il->_3945.stats.general.dbg;
div = &il->_3945.stats.general.div;
accum_general = &il->_3945.accum_stats.general;
delta_general = &il->_3945.delta_stats.general;
max_general = &il->_3945.max_delta.general;
accum_dbg = &il->_3945.accum_statistics.general.dbg;
delta_dbg = &il->_3945.delta_statistics.general.dbg;
accum_dbg = &il->_3945.accum_stats.general.dbg;
delta_dbg = &il->_3945.delta_stats.general.dbg;
max_dbg = &il->_3945.max_delta.general.dbg;
accum_div = &il->_3945.accum_statistics.general.div;
delta_div = &il->_3945.delta_statistics.general.div;
accum_div = &il->_3945.accum_stats.general.div;
delta_div = &il->_3945.delta_stats.general.div;
max_div = &il->_3945.max_delta.general.div;
pos += il3945_statistics_flag(il, buf, bufsz);
pos += il3945_stats_flag(il, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
"acumulative delta max\n",
"Statistics_General:");
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlegacy/iwl-3945-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static int il3945_rate_scale_flush_windows(struct il3945_rs_sta *rs_sta)
/*
* For each rate, if we have collected data on that rate
* and it has been more than IL_RATE_WIN_FLUSH
* since we flushed, clear out the gathered statistics
* since we flushed, clear out the gathered stats
*/
for (i = 0; i < IL_RATE_COUNT_3945; i++) {
if (!rs_sta->win[i].counter)
Expand Down
44 changes: 22 additions & 22 deletions trunk/drivers/net/wireless/iwlegacy/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,20 +362,20 @@ static void il3945_rx_reply_tx(struct il_priv *il,
*
*****************************************************************************/
#ifdef CONFIG_IWLEGACY_DEBUGFS
static void il3945_accumulative_statistics(struct il_priv *il,
static void il3945_accumulative_stats(struct il_priv *il,
__le32 *stats)
{
int i;
__le32 *prev_stats;
u32 *accum_stats;
u32 *delta, *max_delta;

prev_stats = (__le32 *)&il->_3945.statistics;
accum_stats = (u32 *)&il->_3945.accum_statistics;
delta = (u32 *)&il->_3945.delta_statistics;
prev_stats = (__le32 *)&il->_3945.stats;
accum_stats = (u32 *)&il->_3945.accum_stats;
delta = (u32 *)&il->_3945.delta_stats;
max_delta = (u32 *)&il->_3945.max_delta;

for (i = sizeof(__le32); i < sizeof(struct il3945_notif_statistics);
for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats);
i += sizeof(__le32), stats++, prev_stats++, delta++,
max_delta++, accum_stats++) {
if (le32_to_cpu(*stats) > le32_to_cpu(*prev_stats)) {
Expand All @@ -387,47 +387,47 @@ static void il3945_accumulative_statistics(struct il_priv *il,
}
}

/* reset accumulative statistics for "no-counter" type statistics */
il->_3945.accum_statistics.general.temperature =
il->_3945.statistics.general.temperature;
il->_3945.accum_statistics.general.ttl_timestamp =
il->_3945.statistics.general.ttl_timestamp;
/* reset accumulative stats for "no-counter" type stats */
il->_3945.accum_stats.general.temperature =
il->_3945.stats.general.temperature;
il->_3945.accum_stats.general.ttl_timestamp =
il->_3945.stats.general.ttl_timestamp;
}
#endif

void il3945_hw_rx_statistics(struct il_priv *il,
void il3945_hw_rx_stats(struct il_priv *il,
struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);

D_RX("Statistics notification received (%d vs %d).\n",
(int)sizeof(struct il3945_notif_statistics),
(int)sizeof(struct il3945_notif_stats),
le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
#ifdef CONFIG_IWLEGACY_DEBUGFS
il3945_accumulative_statistics(il, (__le32 *)&pkt->u.raw);
il3945_accumulative_stats(il, (__le32 *)&pkt->u.raw);
#endif

memcpy(&il->_3945.statistics, pkt->u.raw, sizeof(il->_3945.statistics));
memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats));
}

void il3945_reply_statistics(struct il_priv *il,
void il3945_reply_stats(struct il_priv *il,
struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
__le32 *flag = (__le32 *)&pkt->u.raw;

if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) {
#ifdef CONFIG_IWLEGACY_DEBUGFS
memset(&il->_3945.accum_statistics, 0,
sizeof(struct il3945_notif_statistics));
memset(&il->_3945.delta_statistics, 0,
sizeof(struct il3945_notif_statistics));
memset(&il->_3945.accum_stats, 0,
sizeof(struct il3945_notif_stats));
memset(&il->_3945.delta_stats, 0,
sizeof(struct il3945_notif_stats));
memset(&il->_3945.max_delta, 0,
sizeof(struct il3945_notif_statistics));
sizeof(struct il3945_notif_stats));
#endif
D_RX("Statistics have been cleared\n");
}
il3945_hw_rx_statistics(il, rxb);
il3945_hw_rx_stats(il, rxb);
}


Expand All @@ -437,7 +437,7 @@ void il3945_reply_statistics(struct il_priv *il,
*
******************************************************************************/

/* This is necessary only for a number of statistics, see the caller. */
/* This is necessary only for a number of stats, see the caller. */
static int il3945_is_network_packet(struct il_priv *il,
struct ieee80211_hdr *header)
{
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/iwlegacy/iwl-3945.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extern const struct pci_device_id il3945_hw_card_ids[];

/* Default noise level to report when noise measurement is not available.
* This may be because we're:
* 1) Not associated (4965, no beacon statistics being sent to driver)
* 1) Not associated (4965, no beacon stats being sent to driver)
* 2) Scanning (noise measurement does not apply to associated channel)
* 3) Receiving CCK (3945 delivers noise info only for OFDM frames)
* Use default noise value of -127 ... this is below the range of measurable
Expand Down Expand Up @@ -258,9 +258,9 @@ void il3945_hw_build_tx_cmd_rate(struct il_priv *il,
int sta_id, int tx_id);
extern int il3945_hw_reg_send_txpower(struct il_priv *il);
extern int il3945_hw_reg_set_txpower(struct il_priv *il, s8 power);
extern void il3945_hw_rx_statistics(struct il_priv *il,
extern void il3945_hw_rx_stats(struct il_priv *il,
struct il_rx_buf *rxb);
void il3945_reply_statistics(struct il_priv *il,
void il3945_reply_stats(struct il_priv *il,
struct il_rx_buf *rxb);
extern void il3945_disable_events(struct il_priv *il);
extern int il4965_get_temperature(const struct il_priv *il);
Expand Down
Loading

0 comments on commit 6122903

Please sign in to comment.