diff mbox series

iw: info: fix bug reading preamble and bandwidths

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

Commit Message

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

Comments

Kalle Valo Dec. 22, 2022, 8:32 a.m. UTC | #1
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.
diff mbox series

Patch

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)