public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Cleanup: Formatting iwlwifi driver
@ 2024-08-18  6:48 Juan José Arboleda
  2024-08-18  6:48 ` [PATCH 1/3] iwlwifi: mvm: Improve code style in pointer declarations Juan José Arboleda
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Juan José Arboleda @ 2024-08-18  6:48 UTC (permalink / raw)
  To: linux-wireless, linux-kernel
  Cc: miriam.rachel.korenblit, kvalo, Juan José Arboleda

Code Style Enhancements:

* Pointer Declarations: Improved spacing consistency.

Macro Improvements:

* Enclosed multi-statement macro in a do-while loop.

Formatting Standardization:

* Replaced spaces with tabs in iwl_mvm_vendor_events_idx.

Juan José Arboleda (3):
  iwlwifi: mvm: Improve code style in pointer declarations
  iwlwifi: mvm: Enclose multi-statement macro in a do while
  iwlwifi: mvm: Replace spaces for tabs in iwl_mvm_vendor_events_idx

 drivers/net/wireless/intel/iwlwifi/mvm/power.c      |  4 ++--
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c       | 11 +++++++----
 drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c |  6 +++---
 3 files changed, 12 insertions(+), 9 deletions(-)

-- 
2.46.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] iwlwifi: mvm: Improve code style in pointer declarations
  2024-08-18  6:48 [PATCH 0/3] Cleanup: Formatting iwlwifi driver Juan José Arboleda
@ 2024-08-18  6:48 ` Juan José Arboleda
  2024-08-18  6:48 ` [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while Juan José Arboleda
  2024-08-18  6:48 ` [PATCH 3/3] iwlwifi: mvm: Replace spaces for tabs in iwl_mvm_vendor_events_idx Juan José Arboleda
  2 siblings, 0 replies; 6+ messages in thread
From: Juan José Arboleda @ 2024-08-18  6:48 UTC (permalink / raw)
  To: linux-wireless, linux-kernel
  Cc: miriam.rachel.korenblit, kvalo, Juan José Arboleda

The changes ensure that there is a space between the `u8` type and the
`*` character as preferred by the guidelines.

This change is purely stylistic and do not affect the functionality
of the code.

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/power.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c
index bc363e8427e4..a386b315e52f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c
@@ -567,7 +567,7 @@ struct iwl_power_vifs {
 	bool monitor_active;
 };
 
