[PATCH 0/3] Cleanup: Formatting iwlwifi driver
From: Juan José Arboleda <hidden>
Date: 2024-08-18 06:48:58
Subsystems: intel wireless wifi link (iwlwifi), the rest · Maintainers: Miri Korenblit, Linus Torvalds
Series: 3 patches touching 3 files, +12/-9
Status: Superseded by v2 (posted 2024-08-19). [go to v2]
Revision v1 (2 revisions archived).
6 messages, 2 authors, 2024-08-18 · open the first message on its own page
From: Juan José Arboleda <hidden>
Date: 2024-08-18 06:48:58
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
From: Juan José Arboleda <hidden>
Date: 2024-08-18 06:49:02
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 <redacted> --- 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
From: Juan José Arboleda <hidden>
Date: 2024-08-18 06:49:11
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 <redacted> --- 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
From: Juan José Arboleda <hidden>
Date: 2024-08-18 06:49:15
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 <redacted> --- 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
From: kernel test robot <hidden>
Date: 2024-08-18 16:51:14
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 [off-list ref] | 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':
quoted
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);
| ^~~~~~~~quoted
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);
| ^~~~~~~~quoted
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);
| ^~~~~~~~quoted
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);
| ^~~~~~~~quoted
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,
| ^~~~~~quoted
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,
| ^~~~~~~~~~~~~~~~~~~~~~~~~quoted
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,
| ^~~~~~~~~~~~~~~~~~~~~~~~~quoted
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,
| ^~~~~~~~~~~~~~~~~~~~~quoted
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,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~quoted
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,
| ^~~~~~~~~~~~~~quoted
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':quoted
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':quoted
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,
| ^~~~~~~~~~~~~~~~~~~quoted
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)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~quoted
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,
| ^~~~~~~~~~~~~~~~~~~~~~quoted
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2561:1: error: expected declaration or statement at end of input
2561 | }
| ^quoted
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:
quoted
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),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:
From: kernel test robot <hidden>
Date: 2024-08-18 19:14:18
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 [off-list ref] | 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:
quoted
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);
| ^quoted
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 { \
| ^quoted
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 | {
| ^quoted
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 { \
| ^quoted
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 { \
| ^quoted
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 { \
| ^quoted
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: