rework debug output to be more helpful for radio config failures
This commit is contained in:
parent
baf1ccbc73
commit
651ccc0d33
@ -384,7 +384,9 @@ int capwap_sendto(int sock, void* buffer, int size, union sockaddr_capwap* toadd
|
||||
#ifdef DEBUG
|
||||
{
|
||||
char strtoaddr[INET6_ADDRSTRLEN];
|
||||
log_printf(LOG_DEBUG, "Sent packet to %s:%d with result %d", capwap_address_to_string(toaddr, strtoaddr, INET6_ADDRSTRLEN), (int)CAPWAP_GET_NETWORK_PORT(toaddr), result);
|
||||
log_printf(LOG_DEBUG, "Sent packet to %s:%d with result %d",
|
||||
capwap_address_to_string(toaddr, strtoaddr, INET6_ADDRSTRLEN),
|
||||
(int)CAPWAP_GET_NETWORK_PORT(toaddr), result);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
/* */
|
||||
static void wtp_dfa_state_dtlsconnect_timeout(EV_P_ ev_timer *w, int revents)
|
||||
{
|
||||
log_printf(LOG_DEBUG, "DTLS Connect Timeout");
|
||||
wtp_teardown_connection();
|
||||
}
|
||||
|
||||
|
@ -464,18 +464,22 @@ int wtp_radio_setconfiguration(struct capwap_parsed_packet* packet)
|
||||
result = wifi_device_setfrequency(item->radio->devicehandle, WIFI_BAND_2GHZ,
|
||||
item->radio->radioinformation.radiotype,
|
||||
item->radio->directsequencecontrol.currentchannel);
|
||||
log_printf(LOG_DEBUG, "wtp_radio %d, set 2GHz frequency to %d, result: %d",
|
||||
item->radio->radioid, item->radio->directsequencecontrol.currentchannel,
|
||||
result);
|
||||
break;
|
||||
|
||||
case WTP_UPDATE_FREQUENCY_OFDM:
|
||||
result = wifi_device_setfrequency(item->radio->devicehandle, WIFI_BAND_5GHZ,
|
||||
item->radio->radioinformation.radiotype,
|
||||
item->radio->ofdmcontrol.currentchannel);
|
||||
log_printf(LOG_DEBUG, "wtp_radio %d, set 5GHz frequency to %d, result: %d",
|
||||
item->radio->radioid, item->radio->ofdmcontrol.currentchannel,
|
||||
result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
log_printf(LOG_DEBUG, "wtp_radio_setconfiguration result #2: %d", result);
|
||||
|
||||
/* Update radio configuration */
|
||||
for (i = 0; (i < updateitems->count) && !result; i++) {
|
||||
struct wtp_update_configuration_item* item =
|
||||
@ -486,6 +490,8 @@ int wtp_radio_setconfiguration(struct capwap_parsed_packet* packet)
|
||||
result = wifi_device_updaterates(item->radio->devicehandle,
|
||||
item->radio->rateset.rateset,
|
||||
item->radio->rateset.ratesetcount);
|
||||
log_printf(LOG_DEBUG, "wtp_radio %d, update rates result: %d",
|
||||
item->radio->radioid, result);
|
||||
break;
|
||||
|
||||
case WTP_UPDATE_CONFIGURATION: {
|
||||
@ -499,17 +505,21 @@ int wtp_radio_setconfiguration(struct capwap_parsed_packet* packet)
|
||||
params.beaconperiod = item->radio->radioconfig.beaconperiod;
|
||||
memcpy(params.country, item->radio->radioconfig.country, WIFI_COUNTRY_LENGTH);
|
||||
result = wifi_device_setconfiguration(item->radio->devicehandle, ¶ms);
|
||||
|
||||
log_printf(LOG_DEBUG, "wtp_radio %d, set configuration result: %d",
|
||||
item->radio->radioid, result);
|
||||
break;
|
||||
}
|
||||
|
||||
case WTP_UPDATE_TX_QUEUE:
|
||||
result = wifi_device_settxqueue(item->radio->devicehandle, &item->radio->qos);
|
||||
|
||||
log_printf(LOG_DEBUG, "wtp_radio %d, set Tx queue result: %d",
|
||||
item->radio->radioid, result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
log_printf(LOG_DEBUG, "wtp_radio_setconfiguration result #3: %d", result);
|
||||
|
||||
/* */
|
||||
capwap_array_free(updateitems);
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user