-static void iwl_mvm_power_disable_pm_iterator(void *_data, u8* mac,
+static void iwl_mvm_power_disable_pm_iterator(void *_data, u8 *mac,
 					      struct ieee80211_vif *vif)
 {
 	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
@@ -575,7 +575,7 @@ static void iwl_mvm_power_disable_pm_iterator(void *_data, u8* mac,
 	mvmvif->pm_enabled = false;
 }
 
-static void iwl_mvm_power_ps_disabled_iterator(void *_data, u8* mac,
+static void iwl_mvm_power_ps_disabled_iterator(void *_data, u8 *mac,
 					       struct ieee80211_vif *vif)
 {
 	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while
  2024-08-18  6:48 [PATCH 0/3] Cleanup: Formatting iwlwifi driver Juan José Arboleda
  2024-08-18  6:48 ` [PATCH 1/3] iwlwifi: mvm: Improve code style in pointer declarations Juan José Arboleda
@ 2024-08-18  6:48 ` Juan José Arboleda
  2024-08-18 16:50   ` kernel test robot
  2024-08-18 19:13   ` kernel test robot
  2024-08-18  6:48 ` [PATCH 3/3] iwlwifi: mvm: Replace spaces for tabs in iwl_mvm_vendor_events_idx Juan José Arboleda
  2 siblings, 2 replies; 6+ messages in thread
From: Juan José Arboleda @ 2024-08-18  6:48 UTC (permalink / raw)
  To: linux-wireless, linux-kernel
  Cc: miriam.rachel.korenblit, kvalo, Juan José Arboleda

This patch encloses the `CHECK_BW` macro inside a do while as
preferred by the guidelines.

This change is purely stylistic and do not affect the functionality
of the code.

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 1a210d0c22b3..b7a12c52a95d 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -1043,10 +1043,13 @@ iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data,
 			cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_SEC);
 
 #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)
+	do { \
+		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) \
+	while (0);
+
 	CHECK_BW(20);
 	CHECK_BW(40);
 	CHECK_BW(80);
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] iwlwifi: mvm: Replace spaces for tabs in iwl_mvm_vendor_events_idx
  2024-08-18  6:48 [PATCH 0/3] Cleanup: Formatting iwlwifi driver Juan José Arboleda
  2024-08-18  6:48 ` [PATCH 1/3] iwlwifi: mvm: Improve code style in pointer declarations Juan José Arboleda
  2024-08-18  6:48 ` [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while Juan José Arboleda
@ 2024-08-18  6:48 ` Juan José Arboleda
  2 siblings, 0 replies; 6+ messages in thread
From: Juan José Arboleda @ 2024-08-18  6:48 UTC (permalink / raw)
  To: linux-wireless, linux-kernel
  Cc: miriam.rachel.korenblit, kvalo, Juan José Arboleda

This patch replaces spaces with tabs in the affected source files to
adhere to the Linux kernel coding style guidelines.

This change is purely stylistic and do not affect the functionality
of the code.

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c b/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
index 080a1587caa5..0f7fa6032c66 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
@@ -104,9 +104,9 @@ static const struct wiphy_vendor_command iwl_mvm_vendor_commands[] = {
 };
 
 enum iwl_mvm_vendor_events_idx {
-        /* 0x0 - 0x3 are deprecated */
-        IWL_MVM_VENDOR_EVENT_IDX_ROAMING_FORBIDDEN = 4,
-        NUM_IWL_MVM_VENDOR_EVENT_IDX
+	/* 0x0 - 0x3 are deprecated */
+	IWL_MVM_VENDOR_EVENT_IDX_ROAMING_FORBIDDEN = 4,
+	NUM_IWL_MVM_VENDOR_EVENT_IDX
 };
 
 static const struct nl80211_vendor_cmd_info
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while
  2024-08-18  6:48 ` [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while Juan José Arboleda
@ 2024-08-18 16:50   ` kernel test robot
  2024-08-18 19:13   ` kernel test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2024-08-18 16:50 UTC (permalink / raw)
  To: Juan José Arboleda, linux-wireless, linux-kernel
  Cc: oe-kbuild-all, miriam.rachel.korenblit, kvalo,
	Juan José Arboleda

Hi Juan,

kernel test robot noticed the following build errors:

[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master v6.11-rc3 next-20240816]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Jos-Arboleda/iwlwifi-mvm-Improve-code-style-in-pointer-declarations/20240818-145152
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link:    https://lore.kernel.org/r/959e76da152811a723415545a3cf6ab1d8e17fbc.1723963126.git.soyjuanarbol%40gmail.com
patch subject: [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240819/202408190044.FGyKKgGE-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240819/202408190044.FGyKKgGE-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408190044.FGyKKgGE-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c: In function 'iwl_mvm_decode_he_phy_ru_alloc':
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1051:9: error: expected ';' before 'while'
    1051 |         while (0);
         |         ^~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1053:9: note: in expansion of macro 'CHECK_BW'
    1053 |         CHECK_BW(20);
         |         ^~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1051:9: error: expected ';' before 'while'
    1051 |         while (0);
         |         ^~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1054:9: note: in expansion of macro 'CHECK_BW'
    1054 |         CHECK_BW(40);
         |         ^~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1051:9: error: expected ';' before 'while'
    1051 |         while (0);
         |         ^~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1055:9: note: in expansion of macro 'CHECK_BW'
    1055 |         CHECK_BW(80);
         |         ^~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1051:9: error: expected ';' before 'while'
    1051 |         while (0);
         |         ^~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1056:9: note: in expansion of macro 'CHECK_BW'
    1056 |         CHECK_BW(160);
         |         ^~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1071:1: error: expected 'while' before 'static'
    1071 | static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,
         | ^~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1252:13: error: invalid storage class for function 'iwl_mvm_decode_eht_ext_mu'
    1252 | static void iwl_mvm_decode_eht_ext_mu(struct iwl_mvm *mvm,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1362:13: error: invalid storage class for function 'iwl_mvm_decode_eht_ext_tb'
    1362 | static void iwl_mvm_decode_eht_ext_tb(struct iwl_mvm *mvm,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1409:13: error: invalid storage class for function 'iwl_mvm_decode_eht_ru'
    1409 | static void iwl_mvm_decode_eht_ru(struct iwl_mvm *mvm,
         |             ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1478:13: error: invalid storage class for function 'iwl_mvm_decode_eht_phy_data'
    1478 | static void iwl_mvm_decode_eht_phy_data(struct iwl_mvm *mvm,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1595:13: error: invalid storage class for function 'iwl_mvm_rx_eht'
    1595 | static void iwl_mvm_rx_eht(struct iwl_mvm *mvm, struct sk_buff *skb,
         |             ^~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1738:13: error: invalid storage class for function 'iwl_mvm_rx_he'
    1738 | static void iwl_mvm_rx_he(struct iwl_mvm *mvm, struct sk_buff *skb,
         |             ^~~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c: In function 'iwl_mvm_rx_he':
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1784:17: error: implicit declaration of function 'iwl_mvm_decode_he_phy_data'; did you mean 'iwl_mvm_decode_eht_phy_data'? [-Werror=implicit-function-declaration]
    1784 |                 iwl_mvm_decode_he_phy_data(mvm, phy_data, he, he_mu, rx_status,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 iwl_mvm_decode_eht_phy_data
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c: In function 'iwl_mvm_decode_he_phy_ru_alloc':
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1865:13: error: invalid storage class for function 'iwl_mvm_decode_lsig'
    1865 | static void iwl_mvm_decode_lsig(struct sk_buff *skb,
         |             ^~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1901:13: error: invalid storage class for function 'iwl_mvm_rx_get_sta_block_tx'
    1901 | static void iwl_mvm_rx_get_sta_block_tx(void *data, struct ieee80211_sta *sta)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1917:13: error: invalid storage class for function 'iwl_mvm_rx_fill_status'
    1917 | static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm,
         |             ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:1: error: expected declaration or statement at end of input
    2561 | }
         | ^
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:1: error: expected declaration or statement at end of input
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:1: error: expected declaration or statement at end of input
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:1: error: expected declaration or statement at end of input
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c: At top level:
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2517:6: warning: 'iwl_mvm_rx_bar_frame_release' defined but not used [-Wunused-function]
    2517 | void iwl_mvm_rx_bar_frame_release(struct iwl_mvm *mvm, struct napi_struct *napi,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2503:6: warning: 'iwl_mvm_rx_frame_release' defined but not used [-Wunused-function]
    2503 | void iwl_mvm_rx_frame_release(struct iwl_mvm *mvm, struct napi_struct *napi,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2370:6: warning: 'iwl_mvm_rx_monitor_no_data' defined but not used [-Wunused-function]
    2370 | void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2038:6: warning: 'iwl_mvm_rx_mpdu_mq' defined but not used [-Wunused-function]
    2038 | void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
         |      ^~~~~~~~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:987:1: warning: 'iwl_mvm_decode_he_phy_ru_alloc' defined but not used [-Wunused-function]
     987 | iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:935:13: warning: 'iwl_mvm_decode_he_mu_ext' defined but not used [-Wunused-function]
     935 | static void iwl_mvm_decode_he_mu_ext(struct iwl_mvm *mvm,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +1051 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

   934	
 > 935	static void iwl_mvm_decode_he_mu_ext(struct iwl_mvm *mvm,
   936					     struct iwl_mvm_rx_phy_data *phy_data,
   937					     struct ieee80211_radiotap_he_mu *he_mu)
   938	{
   939		u32 phy_data2 = le32_to_cpu(phy_data->d2);
   940		u32 phy_data3 = le32_to_cpu(phy_data->d3);
   941		u16 phy_data4 = le16_to_cpu(phy_data->d4);
   942		u32 rate_n_flags = phy_data->rate_n_flags;
   943	
   944		if (FIELD_GET(IWL_RX_PHY_DATA4_HE_MU_EXT_CH1_CRC_OK, phy_data4)) {
   945			he_mu->flags1 |=
   946				cpu_to_le16(IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH1_RU_KNOWN |
   947					    IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH1_CTR_26T_RU_KNOWN);
   948	
   949			he_mu->flags1 |=
   950				le16_encode_bits(FIELD_GET(IWL_RX_PHY_DATA4_HE_MU_EXT_CH1_CTR_RU,
   951							   phy_data4),
   952						 IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH1_CTR_26T_RU);
   953	
   954			he_mu->ru_ch1[0] = FIELD_GET(IWL_RX_PHY_DATA2_HE_MU_EXT_CH1_RU0,
   955						     phy_data2);
   956			he_mu->ru_ch1[1] = FIELD_GET(IWL_RX_PHY_DATA3_HE_MU_EXT_CH1_RU1,
   957						     phy_data3);
   958			he_mu->ru_ch1[2] = FIELD_GET(IWL_RX_PHY_DATA2_HE_MU_EXT_CH1_RU2,
   959						     phy_data2);
   960			he_mu->ru_ch1[3] = FIELD_GET(IWL_RX_PHY_DATA3_HE_MU_EXT_CH1_RU3,
   961						     phy_data3);
   962		}
   963	
   964		if (FIELD_GET(IWL_RX_PHY_DATA4_HE_MU_EXT_CH2_CRC_OK, phy_data4) &&
   965		    (rate_n_flags & RATE_MCS_CHAN_WIDTH_MSK_V1) != RATE_MCS_CHAN_WIDTH_20) {
   966			he_mu->flags1 |=
   967				cpu_to_le16(IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH2_RU_KNOWN |
   968					    IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH2_CTR_26T_RU_KNOWN);
   969	
   970			he_mu->flags2 |=
   971				le16_encode_bits(FIELD_GET(IWL_RX_PHY_DATA4_HE_MU_EXT_CH2_CTR_RU,
   972							   phy_data4),
   973						 IEEE80211_RADIOTAP_HE_MU_FLAGS2_CH2_CTR_26T_RU);
   974	
   975			he_mu->ru_ch2[0] = FIELD_GET(IWL_RX_PHY_DATA2_HE_MU_EXT_CH2_RU0,
   976						     phy_data2);
   977			he_mu->ru_ch2[1] = FIELD_GET(IWL_RX_PHY_DATA3_HE_MU_EXT_CH2_RU1,
   978						     phy_data3);
   979			he_mu->ru_ch2[2] = FIELD_GET(IWL_RX_PHY_DATA2_HE_MU_EXT_CH2_RU2,
   980						     phy_data2);
   981			he_mu->ru_ch2[3] = FIELD_GET(IWL_RX_PHY_DATA3_HE_MU_EXT_CH2_RU3,
   982						     phy_data3);
   983		}
   984	}
   985	
   986	static void
 > 987	iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data,
   988				       struct ieee80211_radiotap_he *he,
   989				       struct ieee80211_radiotap_he_mu *he_mu,
   990				       struct ieee80211_rx_status *rx_status)
   991	{
   992		/*
   993		 * Unfortunately, we have to leave the mac80211 data
   994		 * incorrect for the case that we receive an HE-MU
   995		 * transmission and *don't* have the HE phy data (due
   996		 * to the bits being used for TSF). This shouldn't
   997		 * happen though as management frames where we need
   998		 * the TSF/timers are not be transmitted in HE-MU.
   999		 */
  1000		u8 ru = le32_get_bits(phy_data->d1, IWL_RX_PHY_DATA1_HE_RU_ALLOC_MASK);
  1001		u32 rate_n_flags = phy_data->rate_n_flags;
  1002		u32 he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK_V1;
  1003		u8 offs = 0;
  1004	
  1005		rx_status->bw = RATE_INFO_BW_HE_RU;
  1006	
  1007		he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN);
  1008	
  1009		switch (ru) {
  1010		case 0 ... 36:
  1011			rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_26;
  1012			offs = ru;
  1013			break;
  1014		case 37 ... 52:
  1015			rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_52;
  1016			offs = ru - 37;
  1017			break;
  1018		case 53 ... 60:
  1019			rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_106;
  1020			offs = ru - 53;
  1021			break;
  1022		case 61 ... 64:
  1023			rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_242;
  1024			offs = ru - 61;
  1025			break;
  1026		case 65 ... 66:
  1027			rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_484;
  1028			offs = ru - 65;
  1029			break;
  1030		case 67:
  1031			rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_996;
  1032			break;
  1033		case 68:
  1034			rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_2x996;
  1035			break;
  1036		}
  1037		he->data2 |= le16_encode_bits(offs,
  1038					      IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET);
  1039		he->data2 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_KNOWN |
  1040					 IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET_KNOWN);
  1041		if (phy_data->d1 & cpu_to_le32(IWL_RX_PHY_DATA1_HE_RU_ALLOC_SEC80))
  1042			he->data2 |=
  1043				cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_SEC);
  1044	
  1045	#define CHECK_BW(bw) \
  1046		do { \
  1047			BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_ ## bw ## MHZ != \
  1048				     RATE_MCS_CHAN_WIDTH_##bw >> RATE_MCS_CHAN_WIDTH_POS); \
  1049			BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_ ## bw ## MHZ != \
  1050				     RATE_MCS_CHAN_WIDTH_##bw >> RATE_MCS_CHAN_WIDTH_POS) \
> 1051		while (0);
  1052	
  1053		CHECK_BW(20);
  1054		CHECK_BW(40);
> 1055		CHECK_BW(80);
> 1056		CHECK_BW(160);
  1057	
  1058		if (he_mu)
  1059			he_mu->flags2 |=
  1060				le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK_V1,
  1061							   rate_n_flags),
  1062						 IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW);
  1063		else if (he_type == RATE_MCS_HE_TYPE_TRIG_V1)
  1064			he->data6 |=
  1065				cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN) |
  1066				le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK_V1,
  1067							   rate_n_flags),
  1068						 IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW);
  1069	}
  1070	
> 1071	static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,
  1072					       struct iwl_mvm_rx_phy_data *phy_data,
  1073					       struct ieee80211_radiotap_he *he,
  1074					       struct ieee80211_radiotap_he_mu *he_mu,
  1075					       struct ieee80211_rx_status *rx_status,
  1076					       int queue)
  1077	{
  1078		switch (phy_data->info_type) {
  1079		case IWL_RX_PHY_INFO_TYPE_NONE:
  1080		case IWL_RX_PHY_INFO_TYPE_CCK:
  1081		case IWL_RX_PHY_INFO_TYPE_OFDM_LGCY:
  1082		case IWL_RX_PHY_INFO_TYPE_HT:
  1083		case IWL_RX_PHY_INFO_TYPE_VHT_SU:
  1084		case IWL_RX_PHY_INFO_TYPE_VHT_MU:
  1085		case IWL_RX_PHY_INFO_TYPE_EHT_MU:
  1086		case IWL_RX_PHY_INFO_TYPE_EHT_TB:
  1087		case IWL_RX_PHY_INFO_TYPE_EHT_MU_EXT:
  1088		case IWL_RX_PHY_INFO_TYPE_EHT_TB_EXT:
  1089			return;
  1090		case IWL_RX_PHY_INFO_TYPE_HE_TB_EXT:
  1091			he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE_KNOWN |
  1092						 IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE2_KNOWN |
  1093						 IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE3_KNOWN |
  1094						 IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE4_KNOWN);
  1095			he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d2,
  1096								    IWL_RX_PHY_DATA2_HE_TB_EXT_SPTL_REUSE1),
  1097						      IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE1);
  1098			he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d2,
  1099								    IWL_RX_PHY_DATA2_HE_TB_EXT_SPTL_REUSE2),
  1100						      IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE2);
  1101			he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d2,
  1102								    IWL_RX_PHY_DATA2_HE_TB_EXT_SPTL_REUSE3),
  1103						      IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE3);
  1104			he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d2,
  1105								    IWL_RX_PHY_DATA2_HE_TB_EXT_SPTL_REUSE4),
  1106						      IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE4);
  1107			fallthrough;
  1108		case IWL_RX_PHY_INFO_TYPE_HE_SU:
  1109		case IWL_RX_PHY_INFO_TYPE_HE_MU:
  1110		case IWL_RX_PHY_INFO_TYPE_HE_MU_EXT:
  1111		case IWL_RX_PHY_INFO_TYPE_HE_TB:
  1112			/* HE common */
  1113			he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_LDPC_XSYMSEG_KNOWN |
  1114						 IEEE80211_RADIOTAP_HE_DATA1_DOPPLER_KNOWN |
  1115						 IEEE80211_RADIOTAP_HE_DATA1_BSS_COLOR_KNOWN);
  1116			he->data2 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRE_FEC_PAD_KNOWN |
  1117						 IEEE80211_RADIOTAP_HE_DATA2_PE_DISAMBIG_KNOWN |
  1118						 IEEE80211_RADIOTAP_HE_DATA2_TXOP_KNOWN |
  1119						 IEEE80211_RADIOTAP_HE_DATA2_NUM_LTF_SYMS_KNOWN);
  1120			he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1121								    IWL_RX_PHY_DATA0_HE_BSS_COLOR_MASK),
  1122						      IEEE80211_RADIOTAP_HE_DATA3_BSS_COLOR);
  1123			if (phy_data->info_type != IWL_RX_PHY_INFO_TYPE_HE_TB &&
  1124			    phy_data->info_type != IWL_RX_PHY_INFO_TYPE_HE_TB_EXT) {
  1125				he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_UL_DL_KNOWN);
  1126				he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1127								    IWL_RX_PHY_DATA0_HE_UPLINK),
  1128							      IEEE80211_RADIOTAP_HE_DATA3_UL_DL);
  1129			}
  1130			he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1131								    IWL_RX_PHY_DATA0_HE_LDPC_EXT_SYM),
  1132						      IEEE80211_RADIOTAP_HE_DATA3_LDPC_XSYMSEG);
  1133			he->data5 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1134								    IWL_RX_PHY_DATA0_HE_PRE_FEC_PAD_MASK),
  1135						      IEEE80211_RADIOTAP_HE_DATA5_PRE_FEC_PAD);
  1136			he->data5 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1137								    IWL_RX_PHY_DATA0_HE_PE_DISAMBIG),
  1138						      IEEE80211_RADIOTAP_HE_DATA5_PE_DISAMBIG);
  1139			he->data5 |= le16_encode_bits(le32_get_bits(phy_data->d1,
  1140								    IWL_RX_PHY_DATA1_HE_LTF_NUM_MASK),
  1141						      IEEE80211_RADIOTAP_HE_DATA5_NUM_LTF_SYMS);
  1142			he->data6 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1143								    IWL_RX_PHY_DATA0_HE_TXOP_DUR_MASK),
  1144						      IEEE80211_RADIOTAP_HE_DATA6_TXOP);
  1145			he->data6 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1146								    IWL_RX_PHY_DATA0_HE_DOPPLER),
  1147						      IEEE80211_RADIOTAP_HE_DATA6_DOPPLER);
  1148			break;
  1149		}
  1150	
  1151		switch (phy_data->info_type) {
  1152		case IWL_RX_PHY_INFO_TYPE_HE_MU_EXT:
  1153		case IWL_RX_PHY_INFO_TYPE_HE_MU:
  1154		case IWL_RX_PHY_INFO_TYPE_HE_SU:
  1155			he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE_KNOWN);
  1156			he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1157								    IWL_RX_PHY_DATA0_HE_SPATIAL_REUSE_MASK),
  1158						      IEEE80211_RADIOTAP_HE_DATA4_SU_MU_SPTL_REUSE);
  1159			break;
  1160		default:
  1161			/* nothing here */
  1162			break;
  1163		}
  1164	
  1165		switch (phy_data->info_type) {
  1166		case IWL_RX_PHY_INFO_TYPE_HE_MU_EXT:
  1167			he_mu->flags1 |=
  1168				le16_encode_bits(le16_get_bits(phy_data->d4,
  1169							       IWL_RX_PHY_DATA4_HE_MU_EXT_SIGB_DCM),
  1170						 IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM);
  1171			he_mu->flags1 |=
  1172				le16_encode_bits(le16_get_bits(phy_data->d4,
  1173							       IWL_RX_PHY_DATA4_HE_MU_EXT_SIGB_MCS_MASK),
  1174						 IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS);
  1175			he_mu->flags2 |=
  1176				le16_encode_bits(le16_get_bits(phy_data->d4,
  1177							       IWL_RX_PHY_DATA4_HE_MU_EXT_PREAMBLE_PUNC_TYPE_MASK),
  1178						 IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW);
  1179			iwl_mvm_decode_he_mu_ext(mvm, phy_data, he_mu);
  1180			fallthrough;
  1181		case IWL_RX_PHY_INFO_TYPE_HE_MU:
  1182			he_mu->flags2 |=
  1183				le16_encode_bits(le32_get_bits(phy_data->d1,
  1184							       IWL_RX_PHY_DATA1_HE_MU_SIBG_SYM_OR_USER_NUM_MASK),
  1185						 IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_SYMS_USERS);
  1186			he_mu->flags2 |=
  1187				le16_encode_bits(le32_get_bits(phy_data->d1,
  1188							       IWL_RX_PHY_DATA1_HE_MU_SIGB_COMPRESSION),
  1189						 IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_COMP);
  1190			fallthrough;
  1191		case IWL_RX_PHY_INFO_TYPE_HE_TB:
  1192		case IWL_RX_PHY_INFO_TYPE_HE_TB_EXT:
  1193			iwl_mvm_decode_he_phy_ru_alloc(phy_data, he, he_mu, rx_status);
  1194			break;
  1195		case IWL_RX_PHY_INFO_TYPE_HE_SU:
  1196			he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_BEAM_CHANGE_KNOWN);
  1197			he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
  1198								    IWL_RX_PHY_DATA0_HE_BEAM_CHNG),
  1199						      IEEE80211_RADIOTAP_HE_DATA3_BEAM_CHANGE);
  1200			break;
  1201		default:
  1202			/* nothing */
  1203			break;
  1204		}
  1205	}
  1206	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while
  2024-08-18  6:48 ` [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while Juan José Arboleda
  2024-08-18 16:50   ` kernel test robot
@ 2024-08-18 19:13   ` kernel test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2024-08-18 19:13 UTC (permalink / raw)
  To: Juan José Arboleda, linux-wireless, linux-kernel
  Cc: llvm, oe-kbuild-all, miriam.rachel.korenblit, kvalo,
	Juan José Arboleda

Hi Juan,

kernel test robot noticed the following build errors:

[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master v6.11-rc3 next-20240816]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Jos-Arboleda/iwlwifi-mvm-Improve-code-style-in-pointer-declarations/20240818-145152
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link:    https://lore.kernel.org/r/959e76da152811a723415545a3cf6ab1d8e17fbc.1723963126.git.soyjuanarbol%40gmail.com
patch subject: [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20240819/202408190201.maHKSVvI-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 26670e7fa4f032a019d23d56c6a02926e854e8af)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240819/202408190201.maHKSVvI-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408190201.maHKSVvI-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:7:
   In file included from include/linux/etherdevice.h:20:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/um/include/asm/cacheflush.h:4:
   In file included from arch/um/include/asm/tlbflush.h:9:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:7:
   In file included from include/linux/etherdevice.h:20:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     548 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     561 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:7:
   In file included from include/linux/etherdevice.h:20:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     574 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:7:
   In file included from include/linux/etherdevice.h:20:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     585 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     595 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     605 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:693:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     693 |         readsb(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:701:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     701 |         readsw(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:709:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     709 |         readsl(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:718:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     718 |         writesb(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:727:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     727 |         writesw(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:736:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     736 |         writesl(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1053:2: error: expected ';' after do/while statement
    1053 |         CHECK_BW(20);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1051:2: note: expanded from macro 'CHECK_BW'
    1051 |         while (0);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1054:2: error: expected ';' after do/while statement
    1054 |         CHECK_BW(40);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1051:2: note: expanded from macro 'CHECK_BW'
    1051 |         while (0);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1055:2: error: expected ';' after do/while statement
    1055 |         CHECK_BW(80);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1051:2: note: expanded from macro 'CHECK_BW'
    1051 |         while (0);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1056:2: error: expected ';' after do/while statement
    1056 |         CHECK_BW(160);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1051:2: note: expanded from macro 'CHECK_BW'
    1051 |         while (0);
         |         ^
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1071:1: error: expected 'while' in do/while loop
    1071 | static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,
         | ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1056:2: note: to match this 'do'
    1056 |         CHECK_BW(160);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1046:2: note: expanded from macro 'CHECK_BW'
    1046 |         do { \
         |         ^
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1902:1: error: function definition is not allowed here
    1902 | {
         | ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1921:1: error: function definition is not allowed here
    1921 | {
         | ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2040:1: error: function definition is not allowed here
    2040 | {
         | ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2372:1: error: function definition is not allowed here
    2372 | {
         | ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2505:1: error: function definition is not allowed here
    2505 | {
         | ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2519:1: error: function definition is not allowed here
    2519 | {
         | ^
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:2: error: expected '}'
    2561 | }
         |  ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1055:2: note: to match this '{'
    1055 |         CHECK_BW(80);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1046:5: note: expanded from macro 'CHECK_BW'
    1046 |         do { \
         |            ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:2: error: expected 'while' in do/while loop
    2561 | }
         |  ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1055:2: note: to match this 'do'
    1055 |         CHECK_BW(80);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1046:2: note: expanded from macro 'CHECK_BW'
    1046 |         do { \
         |         ^
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:2: error: expected '}'
    2561 | }
         |  ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1054:2: note: to match this '{'
    1054 |         CHECK_BW(40);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1046:5: note: expanded from macro 'CHECK_BW'
    1046 |         do { \
         |            ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:2: error: expected 'while' in do/while loop
    2561 | }
         |  ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1054:2: note: to match this 'do'
    1054 |         CHECK_BW(40);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1046:2: note: expanded from macro 'CHECK_BW'
    1046 |         do { \
         |         ^
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:2: error: expected '}'
    2561 | }
         |  ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1053:2: note: to match this '{'
    1053 |         CHECK_BW(20);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1046:5: note: expanded from macro 'CHECK_BW'
    1046 |         do { \
         |            ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:2: error: expected 'while' in do/while loop
    2561 | }
         |  ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1053:2: note: to match this 'do'
    1053 |         CHECK_BW(20);
         |         ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1046:2: note: expanded from macro 'CHECK_BW'
    1046 |         do { \
         |         ^
>> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:2: error: expected '}'
    2561 | }
         |  ^
   drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:991:1: note: to match this '{'
     991 | {
         | ^
   13 warnings and 18 errors generated.


vim +1053 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

dabf9844385885 Johannes Berg       2018-04-26   985  
ffe9d734b8b556 Johannes Berg       2018-06-14   986  static void
bdf180c8d375ee Shaul Triebitz      2018-07-02   987  iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data,
ffe9d734b8b556 Johannes Berg       2018-06-14   988  			       struct ieee80211_radiotap_he *he,
ffe9d734b8b556 Johannes Berg       2018-06-14   989  			       struct ieee80211_radiotap_he_mu *he_mu,
ffe9d734b8b556 Johannes Berg       2018-06-14   990  			       struct ieee80211_rx_status *rx_status)
ffe9d734b8b556 Johannes Berg       2018-06-14   991  {
ffe9d734b8b556 Johannes Berg       2018-06-14   992  	/*
ffe9d734b8b556 Johannes Berg       2018-06-14   993  	 * Unfortunately, we have to leave the mac80211 data
ffe9d734b8b556 Johannes Berg       2018-06-14   994  	 * incorrect for the case that we receive an HE-MU
ffe9d734b8b556 Johannes Berg       2018-06-14   995  	 * transmission and *don't* have the HE phy data (due
ffe9d734b8b556 Johannes Berg       2018-06-14   996  	 * to the bits being used for TSF). This shouldn't
ffe9d734b8b556 Johannes Berg       2018-06-14   997  	 * happen though as management frames where we need
ffe9d734b8b556 Johannes Berg       2018-06-14   998  	 * the TSF/timers are not be transmitted in HE-MU.
ffe9d734b8b556 Johannes Berg       2018-06-14   999  	 */
bdf180c8d375ee Shaul Triebitz      2018-07-02  1000  	u8 ru = le32_get_bits(phy_data->d1, IWL_RX_PHY_DATA1_HE_RU_ALLOC_MASK);
f1490546bec933 Johannes Berg       2022-09-06  1001  	u32 rate_n_flags = phy_data->rate_n_flags;
48c6ebc13c1ce1 Miri Korenblit      2021-10-17  1002  	u32 he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK_V1;
ffe9d734b8b556 Johannes Berg       2018-06-14  1003  	u8 offs = 0;
ffe9d734b8b556 Johannes Berg       2018-06-14  1004  
ffe9d734b8b556 Johannes Berg       2018-06-14  1005  	rx_status->bw = RATE_INFO_BW_HE_RU;
ffe9d734b8b556 Johannes Berg       2018-06-14  1006  
ffe9d734b8b556 Johannes Berg       2018-06-14  1007  	he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN);
ffe9d734b8b556 Johannes Berg       2018-06-14  1008  
ffe9d734b8b556 Johannes Berg       2018-06-14  1009  	switch (ru) {
ffe9d734b8b556 Johannes Berg       2018-06-14  1010  	case 0 ... 36:
ffe9d734b8b556 Johannes Berg       2018-06-14  1011  		rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_26;
ffe9d734b8b556 Johannes Berg       2018-06-14  1012  		offs = ru;
ffe9d734b8b556 Johannes Berg       2018-06-14  1013  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1014  	case 37 ... 52:
ffe9d734b8b556 Johannes Berg       2018-06-14  1015  		rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_52;
ffe9d734b8b556 Johannes Berg       2018-06-14  1016  		offs = ru - 37;
ffe9d734b8b556 Johannes Berg       2018-06-14  1017  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1018  	case 53 ... 60:
ffe9d734b8b556 Johannes Berg       2018-06-14  1019  		rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_106;
ffe9d734b8b556 Johannes Berg       2018-06-14  1020  		offs = ru - 53;
ffe9d734b8b556 Johannes Berg       2018-06-14  1021  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1022  	case 61 ... 64:
ffe9d734b8b556 Johannes Berg       2018-06-14  1023  		rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_242;
ffe9d734b8b556 Johannes Berg       2018-06-14  1024  		offs = ru - 61;
ffe9d734b8b556 Johannes Berg       2018-06-14  1025  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1026  	case 65 ... 66:
ffe9d734b8b556 Johannes Berg       2018-06-14  1027  		rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_484;
ffe9d734b8b556 Johannes Berg       2018-06-14  1028  		offs = ru - 65;
ffe9d734b8b556 Johannes Berg       2018-06-14  1029  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1030  	case 67:
ffe9d734b8b556 Johannes Berg       2018-06-14  1031  		rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_996;
ffe9d734b8b556 Johannes Berg       2018-06-14  1032  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1033  	case 68:
ffe9d734b8b556 Johannes Berg       2018-06-14  1034  		rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_2x996;
ffe9d734b8b556 Johannes Berg       2018-06-14  1035  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1036  	}
ffe9d734b8b556 Johannes Berg       2018-06-14  1037  	he->data2 |= le16_encode_bits(offs,
ffe9d734b8b556 Johannes Berg       2018-06-14  1038  				      IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET);
ffe9d734b8b556 Johannes Berg       2018-06-14  1039  	he->data2 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_KNOWN |
ffe9d734b8b556 Johannes Berg       2018-06-14  1040  				 IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET_KNOWN);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1041  	if (phy_data->d1 & cpu_to_le32(IWL_RX_PHY_DATA1_HE_RU_ALLOC_SEC80))
ffe9d734b8b556 Johannes Berg       2018-06-14  1042  		he->data2 |=
ffe9d734b8b556 Johannes Berg       2018-06-14  1043  			cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_SEC);
ffe9d734b8b556 Johannes Berg       2018-06-14  1044  
ffe9d734b8b556 Johannes Berg       2018-06-14  1045  #define CHECK_BW(bw) \
ff8cfabb6d457b Juan José Arboleda  2024-08-18  1046  	do { \
ffe9d734b8b556 Johannes Berg       2018-06-14  1047  		BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_ ## bw ## MHZ != \
74cf15cb69c0be Johannes Berg       2018-12-03  1048  			     RATE_MCS_CHAN_WIDTH_##bw >> RATE_MCS_CHAN_WIDTH_POS); \
74cf15cb69c0be Johannes Berg       2018-12-03  1049  		BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_ ## bw ## MHZ != \
ff8cfabb6d457b Juan José Arboleda  2024-08-18  1050  			     RATE_MCS_CHAN_WIDTH_##bw >> RATE_MCS_CHAN_WIDTH_POS) \
ff8cfabb6d457b Juan José Arboleda  2024-08-18  1051  	while (0);
ff8cfabb6d457b Juan José Arboleda  2024-08-18  1052  
ffe9d734b8b556 Johannes Berg       2018-06-14 @1053  	CHECK_BW(20);
ffe9d734b8b556 Johannes Berg       2018-06-14  1054  	CHECK_BW(40);
ffe9d734b8b556 Johannes Berg       2018-06-14  1055  	CHECK_BW(80);
ffe9d734b8b556 Johannes Berg       2018-06-14  1056  	CHECK_BW(160);
74cf15cb69c0be Johannes Berg       2018-12-03  1057  
74cf15cb69c0be Johannes Berg       2018-12-03  1058  	if (he_mu)
ffe9d734b8b556 Johannes Berg       2018-06-14  1059  		he_mu->flags2 |=
48c6ebc13c1ce1 Miri Korenblit      2021-10-17  1060  			le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK_V1,
ffe9d734b8b556 Johannes Berg       2018-06-14  1061  						   rate_n_flags),
ffe9d734b8b556 Johannes Berg       2018-06-14  1062  					 IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW);
48c6ebc13c1ce1 Miri Korenblit      2021-10-17  1063  	else if (he_type == RATE_MCS_HE_TYPE_TRIG_V1)
74cf15cb69c0be Johannes Berg       2018-12-03  1064  		he->data6 |=
74cf15cb69c0be Johannes Berg       2018-12-03  1065  			cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN) |
48c6ebc13c1ce1 Miri Korenblit      2021-10-17  1066  			le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK_V1,
74cf15cb69c0be Johannes Berg       2018-12-03  1067  						   rate_n_flags),
74cf15cb69c0be Johannes Berg       2018-12-03  1068  					 IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW);
ffe9d734b8b556 Johannes Berg       2018-06-14  1069  }
ffe9d734b8b556 Johannes Berg       2018-06-14  1070  
59b8cf0cfb5ac5 Johannes Berg       2018-06-14 @1071  static void iwl_mvm_decode_he_phy_data(struct iwl_mvm *mvm,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1072  				       struct iwl_mvm_rx_phy_data *phy_data,
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1073  				       struct ieee80211_radiotap_he *he,
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1074  				       struct ieee80211_radiotap_he_mu *he_mu,
ffe9d734b8b556 Johannes Berg       2018-06-14  1075  				       struct ieee80211_rx_status *rx_status,
f1490546bec933 Johannes Berg       2022-09-06  1076  				       int queue)
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1077  {
6721039d5b8adf Shaul Triebitz      2018-07-02  1078  	switch (phy_data->info_type) {
bdf180c8d375ee Shaul Triebitz      2018-07-02  1079  	case IWL_RX_PHY_INFO_TYPE_NONE:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1080  	case IWL_RX_PHY_INFO_TYPE_CCK:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1081  	case IWL_RX_PHY_INFO_TYPE_OFDM_LGCY:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1082  	case IWL_RX_PHY_INFO_TYPE_HT:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1083  	case IWL_RX_PHY_INFO_TYPE_VHT_SU:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1084  	case IWL_RX_PHY_INFO_TYPE_VHT_MU:
0ac93c06dca70f Mordechay Goodstein 2023-01-27  1085  	case IWL_RX_PHY_INFO_TYPE_EHT_MU:
0ac93c06dca70f Mordechay Goodstein 2023-01-27  1086  	case IWL_RX_PHY_INFO_TYPE_EHT_TB:
0ac93c06dca70f Mordechay Goodstein 2023-01-27  1087  	case IWL_RX_PHY_INFO_TYPE_EHT_MU_EXT:
0ac93c06dca70f Mordechay Goodstein 2023-01-27  1088  	case IWL_RX_PHY_INFO_TYPE_EHT_TB_EXT:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1089  		return;
bdf180c8d375ee Shaul Triebitz      2018-07-02  1090  	case IWL_RX_PHY_INFO_TYPE_HE_TB_EXT:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1091  		he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE_KNOWN |
bdf180c8d375ee Shaul Triebitz      2018-07-02  1092  					 IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE2_KNOWN |
bdf180c8d375ee Shaul Triebitz      2018-07-02  1093  					 IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE3_KNOWN |
bdf180c8d375ee Shaul Triebitz      2018-07-02  1094  					 IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE4_KNOWN);
a197e6d10ce26b Emmanuel Grumbach   2019-01-16  1095  		he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d2,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1096  							    IWL_RX_PHY_DATA2_HE_TB_EXT_SPTL_REUSE1),
bdf180c8d375ee Shaul Triebitz      2018-07-02  1097  					      IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE1);
a197e6d10ce26b Emmanuel Grumbach   2019-01-16  1098  		he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d2,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1099  							    IWL_RX_PHY_DATA2_HE_TB_EXT_SPTL_REUSE2),
bdf180c8d375ee Shaul Triebitz      2018-07-02  1100  					      IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE2);
a197e6d10ce26b Emmanuel Grumbach   2019-01-16  1101  		he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d2,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1102  							    IWL_RX_PHY_DATA2_HE_TB_EXT_SPTL_REUSE3),
bdf180c8d375ee Shaul Triebitz      2018-07-02  1103  					      IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE3);
a197e6d10ce26b Emmanuel Grumbach   2019-01-16  1104  		he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d2,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1105  							    IWL_RX_PHY_DATA2_HE_TB_EXT_SPTL_REUSE4),
bdf180c8d375ee Shaul Triebitz      2018-07-02  1106  					      IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE4);
5a2abdcadc3bd7 Gustavo A. R. Silva 2020-11-17  1107  		fallthrough;
bdf180c8d375ee Shaul Triebitz      2018-07-02  1108  	case IWL_RX_PHY_INFO_TYPE_HE_SU:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1109  	case IWL_RX_PHY_INFO_TYPE_HE_MU:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1110  	case IWL_RX_PHY_INFO_TYPE_HE_MU_EXT:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1111  	case IWL_RX_PHY_INFO_TYPE_HE_TB:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1112  		/* HE common */
bdf180c8d375ee Shaul Triebitz      2018-07-02  1113  		he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_LDPC_XSYMSEG_KNOWN |
69f3ca8ed33dd3 Johannes Berg       2018-06-19  1114  					 IEEE80211_RADIOTAP_HE_DATA1_DOPPLER_KNOWN |
bdf180c8d375ee Shaul Triebitz      2018-07-02  1115  					 IEEE80211_RADIOTAP_HE_DATA1_BSS_COLOR_KNOWN);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1116  		he->data2 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRE_FEC_PAD_KNOWN |
69f3ca8ed33dd3 Johannes Berg       2018-06-19  1117  					 IEEE80211_RADIOTAP_HE_DATA2_PE_DISAMBIG_KNOWN |
bdf180c8d375ee Shaul Triebitz      2018-07-02  1118  					 IEEE80211_RADIOTAP_HE_DATA2_TXOP_KNOWN |
bdf180c8d375ee Shaul Triebitz      2018-07-02  1119  					 IEEE80211_RADIOTAP_HE_DATA2_NUM_LTF_SYMS_KNOWN);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1120  		he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1121  							    IWL_RX_PHY_DATA0_HE_BSS_COLOR_MASK),
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1122  					      IEEE80211_RADIOTAP_HE_DATA3_BSS_COLOR);
7969454b37f25d Shaul Triebitz      2018-07-25  1123  		if (phy_data->info_type != IWL_RX_PHY_INFO_TYPE_HE_TB &&
7969454b37f25d Shaul Triebitz      2018-07-25  1124  		    phy_data->info_type != IWL_RX_PHY_INFO_TYPE_HE_TB_EXT) {
7969454b37f25d Shaul Triebitz      2018-07-25  1125  			he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_UL_DL_KNOWN);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1126  			he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1127  							    IWL_RX_PHY_DATA0_HE_UPLINK),
69f3ca8ed33dd3 Johannes Berg       2018-06-19  1128  						      IEEE80211_RADIOTAP_HE_DATA3_UL_DL);
7969454b37f25d Shaul Triebitz      2018-07-25  1129  		}
bdf180c8d375ee Shaul Triebitz      2018-07-02  1130  		he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1131  							    IWL_RX_PHY_DATA0_HE_LDPC_EXT_SYM),
69f3ca8ed33dd3 Johannes Berg       2018-06-19  1132  					      IEEE80211_RADIOTAP_HE_DATA3_LDPC_XSYMSEG);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1133  		he->data5 |= le16_encode_bits(le32_get_bits(phy_data->d0,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1134  							    IWL_RX_PHY_DATA0_HE_PRE_FEC_PAD_MASK),
69f3ca8ed33dd3 Johannes Berg       2018-06-19  1135  					      IEEE80211_RADIOTAP_HE_DATA5_PRE_FEC_PAD);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1136  		he->data5 |= le16_encode_bits(le32_get_bits(phy_data->d0,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1137  							    IWL_RX_PHY_DATA0_HE_PE_DISAMBIG),
69f3ca8ed33dd3 Johannes Berg       2018-06-19  1138  					      IEEE80211_RADIOTAP_HE_DATA5_PE_DISAMBIG);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1139  		he->data5 |= le16_encode_bits(le32_get_bits(phy_data->d1,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1140  							    IWL_RX_PHY_DATA1_HE_LTF_NUM_MASK),
bdf180c8d375ee Shaul Triebitz      2018-07-02  1141  					      IEEE80211_RADIOTAP_HE_DATA5_NUM_LTF_SYMS);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1142  		he->data6 |= le16_encode_bits(le32_get_bits(phy_data->d0,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1143  							    IWL_RX_PHY_DATA0_HE_TXOP_DUR_MASK),
2b1476345fb6c8 Johannes Berg       2018-06-14  1144  					      IEEE80211_RADIOTAP_HE_DATA6_TXOP);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1145  		he->data6 |= le16_encode_bits(le32_get_bits(phy_data->d0,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1146  							    IWL_RX_PHY_DATA0_HE_DOPPLER),
69f3ca8ed33dd3 Johannes Berg       2018-06-19  1147  					      IEEE80211_RADIOTAP_HE_DATA6_DOPPLER);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1148  		break;
bdf180c8d375ee Shaul Triebitz      2018-07-02  1149  	}
2b1476345fb6c8 Johannes Berg       2018-06-14  1150  
2286a99c32344c Johannes Berg       2019-01-11  1151  	switch (phy_data->info_type) {
2286a99c32344c Johannes Berg       2019-01-11  1152  	case IWL_RX_PHY_INFO_TYPE_HE_MU_EXT:
2286a99c32344c Johannes Berg       2019-01-11  1153  	case IWL_RX_PHY_INFO_TYPE_HE_MU:
2286a99c32344c Johannes Berg       2019-01-11  1154  	case IWL_RX_PHY_INFO_TYPE_HE_SU:
2286a99c32344c Johannes Berg       2019-01-11  1155  		he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE_KNOWN);
2286a99c32344c Johannes Berg       2019-01-11  1156  		he->data4 |= le16_encode_bits(le32_get_bits(phy_data->d0,
2286a99c32344c Johannes Berg       2019-01-11  1157  							    IWL_RX_PHY_DATA0_HE_SPATIAL_REUSE_MASK),
2286a99c32344c Johannes Berg       2019-01-11  1158  					      IEEE80211_RADIOTAP_HE_DATA4_SU_MU_SPTL_REUSE);
2286a99c32344c Johannes Berg       2019-01-11  1159  		break;
2286a99c32344c Johannes Berg       2019-01-11  1160  	default:
2286a99c32344c Johannes Berg       2019-01-11  1161  		/* nothing here */
2286a99c32344c Johannes Berg       2019-01-11  1162  		break;
2286a99c32344c Johannes Berg       2019-01-11  1163  	}
2286a99c32344c Johannes Berg       2019-01-11  1164  
6721039d5b8adf Shaul Triebitz      2018-07-02  1165  	switch (phy_data->info_type) {
bdf180c8d375ee Shaul Triebitz      2018-07-02  1166  	case IWL_RX_PHY_INFO_TYPE_HE_MU_EXT:
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1167  		he_mu->flags1 |=
bdf180c8d375ee Shaul Triebitz      2018-07-02  1168  			le16_encode_bits(le16_get_bits(phy_data->d4,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1169  						       IWL_RX_PHY_DATA4_HE_MU_EXT_SIGB_DCM),
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1170  					 IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM);
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1171  		he_mu->flags1 |=
bdf180c8d375ee Shaul Triebitz      2018-07-02  1172  			le16_encode_bits(le16_get_bits(phy_data->d4,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1173  						       IWL_RX_PHY_DATA4_HE_MU_EXT_SIGB_MCS_MASK),
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1174  					 IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS);
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1175  		he_mu->flags2 |=
bdf180c8d375ee Shaul Triebitz      2018-07-02  1176  			le16_encode_bits(le16_get_bits(phy_data->d4,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1177  						       IWL_RX_PHY_DATA4_HE_MU_EXT_PREAMBLE_PUNC_TYPE_MASK),
bdf180c8d375ee Shaul Triebitz      2018-07-02  1178  					 IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW);
f1490546bec933 Johannes Berg       2022-09-06  1179  		iwl_mvm_decode_he_mu_ext(mvm, phy_data, he_mu);
5a2abdcadc3bd7 Gustavo A. R. Silva 2020-11-17  1180  		fallthrough;
bdf180c8d375ee Shaul Triebitz      2018-07-02  1181  	case IWL_RX_PHY_INFO_TYPE_HE_MU:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1182  		he_mu->flags2 |=
bdf180c8d375ee Shaul Triebitz      2018-07-02  1183  			le16_encode_bits(le32_get_bits(phy_data->d1,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1184  						       IWL_RX_PHY_DATA1_HE_MU_SIBG_SYM_OR_USER_NUM_MASK),
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1185  					 IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_SYMS_USERS);
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1186  		he_mu->flags2 |=
bdf180c8d375ee Shaul Triebitz      2018-07-02  1187  			le16_encode_bits(le32_get_bits(phy_data->d1,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1188  						       IWL_RX_PHY_DATA1_HE_MU_SIGB_COMPRESSION),
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1189  					 IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_COMP);
5a2abdcadc3bd7 Gustavo A. R. Silva 2020-11-17  1190  		fallthrough;
bdf180c8d375ee Shaul Triebitz      2018-07-02  1191  	case IWL_RX_PHY_INFO_TYPE_HE_TB:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1192  	case IWL_RX_PHY_INFO_TYPE_HE_TB_EXT:
f1490546bec933 Johannes Berg       2022-09-06  1193  		iwl_mvm_decode_he_phy_ru_alloc(phy_data, he, he_mu, rx_status);
fed3c4ea6f8f12 Johannes Berg       2018-06-14  1194  		break;
bdf180c8d375ee Shaul Triebitz      2018-07-02  1195  	case IWL_RX_PHY_INFO_TYPE_HE_SU:
bdf180c8d375ee Shaul Triebitz      2018-07-02  1196  		he->data1 |= cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_BEAM_CHANGE_KNOWN);
bdf180c8d375ee Shaul Triebitz      2018-07-02  1197  		he->data3 |= le16_encode_bits(le32_get_bits(phy_data->d0,
bdf180c8d375ee Shaul Triebitz      2018-07-02  1198  							    IWL_RX_PHY_DATA0_HE_BEAM_CHNG),
fed3c4ea6f8f12 Johannes Berg       2018-06-14  1199  					      IEEE80211_RADIOTAP_HE_DATA3_BEAM_CHANGE);
fed3c4ea6f8f12 Johannes Berg       2018-06-14  1200  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1201  	default:
ffe9d734b8b556 Johannes Berg       2018-06-14  1202  		/* nothing */
ffe9d734b8b556 Johannes Berg       2018-06-14  1203  		break;
ffe9d734b8b556 Johannes Berg       2018-06-14  1204  	}
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1205  }
59b8cf0cfb5ac5 Johannes Berg       2018-06-14  1206  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-18 19:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-18  6:48 [PATCH 0/3] Cleanup: Formatting iwlwifi driver Juan José Arboleda
2024-08-18  6:48 ` [PATCH 1/3] iwlwifi: mvm: Improve code style in pointer declarations Juan José Arboleda
2024-08-18  6:48 ` [PATCH 2/3] iwlwifi: mvm: Enclose multi-statement macro in a do while Juan José Arboleda
2024-08-18 16:50   ` kernel test robot
2024-08-18 19:13   ` kernel test robot
2024-08-18  6:48 ` [PATCH 3/3] iwlwifi: mvm: Replace spaces for tabs in iwl_mvm_vendor_events_idx Juan José Arboleda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox