Re: [PATCH] mac80211_hwsim: enable 6GHz channels

From: kernel test robot
Date: Sun Sep 12 2021 - 03:50:07 EST


Hi Ramon,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on mac80211/master linux/master linus/master v5.14 next-20210910]
[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]

url: https://github.com/0day-ci/linux/commits/Ramon-Fontes/mac80211_hwsim-enable-6GHz-channels/20210907-015533
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: i386-randconfig-s002-20210912 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/61f607d25097df8c64fc1a21b0375f69a1a38e94
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ramon-Fontes/mac80211_hwsim-enable-6GHz-channels/20210907-015533
git checkout 61f607d25097df8c64fc1a21b0375f69a1a38e94
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> drivers/net/wireless/mac80211_hwsim.c:3000:70: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le16 [usertype] capa @@ got int @@
drivers/net/wireless/mac80211_hwsim.c:3000:70: sparse: expected restricted __le16 [usertype] capa
drivers/net/wireless/mac80211_hwsim.c:3000:70: sparse: got int
drivers/net/wireless/mac80211_hwsim.c:3058:70: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le16 [usertype] capa @@ got int @@
drivers/net/wireless/mac80211_hwsim.c:3058:70: sparse: expected restricted __le16 [usertype] capa
drivers/net/wireless/mac80211_hwsim.c:3058:70: sparse: got int

vim +3000 drivers/net/wireless/mac80211_hwsim.c

2990
2991 static const struct ieee80211_sband_iftype_data he_capa_6ghz[] = {
2992 {
2993 /* TODO: should we support other types, e.g., P2P?*/
2994 .types_mask = BIT(NL80211_IFTYPE_STATION) |
2995 BIT(NL80211_IFTYPE_AP),
2996 .he_6ghz_capa = {
2997 .capa = IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START |
2998 IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP |
2999 IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN |
> 3000 IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS |
3001 IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS,
3002 },
3003 .he_cap = {
3004 .has_he = true,
3005 .he_cap_elem = {
3006 .mac_cap_info[0] =
3007 IEEE80211_HE_MAC_CAP0_HTC_HE,
3008 .mac_cap_info[1] =
3009 IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US |
3010 IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
3011 .mac_cap_info[2] =
3012 IEEE80211_HE_MAC_CAP2_BSR |
3013 IEEE80211_HE_MAC_CAP2_MU_CASCADING |
3014 IEEE80211_HE_MAC_CAP2_ACK_EN,
3015 .mac_cap_info[3] =
3016 IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
3017 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
3018 .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
3019 .phy_cap_info[0] =
3020 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
3021 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
3022 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G,
3023 .phy_cap_info[1] =
3024 IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
3025 IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
3026 IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |
3027 IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS,
3028 .phy_cap_info[2] =
3029 IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US |
3030 IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ |
3031 IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ |
3032 IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
3033 IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO,
3034
3035 /* Leave all the other PHY capability bytes
3036 * unset, as DCM, beam forming, RU and PPE
3037 * threshold information are not supported
3038 */
3039 },
3040 .he_mcs_nss_supp = {
3041 .rx_mcs_80 = cpu_to_le16(0xfffa),
3042 .tx_mcs_80 = cpu_to_le16(0xfffa),
3043 .rx_mcs_160 = cpu_to_le16(0xfffa),
3044 .tx_mcs_160 = cpu_to_le16(0xfffa),
3045 .rx_mcs_80p80 = cpu_to_le16(0xfffa),
3046 .tx_mcs_80p80 = cpu_to_le16(0xfffa),
3047 },
3048 },
3049 },
3050 #ifdef CONFIG_MAC80211_MESH
3051 {
3052 /* TODO: should we support other types, e.g., IBSS?*/
3053 .types_mask = BIT(NL80211_IFTYPE_MESH_POINT),
3054 .he_6ghz_capa = {
3055 .capa = IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START |
3056 IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP |
3057 IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN |
3058 IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS |
3059 IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS,
3060 },
3061 .he_cap = {
3062 .has_he = true,
3063 .he_cap_elem = {
3064 .mac_cap_info[0] =
3065 IEEE80211_HE_MAC_CAP0_HTC_HE,
3066 .mac_cap_info[1] =
3067 IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8,
3068 .mac_cap_info[2] =
3069 IEEE80211_HE_MAC_CAP2_ACK_EN,
3070 .mac_cap_info[3] =
3071 IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
3072 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
3073 .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
3074 .phy_cap_info[0] =
3075 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
3076 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
3077 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G,
3078 .phy_cap_info[1] =
3079 IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
3080 IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
3081 IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |
3082 IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS,
3083 .phy_cap_info[2] = 0,
3084
3085 /* Leave all the other PHY capability bytes
3086 * unset, as DCM, beam forming, RU and PPE
3087 * threshold information are not supported
3088 */
3089 },
3090 .he_mcs_nss_supp = {
3091 .rx_mcs_80 = cpu_to_le16(0xfffa),
3092 .tx_mcs_80 = cpu_to_le16(0xfffa),
3093 .rx_mcs_160 = cpu_to_le16(0xfffa),
3094 .tx_mcs_160 = cpu_to_le16(0xfffa),
3095 .rx_mcs_80p80 = cpu_to_le16(0xfffa),
3096 .tx_mcs_80p80 = cpu_to_le16(0xfffa),
3097 },
3098 },
3099 },
3100 #endif
3101 };
3102

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip