diff mbox

[08/15] dfs: Add extra debugging messages.

Message ID 1394065200-20377-8-git-send-email-greearb@candelatech.com
State Accepted
Headers show

Commit Message

Ben Greear March 6, 2014, 12:19 a.m. UTC
From: Ben Greear <greearb@candelatech.com>

Might help someone realize why their hostapd config isn't
working properly.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 src/ap/dfs.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

Comments

Jouni Malinen March 11, 2014, 7:25 p.m. UTC | #1
On Wed, Mar 05, 2014 at 04:19:53PM -0800, greearb@candelatech.com wrote:
> Might help someone realize why their hostapd config isn't
> working properly.

Thanks, applied.
diff mbox

Patch

diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index 2b8b90f..1fa9618 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -267,8 +267,22 @@  static int dfs_get_start_chan_idx(struct hostapd_iface *iface)
 		}
 	}
 
-	if (res == -1)
-		wpa_printf(MSG_DEBUG, "DFS chan_idx seems wrong: -1");
+	if (res == -1) {
+		wpa_printf(MSG_DEBUG,
+			   "DFS chan_idx seems wrong: -1 num-ch: %d ch-no: %d conf-ch-no: %d"
+			   " 11n: %d  sec-ch: %d vht-oper-width: %i",
+			   mode->num_channels, channel_no, iface->conf->channel,
+			   iface->conf->ieee80211n, iface->conf->secondary_channel,
+			   iface->conf->vht_oper_chwidth);
+
+		for (i = 0; i < mode->num_channels; i++) {
+			chan = &mode->channels[i];
+			wpa_printf(MSG_DEBUG,
+				   "Available channel: %d\n",
+				   chan->chan);
+		}
+	}
+
 
 	return res;
 }