Lines Matching refs:rate_idx
431 static bool rate_idx_match_legacy_mask(s8 *rate_idx, int n_bitrates, u32 mask)
436 for (j = *rate_idx; j >= 0; j--) {
439 *rate_idx = j;
445 for (j = *rate_idx + 1; j < n_bitrates; j++) {
448 *rate_idx = j;
455 static bool rate_idx_match_mcs_mask(s8 *rate_idx, u8 *mcs_mask)
460 ridx = *rate_idx / 8;
461 rbit = *rate_idx % 8;
471 *rate_idx = i * 8 + j;
478 ridx = (*rate_idx + 1) / 8;
479 rbit = (*rate_idx + 1) % 8;
484 *rate_idx = i * 8 + j;
492 static bool rate_idx_match_vht_mcs_mask(s8 *rate_idx, u16 *vht_mask)
497 ridx = *rate_idx >> 4;
498 rbit = *rate_idx & 0xf;
507 *rate_idx = (i << 4) | j;
515 ridx = (*rate_idx + 1) >> 4;
516 rbit = (*rate_idx + 1) & 0xf;
521 *rate_idx = (i << 4) | j;
530 static void rate_idx_match_mask(s8 *rate_idx, u16 *rate_flags,
539 if (rate_idx_match_vht_mcs_mask(rate_idx, vht_mask))
542 *rate_idx = 0;
552 if (rate_idx_match_mcs_mask(rate_idx, mcs_mask))
558 if (rate_idx_match_legacy_mask(rate_idx, sband->n_bitrates,
563 if (rate_idx_match_mcs_mask(rate_idx, mcs_mask))
567 *rate_idx = 0;
572 if (rate_idx_match_legacy_mask(rate_idx, sband->n_bitrates,
577 if (rate_idx_match_legacy_mask(rate_idx, sband->n_bitrates,
591 *rate_idx = 0;
602 if (rate_idx_match_mcs_mask(rate_idx, mcs_mask))