All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iw: info: fix bug reading preamble and bandwidths
@ 2022-12-20 13:42 Jaewan Kim
  2022-12-20 13:47 ` [PATCH v2] " Jaewan Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Jaewan Kim @ 2022-12-20 13:42 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Jaewan Kim

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

diff --git info.c info.c
index eb257f8..98461a4 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)
 
-- 
2.39.0.314.g84b9a713c41-goog


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

* [PATCH v2] iw: info: fix bug reading preamble and bandwidths
  2022-12-20 13:42 [PATCH] iw: info: fix bug reading preamble and bandwidths Jaewan Kim
@ 2022-12-20 13:47 ` Jaewan Kim
  2022-12-22  8:32   ` Kalle Valo
  2022-12-27  1:00   ` [PATCH v3] iw: info: fix bug reading preambles " Jaewan Kim
  0 siblings, 2 replies; 7+ messages in thread
From: Jaewan Kim @ 2022-12-20 13:47 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Jaewan Kim

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

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)
 
-- 
2.39.0.314.g84b9a713c41-goog


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

* Re: [PATCH v2] iw: info: fix bug reading preamble and bandwidths
  2022-12-20 13:47 ` [PATCH v2] " Jaewan Kim
@ 2022-12-22  8:32   ` Kalle Valo
  2022-12-27  1:00   ` [PATCH v3] iw: info: fix bug reading preambles " Jaewan Kim
  1 sibling, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2022-12-22  8:32 UTC (permalink / raw)
  To: Jaewan Kim; +Cc: johannes, linux-wireless

Jaewan Kim <jaewan@google.com> writes:

> Signed-off-by: Jaewan Kim <jaewan@google.com>

Empty commit logs are frowned upon. Even if the bug is simple there
should be a some kind of commit log.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* [PATCH v3] iw: info: fix bug reading preambles and bandwidths
  2022-12-20 13:47 ` [PATCH v2] " Jaewan Kim
  2022-12-22  8:32   ` Kalle Valo
@ 2022-12-27  1:00   ` Jaewan Kim
  2023-01-09 14:55     ` Kalle Valo
  2023-01-09 15:14     ` [PATCH v4] " Jaewan Kim
  1 sibling, 2 replies; 7+ messages in thread
From: Jaewan Kim @ 2022-12-27  1:00 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Jaewan Kim, Kalle Valo

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>
---
 info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)
 
-- 
2.39.0.314.g84b9a713c41-goog


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

* Re: [PATCH v3] iw: info: fix bug reading preambles and bandwidths
  2022-12-27  1:00   ` [PATCH v3] iw: info: fix bug reading preambles " Jaewan Kim
@ 2023-01-09 14:55     ` Kalle Valo
  2023-01-09 15:12       ` Jaewan Kim
  2023-01-09 15:14     ` [PATCH v4] " Jaewan Kim
  1 sibling, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2023-01-09 14:55 UTC (permalink / raw)
  To: Jaewan Kim; +Cc: johannes, linux-wireless

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

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

* Re: [PATCH v3] iw: info: fix bug reading preambles and bandwidths
  2023-01-09 14:55     ` Kalle Valo
@ 2023-01-09 15:12       ` Jaewan Kim
  0 siblings, 0 replies; 7+ messages in thread
From: Jaewan Kim @ 2023-01-09 15:12 UTC (permalink / raw)
  To: Kalle Valo; +Cc: johannes, linux-wireless

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.

-- 
Jaewan Kim (김재완) | Software Engineer in Google Korea |
jaewan@google.com | +82-10-2781-5078

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

* [PATCH v4] iw: info: fix bug reading preambles and bandwidths
  2022-12-27  1:00   ` [PATCH v3] iw: info: fix bug reading preambles " Jaewan Kim
  2023-01-09 14:55     ` Kalle Valo
@ 2023-01-09 15:14     ` Jaewan Kim
  1 sibling, 0 replies; 7+ messages in thread
From: Jaewan Kim @ 2023-01-09 15:14 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Jaewan Kim

Preambles and bandwidths values are considered as bit shifts
when they're are used for capabilities.

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

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)
 
-- 
2.39.0.314.g84b9a713c41-goog


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

end of thread, other threads:[~2023-01-09 15:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-20 13:42 [PATCH] iw: info: fix bug reading preamble and bandwidths Jaewan Kim
2022-12-20 13:47 ` [PATCH v2] " Jaewan Kim
2022-12-22  8:32   ` Kalle Valo
2022-12-27  1:00   ` [PATCH v3] iw: info: fix bug reading preambles " Jaewan Kim
2023-01-09 14:55     ` Kalle Valo
2023-01-09 15:12       ` Jaewan Kim
2023-01-09 15:14     ` [PATCH v4] " Jaewan Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.