Lines Matching defs:rate

130 	const struct ieee80211_rate *rate;
134 rate = &sband->bitrates[i];
136 if (ath10k_mac_bitrate_is_cck(rate->bitrate) != cck)
139 if (rate->hw_value == hw_rate)
141 else if (rate->flags & IEEE80211_RATE_SHORT_PREAMBLE &&
142 rate->hw_value_short == hw_rate)
2251 u8 rate;
2271 rate = ath10k_mac_bitrate_to_rate(rates->bitrate);
2272 rateset->rates[rateset->num_rates] = rate;
2527 static u32 get_160mhz_nss_from_maxrate(int rate)
2531 switch (rate) {
4330 * reported TX rate. This is just a rough estimation because host driver has no
4331 * knowledge of the actual transmit rate, retries or aggregation. If actual
4363 * airtime/rate doesn't need be exact. Airtime of BC/MC frames
4364 * in 2G get some discount, which helps prevent very low rate
6073 ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret);
6086 u8 rate, rateidx;
6290 rate = ATH10K_HW_RATECODE(hw_value, 0, preamble);
6294 arvif->vdev_id, rate);
6298 vdev_param, rate);
6301 "failed to set mcast rate on vdev %i: %d\n",
6306 vdev_param, rate);
6309 "failed to set bcast rate on vdev %i: %d\n",
6911 u8 *rate, u8 *nss, bool vht_only)
6937 *rate = preamble << 6 |
6947 *rate = WMI_RATE_PREAMBLE_HT << 6 |
6959 *rate = WMI_RATE_PREAMBLE_VHT << 6 |
6985 ath10k_warn(ar, "Invalid VHT rate for sta %pM\n",
6991 ath10k_warn(ar, "Invalid HT rate for sta %pM\n",
7013 u8 nss, rate;
7033 &rate, &nss, false);
7035 ath10k_warn(ar, "failed to get single rate: %d\n",
7040 *rate_ctrl_flag = rate;
8261 u8 rate, u8 nss, u8 sgi, u8 ldpc)
8269 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac set fixed rate params vdev %i rate 0x%02x nss %u sgi %u\n",
8270 arvif->vdev_id, rate, nss, sgi);
8273 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, rate);
8275 ath10k_warn(ar, "failed to set fixed rate param 0x%02x: %d\n",
8276 rate, ret);
8314 * to express all VHT MCS rate masks. Effectively only the following
8341 u8 rate = arvif->vht_pfr;
8343 /* skip non vht and multiple rate peers */
8348 WMI_PEER_PARAM_FIXED_RATE, rate);
8350 ath10k_warn(ar, "failed to enable STA %pM peer fixed rate: %d\n",
8392 ath10k_warn(ar, "failed to clear STA %pM peer fixed rate: %d\n",
8406 u8 rate;
8441 &rate, &nss,
8444 ath10k_warn(ar, "failed to get single rate for vdev %i: %d\n",
8450 rate = WMI_FIXED_RATE_NONE;
8453 rate = WMI_FIXED_RATE_NONE;
8465 /* Reach here, firmware supports peer fixed rate and has
8466 * single vht rate, and don't update vif birate_mask, as
8467 * the rate only for specific peer.
8493 ret = ath10k_mac_set_fixed_rate_params(arvif, rate, nss, sgi, ldpc);
8495 ath10k_warn(ar, "failed to set fixed rate params on vdev %i: %d\n",
9140 static void ath10k_mac_get_rate_flags_ht(struct ath10k *ar, u32 rate, u8 nss, u8 mcs,
9149 ath10k_warn(ar, "not supported mcs %d in current rate table", mcs);
9162 if (rate == mcs_rate[index].supported_rate[0]) {
9164 } else if (rate == mcs_rate[index].supported_rate[1]) {
9166 } else if (rate == mcs_rate[index].supported_rate[2]) {
9169 } else if (rate == mcs_rate[index].supported_rate[3]) {
9173 ath10k_warn(ar, "invalid ht params rate %d 100kbps nss %d mcs %d",
9174 rate, nss, mcs);
9178 static void ath10k_mac_get_rate_flags_vht(struct ath10k *ar, u32 rate, u8 nss, u8 mcs,
9187 if (rate == mcs_rate[mcs].supported_VHT80_rate[0]) {
9189 } else if (rate == mcs_rate[mcs].supported_VHT80_rate[1]) {
9192 } else if (rate == mcs_rate[mcs].supported_VHT40_rate[0]) {
9194 } else if (rate == mcs_rate[mcs].supported_VHT40_rate[1]) {
9197 } else if (rate == mcs_rate[mcs].supported_VHT20_rate[0]) {
9199 } else if (rate == mcs_rate[mcs].supported_VHT20_rate[1]) {
9203 ath10k_warn(ar, "invalid vht params rate %d 100kbps nss %d mcs %d",
9204 rate, nss, mcs);
9208 static void ath10k_mac_get_rate_flags(struct ath10k *ar, u32 rate,
9214 ath10k_mac_get_rate_flags_ht(ar, rate, nss, mcs, flags, bw);
9217 ath10k_mac_get_rate_flags_vht(ar, rate, nss, mcs, flags, bw);
9222 u32 bitrate_kbps, struct rate_info *rate)
9230 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac parse rate code 0x%x bitrate %d kbps\n",
9244 rate->flags = flags;
9245 rate->bw = bw;
9246 rate->legacy = bitrate_kbps / 100;
9247 rate->nss = nss;
9248 rate->mcs = mcs;