Lines Matching refs:rate
903 static u32 cfg80211_calculate_bitrate_60g(struct rate_info *rate) in cfg80211_calculate_bitrate_60g() argument
944 if (WARN_ON_ONCE(rate->mcs >= ARRAY_SIZE(__mcs2bitrate))) in cfg80211_calculate_bitrate_60g()
947 return __mcs2bitrate[rate->mcs]; in cfg80211_calculate_bitrate_60g()
950 static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate) in cfg80211_calculate_bitrate_vht() argument
1001 if (WARN_ON_ONCE(rate->mcs > 9)) in cfg80211_calculate_bitrate_vht()
1004 idx = rate->flags & (RATE_INFO_FLAGS_160_MHZ_WIDTH | in cfg80211_calculate_bitrate_vht()
1006 rate->flags & RATE_INFO_FLAGS_80_MHZ_WIDTH ? 2 : in cfg80211_calculate_bitrate_vht()
1007 rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH ? 1 : 0; in cfg80211_calculate_bitrate_vht()
1009 bitrate = base[idx][rate->mcs]; in cfg80211_calculate_bitrate_vht()
1010 bitrate *= rate->nss; in cfg80211_calculate_bitrate_vht()
1012 if (rate->flags & RATE_INFO_FLAGS_SHORT_GI) in cfg80211_calculate_bitrate_vht()
1019 u32 cfg80211_calculate_bitrate(struct rate_info *rate) in cfg80211_calculate_bitrate() argument
1023 if (!(rate->flags & RATE_INFO_FLAGS_MCS) && in cfg80211_calculate_bitrate()
1024 !(rate->flags & RATE_INFO_FLAGS_VHT_MCS)) in cfg80211_calculate_bitrate()
1025 return rate->legacy; in cfg80211_calculate_bitrate()
1026 if (rate->flags & RATE_INFO_FLAGS_60G) in cfg80211_calculate_bitrate()
1027 return cfg80211_calculate_bitrate_60g(rate); in cfg80211_calculate_bitrate()
1028 if (rate->flags & RATE_INFO_FLAGS_VHT_MCS) in cfg80211_calculate_bitrate()
1029 return cfg80211_calculate_bitrate_vht(rate); in cfg80211_calculate_bitrate()
1032 if (WARN_ON_ONCE(rate->mcs >= 32)) in cfg80211_calculate_bitrate()
1035 modulation = rate->mcs & 7; in cfg80211_calculate_bitrate()
1036 streams = (rate->mcs >> 3) + 1; in cfg80211_calculate_bitrate()
1038 bitrate = (rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH) ? in cfg80211_calculate_bitrate()
1050 if (rate->flags & RATE_INFO_FLAGS_SHORT_GI) in cfg80211_calculate_bitrate()
1404 int rate = (rates[i] & 0x7f) * 5; in ieee80211_get_ratemask() local
1408 if (sband->bitrates[j].bitrate == rate) { in ieee80211_get_ratemask()