Lines Matching refs:ind_calc
779 uint64_t mbits_per_sec, ind_calc, previous_rate = 0;
820 ind_calc = mbits_per_sec/RS_ONE_MEGABIT_PERSEC;
821 if ((ind_calc * RS_ONE_MEGABIT_PERSEC) != mbits_per_sec)
822 ind_calc++;
824 ind_calc += 2;
825 if (ind_calc > (ALL_HARDWARE_RATES-1)) {
827 ind_calc = ALL_HARDWARE_RATES-1;
829 if ((ind_calc >= rs->rs_lowest_valid) &&
830 (ind_calc <= rs->rs_highest_valid)) {
831 rte = &rs->rs_rlt[ind_calc];
832 if (ind_calc >= 1)
833 previous_rate = rs->rs_rlt[(ind_calc-1)].rate;
853 ind_calc = mbits_per_sec/RS_ONE_MEGABIT_PERSEC;
854 if ((ind_calc * RS_ONE_MEGABIT_PERSEC) == mbits_per_sec) {
856 ind_calc += 2;
857 if (ind_calc > (ALL_HARDWARE_RATES-1)) {
859 ind_calc = ALL_HARDWARE_RATES-1;
861 if (rs->rs_rlt[ind_calc].flags & HDWRPACE_INITED)
862 rte = &rs->rs_rlt[ind_calc];
906 ind_calc = mbits_per_sec/RS_ONE_MEGABIT_PERSEC;
907 if ((ind_calc * RS_ONE_MEGABIT_PERSEC) == mbits_per_sec) {
908 if (ind_calc > (ALL_HARDWARE_RATES-1)) {
910 ind_calc = (ALL_HARDWARE_RATES-1);
912 rte = &rs->rs_rlt[ind_calc];
913 if (ind_calc >= 1)
914 previous_rate = rs->rs_rlt[(ind_calc-1)].rate;
918 ind_calc = (mbits_per_sec + (RS_ONE_MEGABIT_PERSEC-1))/RS_ONE_MEGABIT_PERSEC;
919 ind_calc += 2;
920 if (ind_calc > (ALL_HARDWARE_RATES-1)) {
922 ind_calc = ALL_HARDWARE_RATES-1;
924 if (rs->rs_rlt[ind_calc].flags & HDWRPACE_INITED) {
925 rte = &rs->rs_rlt[ind_calc];
926 if (ind_calc >= 1)
927 previous_rate = rs->rs_rlt[(ind_calc-1)].rate;