lkml.org 
[lkml]   [2020]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 04/32] staging: wfx: remove "burst" mechanism
Date
On Thursday 2 April 2020 15:05:26 CEST Dan Carpenter wrote:
[...]
> ^^^^^^^^^
> Not related to this this patch but this confused me initially. UINT_MAX
> would be more readable.
>
> The other unrelated question I had about this function was:
>
> 402 /* search for a winner using edca params */
> 403 for (i = 0; i < IEEE80211_NUM_ACS; ++i) {
> ^^^^^^^^^^^^^^^^^
> IEEE80211_NUM_ACS is 4.
>
> 404 int queued;
> 405
> 406 edca = &wvif->edca_params[i];
> 407 queued = wfx_tx_queue_get_num_queued(&wvif->wdev->tx_queue[i],
> 408 tx_allowed_mask);
> 409 if (!queued)
> 410 continue;
> 411 *total += queued;
> 412 score = ((edca->aifs + edca->cw_min) << 16) +
> 413 ((edca->cw_max - edca->cw_min) *
> 414 (get_random_int() & 0xFFFF));
> 415 if (score < best && (winner < 0 || i != 3)) {
> ^^^^^^
>
> Why do we not want winner to be 3? It's unrelated to the patch but
> there should be a comment next to that code probably.
>
> 416 best = score;
> 417 winner = i;
> 418 }
> 419 }

Indeed. In add, this code is useless. That's why I drop this code in
patch 22/32.

--
Jérôme Pouiller

\
 
 \ /
  Last update: 2020-04-02 16:48    [W:1.643 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site