nl80211: Make debug log more readable for driver events
Print the full name of the nl80211 event message in the debug log to make it easier to parse the debug log. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
10737aba22
commit
7d81932d27
1 changed files with 24 additions and 0 deletions
|
@ -1029,6 +1029,7 @@ static void mlme_event_auth(struct wpa_driver_nl80211_data *drv,
|
||||||
const struct ieee80211_mgmt *mgmt;
|
const struct ieee80211_mgmt *mgmt;
|
||||||
union wpa_event_data event;
|
union wpa_event_data event;
|
||||||
|
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Authenticate event");
|
||||||
mgmt = (const struct ieee80211_mgmt *) frame;
|
mgmt = (const struct ieee80211_mgmt *) frame;
|
||||||
if (len < 24 + sizeof(mgmt->u.auth)) {
|
if (len < 24 + sizeof(mgmt->u.auth)) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Too short association event "
|
wpa_printf(MSG_DEBUG, "nl80211: Too short association event "
|
||||||
|
@ -1090,6 +1091,7 @@ static void mlme_event_assoc(struct wpa_driver_nl80211_data *drv,
|
||||||
union wpa_event_data event;
|
union wpa_event_data event;
|
||||||
u16 status;
|
u16 status;
|
||||||
|
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Associate event");
|
||||||
mgmt = (const struct ieee80211_mgmt *) frame;
|
mgmt = (const struct ieee80211_mgmt *) frame;
|
||||||
if (len < 24 + sizeof(mgmt->u.assoc_resp)) {
|
if (len < 24 + sizeof(mgmt->u.assoc_resp)) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Too short association event "
|
wpa_printf(MSG_DEBUG, "nl80211: Too short association event "
|
||||||
|
@ -1146,6 +1148,11 @@ static void mlme_event_connect(struct wpa_driver_nl80211_data *drv,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cmd == NL80211_CMD_CONNECT)
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Connect event");
|
||||||
|
else if (cmd == NL80211_CMD_ROAM)
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Roam event");
|
||||||
|
|
||||||
os_memset(&event, 0, sizeof(event));
|
os_memset(&event, 0, sizeof(event));
|
||||||
if (cmd == NL80211_CMD_CONNECT &&
|
if (cmd == NL80211_CMD_CONNECT &&
|
||||||
nla_get_u16(status) != WLAN_STATUS_SUCCESS) {
|
nla_get_u16(status) != WLAN_STATUS_SUCCESS) {
|
||||||
|
@ -1195,6 +1202,7 @@ static void mlme_event_disconnect(struct wpa_driver_nl80211_data *drv,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Disconnect event");
|
||||||
drv->associated = 0;
|
drv->associated = 0;
|
||||||
os_memset(&data, 0, sizeof(data));
|
os_memset(&data, 0, sizeof(data));
|
||||||
if (reason)
|
if (reason)
|
||||||
|
@ -1272,6 +1280,7 @@ static void mlme_event_mgmt(struct wpa_driver_nl80211_data *drv,
|
||||||
u16 fc, stype;
|
u16 fc, stype;
|
||||||
int ssi_signal = 0;
|
int ssi_signal = 0;
|
||||||
|
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Frame event");
|
||||||
mgmt = (const struct ieee80211_mgmt *) frame;
|
mgmt = (const struct ieee80211_mgmt *) frame;
|
||||||
if (len < 24) {
|
if (len < 24) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Too short action frame");
|
wpa_printf(MSG_DEBUG, "nl80211: Too short action frame");
|
||||||
|
@ -1314,6 +1323,7 @@ static void mlme_event_mgmt_tx_status(struct wpa_driver_nl80211_data *drv,
|
||||||
const struct ieee80211_hdr *hdr;
|
const struct ieee80211_hdr *hdr;
|
||||||
u16 fc;
|
u16 fc;
|
||||||
|
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Frame TX status event");
|
||||||
if (!is_ap_interface(drv->nlmode)) {
|
if (!is_ap_interface(drv->nlmode)) {
|
||||||
u64 cookie_val;
|
u64 cookie_val;
|
||||||
|
|
||||||
|
@ -1353,6 +1363,11 @@ static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
|
||||||
const u8 *bssid = NULL;
|
const u8 *bssid = NULL;
|
||||||
u16 reason_code = 0;
|
u16 reason_code = 0;
|
||||||
|
|
||||||
|
if (type == EVENT_DEAUTH)
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Deauthenticate event");
|
||||||
|
else
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Disassociate event");
|
||||||
|
|
||||||
mgmt = (const struct ieee80211_mgmt *) frame;
|
mgmt = (const struct ieee80211_mgmt *) frame;
|
||||||
if (len >= 24) {
|
if (len >= 24) {
|
||||||
bssid = mgmt->bssid;
|
bssid = mgmt->bssid;
|
||||||
|
@ -1413,6 +1428,11 @@ static void mlme_event_unprot_disconnect(struct wpa_driver_nl80211_data *drv,
|
||||||
union wpa_event_data event;
|
union wpa_event_data event;
|
||||||
u16 reason_code = 0;
|
u16 reason_code = 0;
|
||||||
|
|
||||||
|
if (type == EVENT_UNPROT_DEAUTH)
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Unprot Deauthenticate event");
|
||||||
|
else
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Unprot Disassociate event");
|
||||||
|
|
||||||
if (len < 24)
|
if (len < 24)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2039,6 +2059,8 @@ static void nl80211_pmksa_candidate_event(struct wpa_driver_nl80211_data *drv,
|
||||||
};
|
};
|
||||||
union wpa_event_data data;
|
union wpa_event_data data;
|
||||||
|
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: PMKSA candidate event");
|
||||||
|
|
||||||
if (!tb[NL80211_ATTR_PMKSA_CANDIDATE])
|
if (!tb[NL80211_ATTR_PMKSA_CANDIDATE])
|
||||||
return;
|
return;
|
||||||
if (nla_parse_nested(cand, MAX_NL80211_PMKSA_CANDIDATE,
|
if (nla_parse_nested(cand, MAX_NL80211_PMKSA_CANDIDATE,
|
||||||
|
@ -2064,6 +2086,8 @@ static void nl80211_client_probe_event(struct wpa_driver_nl80211_data *drv,
|
||||||
{
|
{
|
||||||
union wpa_event_data data;
|
union wpa_event_data data;
|
||||||
|
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: Probe client event");
|
||||||
|
|
||||||
if (!tb[NL80211_ATTR_MAC] || !tb[NL80211_ATTR_ACK])
|
if (!tb[NL80211_ATTR_MAC] || !tb[NL80211_ATTR_ACK])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue