From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/wireless/ath/ath11k/mac.c:1975 ath11k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'.
Date: Thu, 27 Jan 2022 17:44:14 +0800 [thread overview]
Message-ID: <202201271745.LYiGP8Sl-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 21652 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Wen Gong <quic_wgong@quicinc.com>
CC: Kalle Valo <kvalo@codeaurora.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0280e3c58f92b2fe0e8fbbdf8d386449168de4a8
commit: 3db26ecf7114370e451e296e33a0af3303d32819 ath11k: calculate the correct NSS of peer for HE capabilities
date: 9 weeks ago
:::::: branch date: 2 days ago
:::::: commit date: 9 weeks ago
config: microblaze-randconfig-m031-20220127 (https://download.01.org/0day-ci/archive/20220127/202201271745.LYiGP8Sl-lkp(a)intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/net/wireless/ath/ath11k/mac.c:1975 ath11k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'.
drivers/net/wireless/ath/ath11k/mac.c:1975 ath11k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_160'.
Old smatch warnings:
arch/microblaze/include/asm/thread_info.h:91 current_thread_info() error: uninitialized symbol 'sp'.
drivers/net/wireless/ath/ath11k/mac.c:1977 ath11k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'.
vim +/rx_mcs_80 +1975 drivers/net/wireless/ath/ath11k/mac.c
61fe43e7216df6 Miles Hu 2021-09-24 1914
d5c65159f28953 Kalle Valo 2019-11-23 1915 static void ath11k_peer_assoc_h_he(struct ath11k *ar,
d5c65159f28953 Kalle Valo 2019-11-23 1916 struct ieee80211_vif *vif,
d5c65159f28953 Kalle Valo 2019-11-23 1917 struct ieee80211_sta *sta,
d5c65159f28953 Kalle Valo 2019-11-23 1918 struct peer_assoc_params *arg)
d5c65159f28953 Kalle Valo 2019-11-23 1919 {
61fe43e7216df6 Miles Hu 2021-09-24 1920 struct ath11k_vif *arvif = (void *)vif->drv_priv;
61fe43e7216df6 Miles Hu 2021-09-24 1921 struct cfg80211_chan_def def;
9f056ed8ee01ad John Crispin 2019-11-25 1922 const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
61fe43e7216df6 Miles Hu 2021-09-24 1923 enum nl80211_band band;
61fe43e7216df6 Miles Hu 2021-09-24 1924 u16 *he_mcs_mask;
61fe43e7216df6 Miles Hu 2021-09-24 1925 u8 max_nss, he_mcs;
61fe43e7216df6 Miles Hu 2021-09-24 1926 u16 he_tx_mcs = 0, v = 0;
61fe43e7216df6 Miles Hu 2021-09-24 1927 int i, he_nss, nss_idx;
61fe43e7216df6 Miles Hu 2021-09-24 1928 bool user_rate_valid = true;
f552d6fd2f27ce P Praneesh 2021-09-24 1929 u32 rx_nss, tx_nss, nss_160;
3db26ecf711437 Wen Gong 2021-11-22 1930 u8 ampdu_factor, rx_mcs_80, rx_mcs_160;
3db26ecf711437 Wen Gong 2021-11-22 1931 u16 mcs_160_map, mcs_80_map;
3db26ecf711437 Wen Gong 2021-11-22 1932 bool support_160;
61fe43e7216df6 Miles Hu 2021-09-24 1933
61fe43e7216df6 Miles Hu 2021-09-24 1934 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
61fe43e7216df6 Miles Hu 2021-09-24 1935 return;
9f056ed8ee01ad John Crispin 2019-11-25 1936
9f056ed8ee01ad John Crispin 2019-11-25 1937 if (!he_cap->has_he)
9f056ed8ee01ad John Crispin 2019-11-25 1938 return;
9f056ed8ee01ad John Crispin 2019-11-25 1939
61fe43e7216df6 Miles Hu 2021-09-24 1940 band = def.chan->band;
61fe43e7216df6 Miles Hu 2021-09-24 1941 he_mcs_mask = arvif->bitrate_mask.control[band].he_mcs;
61fe43e7216df6 Miles Hu 2021-09-24 1942
61fe43e7216df6 Miles Hu 2021-09-24 1943 if (ath11k_peer_assoc_h_he_masked(he_mcs_mask))
61fe43e7216df6 Miles Hu 2021-09-24 1944 return;
61fe43e7216df6 Miles Hu 2021-09-24 1945
9f056ed8ee01ad John Crispin 2019-11-25 1946 arg->he_flag = true;
3db26ecf711437 Wen Gong 2021-11-22 1947 support_160 = !!(he_cap->he_cap_elem.phy_cap_info[0] &
3db26ecf711437 Wen Gong 2021-11-22 1948 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G);
3db26ecf711437 Wen Gong 2021-11-22 1949
3db26ecf711437 Wen Gong 2021-11-22 1950 /* Supported HE-MCS and NSS Set of peer he_cap is intersection with self he_cp */
3db26ecf711437 Wen Gong 2021-11-22 1951 mcs_160_map = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
3db26ecf711437 Wen Gong 2021-11-22 1952 mcs_80_map = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
3db26ecf711437 Wen Gong 2021-11-22 1953
3db26ecf711437 Wen Gong 2021-11-22 1954 if (support_160) {
3db26ecf711437 Wen Gong 2021-11-22 1955 for (i = 7; i >= 0; i--) {
3db26ecf711437 Wen Gong 2021-11-22 1956 u8 mcs_160 = (mcs_160_map >> (2 * i)) & 3;
3db26ecf711437 Wen Gong 2021-11-22 1957
3db26ecf711437 Wen Gong 2021-11-22 1958 if (mcs_160 != IEEE80211_VHT_MCS_NOT_SUPPORTED) {
3db26ecf711437 Wen Gong 2021-11-22 1959 rx_mcs_160 = i + 1;
3db26ecf711437 Wen Gong 2021-11-22 1960 break;
3db26ecf711437 Wen Gong 2021-11-22 1961 }
3db26ecf711437 Wen Gong 2021-11-22 1962 }
3db26ecf711437 Wen Gong 2021-11-22 1963 }
3db26ecf711437 Wen Gong 2021-11-22 1964
3db26ecf711437 Wen Gong 2021-11-22 1965 for (i = 7; i >= 0; i--) {
3db26ecf711437 Wen Gong 2021-11-22 1966 u8 mcs_80 = (mcs_80_map >> (2 * i)) & 3;
3db26ecf711437 Wen Gong 2021-11-22 1967
3db26ecf711437 Wen Gong 2021-11-22 1968 if (mcs_80 != IEEE80211_VHT_MCS_NOT_SUPPORTED) {
3db26ecf711437 Wen Gong 2021-11-22 1969 rx_mcs_80 = i + 1;
3db26ecf711437 Wen Gong 2021-11-22 1970 break;
3db26ecf711437 Wen Gong 2021-11-22 1971 }
3db26ecf711437 Wen Gong 2021-11-22 1972 }
3db26ecf711437 Wen Gong 2021-11-22 1973
3db26ecf711437 Wen Gong 2021-11-22 1974 if (support_160)
3db26ecf711437 Wen Gong 2021-11-22 @1975 max_nss = min(rx_mcs_80, rx_mcs_160);
3db26ecf711437 Wen Gong 2021-11-22 1976 else
3db26ecf711437 Wen Gong 2021-11-22 1977 max_nss = rx_mcs_80;
3db26ecf711437 Wen Gong 2021-11-22 1978
3db26ecf711437 Wen Gong 2021-11-22 1979 arg->peer_nss = min(sta->rx_nss, max_nss);
9f056ed8ee01ad John Crispin 2019-11-25 1980
c8bcd82a4efd05 Kees Cook 2021-06-16 1981 memcpy_and_pad(&arg->peer_he_cap_macinfo,
c8bcd82a4efd05 Kees Cook 2021-06-16 1982 sizeof(arg->peer_he_cap_macinfo),
c8bcd82a4efd05 Kees Cook 2021-06-16 1983 he_cap->he_cap_elem.mac_cap_info,
c8bcd82a4efd05 Kees Cook 2021-06-16 1984 sizeof(he_cap->he_cap_elem.mac_cap_info),
c8bcd82a4efd05 Kees Cook 2021-06-16 1985 0);
c8bcd82a4efd05 Kees Cook 2021-06-16 1986 memcpy_and_pad(&arg->peer_he_cap_phyinfo,
c8bcd82a4efd05 Kees Cook 2021-06-16 1987 sizeof(arg->peer_he_cap_phyinfo),
c8bcd82a4efd05 Kees Cook 2021-06-16 1988 he_cap->he_cap_elem.phy_cap_info,
c8bcd82a4efd05 Kees Cook 2021-06-16 1989 sizeof(he_cap->he_cap_elem.phy_cap_info),
c8bcd82a4efd05 Kees Cook 2021-06-16 1990 0);
60689de46c7f6a Rajkumar Manoharan 2020-04-24 1991 arg->peer_he_ops = vif->bss_conf.he_oper.params;
9f056ed8ee01ad John Crispin 2019-11-25 1992
9f056ed8ee01ad John Crispin 2019-11-25 1993 /* the top most byte is used to indicate BSS color info */
9f056ed8ee01ad John Crispin 2019-11-25 1994 arg->peer_he_ops &= 0xffffff;
9f056ed8ee01ad John Crispin 2019-11-25 1995
af6d39db1b046a Tamizh Chelvam 2020-09-08 1996 /* As per section 26.6.1 11ax Draft5.0, if the Max AMPDU Exponent Extension
af6d39db1b046a Tamizh Chelvam 2020-09-08 1997 * in HE cap is zero, use the arg->peer_max_mpdu as calculated while parsing
af6d39db1b046a Tamizh Chelvam 2020-09-08 1998 * VHT caps(if VHT caps is present) or HT caps (if VHT caps is not present).
af6d39db1b046a Tamizh Chelvam 2020-09-08 1999 *
af6d39db1b046a Tamizh Chelvam 2020-09-08 2000 * For non-zero value of Max AMPDU Extponent Extension in HE MAC caps,
af6d39db1b046a Tamizh Chelvam 2020-09-08 2001 * if a HE STA sends VHT cap and HE cap IE in assoc request then, use
af6d39db1b046a Tamizh Chelvam 2020-09-08 2002 * MAX_AMPDU_LEN_FACTOR as 20 to calculate max_ampdu length.
af6d39db1b046a Tamizh Chelvam 2020-09-08 2003 * If a HE STA that does not send VHT cap, but HE and HT cap in assoc
af6d39db1b046a Tamizh Chelvam 2020-09-08 2004 * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
af6d39db1b046a Tamizh Chelvam 2020-09-08 2005 * length.
af6d39db1b046a Tamizh Chelvam 2020-09-08 2006 */
1f851b8dfd76a0 Johannes Berg 2021-04-09 2007 ampdu_factor = u8_get_bits(he_cap->he_cap_elem.mac_cap_info[3],
1f851b8dfd76a0 Johannes Berg 2021-04-09 2008 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK);
af6d39db1b046a Tamizh Chelvam 2020-09-08 2009
af6d39db1b046a Tamizh Chelvam 2020-09-08 2010 if (ampdu_factor) {
af6d39db1b046a Tamizh Chelvam 2020-09-08 2011 if (sta->vht_cap.vht_supported)
af6d39db1b046a Tamizh Chelvam 2020-09-08 2012 arg->peer_max_mpdu = (1 << (IEEE80211_HE_VHT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam 2020-09-08 2013 ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam 2020-09-08 2014 else if (sta->ht_cap.ht_supported)
af6d39db1b046a Tamizh Chelvam 2020-09-08 2015 arg->peer_max_mpdu = (1 << (IEEE80211_HE_HT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam 2020-09-08 2016 ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam 2020-09-08 2017 }
af6d39db1b046a Tamizh Chelvam 2020-09-08 2018
9f056ed8ee01ad John Crispin 2019-11-25 2019 if (he_cap->he_cap_elem.phy_cap_info[6] &
9f056ed8ee01ad John Crispin 2019-11-25 2020 IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT) {
9f056ed8ee01ad John Crispin 2019-11-25 2021 int bit = 7;
9f056ed8ee01ad John Crispin 2019-11-25 2022 int nss, ru;
9f056ed8ee01ad John Crispin 2019-11-25 2023
9f056ed8ee01ad John Crispin 2019-11-25 2024 arg->peer_ppet.numss_m1 = he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin 2019-11-25 2025 IEEE80211_PPE_THRES_NSS_MASK;
9f056ed8ee01ad John Crispin 2019-11-25 2026 arg->peer_ppet.ru_bit_mask =
9f056ed8ee01ad John Crispin 2019-11-25 2027 (he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin 2019-11-25 2028 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK) >>
9f056ed8ee01ad John Crispin 2019-11-25 2029 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_POS;
9f056ed8ee01ad John Crispin 2019-11-25 2030
9f056ed8ee01ad John Crispin 2019-11-25 2031 for (nss = 0; nss <= arg->peer_ppet.numss_m1; nss++) {
9f056ed8ee01ad John Crispin 2019-11-25 2032 for (ru = 0; ru < 4; ru++) {
9f056ed8ee01ad John Crispin 2019-11-25 2033 u32 val = 0;
9f056ed8ee01ad John Crispin 2019-11-25 2034 int i;
9f056ed8ee01ad John Crispin 2019-11-25 2035
9f056ed8ee01ad John Crispin 2019-11-25 2036 if ((arg->peer_ppet.ru_bit_mask & BIT(ru)) == 0)
9f056ed8ee01ad John Crispin 2019-11-25 2037 continue;
9f056ed8ee01ad John Crispin 2019-11-25 2038 for (i = 0; i < 6; i++) {
9f056ed8ee01ad John Crispin 2019-11-25 2039 val >>= 1;
9f056ed8ee01ad John Crispin 2019-11-25 2040 val |= ((he_cap->ppe_thres[bit / 8] >>
9f056ed8ee01ad John Crispin 2019-11-25 2041 (bit % 8)) & 0x1) << 5;
9f056ed8ee01ad John Crispin 2019-11-25 2042 bit++;
9f056ed8ee01ad John Crispin 2019-11-25 2043 }
9f056ed8ee01ad John Crispin 2019-11-25 2044 arg->peer_ppet.ppet16_ppet8_ru3_ru0[nss] |=
9f056ed8ee01ad John Crispin 2019-11-25 2045 val << (ru * 6);
9f056ed8ee01ad John Crispin 2019-11-25 2046 }
9f056ed8ee01ad John Crispin 2019-11-25 2047 }
9f056ed8ee01ad John Crispin 2019-11-25 2048 }
9f056ed8ee01ad John Crispin 2019-11-25 2049
6d293d447670da John Crispin 2019-11-25 2050 if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_RES)
6d293d447670da John Crispin 2019-11-25 2051 arg->twt_responder = true;
6d293d447670da John Crispin 2019-11-25 2052 if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_REQ)
6d293d447670da John Crispin 2019-11-25 2053 arg->twt_requester = true;
6d293d447670da John Crispin 2019-11-25 2054
61fe43e7216df6 Miles Hu 2021-09-24 2055 he_nss = ath11k_mac_max_he_nss(he_mcs_mask);
61fe43e7216df6 Miles Hu 2021-09-24 2056
61fe43e7216df6 Miles Hu 2021-09-24 2057 if (he_nss > sta->rx_nss) {
61fe43e7216df6 Miles Hu 2021-09-24 2058 user_rate_valid = false;
61fe43e7216df6 Miles Hu 2021-09-24 2059 for (nss_idx = sta->rx_nss - 1; nss_idx >= 0; nss_idx--) {
61fe43e7216df6 Miles Hu 2021-09-24 2060 if (he_mcs_mask[nss_idx]) {
61fe43e7216df6 Miles Hu 2021-09-24 2061 user_rate_valid = true;
61fe43e7216df6 Miles Hu 2021-09-24 2062 break;
61fe43e7216df6 Miles Hu 2021-09-24 2063 }
61fe43e7216df6 Miles Hu 2021-09-24 2064 }
61fe43e7216df6 Miles Hu 2021-09-24 2065 }
61fe43e7216df6 Miles Hu 2021-09-24 2066
61fe43e7216df6 Miles Hu 2021-09-24 2067 if (!user_rate_valid) {
61fe43e7216df6 Miles Hu 2021-09-24 2068 ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac setting he range mcs value to peer supported nss %d for peer %pM\n",
61fe43e7216df6 Miles Hu 2021-09-24 2069 sta->rx_nss, sta->addr);
61fe43e7216df6 Miles Hu 2021-09-24 2070 he_mcs_mask[sta->rx_nss - 1] = he_mcs_mask[he_nss - 1];
61fe43e7216df6 Miles Hu 2021-09-24 2071 }
61fe43e7216df6 Miles Hu 2021-09-24 2072
9f056ed8ee01ad John Crispin 2019-11-25 2073 switch (sta->bandwidth) {
9f056ed8ee01ad John Crispin 2019-11-25 2074 case IEEE80211_STA_RX_BW_160:
9f056ed8ee01ad John Crispin 2019-11-25 2075 if (he_cap->he_cap_elem.phy_cap_info[0] &
9f056ed8ee01ad John Crispin 2019-11-25 2076 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) {
9f056ed8ee01ad John Crispin 2019-11-25 2077 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80p80);
61fe43e7216df6 Miles Hu 2021-09-24 2078 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
9f056ed8ee01ad John Crispin 2019-11-25 2079 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 2080
9f056ed8ee01ad John Crispin 2019-11-25 2081 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80p80);
9f056ed8ee01ad John Crispin 2019-11-25 2082 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 2083
9f056ed8ee01ad John Crispin 2019-11-25 2084 arg->peer_he_mcs_count++;
61fe43e7216df6 Miles Hu 2021-09-24 2085 he_tx_mcs = v;
9f056ed8ee01ad John Crispin 2019-11-25 2086 }
9f056ed8ee01ad John Crispin 2019-11-25 2087 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
9f056ed8ee01ad John Crispin 2019-11-25 2088 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin 2019-11-25 2089
9f056ed8ee01ad John Crispin 2019-11-25 2090 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_160);
61fe43e7216df6 Miles Hu 2021-09-24 2091 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
9f056ed8ee01ad John Crispin 2019-11-25 2092 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin 2019-11-25 2093
9f056ed8ee01ad John Crispin 2019-11-25 2094 arg->peer_he_mcs_count++;
61fe43e7216df6 Miles Hu 2021-09-24 2095 if (!he_tx_mcs)
61fe43e7216df6 Miles Hu 2021-09-24 2096 he_tx_mcs = v;
0b294aebb6a00b Gustavo A. R. Silva 2020-07-27 2097 fallthrough;
9f056ed8ee01ad John Crispin 2019-11-25 2098
9f056ed8ee01ad John Crispin 2019-11-25 2099 default:
9f056ed8ee01ad John Crispin 2019-11-25 2100 v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
9f056ed8ee01ad John Crispin 2019-11-25 2101 arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 2102
9f056ed8ee01ad John Crispin 2019-11-25 2103 v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80);
61fe43e7216df6 Miles Hu 2021-09-24 2104 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
9f056ed8ee01ad John Crispin 2019-11-25 2105 arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin 2019-11-25 2106
9f056ed8ee01ad John Crispin 2019-11-25 2107 arg->peer_he_mcs_count++;
61fe43e7216df6 Miles Hu 2021-09-24 2108 if (!he_tx_mcs)
61fe43e7216df6 Miles Hu 2021-09-24 2109 he_tx_mcs = v;
9f056ed8ee01ad John Crispin 2019-11-25 2110 break;
9f056ed8ee01ad John Crispin 2019-11-25 2111 }
61fe43e7216df6 Miles Hu 2021-09-24 2112
61fe43e7216df6 Miles Hu 2021-09-24 2113 /* Calculate peer NSS capability from HE capabilities if STA
61fe43e7216df6 Miles Hu 2021-09-24 2114 * supports HE.
61fe43e7216df6 Miles Hu 2021-09-24 2115 */
61fe43e7216df6 Miles Hu 2021-09-24 2116 for (i = 0, max_nss = 0, he_mcs = 0; i < NL80211_HE_NSS_MAX; i++) {
61fe43e7216df6 Miles Hu 2021-09-24 2117 he_mcs = he_tx_mcs >> (2 * i) & 3;
61fe43e7216df6 Miles Hu 2021-09-24 2118
61fe43e7216df6 Miles Hu 2021-09-24 2119 /* In case of fixed rates, MCS Range in he_tx_mcs might have
61fe43e7216df6 Miles Hu 2021-09-24 2120 * unsupported range, with he_mcs_mask set, so check either of them
61fe43e7216df6 Miles Hu 2021-09-24 2121 * to find nss.
61fe43e7216df6 Miles Hu 2021-09-24 2122 */
61fe43e7216df6 Miles Hu 2021-09-24 2123 if (he_mcs != IEEE80211_HE_MCS_NOT_SUPPORTED ||
61fe43e7216df6 Miles Hu 2021-09-24 2124 he_mcs_mask[i])
61fe43e7216df6 Miles Hu 2021-09-24 2125 max_nss = i + 1;
61fe43e7216df6 Miles Hu 2021-09-24 2126 }
61fe43e7216df6 Miles Hu 2021-09-24 2127 arg->peer_nss = min(sta->rx_nss, max_nss);
61fe43e7216df6 Miles Hu 2021-09-24 2128
f552d6fd2f27ce P Praneesh 2021-09-24 2129 if (arg->peer_phymode == MODE_11AX_HE160 ||
f552d6fd2f27ce P Praneesh 2021-09-24 2130 arg->peer_phymode == MODE_11AX_HE80_80) {
f552d6fd2f27ce P Praneesh 2021-09-24 2131 tx_nss = ath11k_get_nss_160mhz(ar, max_nss);
f552d6fd2f27ce P Praneesh 2021-09-24 2132 rx_nss = min(arg->peer_nss, tx_nss);
f552d6fd2f27ce P Praneesh 2021-09-24 2133 arg->peer_bw_rxnss_override = ATH11K_BW_NSS_MAP_ENABLE;
f552d6fd2f27ce P Praneesh 2021-09-24 2134
f552d6fd2f27ce P Praneesh 2021-09-24 2135 if (!rx_nss) {
f552d6fd2f27ce P Praneesh 2021-09-24 2136 ath11k_warn(ar->ab, "invalid max_nss\n");
f552d6fd2f27ce P Praneesh 2021-09-24 2137 return;
f552d6fd2f27ce P Praneesh 2021-09-24 2138 }
f552d6fd2f27ce P Praneesh 2021-09-24 2139
f552d6fd2f27ce P Praneesh 2021-09-24 2140 if (arg->peer_phymode == MODE_11AX_HE160)
f552d6fd2f27ce P Praneesh 2021-09-24 2141 nss_160 = FIELD_PREP(ATH11K_PEER_RX_NSS_160MHZ, rx_nss - 1);
f552d6fd2f27ce P Praneesh 2021-09-24 2142 else
f552d6fd2f27ce P Praneesh 2021-09-24 2143 nss_160 = FIELD_PREP(ATH11K_PEER_RX_NSS_80_80MHZ, rx_nss - 1);
f552d6fd2f27ce P Praneesh 2021-09-24 2144
f552d6fd2f27ce P Praneesh 2021-09-24 2145 arg->peer_bw_rxnss_override |= nss_160;
f552d6fd2f27ce P Praneesh 2021-09-24 2146 }
f552d6fd2f27ce P Praneesh 2021-09-24 2147
61fe43e7216df6 Miles Hu 2021-09-24 2148 ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
f552d6fd2f27ce P Praneesh 2021-09-24 2149 "mac he peer %pM nss %d mcs cnt %d nss_override 0x%x\n",
f552d6fd2f27ce P Praneesh 2021-09-24 2150 sta->addr, arg->peer_nss,
f552d6fd2f27ce P Praneesh 2021-09-24 2151 arg->peer_he_mcs_count,
f552d6fd2f27ce P Praneesh 2021-09-24 2152 arg->peer_bw_rxnss_override);
d5c65159f28953 Kalle Valo 2019-11-23 2153 }
d5c65159f28953 Kalle Valo 2019-11-23 2154
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2022-01-27 9:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 9:44 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-06-05 17:21 drivers/net/wireless/ath/ath11k/mac.c:1975 ath11k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80' kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202201271745.LYiGP8Sl-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.