Lines Matching defs:rate_idx
426 static bool rate_idx_match_legacy_mask(s8 *rate_idx, int n_bitrates, u32 mask)
431 for (j = *rate_idx; j >= 0; j--) {
434 *rate_idx = j;
440 for (j = *rate_idx + 1; j < n_bitrates; j++) {
443 *rate_idx = j;
450 static bool rate_idx_match_mcs_mask(s8 *rate_idx, u8 *mcs_mask)
455 ridx = *rate_idx / 8;
456 rbit = *rate_idx % 8;
466 *rate_idx = i * 8 + j;
473 ridx = (*rate_idx + 1) / 8;
474 rbit = (*rate_idx + 1) % 8;
479 *rate_idx = i * 8 + j;
487 static bool rate_idx_match_vht_mcs_mask(s8 *rate_idx, u16 *vht_mask)
492 ridx = *rate_idx >> 4;
493 rbit = *rate_idx & 0xf;
502 *rate_idx = (i << 4) | j;
510 ridx = (*rate_idx + 1) >> 4;
511 rbit = (*rate_idx + 1) & 0xf;
516 *rate_idx = (i << 4) | j;
525 static void rate_idx_match_mask(s8 *rate_idx, u16 *rate_flags,
534 if (rate_idx_match_vht_mcs_mask(rate_idx, vht_mask))
537 *rate_idx = 0;
547 if (rate_idx_match_mcs_mask(rate_idx, mcs_mask))
553 if (rate_idx_match_legacy_mask(rate_idx, sband->n_bitrates,
558 if (rate_idx_match_mcs_mask(rate_idx, mcs_mask))
562 *rate_idx = 0;
567 if (rate_idx_match_legacy_mask(rate_idx, sband->n_bitrates,
572 if (rate_idx_match_legacy_mask(rate_idx, sband->n_bitrates,
586 *rate_idx = 0;
597 if (rate_idx_match_mcs_mask(rate_idx, mcs_mask))