diff mbox series

[v2] iw: info: fix bug reading preamble and bandwidths

Message ID 20221220134733.2309329-1-jaewan@google.com
State Superseded
Headers show
Series [v2] iw: info: fix bug reading preamble and bandwidths | expand

Commit Message

Jaewan Kim Dec. 20, 2022, 1:47 p.m. UTC
Signed-off-by: Jaewan Kim <jaewan@google.com>
---
 info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kalle Valo Jan. 9, 2023, 2:55 p.m. UTC | #1
Jaewan Kim <jaewan@google.com> writes:

> Preambles and bandwidths values are considered as bit shifts
> when they're are used for capabilities.
>
> Signed-off-by: Jaewan Kim <jaewan@google.com>
> Reviewed-by: Kalle Valo <kvalo@kernel.org>

I didn't provide you a Reviewed-by tag[1] during my review, please don't
create such tags yourself. For example, in this case I didn't review the
patch in detail so I'm not comfortable giving you my Reviewed-by tag.

The general idea is that you only copy paste the tag when someone gives
you one, you don't create them on your own. I think Reported-by is only
exception but there might be others.

[1] https://lore.kernel.org/linux-wireless/87ili3kfdr.fsf@kernel.org/
Jaewan Kim Jan. 9, 2023, 3:12 p.m. UTC | #2
On Mon, Jan 9, 2023 at 11:55 PM Kalle Valo <kvalo@kernel.org> wrote:
>
> Jaewan Kim <jaewan@google.com> writes:
>
> > Preambles and bandwidths values are considered as bit shifts
> > when they're are used for capabilities.
> >
> > Signed-off-by: Jaewan Kim <jaewan@google.com>
> > Reviewed-by: Kalle Valo <kvalo@kernel.org>
>
> I didn't provide you a Reviewed-by tag[1] during my review, please don't
> create such tags yourself. For example, in this case I didn't review the
> patch in detail so I'm not comfortable giving you my Reviewed-by tag.
>
> The general idea is that you only copy paste the tag when someone gives
> you one, you don't create them on your own. I think Reported-by is only
> exception but there might be others.
>
> [1] https://lore.kernel.org/linux-wireless/87ili3kfdr.fsf@kernel.org/
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Sorry about the newbie mistake. Let me remove the line as you advised.
diff mbox series

Patch

diff --git info.c info.c
index eb257f8..5229d44 100644
--- info.c
+++ info.c
@@ -197,7 +197,7 @@  static void __print_ftm_capability(struct nlattr *ftm_capa)
 	if (tb[NL80211_PMSR_FTM_CAPA_ATTR_PREAMBLES]) {
 #define PRINT_PREAMBLE(P, V) \
 	do { \
-		if (P | NL80211_PREAMBLE_##V) \
+		if (P & BIT(NL80211_PREAMBLE_##V)) \
 			printf(" " #V); \
 	} while (0)
 
@@ -215,7 +215,7 @@  static void __print_ftm_capability(struct nlattr *ftm_capa)
 	if (tb[NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS]) {
 #define PRINT_BANDWIDTH(B, V) \
 	do { \
-		if (B | NL80211_CHAN_WIDTH_##V) \
+		if (B & BIT(NL80211_CHAN_WIDTH_##V)) \
 			printf(" " #V); \
 	} while (0)