mirror of https://gitee.com/openkylin/linux.git
iwlegacy: indentions and whitespaces
Process iwlegacy source files using: indent -npro -l500 -nhnl indent -npro -kr -i8 -ts8 -sob -l80 -nbbo -ss -ncs -cp1 -il0 -psl Plus manual compilation fixes. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
This commit is contained in:
parent
f02579e3a8
commit
e7392364fc
|
@ -29,39 +29,37 @@
|
|||
#include "common.h"
|
||||
#include "3945.h"
|
||||
|
||||
static int il3945_stats_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.stats.flag));
|
||||
if (le32_to_cpu(il->_3945.stats.flag) &
|
||||
UCODE_STATS_CLEAR_MSK)
|
||||
if (le32_to_cpu(il->_3945.stats.flag) & UCODE_STATS_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.stats.flag) &
|
||||
UCODE_STATS_FREQUENCY_MSK)
|
||||
? "2.4 GHz" : "5.2 GHz");
|
||||
UCODE_STATS_FREQUENCY_MSK) ? "2.4 GHz" : "5.2 GHz");
|
||||
p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n",
|
||||
(le32_to_cpu(il->_3945.stats.flag) &
|
||||
UCODE_STATS_NARROW_BAND_MSK)
|
||||
? "enabled" : "disabled");
|
||||
UCODE_STATS_NARROW_BAND_MSK) ? "enabled" : "disabled");
|
||||
return p;
|
||||
}
|
||||
|
||||
ssize_t il3945_ucode_rx_stats_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
ssize_t
|
||||
il3945_ucode_rx_stats_read(struct file * file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
struct il_priv *il = file->private_data;
|
||||
int pos = 0;
|
||||
char *buf;
|
||||
int bufsz = sizeof(struct iwl39_stats_rx_phy) * 40 +
|
||||
int bufsz =
|
||||
sizeof(struct iwl39_stats_rx_phy) * 40 +
|
||||
sizeof(struct iwl39_stats_rx_non_phy) * 40 + 400;
|
||||
ssize_t ret;
|
||||
struct iwl39_stats_rx_phy *ofdm, *accum_ofdm, *delta_ofdm,
|
||||
*max_ofdm;
|
||||
struct iwl39_stats_rx_phy *ofdm, *accum_ofdm, *delta_ofdm, *max_ofdm;
|
||||
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;
|
||||
|
@ -94,225 +92,215 @@ ssize_t il3945_ucode_rx_stats_read(struct file *file,
|
|||
max_general = &il->_3945.max_delta.rx.general;
|
||||
|
||||
pos += il3945_stats_flag(il, buf, bufsz);
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
"%-32s current"
|
||||
"acumulative delta max\n",
|
||||
"Statistics_Rx - OFDM:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"ina_cnt:", le32_to_cpu(ofdm->ina_cnt),
|
||||
accum_ofdm->ina_cnt,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "ina_cnt:",
|
||||
le32_to_cpu(ofdm->ina_cnt), accum_ofdm->ina_cnt,
|
||||
delta_ofdm->ina_cnt, max_ofdm->ina_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"fina_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "fina_cnt:",
|
||||
le32_to_cpu(ofdm->fina_cnt), accum_ofdm->fina_cnt,
|
||||
delta_ofdm->fina_cnt, max_ofdm->fina_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "plcp_err:",
|
||||
le32_to_cpu(ofdm->plcp_err), accum_ofdm->plcp_err,
|
||||
delta_ofdm->plcp_err, max_ofdm->plcp_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "crc32_err:",
|
||||
le32_to_cpu(ofdm->crc32_err), accum_ofdm->crc32_err,
|
||||
delta_ofdm->crc32_err, max_ofdm->crc32_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "overrun_err:",
|
||||
le32_to_cpu(ofdm->overrun_err),
|
||||
accum_ofdm->overrun_err, delta_ofdm->overrun_err,
|
||||
max_ofdm->overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"early_overrun_err:",
|
||||
le32_to_cpu(ofdm->overrun_err), accum_ofdm->overrun_err,
|
||||
delta_ofdm->overrun_err, max_ofdm->overrun_err);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "early_overrun_err:",
|
||||
le32_to_cpu(ofdm->early_overrun_err),
|
||||
accum_ofdm->early_overrun_err,
|
||||
delta_ofdm->early_overrun_err,
|
||||
max_ofdm->early_overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"crc32_good:", le32_to_cpu(ofdm->crc32_good),
|
||||
accum_ofdm->crc32_good, delta_ofdm->crc32_good,
|
||||
max_ofdm->crc32_good);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "crc32_good:",
|
||||
le32_to_cpu(ofdm->crc32_good), accum_ofdm->crc32_good,
|
||||
delta_ofdm->crc32_good, max_ofdm->crc32_good);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "false_alarm_cnt:",
|
||||
le32_to_cpu(ofdm->false_alarm_cnt),
|
||||
accum_ofdm->false_alarm_cnt,
|
||||
delta_ofdm->false_alarm_cnt,
|
||||
accum_ofdm->false_alarm_cnt, delta_ofdm->false_alarm_cnt,
|
||||
max_ofdm->false_alarm_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"fina_sync_err_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "fina_sync_err_cnt:",
|
||||
le32_to_cpu(ofdm->fina_sync_err_cnt),
|
||||
accum_ofdm->fina_sync_err_cnt,
|
||||
delta_ofdm->fina_sync_err_cnt,
|
||||
max_ofdm->fina_sync_err_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"sfd_timeout:",
|
||||
le32_to_cpu(ofdm->sfd_timeout),
|
||||
accum_ofdm->sfd_timeout,
|
||||
delta_ofdm->sfd_timeout,
|
||||
max_ofdm->sfd_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"fina_timeout:",
|
||||
le32_to_cpu(ofdm->fina_timeout),
|
||||
accum_ofdm->fina_timeout,
|
||||
delta_ofdm->fina_timeout,
|
||||
max_ofdm->fina_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"unresponded_rts:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "sfd_timeout:",
|
||||
le32_to_cpu(ofdm->sfd_timeout), accum_ofdm->sfd_timeout,
|
||||
delta_ofdm->sfd_timeout, max_ofdm->sfd_timeout);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "fina_timeout:",
|
||||
le32_to_cpu(ofdm->fina_timeout), accum_ofdm->fina_timeout,
|
||||
delta_ofdm->fina_timeout, max_ofdm->fina_timeout);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "unresponded_rts:",
|
||||
le32_to_cpu(ofdm->unresponded_rts),
|
||||
accum_ofdm->unresponded_rts,
|
||||
delta_ofdm->unresponded_rts,
|
||||
accum_ofdm->unresponded_rts, delta_ofdm->unresponded_rts,
|
||||
max_ofdm->unresponded_rts);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"rxe_frame_lmt_ovrun:",
|
||||
le32_to_cpu(ofdm->rxe_frame_limit_overrun),
|
||||
accum_ofdm->rxe_frame_limit_overrun,
|
||||
delta_ofdm->rxe_frame_limit_overrun,
|
||||
max_ofdm->rxe_frame_limit_overrun);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"sent_ack_cnt:",
|
||||
le32_to_cpu(ofdm->sent_ack_cnt),
|
||||
accum_ofdm->sent_ack_cnt,
|
||||
delta_ofdm->sent_ack_cnt,
|
||||
max_ofdm->sent_ack_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"sent_cts_cnt:",
|
||||
le32_to_cpu(ofdm->sent_cts_cnt),
|
||||
accum_ofdm->sent_cts_cnt,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "sent_ack_cnt:",
|
||||
le32_to_cpu(ofdm->sent_ack_cnt), accum_ofdm->sent_ack_cnt,
|
||||
delta_ofdm->sent_ack_cnt, max_ofdm->sent_ack_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "sent_cts_cnt:",
|
||||
le32_to_cpu(ofdm->sent_cts_cnt), accum_ofdm->sent_cts_cnt,
|
||||
delta_ofdm->sent_cts_cnt, max_ofdm->sent_cts_cnt);
|
||||
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
"%-32s current"
|
||||
"acumulative delta max\n",
|
||||
"Statistics_Rx - CCK:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"ina_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "ina_cnt:",
|
||||
le32_to_cpu(cck->ina_cnt), accum_cck->ina_cnt,
|
||||
delta_cck->ina_cnt, max_cck->ina_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"fina_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "fina_cnt:",
|
||||
le32_to_cpu(cck->fina_cnt), accum_cck->fina_cnt,
|
||||
delta_cck->fina_cnt, max_cck->fina_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"plcp_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "plcp_err:",
|
||||
le32_to_cpu(cck->plcp_err), accum_cck->plcp_err,
|
||||
delta_cck->plcp_err, max_cck->plcp_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"crc32_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "crc32_err:",
|
||||
le32_to_cpu(cck->crc32_err), accum_cck->crc32_err,
|
||||
delta_cck->crc32_err, max_cck->crc32_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"overrun_err:",
|
||||
le32_to_cpu(cck->overrun_err),
|
||||
accum_cck->overrun_err,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "overrun_err:",
|
||||
le32_to_cpu(cck->overrun_err), accum_cck->overrun_err,
|
||||
delta_cck->overrun_err, max_cck->overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"early_overrun_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "early_overrun_err:",
|
||||
le32_to_cpu(cck->early_overrun_err),
|
||||
accum_cck->early_overrun_err,
|
||||
delta_cck->early_overrun_err,
|
||||
max_cck->early_overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"crc32_good:",
|
||||
delta_cck->early_overrun_err, max_cck->early_overrun_err);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "crc32_good:",
|
||||
le32_to_cpu(cck->crc32_good), accum_cck->crc32_good,
|
||||
delta_cck->crc32_good,
|
||||
max_cck->crc32_good);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"false_alarm_cnt:",
|
||||
delta_cck->crc32_good, max_cck->crc32_good);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "false_alarm_cnt:",
|
||||
le32_to_cpu(cck->false_alarm_cnt),
|
||||
accum_cck->false_alarm_cnt,
|
||||
delta_cck->false_alarm_cnt, max_cck->false_alarm_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"fina_sync_err_cnt:",
|
||||
accum_cck->false_alarm_cnt, delta_cck->false_alarm_cnt,
|
||||
max_cck->false_alarm_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "fina_sync_err_cnt:",
|
||||
le32_to_cpu(cck->fina_sync_err_cnt),
|
||||
accum_cck->fina_sync_err_cnt,
|
||||
delta_cck->fina_sync_err_cnt,
|
||||
max_cck->fina_sync_err_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"sfd_timeout:",
|
||||
le32_to_cpu(cck->sfd_timeout),
|
||||
accum_cck->sfd_timeout,
|
||||
delta_cck->fina_sync_err_cnt, max_cck->fina_sync_err_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "sfd_timeout:",
|
||||
le32_to_cpu(cck->sfd_timeout), accum_cck->sfd_timeout,
|
||||
delta_cck->sfd_timeout, max_cck->sfd_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"fina_timeout:",
|
||||
le32_to_cpu(cck->fina_timeout),
|
||||
accum_cck->fina_timeout,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "fina_timeout:",
|
||||
le32_to_cpu(cck->fina_timeout), accum_cck->fina_timeout,
|
||||
delta_cck->fina_timeout, max_cck->fina_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"unresponded_rts:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "unresponded_rts:",
|
||||
le32_to_cpu(cck->unresponded_rts),
|
||||
accum_cck->unresponded_rts,
|
||||
delta_cck->unresponded_rts,
|
||||
accum_cck->unresponded_rts, delta_cck->unresponded_rts,
|
||||
max_cck->unresponded_rts);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"rxe_frame_lmt_ovrun:",
|
||||
le32_to_cpu(cck->rxe_frame_limit_overrun),
|
||||
accum_cck->rxe_frame_limit_overrun,
|
||||
delta_cck->rxe_frame_limit_overrun,
|
||||
max_cck->rxe_frame_limit_overrun);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"sent_ack_cnt:",
|
||||
le32_to_cpu(cck->sent_ack_cnt),
|
||||
accum_cck->sent_ack_cnt,
|
||||
delta_cck->sent_ack_cnt,
|
||||
max_cck->sent_ack_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"sent_cts_cnt:",
|
||||
le32_to_cpu(cck->sent_cts_cnt),
|
||||
accum_cck->sent_cts_cnt,
|
||||
delta_cck->sent_cts_cnt,
|
||||
max_cck->sent_cts_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "sent_ack_cnt:",
|
||||
le32_to_cpu(cck->sent_ack_cnt), accum_cck->sent_ack_cnt,
|
||||
delta_cck->sent_ack_cnt, max_cck->sent_ack_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "sent_cts_cnt:",
|
||||
le32_to_cpu(cck->sent_cts_cnt), accum_cck->sent_cts_cnt,
|
||||
delta_cck->sent_cts_cnt, max_cck->sent_cts_cnt);
|
||||
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
"%-32s current"
|
||||
"acumulative delta max\n",
|
||||
"Statistics_Rx - GENERAL:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"bogus_cts:",
|
||||
le32_to_cpu(general->bogus_cts),
|
||||
accum_general->bogus_cts,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "bogus_cts:",
|
||||
le32_to_cpu(general->bogus_cts), accum_general->bogus_cts,
|
||||
delta_general->bogus_cts, max_general->bogus_cts);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"bogus_ack:",
|
||||
le32_to_cpu(general->bogus_ack),
|
||||
accum_general->bogus_ack,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "bogus_ack:",
|
||||
le32_to_cpu(general->bogus_ack), accum_general->bogus_ack,
|
||||
delta_general->bogus_ack, max_general->bogus_ack);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"non_bssid_frames:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "non_bssid_frames:",
|
||||
le32_to_cpu(general->non_bssid_frames),
|
||||
accum_general->non_bssid_frames,
|
||||
delta_general->non_bssid_frames,
|
||||
max_general->non_bssid_frames);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"filtered_frames:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "filtered_frames:",
|
||||
le32_to_cpu(general->filtered_frames),
|
||||
accum_general->filtered_frames,
|
||||
delta_general->filtered_frames,
|
||||
max_general->filtered_frames);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"non_channel_beacons:",
|
||||
le32_to_cpu(general->non_channel_beacons),
|
||||
|
@ -325,9 +313,9 @@ ssize_t il3945_ucode_rx_stats_read(struct file *file,
|
|||
return ret;
|
||||
}
|
||||
|
||||
ssize_t il3945_ucode_tx_stats_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
ssize_t
|
||||
il3945_ucode_tx_stats_read(struct file * file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
struct il_priv *il = file->private_data;
|
||||
int pos = 0;
|
||||
|
@ -355,75 +343,69 @@ ssize_t il3945_ucode_tx_stats_read(struct file *file,
|
|||
delta_tx = &il->_3945.delta_stats.tx;
|
||||
max_tx = &il->_3945.max_delta.tx;
|
||||
pos += il3945_stats_flag(il, buf, bufsz);
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
"%-32s current"
|
||||
"acumulative delta max\n",
|
||||
"Statistics_Tx:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"preamble:",
|
||||
le32_to_cpu(tx->preamble_cnt),
|
||||
accum_tx->preamble_cnt,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "preamble:",
|
||||
le32_to_cpu(tx->preamble_cnt), accum_tx->preamble_cnt,
|
||||
delta_tx->preamble_cnt, max_tx->preamble_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"rx_detected_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "rx_detected_cnt:",
|
||||
le32_to_cpu(tx->rx_detected_cnt),
|
||||
accum_tx->rx_detected_cnt,
|
||||
delta_tx->rx_detected_cnt, max_tx->rx_detected_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"bt_prio_defer_cnt:",
|
||||
accum_tx->rx_detected_cnt, delta_tx->rx_detected_cnt,
|
||||
max_tx->rx_detected_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "bt_prio_defer_cnt:",
|
||||
le32_to_cpu(tx->bt_prio_defer_cnt),
|
||||
accum_tx->bt_prio_defer_cnt,
|
||||
delta_tx->bt_prio_defer_cnt,
|
||||
accum_tx->bt_prio_defer_cnt, delta_tx->bt_prio_defer_cnt,
|
||||
max_tx->bt_prio_defer_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"bt_prio_kill_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "bt_prio_kill_cnt:",
|
||||
le32_to_cpu(tx->bt_prio_kill_cnt),
|
||||
accum_tx->bt_prio_kill_cnt,
|
||||
delta_tx->bt_prio_kill_cnt,
|
||||
accum_tx->bt_prio_kill_cnt, delta_tx->bt_prio_kill_cnt,
|
||||
max_tx->bt_prio_kill_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"few_bytes_cnt:",
|
||||
le32_to_cpu(tx->few_bytes_cnt),
|
||||
accum_tx->few_bytes_cnt,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "few_bytes_cnt:",
|
||||
le32_to_cpu(tx->few_bytes_cnt), accum_tx->few_bytes_cnt,
|
||||
delta_tx->few_bytes_cnt, max_tx->few_bytes_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"cts_timeout:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "cts_timeout:",
|
||||
le32_to_cpu(tx->cts_timeout), accum_tx->cts_timeout,
|
||||
delta_tx->cts_timeout, max_tx->cts_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"ack_timeout:",
|
||||
le32_to_cpu(tx->ack_timeout),
|
||||
accum_tx->ack_timeout,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "ack_timeout:",
|
||||
le32_to_cpu(tx->ack_timeout), accum_tx->ack_timeout,
|
||||
delta_tx->ack_timeout, max_tx->ack_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"expected_ack_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "expected_ack_cnt:",
|
||||
le32_to_cpu(tx->expected_ack_cnt),
|
||||
accum_tx->expected_ack_cnt,
|
||||
delta_tx->expected_ack_cnt,
|
||||
accum_tx->expected_ack_cnt, delta_tx->expected_ack_cnt,
|
||||
max_tx->expected_ack_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"actual_ack_cnt:",
|
||||
le32_to_cpu(tx->actual_ack_cnt),
|
||||
accum_tx->actual_ack_cnt,
|
||||
delta_tx->actual_ack_cnt,
|
||||
max_tx->actual_ack_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "actual_ack_cnt:",
|
||||
le32_to_cpu(tx->actual_ack_cnt), accum_tx->actual_ack_cnt,
|
||||
delta_tx->actual_ack_cnt, max_tx->actual_ack_cnt);
|
||||
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
kfree(buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ssize_t il3945_ucode_general_stats_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
ssize_t
|
||||
il3945_ucode_general_stats_read(struct file * file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
struct il_priv *il = file->private_data;
|
||||
int pos = 0;
|
||||
|
@ -462,59 +444,59 @@ ssize_t il3945_ucode_general_stats_read(struct file *file,
|
|||
delta_div = &il->_3945.delta_stats.general.div;
|
||||
max_div = &il->_3945.max_delta.general.div;
|
||||
pos += il3945_stats_flag(il, buf, bufsz);
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
"%-32s current"
|
||||
"acumulative delta max\n",
|
||||
"Statistics_General:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"burst_check:",
|
||||
le32_to_cpu(dbg->burst_check),
|
||||
accum_dbg->burst_check,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "burst_check:",
|
||||
le32_to_cpu(dbg->burst_check), accum_dbg->burst_check,
|
||||
delta_dbg->burst_check, max_dbg->burst_check);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"burst_count:",
|
||||
le32_to_cpu(dbg->burst_count),
|
||||
accum_dbg->burst_count,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "burst_count:",
|
||||
le32_to_cpu(dbg->burst_count), accum_dbg->burst_count,
|
||||
delta_dbg->burst_count, max_dbg->burst_count);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"sleep_time:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "sleep_time:",
|
||||
le32_to_cpu(general->sleep_time),
|
||||
accum_general->sleep_time,
|
||||
delta_general->sleep_time, max_general->sleep_time);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"slots_out:",
|
||||
le32_to_cpu(general->slots_out),
|
||||
accum_general->slots_out,
|
||||
accum_general->sleep_time, delta_general->sleep_time,
|
||||
max_general->sleep_time);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "slots_out:",
|
||||
le32_to_cpu(general->slots_out), accum_general->slots_out,
|
||||
delta_general->slots_out, max_general->slots_out);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"slots_idle:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "slots_idle:",
|
||||
le32_to_cpu(general->slots_idle),
|
||||
accum_general->slots_idle,
|
||||
delta_general->slots_idle, max_general->slots_idle);
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "ttl_timestamp:\t\t\t%u\n",
|
||||
accum_general->slots_idle, delta_general->slots_idle,
|
||||
max_general->slots_idle);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, "ttl_timestamp:\t\t\t%u\n",
|
||||
le32_to_cpu(general->ttl_timestamp));
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"tx_on_a:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "tx_on_a:",
|
||||
le32_to_cpu(div->tx_on_a), accum_div->tx_on_a,
|
||||
delta_div->tx_on_a, max_div->tx_on_a);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"tx_on_b:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "tx_on_b:",
|
||||
le32_to_cpu(div->tx_on_b), accum_div->tx_on_b,
|
||||
delta_div->tx_on_b, max_div->tx_on_b);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"exec_time:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "exec_time:",
|
||||
le32_to_cpu(div->exec_time), accum_div->exec_time,
|
||||
delta_div->exec_time, max_div->exec_time);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n",
|
||||
"probe_time:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos,
|
||||
" %-30s %10u %10u %10u %10u\n", "probe_time:",
|
||||
le32_to_cpu(div->probe_time), accum_div->probe_time,
|
||||
delta_div->probe_time, max_div->probe_time);
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -97,7 +97,8 @@ static struct il3945_tpt_entry il3945_tpt_table_g[] = {
|
|||
#define RATE_DECREASE_TH 1920
|
||||
#define RATE_RETRY_TH 15
|
||||
|
||||
static u8 il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band)
|
||||
static u8
|
||||
il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band)
|
||||
{
|
||||
u32 idx = 0;
|
||||
u32 table_size = 0;
|
||||
|
@ -130,7 +131,8 @@ static u8 il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band)
|
|||
return tpt_table[idx].idx;
|
||||
}
|
||||
|
||||
static void il3945_clear_win(struct il3945_rate_scale_data *win)
|
||||
static void
|
||||
il3945_clear_win(struct il3945_rate_scale_data *win)
|
||||
{
|
||||
win->data = 0;
|
||||
win->success_counter = 0;
|
||||
|
@ -147,7 +149,8 @@ static void il3945_clear_win(struct il3945_rate_scale_data *win)
|
|||
* not flushed. If there were any that were not flushed, then
|
||||
* reschedule the rate flushing routine.
|
||||
*/
|
||||
static int il3945_rate_scale_flush_wins(struct il3945_rs_sta *rs_sta)
|
||||
static int
|
||||
il3945_rate_scale_flush_wins(struct il3945_rs_sta *rs_sta)
|
||||
{
|
||||
int unflushed = 0;
|
||||
int i;
|
||||
|
@ -164,10 +167,8 @@ static int il3945_rate_scale_flush_wins(struct il3945_rs_sta *rs_sta)
|
|||
continue;
|
||||
|
||||
spin_lock_irqsave(&rs_sta->lock, flags);
|
||||
if (time_after(jiffies, rs_sta->win[i].stamp +
|
||||
RATE_WIN_FLUSH)) {
|
||||
D_RATE("flushing %d samples of rate "
|
||||
"idx %d\n",
|
||||
if (time_after(jiffies, rs_sta->win[i].stamp + RATE_WIN_FLUSH)) {
|
||||
D_RATE("flushing %d samples of rate " "idx %d\n",
|
||||
rs_sta->win[i].counter, i);
|
||||
il3945_clear_win(&rs_sta->win[i]);
|
||||
} else
|
||||
|
@ -182,7 +183,8 @@ static int il3945_rate_scale_flush_wins(struct il3945_rs_sta *rs_sta)
|
|||
#define RATE_FLUSH_MIN 50 /* msec */
|
||||
#define IL_AVERAGE_PACKETS 1500
|
||||
|
||||
static void il3945_bg_rate_scale_flush(unsigned long data)
|
||||
static void
|
||||
il3945_bg_rate_scale_flush(unsigned long data)
|
||||
{
|
||||
struct il3945_rs_sta *rs_sta = (void *)data;
|
||||
struct il_priv *il __maybe_unused = rs_sta->il;
|
||||
|
@ -205,8 +207,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data)
|
|||
duration =
|
||||
jiffies_to_msecs(jiffies - rs_sta->last_partial_flush);
|
||||
|
||||
D_RATE("Tx'd %d packets in %dms\n",
|
||||
packet_count, duration);
|
||||
D_RATE("Tx'd %d packets in %dms\n", packet_count, duration);
|
||||
|
||||
/* Determine packets per second */
|
||||
if (duration)
|
||||
|
@ -225,11 +226,11 @@ static void il3945_bg_rate_scale_flush(unsigned long data)
|
|||
|
||||
rs_sta->flush_time = msecs_to_jiffies(duration);
|
||||
|
||||
D_RATE("new flush period: %d msec ave %d\n",
|
||||
duration, packet_count);
|
||||
D_RATE("new flush period: %d msec ave %d\n", duration,
|
||||
packet_count);
|
||||
|
||||
mod_timer(&rs_sta->rate_scale_flush, jiffies +
|
||||
rs_sta->flush_time);
|
||||
mod_timer(&rs_sta->rate_scale_flush,
|
||||
jiffies + rs_sta->flush_time);
|
||||
|
||||
rs_sta->last_partial_flush = jiffies;
|
||||
} else {
|
||||
|
@ -253,9 +254,10 @@ static void il3945_bg_rate_scale_flush(unsigned long data)
|
|||
* at this rate. win->data contains the bitmask of successful
|
||||
* packets.
|
||||
*/
|
||||
static void il3945_collect_tx_data(struct il3945_rs_sta *rs_sta,
|
||||
struct il3945_rate_scale_data *win,
|
||||
int success, int retries, int idx)
|
||||
static void
|
||||
il3945_collect_tx_data(struct il3945_rs_sta *rs_sta,
|
||||
struct il3945_rate_scale_data *win, int success,
|
||||
int retries, int idx)
|
||||
{
|
||||
unsigned long flags;
|
||||
s32 fail_count;
|
||||
|
@ -306,8 +308,8 @@ static void il3945_collect_tx_data(struct il3945_rs_sta *rs_sta,
|
|||
|
||||
/* Calculate current success ratio, avoid divide-by-0! */
|
||||
if (win->counter > 0)
|
||||
win->success_ratio = 128 * (100 * win->success_counter)
|
||||
/ win->counter;
|
||||
win->success_ratio =
|
||||
128 * (100 * win->success_counter) / win->counter;
|
||||
else
|
||||
win->success_ratio = IL_INVALID_VALUE;
|
||||
|
||||
|
@ -316,8 +318,9 @@ static void il3945_collect_tx_data(struct il3945_rs_sta *rs_sta,
|
|||
/* Calculate average throughput, if we have enough history. */
|
||||
if (fail_count >= RATE_MIN_FAILURE_TH ||
|
||||
win->success_counter >= RATE_MIN_SUCCESS_TH)
|
||||
win->average_tpt = ((win->success_ratio *
|
||||
rs_sta->expected_tpt[idx] + 64) / 128);
|
||||
win->average_tpt =
|
||||
((win->success_ratio * rs_sta->expected_tpt[idx] +
|
||||
64) / 128);
|
||||
else
|
||||
win->average_tpt = IL_INVALID_VALUE;
|
||||
|
||||
|
@ -331,7 +334,8 @@ static void il3945_collect_tx_data(struct il3945_rs_sta *rs_sta,
|
|||
/*
|
||||
* Called after adding a new station to initialize rate scaling
|
||||
*/
|
||||
void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id)
|
||||
void
|
||||
il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id)
|
||||
{
|
||||
struct ieee80211_hw *hw = il->hw;
|
||||
struct ieee80211_conf *conf = &il->hw->conf;
|
||||
|
@ -344,7 +348,7 @@ void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_i
|
|||
if (sta_id == il->ctx.bcast_sta_id)
|
||||
goto out;
|
||||
|
||||
psta = (struct il3945_sta_priv *) sta->drv_priv;
|
||||
psta = (struct il3945_sta_priv *)sta->drv_priv;
|
||||
rs_sta = &psta->rs_sta;
|
||||
sband = hw->wiphy->bands[conf->channel->band];
|
||||
|
||||
|
@ -382,8 +386,8 @@ void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_i
|
|||
/* For 5 GHz band it start at IL_FIRST_OFDM_RATE */
|
||||
if (sband->band == IEEE80211_BAND_5GHZ) {
|
||||
rs_sta->last_txrate_idx += IL_FIRST_OFDM_RATE;
|
||||
il->_3945.sta_supp_rates = il->_3945.sta_supp_rates <<
|
||||
IL_FIRST_OFDM_RATE;
|
||||
il->_3945.sta_supp_rates =
|
||||
il->_3945.sta_supp_rates << IL_FIRST_OFDM_RATE;
|
||||
}
|
||||
|
||||
out:
|
||||
|
@ -392,21 +396,24 @@ void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_i
|
|||
D_INFO("leave\n");
|
||||
}
|
||||
|
||||
static void *il3945_rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
|
||||
static void *
|
||||
il3945_rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
|
||||
{
|
||||
return hw->priv;
|
||||
}
|
||||
|
||||
/* rate scale requires free function to be implemented */
|
||||
static void il3945_rs_free(void *il)
|
||||
static void
|
||||
il3945_rs_free(void *il)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static void *il3945_rs_alloc_sta(void *il_priv, struct ieee80211_sta *sta, gfp_t gfp)
|
||||
static void *
|
||||
il3945_rs_alloc_sta(void *il_priv, struct ieee80211_sta *sta, gfp_t gfp)
|
||||
{
|
||||
struct il3945_rs_sta *rs_sta;
|
||||
struct il3945_sta_priv *psta = (void *) sta->drv_priv;
|
||||
struct il3945_sta_priv *psta = (void *)sta->drv_priv;
|
||||
struct il_priv *il __maybe_unused = il_priv;
|
||||
|
||||
D_RATE("enter\n");
|
||||
|
@ -421,8 +428,8 @@ static void *il3945_rs_alloc_sta(void *il_priv, struct ieee80211_sta *sta, gfp_t
|
|||
return rs_sta;
|
||||
}
|
||||
|
||||
static void il3945_rs_free_sta(void *il_priv, struct ieee80211_sta *sta,
|
||||
void *il_sta)
|
||||
static void
|
||||
il3945_rs_free_sta(void *il_priv, struct ieee80211_sta *sta, void *il_sta)
|
||||
{
|
||||
struct il3945_rs_sta *rs_sta = il_sta;
|
||||
|
||||
|
@ -434,14 +441,14 @@ static void il3945_rs_free_sta(void *il_priv, struct ieee80211_sta *sta,
|
|||
del_timer_sync(&rs_sta->rate_scale_flush);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* il3945_rs_tx_status - Update rate control values based on Tx results
|
||||
*
|
||||
* NOTE: Uses il_priv->retry_rate for the # of retries attempted by
|
||||
* the hardware for each rate.
|
||||
*/
|
||||
static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *sband,
|
||||
static void
|
||||
il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *sband,
|
||||
struct ieee80211_sta *sta, void *il_sta,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
|
@ -476,7 +483,6 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
rs_sta->tx_packets++;
|
||||
|
||||
scale_rate_idx = first_idx;
|
||||
|
@ -498,32 +504,27 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *
|
|||
last_idx = scale_rate_idx;
|
||||
} else {
|
||||
current_count = il->retry_rate;
|
||||
last_idx = il3945_rs_next_rate(il,
|
||||
scale_rate_idx);
|
||||
last_idx = il3945_rs_next_rate(il, scale_rate_idx);
|
||||
}
|
||||
|
||||
/* Update this rate accounting for as many retries
|
||||
* as was used for it (per current_count) */
|
||||
il3945_collect_tx_data(rs_sta,
|
||||
&rs_sta->win[scale_rate_idx],
|
||||
0, current_count, scale_rate_idx);
|
||||
D_RATE("Update rate %d for %d retries.\n",
|
||||
scale_rate_idx, current_count);
|
||||
il3945_collect_tx_data(rs_sta, &rs_sta->win[scale_rate_idx], 0,
|
||||
current_count, scale_rate_idx);
|
||||
D_RATE("Update rate %d for %d retries.\n", scale_rate_idx,
|
||||
current_count);
|
||||
|
||||
retries -= current_count;
|
||||
|
||||
scale_rate_idx = last_idx;
|
||||
}
|
||||
|
||||
|
||||
/* Update the last idx win with success/failure based on ACK */
|
||||
D_RATE("Update rate %d with %s.\n",
|
||||
last_idx,
|
||||
(info->flags & IEEE80211_TX_STAT_ACK) ?
|
||||
"success" : "failure");
|
||||
il3945_collect_tx_data(rs_sta,
|
||||
&rs_sta->win[last_idx],
|
||||
info->flags & IEEE80211_TX_STAT_ACK, 1, last_idx);
|
||||
D_RATE("Update rate %d with %s.\n", last_idx,
|
||||
(info->flags & IEEE80211_TX_STAT_ACK) ? "success" : "failure");
|
||||
il3945_collect_tx_data(rs_sta, &rs_sta->win[last_idx],
|
||||
info->flags & IEEE80211_TX_STAT_ACK, 1,
|
||||
last_idx);
|
||||
|
||||
/* We updated the rate scale win -- if its been more than
|
||||
* flush_time since the last run, schedule the flush
|
||||
|
@ -531,8 +532,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *
|
|||
spin_lock_irqsave(&rs_sta->lock, flags);
|
||||
|
||||
if (!rs_sta->flush_pending &&
|
||||
time_after(jiffies, rs_sta->last_flush +
|
||||
rs_sta->flush_time)) {
|
||||
time_after(jiffies, rs_sta->last_flush + rs_sta->flush_time)) {
|
||||
|
||||
rs_sta->last_partial_flush = jiffies;
|
||||
rs_sta->flush_pending = 1;
|
||||
|
@ -545,8 +545,9 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *
|
|||
D_RATE("leave\n");
|
||||
}
|
||||
|
||||
static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta,
|
||||
u8 idx, u16 rate_mask, enum ieee80211_band band)
|
||||
static u16
|
||||
il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask,
|
||||
enum ieee80211_band band)
|
||||
{
|
||||
u8 high = RATE_INVALID;
|
||||
u8 low = RATE_INVALID;
|
||||
|
@ -569,8 +570,7 @@ static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta,
|
|||
|
||||
/* Find the next rate that is in the rate mask */
|
||||
i = idx + 1;
|
||||
for (mask = (1 << i); i < RATE_COUNT_3945;
|
||||
i++, mask <<= 1) {
|
||||
for (mask = (1 << i); i < RATE_COUNT_3945; i++, mask <<= 1) {
|
||||
if (rate_mask & mask) {
|
||||
high = i;
|
||||
break;
|
||||
|
@ -625,8 +625,9 @@ static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta,
|
|||
* rate table and must reference the driver allocated rate table
|
||||
*
|
||||
*/
|
||||
static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
|
||||
void *il_sta, struct ieee80211_tx_rate_control *txrc)
|
||||
static void
|
||||
il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
|
||||
struct ieee80211_tx_rate_control *txrc)
|
||||
{
|
||||
struct ieee80211_supported_band *sband = txrc->sband;
|
||||
struct sk_buff *skb = txrc->skb;
|
||||
|
@ -700,9 +701,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
|
|||
|
||||
D_RATE("Invalid average_tpt on rate %d: "
|
||||
"counter: %d, success_counter: %d, "
|
||||
"expected_tpt is %sNULL\n",
|
||||
idx,
|
||||
win->counter,
|
||||
"expected_tpt is %sNULL\n", idx, win->counter,
|
||||
win->success_counter,
|
||||
rs_sta->expected_tpt ? "not " : "");
|
||||
|
||||
|
@ -714,8 +713,8 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
|
|||
|
||||
current_tpt = win->average_tpt;
|
||||
|
||||
high_low = il3945_get_adjacent_rate(rs_sta, idx, rate_mask,
|
||||
sband->band);
|
||||
high_low =
|
||||
il3945_get_adjacent_rate(rs_sta, idx, rate_mask, sband->band);
|
||||
low = high_low & 0xff;
|
||||
high = (high_low >> 8) & 0xff;
|
||||
|
||||
|
@ -740,10 +739,10 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
|
|||
scale_action = -1;
|
||||
/* No throughput measured yet for adjacent rates,
|
||||
* try increase */
|
||||
} else if (low_tpt == IL_INVALID_VALUE &&
|
||||
high_tpt == IL_INVALID_VALUE) {
|
||||
} else if (low_tpt == IL_INVALID_VALUE && high_tpt == IL_INVALID_VALUE) {
|
||||
|
||||
if (high != RATE_INVALID && win->success_ratio >= RATE_INCREASE_TH)
|
||||
if (high != RATE_INVALID &&
|
||||
win->success_ratio >= RATE_INCREASE_TH)
|
||||
scale_action = 1;
|
||||
else if (low != RATE_INVALID)
|
||||
scale_action = 0;
|
||||
|
@ -751,13 +750,11 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
|
|||
/* Both adjacent throughputs are measured, but neither one has
|
||||
* better throughput; we're using the best rate, don't change
|
||||
* it! */
|
||||
} else if (low_tpt != IL_INVALID_VALUE &&
|
||||
high_tpt != IL_INVALID_VALUE &&
|
||||
low_tpt < current_tpt && high_tpt < current_tpt) {
|
||||
} else if (low_tpt != IL_INVALID_VALUE && high_tpt != IL_INVALID_VALUE
|
||||
&& low_tpt < current_tpt && high_tpt < current_tpt) {
|
||||
|
||||
D_RATE("No action -- low [%d] & high [%d] < "
|
||||
"current_tpt [%d]\n",
|
||||
low_tpt, high_tpt, current_tpt);
|
||||
"current_tpt [%d]\n", low_tpt, high_tpt, current_tpt);
|
||||
scale_action = 0;
|
||||
|
||||
/* At least one of the rates has better throughput */
|
||||
|
@ -770,14 +767,12 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
|
|||
win->success_ratio >= RATE_INCREASE_TH)
|
||||
scale_action = 1;
|
||||
else {
|
||||
D_RATE(
|
||||
"decrease rate because of high tpt\n");
|
||||
D_RATE("decrease rate because of high tpt\n");
|
||||
scale_action = 0;
|
||||
}
|
||||
} else if (low_tpt != IL_INVALID_VALUE) {
|
||||
if (low_tpt > current_tpt) {
|
||||
D_RATE(
|
||||
"decrease rate because of low tpt\n");
|
||||
D_RATE("decrease rate because of low tpt\n");
|
||||
scale_action = -1;
|
||||
} else if (win->success_ratio >= RATE_INCREASE_TH) {
|
||||
/* Lower rate has better
|
||||
|
@ -815,10 +810,10 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
|
|||
break;
|
||||
}
|
||||
|
||||
D_RATE("Selected %d (action %d) - low %d high %d\n",
|
||||
idx, scale_action, low, high);
|
||||
D_RATE("Selected %d (action %d) - low %d high %d\n", idx, scale_action,
|
||||
low, high);
|
||||
|
||||
out:
|
||||
out:
|
||||
|
||||
if (sband->band == IEEE80211_BAND_5GHZ) {
|
||||
if (WARN_ON_ONCE(idx < IL_FIRST_OFDM_RATE))
|
||||
|
@ -834,15 +829,16 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
static int il3945_open_file_generic(struct inode *inode, struct file *file)
|
||||
static int
|
||||
il3945_open_file_generic(struct inode *inode, struct file *file)
|
||||
{
|
||||
file->private_data = inode->i_private;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t il3945_sta_dbgfs_stats_table_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
static ssize_t
|
||||
il3945_sta_dbgfs_stats_table_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
char *buff;
|
||||
int desc = 0;
|
||||
|
@ -854,14 +850,15 @@ static ssize_t il3945_sta_dbgfs_stats_table_read(struct file *file,
|
|||
if (!buff)
|
||||
return -ENOMEM;
|
||||
|
||||
desc += sprintf(buff + desc, "tx packets=%d last rate idx=%d\n"
|
||||
"rate=0x%X flush time %d\n",
|
||||
lq_sta->tx_packets,
|
||||
lq_sta->last_txrate_idx,
|
||||
lq_sta->start_rate, jiffies_to_msecs(lq_sta->flush_time));
|
||||
desc +=
|
||||
sprintf(buff + desc,
|
||||
"tx packets=%d last rate idx=%d\n"
|
||||
"rate=0x%X flush time %d\n", lq_sta->tx_packets,
|
||||
lq_sta->last_txrate_idx, lq_sta->start_rate,
|
||||
jiffies_to_msecs(lq_sta->flush_time));
|
||||
for (j = 0; j < RATE_COUNT_3945; j++) {
|
||||
desc += sprintf(buff+desc,
|
||||
"counter=%d success=%d %%=%d\n",
|
||||
desc +=
|
||||
sprintf(buff + desc, "counter=%d success=%d %%=%d\n",
|
||||
lq_sta->win[j].counter,
|
||||
lq_sta->win[j].success_counter,
|
||||
lq_sta->win[j].success_ratio);
|
||||
|
@ -877,18 +874,19 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = {
|
|||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
static void il3945_add_debugfs(void *il, void *il_sta,
|
||||
struct dentry *dir)
|
||||
static void
|
||||
il3945_add_debugfs(void *il, void *il_sta, struct dentry *dir)
|
||||
{
|
||||
struct il3945_rs_sta *lq_sta = il_sta;
|
||||
|
||||
lq_sta->rs_sta_dbgfs_stats_table_file =
|
||||
debugfs_create_file("rate_stats_table", 0600, dir,
|
||||
lq_sta, &rs_sta_dbgfs_stats_table_ops);
|
||||
debugfs_create_file("rate_stats_table", 0600, dir, lq_sta,
|
||||
&rs_sta_dbgfs_stats_table_ops);
|
||||
|
||||
}
|
||||
|
||||
static void il3945_remove_debugfs(void *il, void *il_sta)
|
||||
static void
|
||||
il3945_remove_debugfs(void *il, void *il_sta)
|
||||
{
|
||||
struct il3945_rs_sta *lq_sta = il_sta;
|
||||
debugfs_remove(lq_sta->rs_sta_dbgfs_stats_table_file);
|
||||
|
@ -900,8 +898,8 @@ static void il3945_remove_debugfs(void *il, void *il_sta)
|
|||
* the station is added. Since mac80211 calls this function before a
|
||||
* station is added we ignore it.
|
||||
*/
|
||||
static void il3945_rs_rate_init_stub(void *il_r,
|
||||
struct ieee80211_supported_band *sband,
|
||||
static void
|
||||
il3945_rs_rate_init_stub(void *il_r, struct ieee80211_supported_band *sband,
|
||||
struct ieee80211_sta *sta, void *il_sta)
|
||||
{
|
||||
}
|
||||
|
@ -922,7 +920,9 @@ static struct rate_control_ops rs_ops = {
|
|||
#endif
|
||||
|
||||
};
|
||||
void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
|
||||
|
||||
void
|
||||
il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
|
||||
{
|
||||
struct il_priv *il = hw->priv;
|
||||
s32 rssi = 0;
|
||||
|
@ -935,15 +935,15 @@ void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
|
|||
|
||||
rcu_read_lock();
|
||||
|
||||
sta = ieee80211_find_sta(il->ctx.vif,
|
||||
il->stations[sta_id].sta.sta.addr);
|
||||
sta =
|
||||
ieee80211_find_sta(il->ctx.vif, il->stations[sta_id].sta.sta.addr);
|
||||
if (!sta) {
|
||||
D_RATE("Unable to find station to initialize rate scaling.\n");
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
psta = (void *) sta->drv_priv;
|
||||
psta = (void *)sta->drv_priv;
|
||||
rs_sta = &psta->rs_sta;
|
||||
|
||||
spin_lock_irqsave(&rs_sta->lock, flags);
|
||||
|
@ -952,8 +952,7 @@ void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
|
|||
switch (il->band) {
|
||||
case IEEE80211_BAND_2GHZ:
|
||||
/* TODO: this always does G, not a regression */
|
||||
if (il->ctx.active.flags &
|
||||
RXON_FLG_TGG_PROTECT_MSK) {
|
||||
if (il->ctx.active.flags & RXON_FLG_TGG_PROTECT_MSK) {
|
||||
rs_sta->tgg = 1;
|
||||
rs_sta->expected_tpt = il3945_expected_tpt_g_prot;
|
||||
} else
|
||||
|
@ -978,18 +977,19 @@ void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
|
|||
|
||||
rs_sta->start_rate = il3945_get_rate_idx_by_rssi(rssi, il->band);
|
||||
|
||||
D_RATE("leave: rssi %d assign rate idx: "
|
||||
"%d (plcp 0x%x)\n", rssi, rs_sta->start_rate,
|
||||
il3945_rates[rs_sta->start_rate].plcp);
|
||||
D_RATE("leave: rssi %d assign rate idx: " "%d (plcp 0x%x)\n", rssi,
|
||||
rs_sta->start_rate, il3945_rates[rs_sta->start_rate].plcp);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
int il3945_rate_control_register(void)
|
||||
int
|
||||
il3945_rate_control_register(void)
|
||||
{
|
||||
return ieee80211_rate_control_register(&rs_ops);
|
||||
}
|
||||
|
||||
void il3945_rate_control_unregister(void)
|
||||
void
|
||||
il3945_rate_control_unregister(void)
|
||||
{
|
||||
ieee80211_rate_control_unregister(&rs_ops);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -93,7 +93,6 @@ struct il3945_rs_sta {
|
|||
int last_txrate_idx;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* The common struct MUST be first because it is shared between
|
||||
* 3945 and 4965!
|
||||
|
@ -186,7 +185,6 @@ struct il3945_ibss_seq {
|
|||
#define IL_RX_STATS(x) (&x->u.rx_frame.stats)
|
||||
#define IL_RX_DATA(x) (IL_RX_HDR(x)->payload)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Functions implemented in iwl3945-base.c which are forward declared here
|
||||
|
@ -197,7 +195,8 @@ extern int il3945_calc_db_from_ratio(int sig_ratio);
|
|||
extern void il3945_rx_replenish(void *data);
|
||||
extern void il3945_rx_queue_reset(struct il_priv *il, struct il_rx_queue *rxq);
|
||||
extern unsigned int il3945_fill_beacon_frame(struct il_priv *il,
|
||||
struct ieee80211_hdr *hdr, int left);
|
||||
struct ieee80211_hdr *hdr,
|
||||
int left);
|
||||
extern int il3945_dump_nic_event_log(struct il_priv *il, bool full_log,
|
||||
char **buf, bool display);
|
||||
extern void il3945_dump_nic_error_log(struct il_priv *il);
|
||||
|
@ -230,33 +229,28 @@ extern void il3945_hw_txq_ctx_stop(struct il_priv *il);
|
|||
extern int il3945_hw_nic_reset(struct il_priv *il);
|
||||
extern int il3945_hw_txq_attach_buf_to_tfd(struct il_priv *il,
|
||||
struct il_tx_queue *txq,
|
||||
dma_addr_t addr, u16 len,
|
||||
u8 reset, u8 pad);
|
||||
extern void il3945_hw_txq_free_tfd(struct il_priv *il,
|
||||
struct il_tx_queue *txq);
|
||||
dma_addr_t addr, u16 len, u8 reset,
|
||||
u8 pad);
|
||||
extern void il3945_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq);
|
||||
extern int il3945_hw_get_temperature(struct il_priv *il);
|
||||
extern int il3945_hw_tx_queue_init(struct il_priv *il,
|
||||
struct il_tx_queue *txq);
|
||||
extern int il3945_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
|
||||
extern unsigned int il3945_hw_get_beacon_cmd(struct il_priv *il,
|
||||
struct il3945_frame *frame, u8 rate);
|
||||
void il3945_hw_build_tx_cmd_rate(struct il_priv *il,
|
||||
struct il_device_cmd *cmd,
|
||||
struct il3945_frame *frame,
|
||||
u8 rate);
|
||||
void il3945_hw_build_tx_cmd_rate(struct il_priv *il, struct il_device_cmd *cmd,
|
||||
struct ieee80211_tx_info *info,
|
||||
struct ieee80211_hdr *hdr,
|
||||
int sta_id, int tx_id);
|
||||
struct ieee80211_hdr *hdr, 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_hdl_stats(struct il_priv *il,
|
||||
struct il_rx_buf *rxb);
|
||||
void il3945_hdl_c_stats(struct il_priv *il,
|
||||
struct il_rx_buf *rxb);
|
||||
extern void il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb);
|
||||
void il3945_hdl_c_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);
|
||||
extern void il3945_post_associate(struct il_priv *il);
|
||||
extern void il3945_config_ap(struct il_priv *il);
|
||||
|
||||
extern int il3945_commit_rxon(struct il_priv *il,
|
||||
struct il_rxon_context *ctx);
|
||||
extern int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx);
|
||||
|
||||
/**
|
||||
* il3945_hw_find_station - Find station id for a given BSSID
|
||||
|
@ -266,7 +260,7 @@ extern int il3945_commit_rxon(struct il_priv *il,
|
|||
* not yet been merged into a single common layer for managing the
|
||||
* station tables.
|
||||
*/
|
||||
extern u8 il3945_hw_find_station(struct il_priv *il, const u8 *bssid);
|
||||
extern u8 il3945_hw_find_station(struct il_priv *il, const u8 * bssid);
|
||||
|
||||
extern struct ieee80211_ops il3945_hw_ops;
|
||||
|
||||
|
@ -275,8 +269,10 @@ extern int il3945_init_hw_rate_table(struct il_priv *il);
|
|||
extern void il3945_reg_txpower_periodic(struct il_priv *il);
|
||||
extern int il3945_txpower_set_from_eeprom(struct il_priv *il);
|
||||
|
||||
extern const struct il_channel_info *il3945_get_channel_info(
|
||||
const struct il_priv *il, enum ieee80211_band band, u16 channel);
|
||||
extern const struct il_channel_info *il3945_get_channel_info(const struct
|
||||
il_priv *il,
|
||||
enum ieee80211_band
|
||||
band, u16 channel);
|
||||
|
||||
extern int il3945_rs_next_rate(struct il_priv *il, int rate);
|
||||
|
||||
|
@ -287,8 +283,6 @@ void il3945_post_scan(struct il_priv *il);
|
|||
/* rates */
|
||||
extern const struct il3945_rate_info il3945_rates[RATE_COUNT_3945];
|
||||
|
||||
|
||||
|
||||
/* RSSI to dBm */
|
||||
#define IL39_RSSI_OFFSET 95
|
||||
|
||||
|
@ -474,7 +468,8 @@ struct il3945_eeprom {
|
|||
/* Size of uCode instruction memory in bootstrap state machine */
|
||||
#define IL39_MAX_BSM_SIZE IL39_RTC_INST_SIZE
|
||||
|
||||
static inline int il3945_hw_valid_rtc_data_addr(u32 addr)
|
||||
static inline int
|
||||
il3945_hw_valid_rtc_data_addr(u32 addr)
|
||||
{
|
||||
return (addr >= IL39_RTC_DATA_LOWER_BOUND &&
|
||||
addr < IL39_RTC_DATA_UPPER_BOUND);
|
||||
|
@ -486,19 +481,22 @@ struct il3945_shared {
|
|||
__le32 tx_base_ptr[8];
|
||||
} __packed;
|
||||
|
||||
static inline u8 il3945_hw_get_rate(__le16 rate_n_flags)
|
||||
static inline u8
|
||||
il3945_hw_get_rate(__le16 rate_n_flags)
|
||||
{
|
||||
return le16_to_cpu(rate_n_flags) & 0xFF;
|
||||
}
|
||||
|
||||
static inline u16 il3945_hw_get_rate_n_flags(__le16 rate_n_flags)
|
||||
static inline u16
|
||||
il3945_hw_get_rate_n_flags(__le16 rate_n_flags)
|
||||
{
|
||||
return le16_to_cpu(rate_n_flags);
|
||||
}
|
||||
|
||||
static inline __le16 il3945_hw_set_rate_n_flags(u8 rate, u16 flags)
|
||||
static inline __le16
|
||||
il3945_hw_set_rate_n_flags(u8 rate, u16 flags)
|
||||
{
|
||||
return cpu_to_le16((u16)rate|flags);
|
||||
return cpu_to_le16((u16) rate | flags);
|
||||
}
|
||||
|
||||
/************************************/
|
||||
|
@ -553,7 +551,6 @@ static inline __le16 il3945_hw_set_rate_n_flags(u8 rate, u16 flags)
|
|||
#define FH39_TSSR_MSG_CONFIG (FH39_TSSR_TBL + 0x008)
|
||||
#define FH39_TSSR_TX_STATUS (FH39_TSSR_TBL + 0x010)
|
||||
|
||||
|
||||
/* DBM */
|
||||
|
||||
#define FH39_SRVC_CHNL (6)
|
||||
|
@ -622,29 +619,31 @@ struct il3945_tfd {
|
|||
} __packed;
|
||||
|
||||
#ifdef CONFIG_IWLEGACY_DEBUGFS
|
||||
ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos);
|
||||
ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos);
|
||||
ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos);
|
||||
ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos);
|
||||
ssize_t il3945_ucode_general_stats_read(struct file *file,
|
||||
char __user *user_buf, size_t count,
|
||||
loff_t *ppos);
|
||||
char __user * user_buf, size_t count,
|
||||
loff_t * ppos);
|
||||
#else
|
||||
static ssize_t il3945_ucode_rx_stats_read(struct file *file,
|
||||
char __user *user_buf, size_t count,
|
||||
loff_t *ppos)
|
||||
static ssize_t
|
||||
il3945_ucode_rx_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static ssize_t il3945_ucode_tx_stats_read(struct file *file,
|
||||
char __user *user_buf, size_t count,
|
||||
loff_t *ppos)
|
||||
|
||||
static ssize_t
|
||||
il3945_ucode_tx_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static ssize_t il3945_ucode_general_stats_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
|
||||
static ssize_t
|
||||
il3945_ucode_general_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,8 @@ struct stats_general_data {
|
|||
u32 beacon_energy_c;
|
||||
};
|
||||
|
||||
void il4965_calib_free_results(struct il_priv *il)
|
||||
void
|
||||
il4965_calib_free_results(struct il_priv *il)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -102,9 +103,8 @@ void il4965_calib_free_results(struct il_priv *il)
|
|||
* enough to receive all of our own network traffic, but not so
|
||||
* high that our DSP gets too busy trying to lock onto non-network
|
||||
* activity/noise. */
|
||||
static int il4965_sens_energy_cck(struct il_priv *il,
|
||||
u32 norm_fa,
|
||||
u32 rx_enable_time,
|
||||
static int
|
||||
il4965_sens_energy_cck(struct il_priv *il, u32 norm_fa, u32 rx_enable_time,
|
||||
struct stats_general_data *rx_info)
|
||||
{
|
||||
u32 max_nrg_cck = 0;
|
||||
|
@ -138,12 +138,12 @@ static int il4965_sens_energy_cck(struct il_priv *il,
|
|||
/* Find max silence rssi among all 3 receivers.
|
||||
* This is background noise, which may include transmissions from other
|
||||
* networks, measured during silence before our network's beacon */
|
||||
silence_rssi_a = (u8)((rx_info->beacon_silence_rssi_a &
|
||||
ALL_BAND_FILTER) >> 8);
|
||||
silence_rssi_b = (u8)((rx_info->beacon_silence_rssi_b &
|
||||
ALL_BAND_FILTER) >> 8);
|
||||
silence_rssi_c = (u8)((rx_info->beacon_silence_rssi_c &
|
||||
ALL_BAND_FILTER) >> 8);
|
||||
silence_rssi_a =
|
||||
(u8) ((rx_info->beacon_silence_rssi_a & ALL_BAND_FILTER) >> 8);
|
||||
silence_rssi_b =
|
||||
(u8) ((rx_info->beacon_silence_rssi_b & ALL_BAND_FILTER) >> 8);
|
||||
silence_rssi_c =
|
||||
(u8) ((rx_info->beacon_silence_rssi_c & ALL_BAND_FILTER) >> 8);
|
||||
|
||||
val = max(silence_rssi_b, silence_rssi_c);
|
||||
max_silence_rssi = max(silence_rssi_a, (u8) val);
|
||||
|
@ -159,9 +159,8 @@ static int il4965_sens_energy_cck(struct il_priv *il,
|
|||
val = data->nrg_silence_rssi[i];
|
||||
silence_ref = max(silence_ref, val);
|
||||
}
|
||||
D_CALIB("silence a %u, b %u, c %u, 20-bcn max %u\n",
|
||||
silence_rssi_a, silence_rssi_b, silence_rssi_c,
|
||||
silence_ref);
|
||||
D_CALIB("silence a %u, b %u, c %u, 20-bcn max %u\n", silence_rssi_a,
|
||||
silence_rssi_b, silence_rssi_c, silence_ref);
|
||||
|
||||
/* Find max rx energy (min value!) among all 3 receivers,
|
||||
* measured during beacon frame.
|
||||
|
@ -199,8 +198,8 @@ static int il4965_sens_energy_cck(struct il_priv *il,
|
|||
/* If we got too many false alarms this time, reduce sensitivity */
|
||||
if (false_alarms > max_false_alarms &&
|
||||
data->auto_corr_cck > AUTO_CORR_MAX_TH_CCK) {
|
||||
D_CALIB("norm FA %u > max FA %u\n",
|
||||
false_alarms, max_false_alarms);
|
||||
D_CALIB("norm FA %u > max FA %u\n", false_alarms,
|
||||
max_false_alarms);
|
||||
D_CALIB("... reducing sensitivity\n");
|
||||
data->nrg_curr_state = IL_FA_TOO_MANY;
|
||||
/* Store for "fewer than desired" on later beacon */
|
||||
|
@ -215,11 +214,10 @@ static int il4965_sens_energy_cck(struct il_priv *il,
|
|||
|
||||
/* Compare silence level with silence level for most recent
|
||||
* healthy number or too many false alarms */
|
||||
data->nrg_auto_corr_silence_diff = (s32)data->nrg_silence_ref -
|
||||
(s32)silence_ref;
|
||||
data->nrg_auto_corr_silence_diff =
|
||||
(s32) data->nrg_silence_ref - (s32) silence_ref;
|
||||
|
||||
D_CALIB(
|
||||
"norm FA %u < min FA %u, silence diff %d\n",
|
||||
D_CALIB("norm FA %u < min FA %u, silence diff %d\n",
|
||||
false_alarms, min_false_alarms,
|
||||
data->nrg_auto_corr_silence_diff);
|
||||
|
||||
|
@ -236,10 +234,9 @@ static int il4965_sens_energy_cck(struct il_priv *il,
|
|||
D_CALIB("... increasing sensitivity\n");
|
||||
/* Increase nrg value to increase sensitivity */
|
||||
val = data->nrg_th_cck + NRG_STEP_CCK;
|
||||
data->nrg_th_cck = min((u32)ranges->min_nrg_cck, val);
|
||||
data->nrg_th_cck = min((u32) ranges->min_nrg_cck, val);
|
||||
} else {
|
||||
D_CALIB(
|
||||
"... but not changing sensitivity\n");
|
||||
D_CALIB("... but not changing sensitivity\n");
|
||||
}
|
||||
|
||||
/* Else we got a healthy number of false alarms, keep status quo */
|
||||
|
@ -283,31 +280,28 @@ static int il4965_sens_energy_cck(struct il_priv *il,
|
|||
else {
|
||||
val = data->auto_corr_cck + AUTO_CORR_STEP_CCK;
|
||||
data->auto_corr_cck =
|
||||
min((u32)ranges->auto_corr_max_cck, val);
|
||||
min((u32) ranges->auto_corr_max_cck, val);
|
||||
}
|
||||
val = data->auto_corr_cck_mrc + AUTO_CORR_STEP_CCK;
|
||||
data->auto_corr_cck_mrc =
|
||||
min((u32)ranges->auto_corr_max_cck_mrc, val);
|
||||
min((u32) ranges->auto_corr_max_cck_mrc, val);
|
||||
} else if (false_alarms < min_false_alarms &&
|
||||
(data->nrg_auto_corr_silence_diff > NRG_DIFF ||
|
||||
data->num_in_cck_no_fa > MAX_NUMBER_CCK_NO_FA)) {
|
||||
|
||||
/* Decrease auto_corr values to increase sensitivity */
|
||||
val = data->auto_corr_cck - AUTO_CORR_STEP_CCK;
|
||||
data->auto_corr_cck =
|
||||
max((u32)ranges->auto_corr_min_cck, val);
|
||||
data->auto_corr_cck = max((u32) ranges->auto_corr_min_cck, val);
|
||||
val = data->auto_corr_cck_mrc - AUTO_CORR_STEP_CCK;
|
||||
data->auto_corr_cck_mrc =
|
||||
max((u32)ranges->auto_corr_min_cck_mrc, val);
|
||||
max((u32) ranges->auto_corr_min_cck_mrc, val);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int il4965_sens_auto_corr_ofdm(struct il_priv *il,
|
||||
u32 norm_fa,
|
||||
u32 rx_enable_time)
|
||||
static int
|
||||
il4965_sens_auto_corr_ofdm(struct il_priv *il, u32 norm_fa, u32 rx_enable_time)
|
||||
{
|
||||
u32 val;
|
||||
u32 false_alarms = norm_fa * 200 * 1024;
|
||||
|
@ -321,47 +315,47 @@ static int il4965_sens_auto_corr_ofdm(struct il_priv *il,
|
|||
/* If we got too many false alarms this time, reduce sensitivity */
|
||||
if (false_alarms > max_false_alarms) {
|
||||
|
||||
D_CALIB("norm FA %u > max FA %u)\n",
|
||||
false_alarms, max_false_alarms);
|
||||
D_CALIB("norm FA %u > max FA %u)\n", false_alarms,
|
||||
max_false_alarms);
|
||||
|
||||
val = data->auto_corr_ofdm + AUTO_CORR_STEP_OFDM;
|
||||
data->auto_corr_ofdm =
|
||||
min((u32)ranges->auto_corr_max_ofdm, val);
|
||||
min((u32) ranges->auto_corr_max_ofdm, val);
|
||||
|
||||
val = data->auto_corr_ofdm_mrc + AUTO_CORR_STEP_OFDM;
|
||||
data->auto_corr_ofdm_mrc =
|
||||
min((u32)ranges->auto_corr_max_ofdm_mrc, val);
|
||||
min((u32) ranges->auto_corr_max_ofdm_mrc, val);
|
||||
|
||||
val = data->auto_corr_ofdm_x1 + AUTO_CORR_STEP_OFDM;
|
||||
data->auto_corr_ofdm_x1 =
|
||||
min((u32)ranges->auto_corr_max_ofdm_x1, val);
|
||||
min((u32) ranges->auto_corr_max_ofdm_x1, val);
|
||||
|
||||
val = data->auto_corr_ofdm_mrc_x1 + AUTO_CORR_STEP_OFDM;
|
||||
data->auto_corr_ofdm_mrc_x1 =
|
||||
min((u32)ranges->auto_corr_max_ofdm_mrc_x1, val);
|
||||
min((u32) ranges->auto_corr_max_ofdm_mrc_x1, val);
|
||||
}
|
||||
|
||||
/* Else if we got fewer than desired, increase sensitivity */
|
||||
else if (false_alarms < min_false_alarms) {
|
||||
|
||||
D_CALIB("norm FA %u < min FA %u\n",
|
||||
false_alarms, min_false_alarms);
|
||||
D_CALIB("norm FA %u < min FA %u\n", false_alarms,
|
||||
min_false_alarms);
|
||||
|
||||
val = data->auto_corr_ofdm - AUTO_CORR_STEP_OFDM;
|
||||
data->auto_corr_ofdm =
|
||||
max((u32)ranges->auto_corr_min_ofdm, val);
|
||||
max((u32) ranges->auto_corr_min_ofdm, val);
|
||||
|
||||
val = data->auto_corr_ofdm_mrc - AUTO_CORR_STEP_OFDM;
|
||||
data->auto_corr_ofdm_mrc =
|
||||
max((u32)ranges->auto_corr_min_ofdm_mrc, val);
|
||||
max((u32) ranges->auto_corr_min_ofdm_mrc, val);
|
||||
|
||||
val = data->auto_corr_ofdm_x1 - AUTO_CORR_STEP_OFDM;
|
||||
data->auto_corr_ofdm_x1 =
|
||||
max((u32)ranges->auto_corr_min_ofdm_x1, val);
|
||||
max((u32) ranges->auto_corr_min_ofdm_x1, val);
|
||||
|
||||
val = data->auto_corr_ofdm_mrc_x1 - AUTO_CORR_STEP_OFDM;
|
||||
data->auto_corr_ofdm_mrc_x1 =
|
||||
max((u32)ranges->auto_corr_min_ofdm_mrc_x1, val);
|
||||
max((u32) ranges->auto_corr_min_ofdm_mrc_x1, val);
|
||||
} else {
|
||||
D_CALIB("min FA %u < norm FA %u < max FA %u OK\n",
|
||||
min_false_alarms, false_alarms, max_false_alarms);
|
||||
|
@ -369,48 +363,46 @@ static int il4965_sens_auto_corr_ofdm(struct il_priv *il,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il,
|
||||
static void
|
||||
il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il,
|
||||
struct il_sensitivity_data *data,
|
||||
__le16 *tbl)
|
||||
__le16 * tbl)
|
||||
{
|
||||
tbl[HD_AUTO_CORR32_X4_TH_ADD_MIN_IDX] =
|
||||
cpu_to_le16((u16)data->auto_corr_ofdm);
|
||||
cpu_to_le16((u16) data->auto_corr_ofdm);
|
||||
tbl[HD_AUTO_CORR32_X4_TH_ADD_MIN_MRC_IDX] =
|
||||
cpu_to_le16((u16)data->auto_corr_ofdm_mrc);
|
||||
cpu_to_le16((u16) data->auto_corr_ofdm_mrc);
|
||||
tbl[HD_AUTO_CORR32_X1_TH_ADD_MIN_IDX] =
|
||||
cpu_to_le16((u16)data->auto_corr_ofdm_x1);
|
||||
cpu_to_le16((u16) data->auto_corr_ofdm_x1);
|
||||
tbl[HD_AUTO_CORR32_X1_TH_ADD_MIN_MRC_IDX] =
|
||||
cpu_to_le16((u16)data->auto_corr_ofdm_mrc_x1);
|
||||
cpu_to_le16((u16) data->auto_corr_ofdm_mrc_x1);
|
||||
|
||||
tbl[HD_AUTO_CORR40_X4_TH_ADD_MIN_IDX] =
|
||||
cpu_to_le16((u16)data->auto_corr_cck);
|
||||
cpu_to_le16((u16) data->auto_corr_cck);
|
||||
tbl[HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_IDX] =
|
||||
cpu_to_le16((u16)data->auto_corr_cck_mrc);
|
||||
cpu_to_le16((u16) data->auto_corr_cck_mrc);
|
||||
|
||||
tbl[HD_MIN_ENERGY_CCK_DET_IDX] =
|
||||
cpu_to_le16((u16)data->nrg_th_cck);
|
||||
tbl[HD_MIN_ENERGY_OFDM_DET_IDX] =
|
||||
cpu_to_le16((u16)data->nrg_th_ofdm);
|
||||
tbl[HD_MIN_ENERGY_CCK_DET_IDX] = cpu_to_le16((u16) data->nrg_th_cck);
|
||||
tbl[HD_MIN_ENERGY_OFDM_DET_IDX] = cpu_to_le16((u16) data->nrg_th_ofdm);
|
||||
|
||||
tbl[HD_BARKER_CORR_TH_ADD_MIN_IDX] =
|
||||
cpu_to_le16(data->barker_corr_th_min);
|
||||
tbl[HD_BARKER_CORR_TH_ADD_MIN_MRC_IDX] =
|
||||
cpu_to_le16(data->barker_corr_th_min_mrc);
|
||||
tbl[HD_OFDM_ENERGY_TH_IN_IDX] =
|
||||
cpu_to_le16(data->nrg_th_cca);
|
||||
tbl[HD_OFDM_ENERGY_TH_IN_IDX] = cpu_to_le16(data->nrg_th_cca);
|
||||
|
||||
D_CALIB("ofdm: ac %u mrc %u x1 %u mrc_x1 %u thresh %u\n",
|
||||
data->auto_corr_ofdm, data->auto_corr_ofdm_mrc,
|
||||
data->auto_corr_ofdm_x1, data->auto_corr_ofdm_mrc_x1,
|
||||
data->nrg_th_ofdm);
|
||||
|
||||
D_CALIB("cck: ac %u mrc %u thresh %u\n",
|
||||
data->auto_corr_cck, data->auto_corr_cck_mrc,
|
||||
data->nrg_th_cck);
|
||||
D_CALIB("cck: ac %u mrc %u thresh %u\n", data->auto_corr_cck,
|
||||
data->auto_corr_cck_mrc, data->nrg_th_cck);
|
||||
}
|
||||
|
||||
/* Prepare a C_SENSITIVITY, send to uCode if values have changed */
|
||||
static int il4965_sensitivity_write(struct il_priv *il)
|
||||
static int
|
||||
il4965_sensitivity_write(struct il_priv *il)
|
||||
{
|
||||
struct il_sensitivity_cmd cmd;
|
||||
struct il_sensitivity_data *data = NULL;
|
||||
|
@ -431,20 +423,22 @@ static int il4965_sensitivity_write(struct il_priv *il)
|
|||
cmd.control = C_SENSITIVITY_CONTROL_WORK_TBL;
|
||||
|
||||
/* Don't send command to uCode if nothing has changed */
|
||||
if (!memcmp(&cmd.table[0], &(il->sensitivity_tbl[0]),
|
||||
sizeof(u16)*HD_TBL_SIZE)) {
|
||||
if (!memcmp
|
||||
(&cmd.table[0], &(il->sensitivity_tbl[0]),
|
||||
sizeof(u16) * HD_TBL_SIZE)) {
|
||||
D_CALIB("No change in C_SENSITIVITY\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Copy table for comparison next time */
|
||||
memcpy(&(il->sensitivity_tbl[0]), &(cmd.table[0]),
|
||||
sizeof(u16)*HD_TBL_SIZE);
|
||||
sizeof(u16) * HD_TBL_SIZE);
|
||||
|
||||
return il_send_cmd(il, &cmd_out);
|
||||
}
|
||||
|
||||
void il4965_init_sensitivity(struct il_priv *il)
|
||||
void
|
||||
il4965_init_sensitivity(struct il_priv *il)
|
||||
{
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
@ -498,7 +492,8 @@ void il4965_init_sensitivity(struct il_priv *il)
|
|||
D_CALIB("<<return 0x%X\n", ret);
|
||||
}
|
||||
|
||||
void il4965_sensitivity_calibration(struct il_priv *il, void *resp)
|
||||
void
|
||||
il4965_sensitivity_calibration(struct il_priv *il, void *resp)
|
||||
{
|
||||
u32 rx_enable_time;
|
||||
u32 fa_cck;
|
||||
|
@ -548,12 +543,9 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp)
|
|||
le32_to_cpu(rx_info->beacon_silence_rssi_b);
|
||||
statis.beacon_silence_rssi_c =
|
||||
le32_to_cpu(rx_info->beacon_silence_rssi_c);
|
||||
statis.beacon_energy_a =
|
||||
le32_to_cpu(rx_info->beacon_energy_a);
|
||||
statis.beacon_energy_b =
|
||||
le32_to_cpu(rx_info->beacon_energy_b);
|
||||
statis.beacon_energy_c =
|
||||
le32_to_cpu(rx_info->beacon_energy_c);
|
||||
statis.beacon_energy_a = le32_to_cpu(rx_info->beacon_energy_a);
|
||||
statis.beacon_energy_b = le32_to_cpu(rx_info->beacon_energy_b);
|
||||
statis.beacon_energy_c = le32_to_cpu(rx_info->beacon_energy_c);
|
||||
|
||||
spin_unlock_irqrestore(&il->lock, flags);
|
||||
|
||||
|
@ -599,8 +591,7 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp)
|
|||
norm_fa_ofdm = fa_ofdm + bad_plcp_ofdm;
|
||||
norm_fa_cck = fa_cck + bad_plcp_cck;
|
||||
|
||||
D_CALIB(
|
||||
"cck: fa %u badp %u ofdm: fa %u badp %u\n", fa_cck,
|
||||
D_CALIB("cck: fa %u badp %u ofdm: fa %u badp %u\n", fa_cck,
|
||||
bad_plcp_cck, fa_ofdm, bad_plcp_ofdm);
|
||||
|
||||
il4965_sens_auto_corr_ofdm(il, norm_fa_ofdm, rx_enable_time);
|
||||
|
@ -609,7 +600,8 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp)
|
|||
il4965_sensitivity_write(il);
|
||||
}
|
||||
|
||||
static inline u8 il4965_find_first_chain(u8 mask)
|
||||
static inline u8
|
||||
il4965_find_first_chain(u8 mask)
|
||||
{
|
||||
if (mask & ANT_A)
|
||||
return CHAIN_A;
|
||||
|
@ -623,7 +615,7 @@ static inline u8 il4965_find_first_chain(u8 mask)
|
|||
* disconnected.
|
||||
*/
|
||||
static void
|
||||
il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig,
|
||||
il4965_find_disconn_antenna(struct il_priv *il, u32 * average_sig,
|
||||
struct il_chain_noise_data *data)
|
||||
{
|
||||
u32 active_chains = 0;
|
||||
|
@ -633,11 +625,14 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig,
|
|||
u8 first_chain;
|
||||
u16 i = 0;
|
||||
|
||||
average_sig[0] = data->chain_signal_a /
|
||||
average_sig[0] =
|
||||
data->chain_signal_a /
|
||||
il->cfg->base_params->chain_noise_num_beacons;
|
||||
average_sig[1] = data->chain_signal_b /
|
||||
average_sig[1] =
|
||||
data->chain_signal_b /
|
||||
il->cfg->base_params->chain_noise_num_beacons;
|
||||
average_sig[2] = data->chain_signal_c /
|
||||
average_sig[2] =
|
||||
data->chain_signal_c /
|
||||
il->cfg->base_params->chain_noise_num_beacons;
|
||||
|
||||
if (average_sig[0] >= average_sig[1]) {
|
||||
|
@ -656,10 +651,10 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig,
|
|||
active_chains = (1 << max_average_sig_antenna_i);
|
||||
}
|
||||
|
||||
D_CALIB("average_sig: a %d b %d c %d\n",
|
||||
average_sig[0], average_sig[1], average_sig[2]);
|
||||
D_CALIB("max_average_sig = %d, antenna %d\n",
|
||||
max_average_sig, max_average_sig_antenna_i);
|
||||
D_CALIB("average_sig: a %d b %d c %d\n", average_sig[0], average_sig[1],
|
||||
average_sig[2]);
|
||||
D_CALIB("max_average_sig = %d, antenna %d\n", max_average_sig,
|
||||
max_average_sig_antenna_i);
|
||||
|
||||
/* Compare signal strengths for all 3 receivers. */
|
||||
for (i = 0; i < NUM_RX_CHAINS; i++) {
|
||||
|
@ -673,8 +668,8 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig,
|
|||
else
|
||||
active_chains |= (1 << i);
|
||||
D_CALIB("i = %d rssiDelta = %d "
|
||||
"disconn_array[i] = %d\n",
|
||||
i, rssi_delta, data->disconn_array[i]);
|
||||
"disconn_array[i] = %d\n", i, rssi_delta,
|
||||
data->disconn_array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -712,8 +707,8 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig,
|
|||
il4965_find_first_chain(il->cfg->valid_tx_ant);
|
||||
data->disconn_array[first_chain] = 0;
|
||||
active_chains |= BIT(first_chain);
|
||||
D_CALIB(
|
||||
"All Tx chains are disconnected W/A - declare %d as connected\n",
|
||||
D_CALIB
|
||||
("All Tx chains are disconnected W/A - declare %d as connected\n",
|
||||
first_chain);
|
||||
break;
|
||||
}
|
||||
|
@ -721,21 +716,18 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig,
|
|||
|
||||
if (active_chains != il->hw_params.valid_rx_ant &&
|
||||
active_chains != il->chain_noise_data.active_chains)
|
||||
D_CALIB(
|
||||
"Detected that not all antennas are connected! "
|
||||
"Connected: %#x, valid: %#x.\n",
|
||||
active_chains, il->hw_params.valid_rx_ant);
|
||||
D_CALIB("Detected that not all antennas are connected! "
|
||||
"Connected: %#x, valid: %#x.\n", active_chains,
|
||||
il->hw_params.valid_rx_ant);
|
||||
|
||||
/* Save for use within RXON, TX, SCAN commands, etc. */
|
||||
data->active_chains = active_chains;
|
||||
D_CALIB("active_chains (bitwise) = 0x%x\n",
|
||||
active_chains);
|
||||
D_CALIB("active_chains (bitwise) = 0x%x\n", active_chains);
|
||||
}
|
||||
|
||||
static void il4965_gain_computation(struct il_priv *il,
|
||||
u32 *average_noise,
|
||||
u16 min_average_noise_antenna_i,
|
||||
u32 min_average_noise,
|
||||
static void
|
||||
il4965_gain_computation(struct il_priv *il, u32 * average_noise,
|
||||
u16 min_average_noise_antenna_i, u32 min_average_noise,
|
||||
u8 default_chain)
|
||||
{
|
||||
int i, ret;
|
||||
|
@ -747,9 +739,10 @@ static void il4965_gain_computation(struct il_priv *il,
|
|||
s32 delta_g = 0;
|
||||
|
||||
if (!data->disconn_array[i] &&
|
||||
data->delta_gain_code[i] == CHAIN_NOISE_DELTA_GAIN_INIT_VAL) {
|
||||
data->delta_gain_code[i] ==
|
||||
CHAIN_NOISE_DELTA_GAIN_INIT_VAL) {
|
||||
delta_g = average_noise[i] - min_average_noise;
|
||||
data->delta_gain_code[i] = (u8)((delta_g * 10) / 15);
|
||||
data->delta_gain_code[i] = (u8) ((delta_g * 10) / 15);
|
||||
data->delta_gain_code[i] =
|
||||
min(data->delta_gain_code[i],
|
||||
(u8) CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
|
||||
|
@ -760,10 +753,8 @@ static void il4965_gain_computation(struct il_priv *il,
|
|||
data->delta_gain_code[i] = 0;
|
||||
}
|
||||
}
|
||||
D_CALIB("delta_gain_codes: a %d b %d c %d\n",
|
||||
data->delta_gain_code[0],
|
||||
data->delta_gain_code[1],
|
||||
data->delta_gain_code[2]);
|
||||
D_CALIB("delta_gain_codes: a %d b %d c %d\n", data->delta_gain_code[0],
|
||||
data->delta_gain_code[1], data->delta_gain_code[2]);
|
||||
|
||||
/* Differential gain gets sent to uCode only once */
|
||||
if (!data->radio_write) {
|
||||
|
@ -775,11 +766,9 @@ static void il4965_gain_computation(struct il_priv *il,
|
|||
cmd.diff_gain_a = data->delta_gain_code[0];
|
||||
cmd.diff_gain_b = data->delta_gain_code[1];
|
||||
cmd.diff_gain_c = data->delta_gain_code[2];
|
||||
ret = il_send_cmd_pdu(il, C_PHY_CALIBRATION,
|
||||
sizeof(cmd), &cmd);
|
||||
ret = il_send_cmd_pdu(il, C_PHY_CALIBRATION, sizeof(cmd), &cmd);
|
||||
if (ret)
|
||||
D_CALIB("fail sending cmd "
|
||||
"C_PHY_CALIBRATION\n");
|
||||
D_CALIB("fail sending cmd " "C_PHY_CALIBRATION\n");
|
||||
|
||||
/* TODO we might want recalculate
|
||||
* rx_chain in rxon cmd */
|
||||
|
@ -789,15 +778,14 @@ static void il4965_gain_computation(struct il_priv *il,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Accumulate 16 beacons of signal and noise stats for each of
|
||||
* 3 receivers/antennas/rx-chains, then figure out:
|
||||
* 1) Which antennas are connected.
|
||||
* 2) Differential rx gain settings to balance the 3 receivers.
|
||||
*/
|
||||
void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
||||
void
|
||||
il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
||||
{
|
||||
struct il_chain_noise_data *data = NULL;
|
||||
|
||||
|
@ -807,8 +795,8 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
|||
u32 chain_sig_a;
|
||||
u32 chain_sig_b;
|
||||
u32 chain_sig_c;
|
||||
u32 average_sig[NUM_RX_CHAINS] = {INITIALIZATION_VALUE};
|
||||
u32 average_noise[NUM_RX_CHAINS] = {INITIALIZATION_VALUE};
|
||||
u32 average_sig[NUM_RX_CHAINS] = { INITIALIZATION_VALUE };
|
||||
u32 average_noise[NUM_RX_CHAINS] = { INITIALIZATION_VALUE };
|
||||
u32 min_average_noise = MIN_AVERAGE_NOISE_MAX_VALUE;
|
||||
u16 min_average_noise_antenna_i = INITIALIZATION_VALUE;
|
||||
u16 i = 0;
|
||||
|
@ -838,8 +826,7 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
|||
|
||||
spin_lock_irqsave(&il->lock, flags);
|
||||
|
||||
rx_info = &(((struct il_notif_stats *)stat_resp)->
|
||||
rx.general);
|
||||
rx_info = &(((struct il_notif_stats *)stat_resp)->rx.general);
|
||||
|
||||
if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) {
|
||||
D_CALIB(" << Interference data unavailable\n");
|
||||
|
@ -850,17 +837,17 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
|||
rxon_band24 = !!(ctx->staging.flags & RXON_FLG_BAND_24G_MSK);
|
||||
rxon_chnum = le16_to_cpu(ctx->staging.channel);
|
||||
|
||||
stat_band24 = !!(((struct il_notif_stats *)
|
||||
stat_resp)->flag &
|
||||
STATS_REPLY_FLG_BAND_24G_MSK);
|
||||
stat_chnum = le32_to_cpu(((struct il_notif_stats *)
|
||||
stat_resp)->flag) >> 16;
|
||||
stat_band24 =
|
||||
!!(((struct il_notif_stats *)stat_resp)->
|
||||
flag & STATS_REPLY_FLG_BAND_24G_MSK);
|
||||
stat_chnum =
|
||||
le32_to_cpu(((struct il_notif_stats *)stat_resp)->flag) >> 16;
|
||||
|
||||
/* Make sure we accumulate data for just the associated channel
|
||||
* (even if scanning). */
|
||||
if (rxon_chnum != stat_chnum || rxon_band24 != stat_band24) {
|
||||
D_CALIB("Stats not from chan=%d, band24=%d\n",
|
||||
rxon_chnum, rxon_band24);
|
||||
D_CALIB("Stats not from chan=%d, band24=%d\n", rxon_chnum,
|
||||
rxon_band24);
|
||||
spin_unlock_irqrestore(&il->lock, flags);
|
||||
return;
|
||||
}
|
||||
|
@ -869,12 +856,12 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
|||
* Accumulate beacon stats values across
|
||||
* "chain_noise_num_beacons"
|
||||
*/
|
||||
chain_noise_a = le32_to_cpu(rx_info->beacon_silence_rssi_a) &
|
||||
IN_BAND_FILTER;
|
||||
chain_noise_b = le32_to_cpu(rx_info->beacon_silence_rssi_b) &
|
||||
IN_BAND_FILTER;
|
||||
chain_noise_c = le32_to_cpu(rx_info->beacon_silence_rssi_c) &
|
||||
IN_BAND_FILTER;
|
||||
chain_noise_a =
|
||||
le32_to_cpu(rx_info->beacon_silence_rssi_a) & IN_BAND_FILTER;
|
||||
chain_noise_b =
|
||||
le32_to_cpu(rx_info->beacon_silence_rssi_b) & IN_BAND_FILTER;
|
||||
chain_noise_c =
|
||||
le32_to_cpu(rx_info->beacon_silence_rssi_c) & IN_BAND_FILTER;
|
||||
|
||||
chain_sig_a = le32_to_cpu(rx_info->beacon_rssi_a) & IN_BAND_FILTER;
|
||||
chain_sig_b = le32_to_cpu(rx_info->beacon_rssi_b) & IN_BAND_FILTER;
|
||||
|
@ -892,30 +879,29 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
|||
data->chain_signal_b = (chain_sig_b + data->chain_signal_b);
|
||||
data->chain_signal_c = (chain_sig_c + data->chain_signal_c);
|
||||
|
||||
D_CALIB("chan=%d, band24=%d, beacon=%d\n",
|
||||
rxon_chnum, rxon_band24, data->beacon_count);
|
||||
D_CALIB("chain_sig: a %d b %d c %d\n",
|
||||
chain_sig_a, chain_sig_b, chain_sig_c);
|
||||
D_CALIB("chain_noise: a %d b %d c %d\n",
|
||||
chain_noise_a, chain_noise_b, chain_noise_c);
|
||||
D_CALIB("chan=%d, band24=%d, beacon=%d\n", rxon_chnum, rxon_band24,
|
||||
data->beacon_count);
|
||||
D_CALIB("chain_sig: a %d b %d c %d\n", chain_sig_a, chain_sig_b,
|
||||
chain_sig_c);
|
||||
D_CALIB("chain_noise: a %d b %d c %d\n", chain_noise_a, chain_noise_b,
|
||||
chain_noise_c);
|
||||
|
||||
/* If this is the "chain_noise_num_beacons", determine:
|
||||
* 1) Disconnected antennas (using signal strengths)
|
||||
* 2) Differential gain (using silence noise) to balance receivers */
|
||||
if (data->beacon_count !=
|
||||
il->cfg->base_params->chain_noise_num_beacons)
|
||||
if (data->beacon_count != il->cfg->base_params->chain_noise_num_beacons)
|
||||
return;
|
||||
|
||||
/* Analyze signal for disconnected antenna */
|
||||
il4965_find_disconn_antenna(il, average_sig, data);
|
||||
|
||||
/* Analyze noise for rx balance */
|
||||
average_noise[0] = data->chain_noise_a /
|
||||
il->cfg->base_params->chain_noise_num_beacons;
|
||||
average_noise[1] = data->chain_noise_b /
|
||||
il->cfg->base_params->chain_noise_num_beacons;
|
||||
average_noise[2] = data->chain_noise_c /
|
||||
il->cfg->base_params->chain_noise_num_beacons;
|
||||
average_noise[0] =
|
||||
data->chain_noise_a / il->cfg->base_params->chain_noise_num_beacons;
|
||||
average_noise[1] =
|
||||
data->chain_noise_b / il->cfg->base_params->chain_noise_num_beacons;
|
||||
average_noise[2] =
|
||||
data->chain_noise_c / il->cfg->base_params->chain_noise_num_beacons;
|
||||
|
||||
for (i = 0; i < NUM_RX_CHAINS; i++) {
|
||||
if (!data->disconn_array[i] &&
|
||||
|
@ -927,15 +913,14 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
|||
}
|
||||
}
|
||||
|
||||
D_CALIB("average_noise: a %d b %d c %d\n",
|
||||
average_noise[0], average_noise[1],
|
||||
average_noise[2]);
|
||||
D_CALIB("average_noise: a %d b %d c %d\n", average_noise[0],
|
||||
average_noise[1], average_noise[2]);
|
||||
|
||||
D_CALIB("min_average_noise = %d, antenna %d\n",
|
||||
min_average_noise, min_average_noise_antenna_i);
|
||||
D_CALIB("min_average_noise = %d, antenna %d\n", min_average_noise,
|
||||
min_average_noise_antenna_i);
|
||||
|
||||
il4965_gain_computation(il, average_noise,
|
||||
min_average_noise_antenna_i, min_average_noise,
|
||||
il4965_gain_computation(il, average_noise, min_average_noise_antenna_i,
|
||||
min_average_noise,
|
||||
il4965_find_first_chain(il->cfg->valid_rx_ant));
|
||||
|
||||
/* Some power changes may have been made during the calibration.
|
||||
|
@ -948,13 +933,12 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
|
|||
il_power_update_mode(il, false);
|
||||
}
|
||||
|
||||
void il4965_reset_run_time_calib(struct il_priv *il)
|
||||
void
|
||||
il4965_reset_run_time_calib(struct il_priv *il)
|
||||
{
|
||||
int i;
|
||||
memset(&(il->sensitivity_data), 0,
|
||||
sizeof(struct il_sensitivity_data));
|
||||
memset(&(il->chain_noise_data), 0,
|
||||
sizeof(struct il_chain_noise_data));
|
||||
memset(&(il->sensitivity_data), 0, sizeof(struct il_sensitivity_data));
|
||||
memset(&(il->chain_noise_data), 0, sizeof(struct il_chain_noise_data));
|
||||
for (i = 0; i < NUM_RX_CHAINS; i++)
|
||||
il->chain_noise_data.delta_gain_code[i] =
|
||||
CHAIN_NOISE_DELTA_GAIN_INIT_VAL;
|
||||
|
|
|
@ -33,7 +33,8 @@ static const char *fmt_table = " %-30s %10u %10u %10u %10u\n";
|
|||
static const char *fmt_header =
|
||||
"%-32s current cumulative delta max\n";
|
||||
|
||||
static int il4965_stats_flag(struct il_priv *il, char *buf, int bufsz)
|
||||
static int
|
||||
il4965_stats_flag(struct il_priv *il, char *buf, int bufsz)
|
||||
{
|
||||
int p = 0;
|
||||
u32 flag;
|
||||
|
@ -45,22 +46,24 @@ static int il4965_stats_flag(struct il_priv *il, char *buf, int bufsz)
|
|||
p += scnprintf(buf + p, bufsz - p,
|
||||
"\tStatistics have been cleared\n");
|
||||
p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n",
|
||||
(flag & UCODE_STATS_FREQUENCY_MSK)
|
||||
? "2.4 GHz" : "5.2 GHz");
|
||||
(flag & UCODE_STATS_FREQUENCY_MSK) ? "2.4 GHz" :
|
||||
"5.2 GHz");
|
||||
p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n",
|
||||
(flag & UCODE_STATS_NARROW_BAND_MSK)
|
||||
? "enabled" : "disabled");
|
||||
(flag & UCODE_STATS_NARROW_BAND_MSK) ? "enabled" :
|
||||
"disabled");
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
ssize_t
|
||||
il4965_ucode_rx_stats_read(struct file * file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
struct il_priv *il = file->private_data;
|
||||
int pos = 0;
|
||||
char *buf;
|
||||
int bufsz = sizeof(struct stats_rx_phy) * 40 +
|
||||
int bufsz =
|
||||
sizeof(struct stats_rx_phy) * 40 +
|
||||
sizeof(struct stats_rx_non_phy) * 40 +
|
||||
sizeof(struct stats_rx_ht_phy) * 40 + 400;
|
||||
ssize_t ret;
|
||||
|
@ -102,382 +105,361 @@ ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
|||
max_ht = &il->_4965.max_delta.rx.ofdm_ht;
|
||||
|
||||
pos += il4965_stats_flag(il, buf, bufsz);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_header, "Statistics_Rx - OFDM:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "ina_cnt:",
|
||||
le32_to_cpu(ofdm->ina_cnt),
|
||||
accum_ofdm->ina_cnt,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_header,
|
||||
"Statistics_Rx - OFDM:");
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "ina_cnt:",
|
||||
le32_to_cpu(ofdm->ina_cnt), accum_ofdm->ina_cnt,
|
||||
delta_ofdm->ina_cnt, max_ofdm->ina_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "fina_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "fina_cnt:",
|
||||
le32_to_cpu(ofdm->fina_cnt), accum_ofdm->fina_cnt,
|
||||
delta_ofdm->fina_cnt, max_ofdm->fina_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "plcp_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "plcp_err:",
|
||||
le32_to_cpu(ofdm->plcp_err), accum_ofdm->plcp_err,
|
||||
delta_ofdm->plcp_err, max_ofdm->plcp_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "crc32_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "crc32_err:",
|
||||
le32_to_cpu(ofdm->crc32_err), accum_ofdm->crc32_err,
|
||||
delta_ofdm->crc32_err, max_ofdm->crc32_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "overrun_err:",
|
||||
le32_to_cpu(ofdm->overrun_err),
|
||||
accum_ofdm->overrun_err, delta_ofdm->overrun_err,
|
||||
max_ofdm->overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "early_overrun_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "overrun_err:",
|
||||
le32_to_cpu(ofdm->overrun_err), accum_ofdm->overrun_err,
|
||||
delta_ofdm->overrun_err, max_ofdm->overrun_err);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "early_overrun_err:",
|
||||
le32_to_cpu(ofdm->early_overrun_err),
|
||||
accum_ofdm->early_overrun_err,
|
||||
delta_ofdm->early_overrun_err,
|
||||
max_ofdm->early_overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "crc32_good:",
|
||||
le32_to_cpu(ofdm->crc32_good),
|
||||
accum_ofdm->crc32_good, delta_ofdm->crc32_good,
|
||||
max_ofdm->crc32_good);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "false_alarm_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "crc32_good:",
|
||||
le32_to_cpu(ofdm->crc32_good), accum_ofdm->crc32_good,
|
||||
delta_ofdm->crc32_good, max_ofdm->crc32_good);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "false_alarm_cnt:",
|
||||
le32_to_cpu(ofdm->false_alarm_cnt),
|
||||
accum_ofdm->false_alarm_cnt,
|
||||
delta_ofdm->false_alarm_cnt,
|
||||
accum_ofdm->false_alarm_cnt, delta_ofdm->false_alarm_cnt,
|
||||
max_ofdm->false_alarm_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "fina_sync_err_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "fina_sync_err_cnt:",
|
||||
le32_to_cpu(ofdm->fina_sync_err_cnt),
|
||||
accum_ofdm->fina_sync_err_cnt,
|
||||
delta_ofdm->fina_sync_err_cnt,
|
||||
max_ofdm->fina_sync_err_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sfd_timeout:",
|
||||
le32_to_cpu(ofdm->sfd_timeout),
|
||||
accum_ofdm->sfd_timeout, delta_ofdm->sfd_timeout,
|
||||
max_ofdm->sfd_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "fina_timeout:",
|
||||
le32_to_cpu(ofdm->fina_timeout),
|
||||
accum_ofdm->fina_timeout, delta_ofdm->fina_timeout,
|
||||
max_ofdm->fina_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "unresponded_rts:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sfd_timeout:",
|
||||
le32_to_cpu(ofdm->sfd_timeout), accum_ofdm->sfd_timeout,
|
||||
delta_ofdm->sfd_timeout, max_ofdm->sfd_timeout);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "fina_timeout:",
|
||||
le32_to_cpu(ofdm->fina_timeout), accum_ofdm->fina_timeout,
|
||||
delta_ofdm->fina_timeout, max_ofdm->fina_timeout);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "unresponded_rts:",
|
||||
le32_to_cpu(ofdm->unresponded_rts),
|
||||
accum_ofdm->unresponded_rts,
|
||||
delta_ofdm->unresponded_rts,
|
||||
accum_ofdm->unresponded_rts, delta_ofdm->unresponded_rts,
|
||||
max_ofdm->unresponded_rts);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "rxe_frame_lmt_ovrun:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "rxe_frame_lmt_ovrun:",
|
||||
le32_to_cpu(ofdm->rxe_frame_limit_overrun),
|
||||
accum_ofdm->rxe_frame_limit_overrun,
|
||||
delta_ofdm->rxe_frame_limit_overrun,
|
||||
max_ofdm->rxe_frame_limit_overrun);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sent_ack_cnt:",
|
||||
le32_to_cpu(ofdm->sent_ack_cnt),
|
||||
accum_ofdm->sent_ack_cnt, delta_ofdm->sent_ack_cnt,
|
||||
max_ofdm->sent_ack_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sent_cts_cnt:",
|
||||
le32_to_cpu(ofdm->sent_cts_cnt),
|
||||
accum_ofdm->sent_cts_cnt, delta_ofdm->sent_cts_cnt,
|
||||
max_ofdm->sent_cts_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sent_ba_rsp_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sent_ack_cnt:",
|
||||
le32_to_cpu(ofdm->sent_ack_cnt), accum_ofdm->sent_ack_cnt,
|
||||
delta_ofdm->sent_ack_cnt, max_ofdm->sent_ack_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sent_cts_cnt:",
|
||||
le32_to_cpu(ofdm->sent_cts_cnt), accum_ofdm->sent_cts_cnt,
|
||||
delta_ofdm->sent_cts_cnt, max_ofdm->sent_cts_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sent_ba_rsp_cnt:",
|
||||
le32_to_cpu(ofdm->sent_ba_rsp_cnt),
|
||||
accum_ofdm->sent_ba_rsp_cnt,
|
||||
delta_ofdm->sent_ba_rsp_cnt,
|
||||
accum_ofdm->sent_ba_rsp_cnt, delta_ofdm->sent_ba_rsp_cnt,
|
||||
max_ofdm->sent_ba_rsp_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "dsp_self_kill:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "dsp_self_kill:",
|
||||
le32_to_cpu(ofdm->dsp_self_kill),
|
||||
accum_ofdm->dsp_self_kill,
|
||||
delta_ofdm->dsp_self_kill,
|
||||
accum_ofdm->dsp_self_kill, delta_ofdm->dsp_self_kill,
|
||||
max_ofdm->dsp_self_kill);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "mh_format_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "mh_format_err:",
|
||||
le32_to_cpu(ofdm->mh_format_err),
|
||||
accum_ofdm->mh_format_err,
|
||||
delta_ofdm->mh_format_err,
|
||||
accum_ofdm->mh_format_err, delta_ofdm->mh_format_err,
|
||||
max_ofdm->mh_format_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "re_acq_main_rssi_sum:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"re_acq_main_rssi_sum:",
|
||||
le32_to_cpu(ofdm->re_acq_main_rssi_sum),
|
||||
accum_ofdm->re_acq_main_rssi_sum,
|
||||
delta_ofdm->re_acq_main_rssi_sum,
|
||||
max_ofdm->re_acq_main_rssi_sum);
|
||||
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_header, "Statistics_Rx - CCK:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "ina_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_header,
|
||||
"Statistics_Rx - CCK:");
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "ina_cnt:",
|
||||
le32_to_cpu(cck->ina_cnt), accum_cck->ina_cnt,
|
||||
delta_cck->ina_cnt, max_cck->ina_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "fina_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "fina_cnt:",
|
||||
le32_to_cpu(cck->fina_cnt), accum_cck->fina_cnt,
|
||||
delta_cck->fina_cnt, max_cck->fina_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "plcp_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "plcp_err:",
|
||||
le32_to_cpu(cck->plcp_err), accum_cck->plcp_err,
|
||||
delta_cck->plcp_err, max_cck->plcp_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "crc32_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "crc32_err:",
|
||||
le32_to_cpu(cck->crc32_err), accum_cck->crc32_err,
|
||||
delta_cck->crc32_err, max_cck->crc32_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "overrun_err:",
|
||||
le32_to_cpu(cck->overrun_err),
|
||||
accum_cck->overrun_err, delta_cck->overrun_err,
|
||||
max_cck->overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "early_overrun_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "overrun_err:",
|
||||
le32_to_cpu(cck->overrun_err), accum_cck->overrun_err,
|
||||
delta_cck->overrun_err, max_cck->overrun_err);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "early_overrun_err:",
|
||||
le32_to_cpu(cck->early_overrun_err),
|
||||
accum_cck->early_overrun_err,
|
||||
delta_cck->early_overrun_err,
|
||||
max_cck->early_overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "crc32_good:",
|
||||
delta_cck->early_overrun_err, max_cck->early_overrun_err);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "crc32_good:",
|
||||
le32_to_cpu(cck->crc32_good), accum_cck->crc32_good,
|
||||
delta_cck->crc32_good, max_cck->crc32_good);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "false_alarm_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "false_alarm_cnt:",
|
||||
le32_to_cpu(cck->false_alarm_cnt),
|
||||
accum_cck->false_alarm_cnt,
|
||||
delta_cck->false_alarm_cnt, max_cck->false_alarm_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "fina_sync_err_cnt:",
|
||||
accum_cck->false_alarm_cnt, delta_cck->false_alarm_cnt,
|
||||
max_cck->false_alarm_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "fina_sync_err_cnt:",
|
||||
le32_to_cpu(cck->fina_sync_err_cnt),
|
||||
accum_cck->fina_sync_err_cnt,
|
||||
delta_cck->fina_sync_err_cnt,
|
||||
max_cck->fina_sync_err_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sfd_timeout:",
|
||||
le32_to_cpu(cck->sfd_timeout),
|
||||
accum_cck->sfd_timeout, delta_cck->sfd_timeout,
|
||||
max_cck->sfd_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "fina_timeout:",
|
||||
le32_to_cpu(cck->fina_timeout),
|
||||
accum_cck->fina_timeout, delta_cck->fina_timeout,
|
||||
max_cck->fina_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "unresponded_rts:",
|
||||
delta_cck->fina_sync_err_cnt, max_cck->fina_sync_err_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sfd_timeout:",
|
||||
le32_to_cpu(cck->sfd_timeout), accum_cck->sfd_timeout,
|
||||
delta_cck->sfd_timeout, max_cck->sfd_timeout);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "fina_timeout:",
|
||||
le32_to_cpu(cck->fina_timeout), accum_cck->fina_timeout,
|
||||
delta_cck->fina_timeout, max_cck->fina_timeout);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "unresponded_rts:",
|
||||
le32_to_cpu(cck->unresponded_rts),
|
||||
accum_cck->unresponded_rts, delta_cck->unresponded_rts,
|
||||
max_cck->unresponded_rts);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "rxe_frame_lmt_ovrun:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "rxe_frame_lmt_ovrun:",
|
||||
le32_to_cpu(cck->rxe_frame_limit_overrun),
|
||||
accum_cck->rxe_frame_limit_overrun,
|
||||
delta_cck->rxe_frame_limit_overrun,
|
||||
max_cck->rxe_frame_limit_overrun);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sent_ack_cnt:",
|
||||
le32_to_cpu(cck->sent_ack_cnt),
|
||||
accum_cck->sent_ack_cnt, delta_cck->sent_ack_cnt,
|
||||
max_cck->sent_ack_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sent_cts_cnt:",
|
||||
le32_to_cpu(cck->sent_cts_cnt),
|
||||
accum_cck->sent_cts_cnt, delta_cck->sent_cts_cnt,
|
||||
max_cck->sent_cts_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sent_ba_rsp_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sent_ack_cnt:",
|
||||
le32_to_cpu(cck->sent_ack_cnt), accum_cck->sent_ack_cnt,
|
||||
delta_cck->sent_ack_cnt, max_cck->sent_ack_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sent_cts_cnt:",
|
||||
le32_to_cpu(cck->sent_cts_cnt), accum_cck->sent_cts_cnt,
|
||||
delta_cck->sent_cts_cnt, max_cck->sent_cts_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sent_ba_rsp_cnt:",
|
||||
le32_to_cpu(cck->sent_ba_rsp_cnt),
|
||||
accum_cck->sent_ba_rsp_cnt,
|
||||
delta_cck->sent_ba_rsp_cnt,
|
||||
accum_cck->sent_ba_rsp_cnt, delta_cck->sent_ba_rsp_cnt,
|
||||
max_cck->sent_ba_rsp_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "dsp_self_kill:",
|
||||
le32_to_cpu(cck->dsp_self_kill),
|
||||
accum_cck->dsp_self_kill, delta_cck->dsp_self_kill,
|
||||
max_cck->dsp_self_kill);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "mh_format_err:",
|
||||
le32_to_cpu(cck->mh_format_err),
|
||||
accum_cck->mh_format_err, delta_cck->mh_format_err,
|
||||
max_cck->mh_format_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "re_acq_main_rssi_sum:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "dsp_self_kill:",
|
||||
le32_to_cpu(cck->dsp_self_kill), accum_cck->dsp_self_kill,
|
||||
delta_cck->dsp_self_kill, max_cck->dsp_self_kill);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "mh_format_err:",
|
||||
le32_to_cpu(cck->mh_format_err), accum_cck->mh_format_err,
|
||||
delta_cck->mh_format_err, max_cck->mh_format_err);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"re_acq_main_rssi_sum:",
|
||||
le32_to_cpu(cck->re_acq_main_rssi_sum),
|
||||
accum_cck->re_acq_main_rssi_sum,
|
||||
delta_cck->re_acq_main_rssi_sum,
|
||||
max_cck->re_acq_main_rssi_sum);
|
||||
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_header, "Statistics_Rx - GENERAL:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "bogus_cts:",
|
||||
le32_to_cpu(general->bogus_cts),
|
||||
accum_general->bogus_cts, delta_general->bogus_cts,
|
||||
max_general->bogus_cts);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "bogus_ack:",
|
||||
le32_to_cpu(general->bogus_ack),
|
||||
accum_general->bogus_ack, delta_general->bogus_ack,
|
||||
max_general->bogus_ack);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "non_bssid_frames:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_header,
|
||||
"Statistics_Rx - GENERAL:");
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "bogus_cts:",
|
||||
le32_to_cpu(general->bogus_cts), accum_general->bogus_cts,
|
||||
delta_general->bogus_cts, max_general->bogus_cts);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "bogus_ack:",
|
||||
le32_to_cpu(general->bogus_ack), accum_general->bogus_ack,
|
||||
delta_general->bogus_ack, max_general->bogus_ack);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "non_bssid_frames:",
|
||||
le32_to_cpu(general->non_bssid_frames),
|
||||
accum_general->non_bssid_frames,
|
||||
delta_general->non_bssid_frames,
|
||||
max_general->non_bssid_frames);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "filtered_frames:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "filtered_frames:",
|
||||
le32_to_cpu(general->filtered_frames),
|
||||
accum_general->filtered_frames,
|
||||
delta_general->filtered_frames,
|
||||
max_general->filtered_frames);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "non_channel_beacons:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "non_channel_beacons:",
|
||||
le32_to_cpu(general->non_channel_beacons),
|
||||
accum_general->non_channel_beacons,
|
||||
delta_general->non_channel_beacons,
|
||||
max_general->non_channel_beacons);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "channel_beacons:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "channel_beacons:",
|
||||
le32_to_cpu(general->channel_beacons),
|
||||
accum_general->channel_beacons,
|
||||
delta_general->channel_beacons,
|
||||
max_general->channel_beacons);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "num_missed_bcon:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "num_missed_bcon:",
|
||||
le32_to_cpu(general->num_missed_bcon),
|
||||
accum_general->num_missed_bcon,
|
||||
delta_general->num_missed_bcon,
|
||||
max_general->num_missed_bcon);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "adc_rx_saturation_time:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"adc_rx_saturation_time:",
|
||||
le32_to_cpu(general->adc_rx_saturation_time),
|
||||
accum_general->adc_rx_saturation_time,
|
||||
delta_general->adc_rx_saturation_time,
|
||||
max_general->adc_rx_saturation_time);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "ina_detect_search_tm:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"ina_detect_search_tm:",
|
||||
le32_to_cpu(general->ina_detection_search_time),
|
||||
accum_general->ina_detection_search_time,
|
||||
delta_general->ina_detection_search_time,
|
||||
max_general->ina_detection_search_time);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_silence_rssi_a:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"beacon_silence_rssi_a:",
|
||||
le32_to_cpu(general->beacon_silence_rssi_a),
|
||||
accum_general->beacon_silence_rssi_a,
|
||||
delta_general->beacon_silence_rssi_a,
|
||||
max_general->beacon_silence_rssi_a);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_silence_rssi_b:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"beacon_silence_rssi_b:",
|
||||
le32_to_cpu(general->beacon_silence_rssi_b),
|
||||
accum_general->beacon_silence_rssi_b,
|
||||
delta_general->beacon_silence_rssi_b,
|
||||
max_general->beacon_silence_rssi_b);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_silence_rssi_c:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"beacon_silence_rssi_c:",
|
||||
le32_to_cpu(general->beacon_silence_rssi_c),
|
||||
accum_general->beacon_silence_rssi_c,
|
||||
delta_general->beacon_silence_rssi_c,
|
||||
max_general->beacon_silence_rssi_c);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "interference_data_flag:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"interference_data_flag:",
|
||||
le32_to_cpu(general->interference_data_flag),
|
||||
accum_general->interference_data_flag,
|
||||
delta_general->interference_data_flag,
|
||||
max_general->interference_data_flag);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "channel_load:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "channel_load:",
|
||||
le32_to_cpu(general->channel_load),
|
||||
accum_general->channel_load,
|
||||
delta_general->channel_load,
|
||||
accum_general->channel_load, delta_general->channel_load,
|
||||
max_general->channel_load);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "dsp_false_alarms:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "dsp_false_alarms:",
|
||||
le32_to_cpu(general->dsp_false_alarms),
|
||||
accum_general->dsp_false_alarms,
|
||||
delta_general->dsp_false_alarms,
|
||||
max_general->dsp_false_alarms);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_rssi_a:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "beacon_rssi_a:",
|
||||
le32_to_cpu(general->beacon_rssi_a),
|
||||
accum_general->beacon_rssi_a,
|
||||
delta_general->beacon_rssi_a,
|
||||
max_general->beacon_rssi_a);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_rssi_b:",
|
||||
delta_general->beacon_rssi_a, max_general->beacon_rssi_a);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "beacon_rssi_b:",
|
||||
le32_to_cpu(general->beacon_rssi_b),
|
||||
accum_general->beacon_rssi_b,
|
||||
delta_general->beacon_rssi_b,
|
||||
max_general->beacon_rssi_b);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_rssi_c:",
|
||||
delta_general->beacon_rssi_b, max_general->beacon_rssi_b);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "beacon_rssi_c:",
|
||||
le32_to_cpu(general->beacon_rssi_c),
|
||||
accum_general->beacon_rssi_c,
|
||||
delta_general->beacon_rssi_c,
|
||||
max_general->beacon_rssi_c);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_energy_a:",
|
||||
delta_general->beacon_rssi_c, max_general->beacon_rssi_c);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "beacon_energy_a:",
|
||||
le32_to_cpu(general->beacon_energy_a),
|
||||
accum_general->beacon_energy_a,
|
||||
delta_general->beacon_energy_a,
|
||||
max_general->beacon_energy_a);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_energy_b:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "beacon_energy_b:",
|
||||
le32_to_cpu(general->beacon_energy_b),
|
||||
accum_general->beacon_energy_b,
|
||||
delta_general->beacon_energy_b,
|
||||
max_general->beacon_energy_b);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "beacon_energy_c:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "beacon_energy_c:",
|
||||
le32_to_cpu(general->beacon_energy_c),
|
||||
accum_general->beacon_energy_c,
|
||||
delta_general->beacon_energy_c,
|
||||
max_general->beacon_energy_c);
|
||||
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_header, "Statistics_Rx - OFDM_HT:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "plcp_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_header,
|
||||
"Statistics_Rx - OFDM_HT:");
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "plcp_err:",
|
||||
le32_to_cpu(ht->plcp_err), accum_ht->plcp_err,
|
||||
delta_ht->plcp_err, max_ht->plcp_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "overrun_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "overrun_err:",
|
||||
le32_to_cpu(ht->overrun_err), accum_ht->overrun_err,
|
||||
delta_ht->overrun_err, max_ht->overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "early_overrun_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "early_overrun_err:",
|
||||
le32_to_cpu(ht->early_overrun_err),
|
||||
accum_ht->early_overrun_err,
|
||||
delta_ht->early_overrun_err,
|
||||
accum_ht->early_overrun_err, delta_ht->early_overrun_err,
|
||||
max_ht->early_overrun_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "crc32_good:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "crc32_good:",
|
||||
le32_to_cpu(ht->crc32_good), accum_ht->crc32_good,
|
||||
delta_ht->crc32_good, max_ht->crc32_good);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "crc32_err:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "crc32_err:",
|
||||
le32_to_cpu(ht->crc32_err), accum_ht->crc32_err,
|
||||
delta_ht->crc32_err, max_ht->crc32_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "mh_format_err:",
|
||||
le32_to_cpu(ht->mh_format_err),
|
||||
accum_ht->mh_format_err,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "mh_format_err:",
|
||||
le32_to_cpu(ht->mh_format_err), accum_ht->mh_format_err,
|
||||
delta_ht->mh_format_err, max_ht->mh_format_err);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg_crc32_good:",
|
||||
le32_to_cpu(ht->agg_crc32_good),
|
||||
accum_ht->agg_crc32_good,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg_crc32_good:",
|
||||
le32_to_cpu(ht->agg_crc32_good), accum_ht->agg_crc32_good,
|
||||
delta_ht->agg_crc32_good, max_ht->agg_crc32_good);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg_mpdu_cnt:",
|
||||
le32_to_cpu(ht->agg_mpdu_cnt),
|
||||
accum_ht->agg_mpdu_cnt,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg_mpdu_cnt:",
|
||||
le32_to_cpu(ht->agg_mpdu_cnt), accum_ht->agg_mpdu_cnt,
|
||||
delta_ht->agg_mpdu_cnt, max_ht->agg_mpdu_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg_cnt:",
|
||||
le32_to_cpu(ht->agg_cnt), accum_ht->agg_cnt,
|
||||
delta_ht->agg_cnt, max_ht->agg_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "unsupport_mcs:",
|
||||
le32_to_cpu(ht->unsupport_mcs),
|
||||
accum_ht->unsupport_mcs,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "unsupport_mcs:",
|
||||
le32_to_cpu(ht->unsupport_mcs), accum_ht->unsupport_mcs,
|
||||
delta_ht->unsupport_mcs, max_ht->unsupport_mcs);
|
||||
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
|
@ -485,9 +467,9 @@ ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
|||
return ret;
|
||||
}
|
||||
|
||||
ssize_t il4965_ucode_tx_stats_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
ssize_t
|
||||
il4965_ucode_tx_stats_read(struct file * file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
struct il_priv *il = file->private_data;
|
||||
int pos = 0;
|
||||
|
@ -515,144 +497,135 @@ ssize_t il4965_ucode_tx_stats_read(struct file *file,
|
|||
max_tx = &il->_4965.max_delta.tx;
|
||||
|
||||
pos += il4965_stats_flag(il, buf, bufsz);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_header, "Statistics_Tx:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "preamble:",
|
||||
le32_to_cpu(tx->preamble_cnt),
|
||||
accum_tx->preamble_cnt,
|
||||
pos += scnprintf(buf + pos, bufsz - pos, fmt_header, "Statistics_Tx:");
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "preamble:",
|
||||
le32_to_cpu(tx->preamble_cnt), accum_tx->preamble_cnt,
|
||||
delta_tx->preamble_cnt, max_tx->preamble_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "rx_detected_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "rx_detected_cnt:",
|
||||
le32_to_cpu(tx->rx_detected_cnt),
|
||||
accum_tx->rx_detected_cnt,
|
||||
delta_tx->rx_detected_cnt, max_tx->rx_detected_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "bt_prio_defer_cnt:",
|
||||
accum_tx->rx_detected_cnt, delta_tx->rx_detected_cnt,
|
||||
max_tx->rx_detected_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "bt_prio_defer_cnt:",
|
||||
le32_to_cpu(tx->bt_prio_defer_cnt),
|
||||
accum_tx->bt_prio_defer_cnt,
|
||||
delta_tx->bt_prio_defer_cnt,
|
||||
accum_tx->bt_prio_defer_cnt, delta_tx->bt_prio_defer_cnt,
|
||||
max_tx->bt_prio_defer_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "bt_prio_kill_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "bt_prio_kill_cnt:",
|
||||
le32_to_cpu(tx->bt_prio_kill_cnt),
|
||||
accum_tx->bt_prio_kill_cnt,
|
||||
delta_tx->bt_prio_kill_cnt,
|
||||
accum_tx->bt_prio_kill_cnt, delta_tx->bt_prio_kill_cnt,
|
||||
max_tx->bt_prio_kill_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "few_bytes_cnt:",
|
||||
le32_to_cpu(tx->few_bytes_cnt),
|
||||
accum_tx->few_bytes_cnt,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "few_bytes_cnt:",
|
||||
le32_to_cpu(tx->few_bytes_cnt), accum_tx->few_bytes_cnt,
|
||||
delta_tx->few_bytes_cnt, max_tx->few_bytes_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "cts_timeout:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "cts_timeout:",
|
||||
le32_to_cpu(tx->cts_timeout), accum_tx->cts_timeout,
|
||||
delta_tx->cts_timeout, max_tx->cts_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "ack_timeout:",
|
||||
le32_to_cpu(tx->ack_timeout),
|
||||
accum_tx->ack_timeout,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "ack_timeout:",
|
||||
le32_to_cpu(tx->ack_timeout), accum_tx->ack_timeout,
|
||||
delta_tx->ack_timeout, max_tx->ack_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "expected_ack_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "expected_ack_cnt:",
|
||||
le32_to_cpu(tx->expected_ack_cnt),
|
||||
accum_tx->expected_ack_cnt,
|
||||
delta_tx->expected_ack_cnt,
|
||||
accum_tx->expected_ack_cnt, delta_tx->expected_ack_cnt,
|
||||
max_tx->expected_ack_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "actual_ack_cnt:",
|
||||
le32_to_cpu(tx->actual_ack_cnt),
|
||||
accum_tx->actual_ack_cnt,
|
||||
delta_tx->actual_ack_cnt,
|
||||
max_tx->actual_ack_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "dump_msdu_cnt:",
|
||||
le32_to_cpu(tx->dump_msdu_cnt),
|
||||
accum_tx->dump_msdu_cnt,
|
||||
delta_tx->dump_msdu_cnt,
|
||||
max_tx->dump_msdu_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "abort_nxt_frame_mismatch:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "actual_ack_cnt:",
|
||||
le32_to_cpu(tx->actual_ack_cnt), accum_tx->actual_ack_cnt,
|
||||
delta_tx->actual_ack_cnt, max_tx->actual_ack_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "dump_msdu_cnt:",
|
||||
le32_to_cpu(tx->dump_msdu_cnt), accum_tx->dump_msdu_cnt,
|
||||
delta_tx->dump_msdu_cnt, max_tx->dump_msdu_cnt);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"abort_nxt_frame_mismatch:",
|
||||
le32_to_cpu(tx->burst_abort_next_frame_mismatch_cnt),
|
||||
accum_tx->burst_abort_next_frame_mismatch_cnt,
|
||||
delta_tx->burst_abort_next_frame_mismatch_cnt,
|
||||
max_tx->burst_abort_next_frame_mismatch_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "abort_missing_nxt_frame:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"abort_missing_nxt_frame:",
|
||||
le32_to_cpu(tx->burst_abort_missing_next_frame_cnt),
|
||||
accum_tx->burst_abort_missing_next_frame_cnt,
|
||||
delta_tx->burst_abort_missing_next_frame_cnt,
|
||||
max_tx->burst_abort_missing_next_frame_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "cts_timeout_collision:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"cts_timeout_collision:",
|
||||
le32_to_cpu(tx->cts_timeout_collision),
|
||||
accum_tx->cts_timeout_collision,
|
||||
delta_tx->cts_timeout_collision,
|
||||
max_tx->cts_timeout_collision);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "ack_ba_timeout_collision:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"ack_ba_timeout_collision:",
|
||||
le32_to_cpu(tx->ack_or_ba_timeout_collision),
|
||||
accum_tx->ack_or_ba_timeout_collision,
|
||||
delta_tx->ack_or_ba_timeout_collision,
|
||||
max_tx->ack_or_ba_timeout_collision);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg ba_timeout:",
|
||||
le32_to_cpu(tx->agg.ba_timeout),
|
||||
accum_tx->agg.ba_timeout,
|
||||
delta_tx->agg.ba_timeout,
|
||||
max_tx->agg.ba_timeout);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg ba_resched_frames:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg ba_timeout:",
|
||||
le32_to_cpu(tx->agg.ba_timeout), accum_tx->agg.ba_timeout,
|
||||
delta_tx->agg.ba_timeout, max_tx->agg.ba_timeout);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"agg ba_resched_frames:",
|
||||
le32_to_cpu(tx->agg.ba_reschedule_frames),
|
||||
accum_tx->agg.ba_reschedule_frames,
|
||||
delta_tx->agg.ba_reschedule_frames,
|
||||
max_tx->agg.ba_reschedule_frames);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg scd_query_agg_frame:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"agg scd_query_agg_frame:",
|
||||
le32_to_cpu(tx->agg.scd_query_agg_frame_cnt),
|
||||
accum_tx->agg.scd_query_agg_frame_cnt,
|
||||
delta_tx->agg.scd_query_agg_frame_cnt,
|
||||
max_tx->agg.scd_query_agg_frame_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg scd_query_no_agg:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"agg scd_query_no_agg:",
|
||||
le32_to_cpu(tx->agg.scd_query_no_agg),
|
||||
accum_tx->agg.scd_query_no_agg,
|
||||
delta_tx->agg.scd_query_no_agg,
|
||||
max_tx->agg.scd_query_no_agg);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg scd_query_agg:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg scd_query_agg:",
|
||||
le32_to_cpu(tx->agg.scd_query_agg),
|
||||
accum_tx->agg.scd_query_agg,
|
||||
delta_tx->agg.scd_query_agg,
|
||||
accum_tx->agg.scd_query_agg, delta_tx->agg.scd_query_agg,
|
||||
max_tx->agg.scd_query_agg);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg scd_query_mismatch:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"agg scd_query_mismatch:",
|
||||
le32_to_cpu(tx->agg.scd_query_mismatch),
|
||||
accum_tx->agg.scd_query_mismatch,
|
||||
delta_tx->agg.scd_query_mismatch,
|
||||
max_tx->agg.scd_query_mismatch);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg frame_not_ready:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg frame_not_ready:",
|
||||
le32_to_cpu(tx->agg.frame_not_ready),
|
||||
accum_tx->agg.frame_not_ready,
|
||||
delta_tx->agg.frame_not_ready,
|
||||
max_tx->agg.frame_not_ready);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg underrun:",
|
||||
le32_to_cpu(tx->agg.underrun),
|
||||
accum_tx->agg.underrun,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg underrun:",
|
||||
le32_to_cpu(tx->agg.underrun), accum_tx->agg.underrun,
|
||||
delta_tx->agg.underrun, max_tx->agg.underrun);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg bt_prio_kill:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg bt_prio_kill:",
|
||||
le32_to_cpu(tx->agg.bt_prio_kill),
|
||||
accum_tx->agg.bt_prio_kill,
|
||||
delta_tx->agg.bt_prio_kill,
|
||||
accum_tx->agg.bt_prio_kill, delta_tx->agg.bt_prio_kill,
|
||||
max_tx->agg.bt_prio_kill);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "agg rx_ba_rsp_cnt:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "agg rx_ba_rsp_cnt:",
|
||||
le32_to_cpu(tx->agg.rx_ba_rsp_cnt),
|
||||
accum_tx->agg.rx_ba_rsp_cnt,
|
||||
delta_tx->agg.rx_ba_rsp_cnt,
|
||||
accum_tx->agg.rx_ba_rsp_cnt, delta_tx->agg.rx_ba_rsp_cnt,
|
||||
max_tx->agg.rx_ba_rsp_cnt);
|
||||
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
|
@ -661,8 +634,8 @@ ssize_t il4965_ucode_tx_stats_read(struct file *file,
|
|||
}
|
||||
|
||||
ssize_t
|
||||
il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
il4965_ucode_general_stats_read(struct file * file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
struct il_priv *il = file->private_data;
|
||||
int pos = 0;
|
||||
|
@ -701,69 +674,68 @@ il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
|
|||
max_div = &il->_4965.max_delta.general.common.div;
|
||||
|
||||
pos += il4965_stats_flag(il, buf, bufsz);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_header, "Statistics_General:");
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_value, "temperature:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_header,
|
||||
"Statistics_General:");
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_value, "temperature:",
|
||||
le32_to_cpu(general->temperature));
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_value, "ttl_timestamp:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_value, "ttl_timestamp:",
|
||||
le32_to_cpu(general->ttl_timestamp));
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "burst_check:",
|
||||
le32_to_cpu(dbg->burst_check),
|
||||
accum_dbg->burst_check,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "burst_check:",
|
||||
le32_to_cpu(dbg->burst_check), accum_dbg->burst_check,
|
||||
delta_dbg->burst_check, max_dbg->burst_check);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "burst_count:",
|
||||
le32_to_cpu(dbg->burst_count),
|
||||
accum_dbg->burst_count,
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "burst_count:",
|
||||
le32_to_cpu(dbg->burst_count), accum_dbg->burst_count,
|
||||
delta_dbg->burst_count, max_dbg->burst_count);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "wait_for_silence_timeout_count:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table,
|
||||
"wait_for_silence_timeout_count:",
|
||||
le32_to_cpu(dbg->wait_for_silence_timeout_cnt),
|
||||
accum_dbg->wait_for_silence_timeout_cnt,
|
||||
delta_dbg->wait_for_silence_timeout_cnt,
|
||||
max_dbg->wait_for_silence_timeout_cnt);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "sleep_time:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "sleep_time:",
|
||||
le32_to_cpu(general->sleep_time),
|
||||
accum_general->sleep_time,
|
||||
delta_general->sleep_time, max_general->sleep_time);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "slots_out:",
|
||||
le32_to_cpu(general->slots_out),
|
||||
accum_general->slots_out,
|
||||
accum_general->sleep_time, delta_general->sleep_time,
|
||||
max_general->sleep_time);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "slots_out:",
|
||||
le32_to_cpu(general->slots_out), accum_general->slots_out,
|
||||
delta_general->slots_out, max_general->slots_out);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "slots_idle:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "slots_idle:",
|
||||
le32_to_cpu(general->slots_idle),
|
||||
accum_general->slots_idle,
|
||||
delta_general->slots_idle, max_general->slots_idle);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "tx_on_a:",
|
||||
accum_general->slots_idle, delta_general->slots_idle,
|
||||
max_general->slots_idle);
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "tx_on_a:",
|
||||
le32_to_cpu(div->tx_on_a), accum_div->tx_on_a,
|
||||
delta_div->tx_on_a, max_div->tx_on_a);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "tx_on_b:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "tx_on_b:",
|
||||
le32_to_cpu(div->tx_on_b), accum_div->tx_on_b,
|
||||
delta_div->tx_on_b, max_div->tx_on_b);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "exec_time:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "exec_time:",
|
||||
le32_to_cpu(div->exec_time), accum_div->exec_time,
|
||||
delta_div->exec_time, max_div->exec_time);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "probe_time:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "probe_time:",
|
||||
le32_to_cpu(div->probe_time), accum_div->probe_time,
|
||||
delta_div->probe_time, max_div->probe_time);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "rx_enable_counter:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "rx_enable_counter:",
|
||||
le32_to_cpu(general->rx_enable_counter),
|
||||
accum_general->rx_enable_counter,
|
||||
delta_general->rx_enable_counter,
|
||||
max_general->rx_enable_counter);
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
fmt_table, "num_of_sos_states:",
|
||||
pos +=
|
||||
scnprintf(buf + pos, bufsz - pos, fmt_table, "num_of_sos_states:",
|
||||
le32_to_cpu(general->num_of_sos_states),
|
||||
accum_general->num_of_sos_states,
|
||||
delta_general->num_of_sos_states,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -44,19 +44,17 @@ extern struct il_mod_params il4965_mod_params;
|
|||
extern struct ieee80211_ops il4965_hw_ops;
|
||||
|
||||
/* tx queue */
|
||||
void il4965_free_tfds_in_queue(struct il_priv *il,
|
||||
int sta_id, int tid, int freed);
|
||||
void il4965_free_tfds_in_queue(struct il_priv *il, int sta_id, int tid,
|
||||
int freed);
|
||||
|
||||
/* RXON */
|
||||
void il4965_set_rxon_chain(struct il_priv *il,
|
||||
struct il_rxon_context *ctx);
|
||||
void il4965_set_rxon_chain(struct il_priv *il, struct il_rxon_context *ctx);
|
||||
|
||||
/* uCode */
|
||||
int il4965_verify_ucode(struct il_priv *il);
|
||||
|
||||
/* lib */
|
||||
void il4965_check_abort_status(struct il_priv *il,
|
||||
u8 frame_count, u32 status);
|
||||
void il4965_check_abort_status(struct il_priv *il, u8 frame_count, u32 status);
|
||||
|
||||
void il4965_rx_queue_reset(struct il_priv *il, struct il_rx_queue *rxq);
|
||||
int il4965_rx_init(struct il_priv *il, struct il_rx_queue *rxq);
|
||||
|
@ -70,30 +68,24 @@ void il4965_rx_replenish_now(struct il_priv *il);
|
|||
void il4965_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq);
|
||||
int il4965_rxq_stop(struct il_priv *il);
|
||||
int il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band);
|
||||
void il4965_hdl_rx(struct il_priv *il,
|
||||
struct il_rx_buf *rxb);
|
||||
void il4965_hdl_rx_phy(struct il_priv *il,
|
||||
struct il_rx_buf *rxb);
|
||||
void il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb);
|
||||
void il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb);
|
||||
void il4965_rx_handle(struct il_priv *il);
|
||||
|
||||
/* tx */
|
||||
void il4965_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq);
|
||||
int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il,
|
||||
struct il_tx_queue *txq,
|
||||
int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq,
|
||||
dma_addr_t addr, u16 len, u8 reset, u8 pad);
|
||||
int il4965_hw_tx_queue_init(struct il_priv *il,
|
||||
struct il_tx_queue *txq);
|
||||
int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
|
||||
void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
|
||||
struct ieee80211_tx_info *info);
|
||||
int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb);
|
||||
int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta, u16 tid, u16 *ssn);
|
||||
struct ieee80211_sta *sta, u16 tid, u16 * ssn);
|
||||
int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta, u16 tid);
|
||||
int il4965_txq_check_empty(struct il_priv *il,
|
||||
int sta_id, u8 tid, int txq_id);
|
||||
void il4965_hdl_compressed_ba(struct il_priv *il,
|
||||
struct il_rx_buf *rxb);
|
||||
int il4965_txq_check_empty(struct il_priv *il, int sta_id, u8 tid, int txq_id);
|
||||
void il4965_hdl_compressed_ba(struct il_priv *il, struct il_rx_buf *rxb);
|
||||
int il4965_tx_queue_reclaim(struct il_priv *il, int txq_id, int idx);
|
||||
void il4965_hw_txq_ctx_free(struct il_priv *il);
|
||||
int il4965_txq_ctx_alloc(struct il_priv *il);
|
||||
|
@ -112,28 +104,23 @@ void il4965_set_wr_ptrs(struct il_priv *il, int txq_id, u32 idx);
|
|||
*
|
||||
* NOTE: Acquire il->lock before calling this function !
|
||||
*/
|
||||
void il4965_tx_queue_set_status(struct il_priv *il,
|
||||
struct il_tx_queue *txq,
|
||||
void il4965_tx_queue_set_status(struct il_priv *il, struct il_tx_queue *txq,
|
||||
int tx_fifo_id, int scd_retry);
|
||||
|
||||
u8 il4965_toggle_tx_ant(struct il_priv *il, u8 ant_idx, u8 valid);
|
||||
|
||||
/* rx */
|
||||
void il4965_hdl_missed_beacon(struct il_priv *il,
|
||||
struct il_rx_buf *rxb);
|
||||
bool il4965_good_plcp_health(struct il_priv *il,
|
||||
struct il_rx_pkt *pkt);
|
||||
void il4965_hdl_stats(struct il_priv *il,
|
||||
struct il_rx_buf *rxb);
|
||||
void il4965_hdl_c_stats(struct il_priv *il,
|
||||
struct il_rx_buf *rxb);
|
||||
void il4965_hdl_missed_beacon(struct il_priv *il, struct il_rx_buf *rxb);
|
||||
bool il4965_good_plcp_health(struct il_priv *il, struct il_rx_pkt *pkt);
|
||||
void il4965_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb);
|
||||
void il4965_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb);
|
||||
|
||||
/* scan */
|
||||
int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif);
|
||||
|
||||
/* station mgmt */
|
||||
int il4965_manage_ibss_station(struct il_priv *il,
|
||||
struct ieee80211_vif *vif, bool add);
|
||||
int il4965_manage_ibss_station(struct il_priv *il, struct ieee80211_vif *vif,
|
||||
bool add);
|
||||
|
||||
/* hcmd */
|
||||
int il4965_send_beacon_cmd(struct il_priv *il);
|
||||
|
@ -142,56 +129,54 @@ int il4965_send_beacon_cmd(struct il_priv *il);
|
|||
const char *il4965_get_tx_fail_reason(u32 status);
|
||||
#else
|
||||
static inline const char *
|
||||
il4965_get_tx_fail_reason(u32 status) { return ""; }
|
||||
il4965_get_tx_fail_reason(u32 status)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
#endif
|
||||
|
||||
/* station management */
|
||||
int il4965_alloc_bcast_station(struct il_priv *il,
|
||||
struct il_rxon_context *ctx);
|
||||
int il4965_add_bssid_station(struct il_priv *il,
|
||||
struct il_rxon_context *ctx,
|
||||
const u8 *addr, u8 *sta_id_r);
|
||||
int il4965_alloc_bcast_station(struct il_priv *il, struct il_rxon_context *ctx);
|
||||
int il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx,
|
||||
const u8 * addr, u8 * sta_id_r);
|
||||
int il4965_remove_default_wep_key(struct il_priv *il,
|
||||
struct il_rxon_context *ctx,
|
||||
struct ieee80211_key_conf *key);
|
||||
int il4965_set_default_wep_key(struct il_priv *il,
|
||||
struct il_rxon_context *ctx,
|
||||
int il4965_set_default_wep_key(struct il_priv *il, struct il_rxon_context *ctx,
|
||||
struct ieee80211_key_conf *key);
|
||||
int il4965_restore_default_wep_keys(struct il_priv *il,
|
||||
struct il_rxon_context *ctx);
|
||||
int il4965_set_dynamic_key(struct il_priv *il,
|
||||
struct il_rxon_context *ctx,
|
||||
int il4965_set_dynamic_key(struct il_priv *il, struct il_rxon_context *ctx,
|
||||
struct ieee80211_key_conf *key, u8 sta_id);
|
||||
int il4965_remove_dynamic_key(struct il_priv *il,
|
||||
struct il_rxon_context *ctx,
|
||||
int il4965_remove_dynamic_key(struct il_priv *il, struct il_rxon_context *ctx,
|
||||
struct ieee80211_key_conf *key, u8 sta_id);
|
||||
void il4965_update_tkip_key(struct il_priv *il,
|
||||
struct il_rxon_context *ctx,
|
||||
void il4965_update_tkip_key(struct il_priv *il, struct il_rxon_context *ctx,
|
||||
struct ieee80211_key_conf *keyconf,
|
||||
struct ieee80211_sta *sta, u32 iv32, u16 *phase1key);
|
||||
int il4965_sta_tx_modify_enable_tid(struct il_priv *il,
|
||||
int sta_id, int tid);
|
||||
struct ieee80211_sta *sta, u32 iv32,
|
||||
u16 * phase1key);
|
||||
int il4965_sta_tx_modify_enable_tid(struct il_priv *il, int sta_id, int tid);
|
||||
int il4965_sta_rx_agg_start(struct il_priv *il, struct ieee80211_sta *sta,
|
||||
int tid, u16 ssn);
|
||||
int il4965_sta_rx_agg_stop(struct il_priv *il, struct ieee80211_sta *sta,
|
||||
int tid);
|
||||
void il4965_sta_modify_sleep_tx_count(struct il_priv *il,
|
||||
int sta_id, int cnt);
|
||||
void il4965_sta_modify_sleep_tx_count(struct il_priv *il, int sta_id, int cnt);
|
||||
int il4965_update_bcast_stations(struct il_priv *il);
|
||||
|
||||
/* rate */
|
||||
static inline u8 il4965_hw_get_rate(__le32 rate_n_flags)
|
||||
static inline u8
|
||||
il4965_hw_get_rate(__le32 rate_n_flags)
|
||||
{
|
||||
return le32_to_cpu(rate_n_flags) & 0xFF;
|
||||
}
|
||||
|
||||
static inline __le32 il4965_hw_set_rate_n_flags(u8 rate, u32 flags)
|
||||
static inline __le32
|
||||
il4965_hw_set_rate_n_flags(u8 rate, u32 flags)
|
||||
{
|
||||
return cpu_to_le32(flags|(u32)rate);
|
||||
return cpu_to_le32(flags | (u32) rate);
|
||||
}
|
||||
|
||||
/* eeprom */
|
||||
void il4965_eeprom_get_mac(const struct il_priv *il, u8 *mac);
|
||||
void il4965_eeprom_get_mac(const struct il_priv *il, u8 * mac);
|
||||
int il4965_eeprom_acquire_semaphore(struct il_priv *il);
|
||||
void il4965_eeprom_release_semaphore(struct il_priv *il);
|
||||
int il4965_eeprom_check_version(struct il_priv *il);
|
||||
|
@ -202,30 +187,26 @@ int il4965_mac_start(struct ieee80211_hw *hw);
|
|||
void il4965_mac_stop(struct ieee80211_hw *hw);
|
||||
void il4965_configure_filter(struct ieee80211_hw *hw,
|
||||
unsigned int changed_flags,
|
||||
unsigned int *total_flags,
|
||||
u64 multicast);
|
||||
unsigned int *total_flags, u64 multicast);
|
||||
int il4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
||||
struct ieee80211_vif *vif, struct ieee80211_sta *sta,
|
||||
struct ieee80211_key_conf *key);
|
||||
void il4965_mac_update_tkip_key(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_key_conf *keyconf,
|
||||
struct ieee80211_sta *sta,
|
||||
u32 iv32, u16 *phase1key);
|
||||
int il4965_mac_ampdu_action(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta, u32 iv32,
|
||||
u16 * phase1key);
|
||||
int il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
enum ieee80211_ampdu_mlme_action action,
|
||||
struct ieee80211_sta *sta, u16 tid, u16 *ssn,
|
||||
struct ieee80211_sta *sta, u16 tid, u16 * ssn,
|
||||
u8 buf_size);
|
||||
int il4965_mac_sta_add(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
int il4965_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta);
|
||||
void il4965_mac_channel_switch(struct ieee80211_hw *hw,
|
||||
struct ieee80211_channel_switch *ch_switch);
|
||||
|
||||
void il4965_led_enable(struct il_priv *il);
|
||||
|
||||
|
||||
/* EEPROM */
|
||||
#define IL4965_EEPROM_IMG_SIZE 1024
|
||||
|
||||
|
@ -255,7 +236,8 @@ void il4965_led_enable(struct il_priv *il);
|
|||
/* Size of uCode instruction memory in bootstrap state machine */
|
||||
#define IL49_MAX_BSM_SIZE BSM_SRAM_SIZE
|
||||
|
||||
static inline int il4965_hw_valid_rtc_data_addr(u32 addr)
|
||||
static inline int
|
||||
il4965_hw_valid_rtc_data_addr(u32 addr)
|
||||
{
|
||||
return (addr >= IL49_RTC_DATA_LOWER_BOUND &&
|
||||
addr < IL49_RTC_DATA_UPPER_BOUND);
|
||||
|
@ -810,7 +792,6 @@ static inline int il4965_hw_valid_rtc_data_addr(u32 addr)
|
|||
* 98 78 0x00
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Sanity checks and default values for EEPROM regulatory levels.
|
||||
* If EEPROM values fall outside MIN/MAX range, use default values.
|
||||
|
@ -894,7 +875,6 @@ enum {
|
|||
|
||||
/********************* END TXPOWER *****************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Tx/Rx Queues
|
||||
*
|
||||
|
@ -920,7 +900,6 @@ enum {
|
|||
#define IL49_NUM_QUEUES 16
|
||||
#define IL49_NUM_AMPDU_QUEUES 8
|
||||
|
||||
|
||||
/**
|
||||
* struct il4965_schedq_bc_tbl
|
||||
*
|
||||
|
@ -944,7 +923,6 @@ struct il4965_scd_bc_tbl {
|
|||
u8 pad[1024 - (TFD_QUEUE_BC_SIZE) * sizeof(__le16)];
|
||||
} __packed;
|
||||
|
||||
|
||||
#define IL4965_RTC_INST_LOWER_BOUND (0x000000)
|
||||
|
||||
/* RSSI to dBm */
|
||||
|
@ -971,28 +949,31 @@ void il4965_calib_free_results(struct il_priv *il);
|
|||
|
||||
/* Debug */
|
||||
#ifdef CONFIG_IWLEGACY_DEBUGFS
|
||||
ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos);
|
||||
ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos);
|
||||
ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos);
|
||||
ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos);
|
||||
ssize_t il4965_ucode_general_stats_read(struct file *file,
|
||||
char __user *user_buf, size_t count, loff_t *ppos);
|
||||
char __user * user_buf, size_t count,
|
||||
loff_t * ppos);
|
||||
#else
|
||||
static ssize_t
|
||||
il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
il4965_ucode_rx_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
il4965_ucode_tx_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
il4965_ucode_general_stats_read(struct file *file, char __user * user_buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1028,7 +1009,6 @@ il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
|
|||
*/
|
||||
#define FH49_KW_MEM_ADDR_REG (FH49_MEM_LOWER_BOUND + 0x97C)
|
||||
|
||||
|
||||
/**
|
||||
* TFD Circular Buffers Base (CBBC) addresses
|
||||
*
|
||||
|
@ -1047,7 +1027,6 @@ il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
|
|||
/* Find TFD CB base pointer for given queue (range 0-15). */
|
||||
#define FH49_MEM_CBBC_QUEUE(x) (FH49_MEM_CBBC_LOWER_BOUND + (x) * 0x4)
|
||||
|
||||
|
||||
/**
|
||||
* Rx SRAM Control and Status Registers (RSCSR)
|
||||
*
|
||||
|
@ -1144,7 +1123,6 @@ il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
|
|||
#define FH49_RSCSR_CHNL0_RBDCB_WPTR_REG (FH49_MEM_RSCSR_CHNL0 + 0x008)
|
||||
#define FH49_RSCSR_CHNL0_WPTR (FH49_RSCSR_CHNL0_RBDCB_WPTR_REG)
|
||||
|
||||
|
||||
/**
|
||||
* Rx Config/Status Registers (RCSR)
|
||||
* Rx Config Reg for channel 0 (only channel used)
|
||||
|
@ -1182,7 +1160,7 @@ il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
|
|||
#define FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK (0x00008000) /* bit 15 */
|
||||
#define FH49_RCSR_CHNL0_RX_CONFIG_RB_SIZE_MSK (0x00030000) /* bits 16-17 */
|
||||
#define FH49_RCSR_CHNL0_RX_CONFIG_RBDBC_SIZE_MSK (0x00F00000) /* bits 20-23 */
|
||||
#define FH49_RCSR_CHNL0_RX_CONFIG_DMA_CHNL_EN_MSK (0xC0000000) /* bits 30-31*/
|
||||
#define FH49_RCSR_CHNL0_RX_CONFIG_DMA_CHNL_EN_MSK (0xC0000000) /* bits 30-31 */
|
||||
|
||||
#define FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS (20)
|
||||
#define FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS (4)
|
||||
|
|
|
@ -74,7 +74,6 @@ struct il_priv;
|
|||
#define IL_UCODE_API(ver) (((ver) & 0x0000FF00) >> 8)
|
||||
#define IL_UCODE_SERIAL(ver) ((ver) & 0x000000FF)
|
||||
|
||||
|
||||
/* Tx rates */
|
||||
#define IL_CCK_RATES 4
|
||||
#define IL_OFDM_RATES 8
|
||||
|
@ -124,7 +123,7 @@ enum {
|
|||
|
||||
/* IBSS/AP commands */
|
||||
N_BEACON = 0x90,
|
||||
C_TX_BEACON= 0x91,
|
||||
C_TX_BEACON = 0x91,
|
||||
|
||||
/* Miscellaneous commands */
|
||||
C_TX_PWR_TBL = 0x97,
|
||||
|
@ -207,7 +206,6 @@ struct il_cmd_header {
|
|||
u8 data[0];
|
||||
} __packed;
|
||||
|
||||
|
||||
/**
|
||||
* struct il3945_tx_power
|
||||
*
|
||||
|
@ -430,7 +428,6 @@ struct il_init_alive_resp {
|
|||
* 2 Tx chains */
|
||||
} __packed;
|
||||
|
||||
|
||||
/**
|
||||
* N_ALIVE = 0x1 (response only, not a command)
|
||||
*
|
||||
|
@ -551,7 +548,6 @@ enum {
|
|||
RXON_DEV_TYPE_SNIFFER = 6,
|
||||
};
|
||||
|
||||
|
||||
#define RXON_RX_CHAIN_DRIVER_FORCE_MSK cpu_to_le16(0x1 << 0)
|
||||
#define RXON_RX_CHAIN_DRIVER_FORCE_POS (0)
|
||||
#define RXON_RX_CHAIN_VALID_MSK cpu_to_le16(0x7 << 1)
|
||||
|
@ -590,7 +586,6 @@ enum {
|
|||
* (according to ON_AIR deassertion) */
|
||||
#define RXON_FLG_TSF2HOST_MSK cpu_to_le32(1 << 15)
|
||||
|
||||
|
||||
/* HT flags */
|
||||
#define RXON_FLG_CTRL_CHANNEL_LOC_POS (22)
|
||||
#define RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK cpu_to_le32(0x1 << 22)
|
||||
|
@ -718,7 +713,6 @@ struct il_rxon_cmd {
|
|||
u8 reserved5;
|
||||
} __packed;
|
||||
|
||||
|
||||
/*
|
||||
* C_RXON_ASSOC = 0x11 (command, has simple generic response)
|
||||
*/
|
||||
|
@ -856,7 +850,7 @@ struct il_qosparam_cmd {
|
|||
#define IL4965_BROADCAST_ID 31
|
||||
#define IL4965_STATION_COUNT 32
|
||||
|
||||
#define IL_STATION_COUNT 32 /* MAX(3945,4965)*/
|
||||
#define IL_STATION_COUNT 32 /* MAX(3945,4965) */
|
||||
#define IL_INVALID_STATION 255
|
||||
|
||||
#define STA_FLG_TX_RATE_MSK cpu_to_le32(1 << 2)
|
||||
|
@ -1062,7 +1056,6 @@ struct il_addsta_cmd {
|
|||
__le16 reserved2;
|
||||
} __packed;
|
||||
|
||||
|
||||
#define ADD_STA_SUCCESS_MSK 0x1
|
||||
#define ADD_STA_NO_ROOM_IN_TBL 0x2
|
||||
#define ADD_STA_NO_BLOCK_ACK_RESOURCE 0x4
|
||||
|
@ -1165,7 +1158,6 @@ struct il_wep_cmd {
|
|||
#define RX_MPDU_RES_STATUS_TTAK_OK (1 << 7)
|
||||
#define RX_MPDU_RES_STATUS_DEC_DONE_MSK (0x800)
|
||||
|
||||
|
||||
struct il3945_rx_frame_stats {
|
||||
u8 phy_count;
|
||||
u8 id;
|
||||
|
@ -1221,7 +1213,6 @@ struct il4965_rx_non_cfg_phy {
|
|||
u8 pad[0];
|
||||
} __packed;
|
||||
|
||||
|
||||
/*
|
||||
* N_RX = 0xc3 (response only, not a command)
|
||||
* Used only for legacy (non 11n) frames.
|
||||
|
@ -1246,7 +1237,6 @@ struct il_rx_mpdu_res_start {
|
|||
__le16 reserved;
|
||||
} __packed;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* (5)
|
||||
* Tx Commands & Responses:
|
||||
|
@ -1346,7 +1336,6 @@ struct il_rx_mpdu_res_start {
|
|||
/* HCCA-AP - disable duration overwriting. */
|
||||
#define TX_CMD_FLG_DUR_MSK cpu_to_le32(1 << 25)
|
||||
|
||||
|
||||
/*
|
||||
* TX command security control
|
||||
*/
|
||||
|
@ -1442,7 +1431,6 @@ struct il3945_tx_resp {
|
|||
__le32 status; /* TX status */
|
||||
} __packed;
|
||||
|
||||
|
||||
/*
|
||||
* 4965 uCode updates these Tx attempt count values in host DRAM.
|
||||
* Used for managing Tx retries when expecting block-acks.
|
||||
|
@ -1770,7 +1758,6 @@ struct il4965_txpowertable_cmd {
|
|||
struct il4965_tx_power_db tx_power;
|
||||
} __packed;
|
||||
|
||||
|
||||
/**
|
||||
* struct il3945_rate_scaling_cmd - Rate Scaling Command & Response
|
||||
*
|
||||
|
@ -1798,7 +1785,6 @@ struct il3945_rate_scaling_cmd {
|
|||
struct il3945_rate_scaling_info table[IL_MAX_RATES];
|
||||
} __packed;
|
||||
|
||||
|
||||
/*RS_NEW_API: only TLC_RTS remains and moved to bit 0 */
|
||||
#define LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK (1 << 0)
|
||||
|
||||
|
@ -1813,7 +1799,6 @@ struct il3945_rate_scaling_cmd {
|
|||
#define LINK_QUAL_ANT_B_MSK (1 << 1)
|
||||
#define LINK_QUAL_ANT_MSK (LINK_QUAL_ANT_A_MSK|LINK_QUAL_ANT_B_MSK)
|
||||
|
||||
|
||||
/**
|
||||
* struct il_link_qual_general_params
|
||||
*
|
||||
|
@ -2129,7 +2114,6 @@ struct il_bt_cmd {
|
|||
__le32 kill_cts_mask;
|
||||
} __packed;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* (6)
|
||||
* Spectrum Management (802.11h) Commands, Responses, Notifications:
|
||||
|
@ -2648,7 +2632,6 @@ struct il_scancomplete_notification {
|
|||
__le32 tsf_high;
|
||||
} __packed;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* (9)
|
||||
* IBSS/AP Commands and Notifications:
|
||||
|
@ -2849,7 +2832,7 @@ struct stats_rx_non_phy {
|
|||
__le32 num_missed_bcon; /* number of missed beacons */
|
||||
__le32 adc_rx_saturation_time; /* count in 0.8us units the time the
|
||||
* ADC was in saturation */
|
||||
__le32 ina_detection_search_time;/* total time (in 0.8us) searched
|
||||
__le32 ina_detection_search_time; /* total time (in 0.8us) searched
|
||||
* for INA */
|
||||
__le32 beacon_silence_rssi_a; /* RSSI silence after beacon frame */
|
||||
__le32 beacon_silence_rssi_b; /* RSSI silence after beacon frame */
|
||||
|
@ -2922,7 +2905,6 @@ struct stats_tx {
|
|||
__le32 reserved1;
|
||||
} __packed;
|
||||
|
||||
|
||||
struct stats_div {
|
||||
__le32 tx_on_a;
|
||||
__le32 tx_on_b;
|
||||
|
@ -2975,7 +2957,7 @@ struct stats_general {
|
|||
* does not affect the response to the C_STATS 0x9c itself.
|
||||
*/
|
||||
#define IL_STATS_CONF_CLEAR_STATS cpu_to_le32(0x1) /* see above */
|
||||
#define IL_STATS_CONF_DISABLE_NOTIF cpu_to_le32(0x2)/* see above */
|
||||
#define IL_STATS_CONF_DISABLE_NOTIF cpu_to_le32(0x2) /* see above */
|
||||
struct il_stats_cmd {
|
||||
__le32 configuration_flags; /* IL_STATS_CONF_* */
|
||||
} __packed;
|
||||
|
@ -3043,7 +3025,6 @@ struct il_missed_beacon_notif {
|
|||
__le32 num_recvd_beacons;
|
||||
} __packed;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* (11)
|
||||
* Rx Calibration Commands:
|
||||
|
@ -3245,7 +3226,6 @@ struct il_sensitivity_cmd {
|
|||
__le16 table[HD_TBL_SIZE]; /* use HD_* as idx */
|
||||
} __packed;
|
||||
|
||||
|
||||
/**
|
||||
* C_PHY_CALIBRATION = 0xb0 (command, has simple generic response)
|
||||
*
|
||||
|
@ -3350,7 +3330,6 @@ struct il_led_cmd {
|
|||
u8 reserved;
|
||||
} __packed;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* (13)
|
||||
* Union of all expected notifications/responses:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -86,9 +86,9 @@
|
|||
#define CSR_INT_COALESCING (CSR_BASE+0x004) /* accum ints, 32-usec units */
|
||||
#define CSR_INT (CSR_BASE+0x008) /* host interrupt status/ack */
|
||||
#define CSR_INT_MASK (CSR_BASE+0x00c) /* host interrupt enable */
|
||||
#define CSR_FH_INT_STATUS (CSR_BASE+0x010) /* busmaster int status/ack*/
|
||||
#define CSR_FH_INT_STATUS (CSR_BASE+0x010) /* busmaster int status/ack */
|
||||
#define CSR_GPIO_IN (CSR_BASE+0x018) /* read external chip pins */
|
||||
#define CSR_RESET (CSR_BASE+0x020) /* busmaster enable, NMI, etc*/
|
||||
#define CSR_RESET (CSR_BASE+0x020) /* busmaster enable, NMI, etc */
|
||||
#define CSR_GP_CNTRL (CSR_BASE+0x024)
|
||||
|
||||
/* 2nd byte of CSR_INT_COALESCING, not accessible via _il_wr()! */
|
||||
|
@ -170,8 +170,8 @@
|
|||
#define CSR_HW_IF_CONFIG_REG_BIT_NIC_PREPARE_DONE (0x02000000) /* ME_OWN */
|
||||
#define CSR_HW_IF_CONFIG_REG_PREPARE (0x08000000) /* WAKE_ME */
|
||||
|
||||
#define CSR_INT_PERIODIC_DIS (0x00) /* disable periodic int*/
|
||||
#define CSR_INT_PERIODIC_ENA (0xFF) /* 255*32 usec ~ 8 msec*/
|
||||
#define CSR_INT_PERIODIC_DIS (0x00) /* disable periodic int */
|
||||
#define CSR_INT_PERIODIC_ENA (0xFF) /* 255*32 usec ~ 8 msec */
|
||||
|
||||
/* interrupt flags in INTA, set by uCode or hardware (e.g. dma),
|
||||
* acknowledged (reset) by host writing "1" to flagged bits. */
|
||||
|
@ -211,7 +211,6 @@
|
|||
CSR_FH_INT_BIT_RX_CHNL1 | \
|
||||
CSR_FH_INT_BIT_RX_CHNL0)
|
||||
|
||||
|
||||
#define CSR39_FH_INT_TX_MASK (CSR39_FH_INT_BIT_TX_CHNL6 | \
|
||||
CSR_FH_INT_BIT_TX_CHNL1 | \
|
||||
CSR_FH_INT_BIT_TX_CHNL0)
|
||||
|
@ -285,7 +284,6 @@
|
|||
#define CSR_GP_CNTRL_REG_FLAG_MAC_POWER_SAVE (0x04000000)
|
||||
#define CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW (0x08000000)
|
||||
|
||||
|
||||
/* EEPROM REG */
|
||||
#define CSR_EEPROM_REG_READ_VALID_MSK (0x00000001)
|
||||
#define CSR_EEPROM_REG_BIT_CMD (0x00000002)
|
||||
|
@ -305,7 +303,6 @@
|
|||
#define CSR_GP_REG_PHY_POWER_SAVE (0x02000000)
|
||||
#define CSR_GP_REG_POWER_SAVE_ERROR (0x03000000)
|
||||
|
||||
|
||||
/* CSR GIO */
|
||||
#define CSR_GIO_REG_VAL_L0S_ENABLED (0x00000002)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -203,7 +203,7 @@
|
|||
|
||||
/* BSM bit fields */
|
||||
#define BSM_WR_CTRL_REG_BIT_START (0x80000000) /* start boot load now */
|
||||
#define BSM_WR_CTRL_REG_BIT_START_EN (0x40000000) /* enable boot after pwrup*/
|
||||
#define BSM_WR_CTRL_REG_BIT_START_EN (0x40000000) /* enable boot after pwrup */
|
||||
#define BSM_DRAM_INST_LOAD (0x80000000) /* start program load now */
|
||||
|
||||
/* BSM addresses */
|
||||
|
@ -233,7 +233,6 @@
|
|||
#define BSM_SRAM_LOWER_BOUND (PRPH_BASE + 0x3800)
|
||||
#define BSM_SRAM_SIZE (1024) /* bytes */
|
||||
|
||||
|
||||
/* 3945 Tx scheduler registers */
|
||||
#define ALM_SCD_BASE (PRPH_BASE + 0x2E00)
|
||||
#define ALM_SCD_MODE_REG (ALM_SCD_BASE + 0x000)
|
||||
|
|
Loading…
Reference in New Issue