From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, Lorenzo Bianconi <lorenzo@kernel.org>,
johannes@sipsolutions.net, lkp@intel.com,
kbuild-all@lists.01.org, nbd@nbd.name,
linux-wireless@vger.kernel.org, ryder.lee@mediatek.com,
evelyn.tsai@mediatek.com, chui-hao.chiu@mediatek.com, j@w1.fi
Subject: Re: [kbuild] Re: [PATCH wireless-next] mac80211: introduce BSS color collision detection
Date: Tue, 22 Mar 2022 10:43:29 +0100 [thread overview]
Message-ID: <YjmaQeDWT2G7wHzU@lore-desk> (raw)
In-Reply-To: <202203220555.BHvsEAhe-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 4526 bytes --]
> Hi Lorenzo,
>
> url: https://github.com/0day-ci/linux/commits/Lorenzo-Bianconi/mac80211-introduce-BSS-color-collision-detection/20220321-183456
> base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
> config: nios2-randconfig-m031-20220321 (https://download.01.org/0day-ci/archive/20220322/202203220555.BHvsEAhe-lkp@intel.com/config )
> compiler: nios2-linux-gcc (GCC) 11.2.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> New smatch warnings:
> net/mac80211/rx.c:3218 ieee80211_rx_check_bss_color_collision() warn: should '(((1))) << color' be a 64 bit type?
>
> vim +3218 net/mac80211/rx.c
>
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3181 static void
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3182 ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3183 {
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3184 struct ieee80211_mgmt *mgmt = (void *)rx->skb->data;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3185 const struct element *ie;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3186 size_t baselen;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3187
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3188 if (!wiphy_ext_feature_isset(rx->local->hw.wiphy,
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3189 NL80211_EXT_FEATURE_BSS_COLOR))
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3190 return;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3191
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3192 if (wiphy_ext_feature_isset(rx->local->hw.wiphy,
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3193 NL80211_EXT_FEATURE_HW_COLOR_COLLISION))
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3194 return;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3195
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3196 baselen = mgmt->u.beacon.variable - rx->skb->data;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3197 if (baselen > rx->skb->len)
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3198 return;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3199
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3200 ie = cfg80211_find_ext_elem(WLAN_EID_EXT_HE_OPERATION,
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3201 mgmt->u.beacon.variable,
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3202 rx->skb->len - baselen);
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3203 if (ie && ie->datalen >= sizeof(struct ieee80211_he_operation) &&
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3204 ie->datalen >= ieee80211_he_oper_size(ie->data + 1)) {
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3205 struct ieee80211_bss_conf *bss_conf = &rx->sdata->vif.bss_conf;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3206 const struct ieee80211_he_operation *he_oper;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3207 u8 color;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3208
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3209 he_oper = (void *)(ie->data + 1);
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3210 if (le32_get_bits(he_oper->he_oper_params,
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3211 IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED))
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3212 return;
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3213
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3214 color = le32_get_bits(he_oper->he_oper_params,
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3215 IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
>
> IEEE80211_HE_OPERATION_BSS_COLOR_MASK gives us 63
>
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3216 if (color == bss_conf->he_bss_color.color)
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3217 ieeee80211_obss_color_collision_notify(&rx->sdata->vif,
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 @3218 BIT(color));
>
> So this should be BIT_ULL()
ack, I will fix it in v2.
Regards,
Lorenzo
>
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3219 }
> 964596b43c17b4 Lorenzo Bianconi 2022-03-21 3220 }
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
> _______________________________________________
> kbuild mailing list -- kbuild@lists.01.org
> To unsubscribe send an email to kbuild-leave@lists.01.org
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2022-03-22 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 10:33 [PATCH wireless-next] mac80211: introduce BSS color collision detection Lorenzo Bianconi
2022-03-22 6:14 ` [kbuild] " Dan Carpenter
2022-03-22 9:43 ` Lorenzo Bianconi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YjmaQeDWT2G7wHzU@lore-desk \
--to=lorenzo.bianconi@redhat.com \
--cc=chui-hao.chiu@mediatek.com \
--cc=dan.carpenter@oracle.com \
--cc=evelyn.tsai@mediatek.com \
--cc=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox