#include "utils/common.h"
#include "common/ieee802_11_defs.h"
+#include "common/wpa_ctrl.h"
#include "hostapd.h"
#include "ap_drv_ops.h"
#include "drivers/driver.h"
/* Finally start CAC */
wpa_printf(MSG_DEBUG, "DFS start CAC on %d MHz", hapd->iface->freq);
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DFS_EVENT_CAC_START
+ "freq=%d chan=%d sec_chan=%d",
+ hapd->iface->freq,
+ hapd->iconf->channel, hapd->iconf->secondary_channel);
if (hostapd_start_dfs_cac(hapd, hapd->iconf->hw_mode,
hapd->iface->freq,
hapd->iconf->channel,
int ht_enabled, int chan_offset, int chan_width,
int cf1, int cf2)
{
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DFS_EVENT_CAC_COMPLETED
+ "success=%d freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
+ success, freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
+
if (success) {
/* Complete iface/ap configuration */
set_dfs_state(hapd, freq, ht_enabled, chan_offset,
if (channel) {
wpa_printf(MSG_DEBUG, "DFS will switch to a new channel %d",
channel->chan);
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DFS_EVENT_NEW_CHANNEL
+ "freq=%d chan=%d sec_chan=%d", channel->freq,
+ channel->chan, secondary_channel);
hapd->iface->freq = channel->freq;
hapd->iconf->channel = channel->chan;
if (!hapd->iconf->ieee80211h)
return 0;
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DFS_EVENT_RADAR_DETECTED
+ "freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
+ freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
+
/* mark radar frequency as invalid */
res = set_dfs_state(hapd, freq, ht_enabled, chan_offset,
chan_width, cf1, cf2,
int ht_enabled, int chan_offset, int chan_width,
int cf1, int cf2)
{
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DFS_EVENT_NOP_FINISHED
+ "freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
+ freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
/* TODO add correct implementation here */
set_dfs_state(hapd, freq, ht_enabled, chan_offset, chan_width, cf1, cf2,
HOSTAPD_CHAN_DFS_USABLE);