Message ID | 20190131202206.15903-8-luca@coelho.fi (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Luca Coelho |
Headers | show |
Series | iwlwifi: updates intended for v5.1 2019-01-31 | expand |
Luca Coelho <luca@coelho.fi> writes: > From: Johannes Berg <johannes.berg@intel.com> > > Expose the trigger-based PPDU SIG-A bandwidth to radiotap in > the newly defined bits thereof. > > Signed-off-by: Johannes Berg <johannes.berg@intel.com> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com> [...] > --- a/include/net/ieee80211_radiotap.h > +++ b/include/net/ieee80211_radiotap.h > @@ -291,6 +291,12 @@ enum ieee80211_radiotap_he_bits { > > IEEE80211_RADIOTAP_HE_DATA6_NSTS = 0x000f, > IEEE80211_RADIOTAP_HE_DATA6_DOPPLER = 0x0010, > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN = 0x0020, > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW = 0x00c0, > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_20MHZ = 0, > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_40MHZ = 1, > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_80MHZ = 2, > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_160MHZ = 3, > IEEE80211_RADIOTAP_HE_DATA6_TXOP = 0x7f00, > IEEE80211_RADIOTAP_HE_DATA6_MIDAMBLE_PDCTY = 0x8000, > }; Johannes, as you wrote the patch I take it that you are ok to push this via wireless-drivers-next?
On Wed, 2019-02-06 at 20:11 +0200, Kalle Valo wrote: > Luca Coelho <luca@coelho.fi> writes: > > > From: Johannes Berg <johannes.berg@intel.com> > > > > Expose the trigger-based PPDU SIG-A bandwidth to radiotap in > > the newly defined bits thereof. > > > > Signed-off-by: Johannes Berg <johannes.berg@intel.com> > > Signed-off-by: Luca Coelho <luciano.coelho@intel.com> > > [...] > > > --- a/include/net/ieee80211_radiotap.h > > +++ b/include/net/ieee80211_radiotap.h > > @@ -291,6 +291,12 @@ enum ieee80211_radiotap_he_bits { > > > > IEEE80211_RADIOTAP_HE_DATA6_NSTS = 0x000f, > > IEEE80211_RADIOTAP_HE_DATA6_DOPPLER = 0x0010, > > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN = 0x0020, > > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW = 0x00c0, > > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_20MHZ = 0, > > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_40MHZ = 1, > > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_80MHZ = 2, > > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_160MHZ = 3, > > IEEE80211_RADIOTAP_HE_DATA6_TXOP = 0x7f00, > > IEEE80211_RADIOTAP_HE_DATA6_MIDAMBLE_PDCTY = 0x8000, > > }; > > Johannes, as you wrote the patch I take it that you are ok to push this > via wireless-drivers-next? Oops, maybe I should've split that, but it doesn't really matter much. Sure, take it. johannes
Johannes Berg <johannes@sipsolutions.net> writes: > On Wed, 2019-02-06 at 20:11 +0200, Kalle Valo wrote: >> Luca Coelho <luca@coelho.fi> writes: >> >> > From: Johannes Berg <johannes.berg@intel.com> >> > >> > Expose the trigger-based PPDU SIG-A bandwidth to radiotap in >> > the newly defined bits thereof. >> > >> > Signed-off-by: Johannes Berg <johannes.berg@intel.com> >> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com> >> >> [...] >> >> > --- a/include/net/ieee80211_radiotap.h >> > +++ b/include/net/ieee80211_radiotap.h >> > @@ -291,6 +291,12 @@ enum ieee80211_radiotap_he_bits { >> > >> > IEEE80211_RADIOTAP_HE_DATA6_NSTS = 0x000f, >> > IEEE80211_RADIOTAP_HE_DATA6_DOPPLER = 0x0010, >> > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN = 0x0020, >> > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW = 0x00c0, >> > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_20MHZ = 0, >> > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_40MHZ = 1, >> > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_80MHZ = 2, >> > + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_160MHZ = 3, >> > IEEE80211_RADIOTAP_HE_DATA6_TXOP = 0x7f00, >> > IEEE80211_RADIOTAP_HE_DATA6_MIDAMBLE_PDCTY = 0x8000, >> > }; >> >> Johannes, as you wrote the patch I take it that you are ok to push this >> via wireless-drivers-next? > > Oops, maybe I should've split that, but it doesn't really matter much. IMHO splitting does not make any sense, we had four changes to ieee80211_radiotap.h last year so the chance of conflicts is low :) Just wanted to make sure you are ok with this. > Sure, take it. Great, thanks. I'll pull this now.
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index b5ff3325c1d3..d2728fe6a041 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -960,6 +960,7 @@ iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data, * the TSF/timers are not be transmitted in HE-MU. */ u8 ru = le32_get_bits(phy_data->d1, IWL_RX_PHY_DATA1_HE_RU_ALLOC_MASK); + u32 he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK; u8 offs = 0; rx_status->bw = RATE_INFO_BW_HE_RU; @@ -1002,19 +1003,27 @@ iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data, he->data2 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_SEC); - if (he_mu) { #define CHECK_BW(bw) \ BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_ ## bw ## MHZ != \ + RATE_MCS_CHAN_WIDTH_##bw >> RATE_MCS_CHAN_WIDTH_POS); \ + BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_ ## bw ## MHZ != \ RATE_MCS_CHAN_WIDTH_##bw >> RATE_MCS_CHAN_WIDTH_POS) - CHECK_BW(20); - CHECK_BW(40); - CHECK_BW(80); - CHECK_BW(160); + CHECK_BW(20); + CHECK_BW(40); + CHECK_BW(80); + CHECK_BW(160); + + if (he_mu) he_mu->flags2 |= le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK, rate_n_flags), IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW); - } + else if (he_type == RATE_MCS_HE_TYPE_TRIG) + he->data6 |= + cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN) | + le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK, + rate_n_flags), + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW); } static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm, diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index 8014153bdd49..38c48bb80439 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h @@ -291,6 +291,12 @@ enum ieee80211_radiotap_he_bits { IEEE80211_RADIOTAP_HE_DATA6_NSTS = 0x000f, IEEE80211_RADIOTAP_HE_DATA6_DOPPLER = 0x0010, + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN = 0x0020, + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW = 0x00c0, + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_20MHZ = 0, + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_40MHZ = 1, + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_80MHZ = 2, + IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_160MHZ = 3, IEEE80211_RADIOTAP_HE_DATA6_TXOP = 0x7f00, IEEE80211_RADIOTAP_HE_DATA6_MIDAMBLE_PDCTY = 0x8000, };