From 0e167018fbc95580ba2cb94128452a18463cbde2 Mon Sep 17 00:00:00 2001
From: Recursive Madman <recursive.madman@gmx.de>
Date: Mon, 22 Dec 2014 15:21:07 +0100
Subject: [PATCH] dev link: print channel number as well
Signed-off-by: Recursive Madman <recursive.madman@gmx.de>
---
link.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -84,9 +84,12 @@ static int link_bss_handler(struct nl_msg *msg, void *arg)
nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]),
false, PRINT_LINK);
- if (bss[NL80211_BSS_FREQUENCY])
+ if (bss[NL80211_BSS_FREQUENCY]) {
printf("\tfreq: %d\n",
nla_get_u32(bss[NL80211_BSS_FREQUENCY]));
+ printf("\tchannel: %d\n",
+ ieee80211_frequency_to_channel(nla_get_u32(bss[NL80211_BSS_FREQUENCY])));
+ }
if (nla_get_u32(bss[NL80211_BSS_STATUS]) != NL80211_BSS_STATUS_ASSOCIATED)
return NL_SKIP;
--
2.1.3