Lines Matching full:nss

179 static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss)  in ath10k_mac_get_max_vht_mcs_map()  argument
181 switch ((mcs_map >> (2 * nss)) & 0x3) { in ath10k_mac_get_max_vht_mcs_map()
192 int nss; in ath10k_mac_max_ht_nss() local
194 for (nss = IEEE80211_HT_MCS_MASK_LEN - 1; nss >= 0; nss--) in ath10k_mac_max_ht_nss()
195 if (ht_mcs_mask[nss]) in ath10k_mac_max_ht_nss()
196 return nss + 1; in ath10k_mac_max_ht_nss()
204 int nss; in ath10k_mac_max_vht_nss() local
206 for (nss = NL80211_VHT_NSS_MAX - 1; nss >= 0; nss--) in ath10k_mac_max_vht_nss()
207 if (vht_mcs_mask[nss]) in ath10k_mac_max_vht_nss()
208 return nss + 1; in ath10k_mac_max_vht_nss()
2275 int nss; in ath10k_peer_assoc_h_ht_masked() local
2277 for (nss = 0; nss < IEEE80211_HT_MCS_MASK_LEN; nss++) in ath10k_peer_assoc_h_ht_masked()
2278 if (ht_mcs_mask[nss]) in ath10k_peer_assoc_h_ht_masked()
2287 int nss; in ath10k_peer_assoc_h_vht_masked() local
2289 for (nss = 0; nss < NL80211_VHT_NSS_MAX; nss++) in ath10k_peer_assoc_h_vht_masked()
2290 if (vht_mcs_mask[nss]) in ath10k_peer_assoc_h_vht_masked()
2397 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n", in ath10k_peer_assoc_h_ht()
2476 int nss; in ath10k_peer_assoc_h_vht_limit() local
2480 for (nss = 0; nss < NL80211_VHT_NSS_MAX; nss++) { in ath10k_peer_assoc_h_vht_limit()
2481 mcs_map = ath10k_mac_get_max_vht_mcs_map(tx_mcs_set, nss) & in ath10k_peer_assoc_h_vht_limit()
2482 vht_mcs_limit[nss]; in ath10k_peer_assoc_h_vht_limit()
2515 tx_mcs_set &= ~(0x3 << (nss * 2)); in ath10k_peer_assoc_h_vht_limit()
2516 tx_mcs_set |= mcs << (nss * 2); in ath10k_peer_assoc_h_vht_limit()
2524 u32 nss; in get_160mhz_nss_from_maxrate() local
2528 nss = 1; in get_160mhz_nss_from_maxrate()
2531 nss = 2; in get_160mhz_nss_from_maxrate()
2534 nss = 3; /* not support MCS9 from spec*/ in get_160mhz_nss_from_maxrate()
2537 nss = 4; in get_160mhz_nss_from_maxrate()
2540 nss = 1; in get_160mhz_nss_from_maxrate()
2543 return nss; in get_160mhz_nss_from_maxrate()
2599 /* Calculate peer NSS capability from VHT capabilities if STA in ath10k_peer_assoc_h_vht()
2620 /* Configure bandwidth-NSS mapping to FW in ath10k_peer_assoc_h_vht()
4907 * a restricted NSS for 160 or 80+80 vs what it can do for 80Mhz. Give in ath10k_create_vht_cap()
5732 u16 nss = get_nss_from_chainmask(ar->cfg_tx_chainmask); in ath10k_add_interface() local
5734 vdev_param = ar->wmi.vdev_param->nss; in ath10k_add_interface()
5736 nss); in ath10k_add_interface()
5738 ath10k_warn(ar, "failed to set vdev %i chainmask 0x%x, nss %i: %d\n", in ath10k_add_interface()
5739 arvif->vdev_id, ar->cfg_tx_chainmask, nss, in ath10k_add_interface()
6723 u32 changed, bw, nss, smps; in ath10k_sta_rc_update_wk() local
6744 nss = arsta->nss; in ath10k_sta_rc_update_wk()
6751 nss = max_t(u32, 1, nss); in ath10k_sta_rc_update_wk()
6752 nss = min(nss, max(ath10k_mac_max_ht_nss(ht_mcs_mask), in ath10k_sta_rc_update_wk()
6778 ath10k_dbg(ar, ATH10K_DBG_STA, "mac update sta %pM nss %d\n", in ath10k_sta_rc_update_wk()
6779 sta->addr, nss); in ath10k_sta_rc_update_wk()
6782 ar->wmi.peer_param->nss, nss); in ath10k_sta_rc_update_wk()
6784 ath10k_warn(ar, "failed to update STA %pM nss %d: %d\n", in ath10k_sta_rc_update_wk()
6785 sta->addr, nss, err); in ath10k_sta_rc_update_wk()
6913 u8 *rate, u8 *nss, bool vht_only) in ath10k_mac_bitrate_mask_get_single_rate() argument
6938 *nss = 1; in ath10k_mac_bitrate_mask_get_single_rate()
6940 (*nss - 1) << 4 | in ath10k_mac_bitrate_mask_get_single_rate()
6948 *nss = i + 1; in ath10k_mac_bitrate_mask_get_single_rate()
6950 (*nss - 1) << 4 | in ath10k_mac_bitrate_mask_get_single_rate()
6960 *nss = i + 1; in ath10k_mac_bitrate_mask_get_single_rate()
6962 (*nss - 1) << 4 | in ath10k_mac_bitrate_mask_get_single_rate()
6974 u32 rate_ctrl_flag, u8 nss) in ath10k_mac_validate_rate_mask() argument
6979 if (nss > sta->deflink.rx_nss) { in ath10k_mac_validate_rate_mask()
6980 ath10k_warn(ar, "Invalid nss field, configured %u limit %u\n", in ath10k_mac_validate_rate_mask()
6981 nss, sta->deflink.rx_nss); in ath10k_mac_validate_rate_mask()
7015 u8 nss, rate; in ath10k_mac_tid_bitrate_config() local
7035 &rate, &nss, false); in ath10k_mac_tid_bitrate_config()
7044 if (sta && ath10k_mac_validate_rate_mask(ar, sta, *rate_ctrl_flag, nss)) in ath10k_mac_tid_bitrate_config()
7333 u8 nss; in ath10k_sta_tid_cfg_wk() local
7389 nss = ATH10K_HW_NSS(arvif->rate_code[i]); in ath10k_sta_tid_cfg_wk()
7392 nss); in ath10k_sta_tid_cfg_wk()
8217 int *nss) in ath10k_mac_bitrate_mask_get_single_nss() argument
8257 *nss = fls(ht_nss_mask); in ath10k_mac_bitrate_mask_get_single_nss()
8263 u8 rate, u8 nss, u8 sgi, u8 ldpc) in ath10k_mac_set_fixed_rate_params() argument
8271 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac set fixed rate params vdev %i rate 0x%02x nss %u sgi %u\n", in ath10k_mac_set_fixed_rate_params()
8272 arvif->vdev_id, rate, nss, sgi); in ath10k_mac_set_fixed_rate_params()
8282 vdev_param = ar->wmi.vdev_param->nss; in ath10k_mac_set_fixed_rate_params()
8283 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, nss); in ath10k_mac_set_fixed_rate_params()
8285 ath10k_warn(ar, "failed to set nss param %d: %d\n", nss, ret); in ath10k_mac_set_fixed_rate_params()
8409 u8 nss; in ath10k_mac_op_set_bitrate_mask() local
8443 &rate, &nss, in ath10k_mac_op_set_bitrate_mask()
8453 nss = single_nss; in ath10k_mac_op_set_bitrate_mask()
8456 nss = min(ar->num_rf_chains, in ath10k_mac_op_set_bitrate_mask()
8495 ret = ath10k_mac_set_fixed_rate_params(arvif, rate, nss, sgi, ldpc); in ath10k_mac_op_set_bitrate_mask()
8530 "mac sta rc update for %pM changed %08x bw %d nss %d smps %d\n", in ath10k_sta_rc_update()
8562 arsta->nss = sta->deflink.rx_nss; in ath10k_sta_rc_update()
9086 /* HT MCS parameters with Nss = 1 */
9099 /* HT MCS parameters with Nss = 2 */
9112 /* MCS parameters with Nss = 1 */
9127 /*MCS parameters with Nss = 2 */
9142 static void ath10k_mac_get_rate_flags_ht(struct ath10k *ar, u32 rate, u8 nss, u8 mcs, in ath10k_mac_get_rate_flags_ht() argument
9156 ((nss == 1) ? &supported_ht_mcs_rate_nss1 : in ath10k_mac_get_rate_flags_ht()
9175 ath10k_warn(ar, "invalid ht params rate %d 100kbps nss %d mcs %d", in ath10k_mac_get_rate_flags_ht()
9176 rate, nss, mcs); in ath10k_mac_get_rate_flags_ht()
9180 static void ath10k_mac_get_rate_flags_vht(struct ath10k *ar, u32 rate, u8 nss, u8 mcs, in ath10k_mac_get_rate_flags_vht() argument
9186 ((nss == 1) ? &supported_vht_mcs_rate_nss1 : in ath10k_mac_get_rate_flags_vht()
9205 ath10k_warn(ar, "invalid vht params rate %d 100kbps nss %d mcs %d", in ath10k_mac_get_rate_flags_vht()
9206 rate, nss, mcs); in ath10k_mac_get_rate_flags_vht()
9211 enum ath10k_phy_mode mode, u8 nss, u8 mcs, in ath10k_mac_get_rate_flags() argument
9216 ath10k_mac_get_rate_flags_ht(ar, rate, nss, mcs, flags, bw); in ath10k_mac_get_rate_flags()
9219 ath10k_mac_get_rate_flags_vht(ar, rate, nss, mcs, flags, bw); in ath10k_mac_get_rate_flags()
9228 u8 nss = WMI_TLV_GET_HW_RC_NSS_V1(rate_code) + 1; in ath10k_mac_parse_bitrate() local
9240 ath10k_mac_get_rate_flags(ar, bitrate_kbps / 100, mode, nss, mcs, &flags, &bw); in ath10k_mac_parse_bitrate()
9243 "mac parse bitrate preamble %d mode %d nss %d mcs %d flags %x bw %d\n", in ath10k_mac_parse_bitrate()
9244 preamble, mode, nss, mcs, flags, bw); in ath10k_mac_parse_bitrate()
9249 rate->nss = nss; in ath10k_mac_parse_bitrate()
9329 if (arsta->txrate.legacy || arsta->txrate.nss) { in ath10k_sta_statistics()
9334 sinfo->txrate.nss = arsta->txrate.nss; in ath10k_sta_statistics()