Re: [PATCH 04/32] staging: wfx: remove "burst" mechanism
From: Jérôme Pouiller
Date: Thu Apr 02 2020 - 10:47:51 EST
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