@@ -1845,6 +1845,7 @@ static void iwl_mvm_rx_eht(struct iwl_mvm *mvm, struct sk_buff *skb,
18451845
18461846 struct ieee80211_radiotap_eht * eht ;
18471847 struct ieee80211_radiotap_eht_usig * usig ;
1848+ size_t eht_len = sizeof (* eht );
18481849
18491850 u32 rate_n_flags = phy_data -> rate_n_flags ;
18501851 u32 he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK ;
@@ -1854,8 +1855,10 @@ static void iwl_mvm_rx_eht(struct iwl_mvm *mvm, struct sk_buff *skb,
18541855 u32 bw ;
18551856
18561857 /* u32 for 1 user_info */
1857- eht = iwl_mvm_radiotap_put_tlv (skb , IEEE80211_RADIOTAP_EHT ,
1858- sizeof (* eht ) + sizeof (u32 ));
1858+ if (phy_data -> with_data )
1859+ eht_len += sizeof (u32 );
1860+
1861+ eht = iwl_mvm_radiotap_put_tlv (skb , IEEE80211_RADIOTAP_EHT , eht_len );
18591862
18601863 usig = iwl_mvm_radiotap_put_tlv (skb , IEEE80211_RADIOTAP_EHT_USIG ,
18611864 sizeof (* usig ));
@@ -1946,27 +1949,40 @@ static void iwl_mvm_rx_eht(struct iwl_mvm *mvm, struct sk_buff *skb,
19461949 rx_status -> eht .gi ));
19471950 }
19481951
1949- eht -> user_info [0 ] |= cpu_to_le32
1950- (IEEE80211_RADIOTAP_EHT_USER_INFO_MCS_KNOWN |
1951- IEEE80211_RADIOTAP_EHT_USER_INFO_CODING_KNOWN |
1952- IEEE80211_RADIOTAP_EHT_USER_INFO_NSS_KNOWN_O |
1953- IEEE80211_RADIOTAP_EHT_USER_INFO_BEAMFORMING_KNOWN_O |
1954- IEEE80211_RADIOTAP_EHT_USER_INFO_DATA_FOR_USER );
1955-
1956- if (rate_n_flags & RATE_MCS_BF_MSK )
1957- eht -> user_info [0 ] |=
1958- cpu_to_le32 (IEEE80211_RADIOTAP_EHT_USER_INFO_BEAMFORMING_O );
19591952
1960- if (rate_n_flags & RATE_MCS_LDPC_MSK )
1953+ if (!phy_data -> with_data ) {
1954+ eht -> known |= cpu_to_le32 (IEEE80211_RADIOTAP_EHT_KNOWN_NSS_S |
1955+ IEEE80211_RADIOTAP_EHT_KNOWN_BEAMFORMED_S );
1956+ eht -> data [7 ] |=
1957+ le32_encode_bits (le32_get_bits (phy_data -> rx_vec [2 ],
1958+ RX_NO_DATA_RX_VEC2_EHT_NSTS_MSK ),
1959+ IEEE80211_RADIOTAP_EHT_DATA7_NSS_S );
1960+ if (rate_n_flags & RATE_MCS_BF_MSK )
1961+ eht -> data [7 ] |=
1962+ cpu_to_le32 (IEEE80211_RADIOTAP_EHT_DATA7_BEAMFORMED_S );
1963+ } else {
19611964 eht -> user_info [0 ] |=
1962- cpu_to_le32 (IEEE80211_RADIOTAP_EHT_USER_INFO_CODING );
1963-
1964- eht -> user_info [0 ] |= cpu_to_le32
1965- (FIELD_PREP (IEEE80211_RADIOTAP_EHT_USER_INFO_MCS ,
1966- FIELD_GET (RATE_VHT_MCS_RATE_CODE_MSK ,
1967- rate_n_flags )) |
1968- FIELD_PREP (IEEE80211_RADIOTAP_EHT_USER_INFO_NSS_O ,
1969- FIELD_GET (RATE_MCS_NSS_MSK , rate_n_flags )));
1965+ cpu_to_le32 (IEEE80211_RADIOTAP_EHT_USER_INFO_MCS_KNOWN |
1966+ IEEE80211_RADIOTAP_EHT_USER_INFO_CODING_KNOWN |
1967+ IEEE80211_RADIOTAP_EHT_USER_INFO_NSS_KNOWN_O |
1968+ IEEE80211_RADIOTAP_EHT_USER_INFO_BEAMFORMING_KNOWN_O |
1969+ IEEE80211_RADIOTAP_EHT_USER_INFO_DATA_FOR_USER );
1970+
1971+ if (rate_n_flags & RATE_MCS_BF_MSK )
1972+ eht -> user_info [0 ] |=
1973+ cpu_to_le32 (IEEE80211_RADIOTAP_EHT_USER_INFO_BEAMFORMING_O );
1974+
1975+ if (rate_n_flags & RATE_MCS_LDPC_MSK )
1976+ eht -> user_info [0 ] |=
1977+ cpu_to_le32 (IEEE80211_RADIOTAP_EHT_USER_INFO_CODING );
1978+
1979+ eht -> user_info [0 ] |= cpu_to_le32
1980+ (FIELD_PREP (IEEE80211_RADIOTAP_EHT_USER_INFO_MCS ,
1981+ FIELD_GET (RATE_VHT_MCS_RATE_CODE_MSK ,
1982+ rate_n_flags )) |
1983+ FIELD_PREP (IEEE80211_RADIOTAP_EHT_USER_INFO_NSS_O ,
1984+ FIELD_GET (RATE_MCS_NSS_MSK , rate_n_flags )));
1985+ }
19701986}
19711987
19721988static void iwl_mvm_rx_he (struct iwl_mvm * mvm , struct sk_buff * skb ,
0 commit comments