[ath] Extend the colours to 4, not 2.
There's 8 bins in the upcoming changeset to ath/ath_rate, so I need more colours. Yeah, I know.
This commit is contained in:
parent
3dbb9df36b
commit
3347e196e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361025
@ -122,7 +122,7 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_rateioctl_rt *rt,
|
||||
(long long) sn->ratemask);
|
||||
|
||||
for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) {
|
||||
PRINTATTR_ON(COLOR_PAIR(4 + (y % 2)) | A_BOLD);
|
||||
PRINTATTR_ON(COLOR_PAIR(2 + (y % 4)) | A_BOLD);
|
||||
PRINTMSG("[%4u] cur rate %d %s since switch: "
|
||||
"packets %d ticks %u ",
|
||||
bin_to_size(y),
|
||||
@ -132,17 +132,16 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_rateioctl_rt *rt,
|
||||
sn->ticks_since_switch[y]);
|
||||
|
||||
PRINTMSG("last sample (%d %s) cur sample (%d %s) "
|
||||
"packets sent %d\n",
|
||||
"packets sent %d ",
|
||||
dot11rate(rt, sn->last_sample_rix[y]),
|
||||
dot11str(rt, sn->last_sample_rix[y]),
|
||||
dot11rate(rt, sn->current_sample_rix[y]),
|
||||
dot11str(rt, sn->current_sample_rix[y]),
|
||||
sn->packets_sent[y]);
|
||||
PRINTATTR_OFF(COLOR_PAIR(4 + (y % 2)) | A_BOLD);
|
||||
PRINTATTR_OFF(COLOR_PAIR(2 + (y % 4)) | A_BOLD);
|
||||
|
||||
PRINTATTR_ON(COLOR_PAIR(3) | A_BOLD);
|
||||
PRINTMSG("[%4u] packets since sample %d sample tt %u\n",
|
||||
bin_to_size(y),
|
||||
PRINTATTR_ON(COLOR_PAIR(1) | A_BOLD);
|
||||
PRINTMSG("packets since sample %d sample tt %u\n",
|
||||
sn->packets_since_sample[y],
|
||||
sn->sample_tt[y]);
|
||||
PRINTATTR_OFF(COLOR_PAIR(3) | A_BOLD);
|
||||
@ -156,9 +155,9 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_rateioctl_rt *rt,
|
||||
if (sn->stats[y][rix].total_packets == 0)
|
||||
continue;
|
||||
if (rix == sn->current_rix[y])
|
||||
PRINTATTR_ON(COLOR_PAIR(y+4) | A_BOLD);
|
||||
PRINTATTR_ON(COLOR_PAIR(2 + (y % 4)) | A_BOLD);
|
||||
else if (rix == sn->last_sample_rix[y])
|
||||
PRINTATTR_ON(COLOR_PAIR(3) | A_BOLD);
|
||||
PRINTATTR_ON(COLOR_PAIR(1) | A_BOLD);
|
||||
#if 0
|
||||
else if (sn->stats[y][rix].ewma_pct / 10 < 50)
|
||||
PRINTATTR_ON(COLOR_PAIR(2) | A_BOLD);
|
||||
@ -179,9 +178,9 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_rateioctl_rt *rt,
|
||||
sn->stats[y][rix].average_tx_time,
|
||||
sn->stats[y][rix].last_tx);
|
||||
if (rix == sn->current_rix[y])
|
||||
PRINTATTR_OFF(COLOR_PAIR(y+4) | A_BOLD);
|
||||
PRINTATTR_OFF(COLOR_PAIR(2 + (y % 4)) | A_BOLD);
|
||||
else if (rix == sn->last_sample_rix[y])
|
||||
PRINTATTR_OFF(COLOR_PAIR(3) | A_BOLD);
|
||||
PRINTATTR_OFF(COLOR_PAIR(1) | A_BOLD);
|
||||
#if 0
|
||||
else if (sn->stats[y][rix].ewma_pct / 10 < 50)
|
||||
PRINTATTR_OFF(COLOR_PAIR(2) | A_BOLD);
|
||||
|
Loading…
Reference in New Issue
Block a user