use MACSTR and MAC2STR where appropriate

Replace capwap_printf_macaddress with MACSTR and MAC2STR
macro for all EUI48 MAC addresses. Save a text buffer in
the station structure and some buffers in functions.
This commit is contained in:
Andreas Schultz
2016-04-06 12:50:39 +02:00
parent f3fb11ac81
commit c132036914
9 changed files with 100 additions and 82 deletions

View File

@ -1097,9 +1097,8 @@ int nl80211_station_authorize(struct wifi_wlan* wlan, struct wifi_station* stati
}
/* */
if (!result) {
log_printf(LOG_INFO, "Authorized station: %s", station->addrtext);
}
if (!result)
log_printf(LOG_INFO, "Authorized station: " MACSTR, MAC2STR(station->address));
/* */
nlmsg_free(msg);
@ -1139,10 +1138,8 @@ int nl80211_station_deauthorize(struct wifi_wlan* wlan, const uint8_t* address)
}
/* */
if (!result) {
char addrtext[CAPWAP_MACADDRESS_EUI48_BUFFER];
log_printf(LOG_INFO, "Deauthorize station: %s", capwap_printf_macaddress(addrtext, address, MACADDRESS_EUI48_LENGTH));
}
if (!result)
log_printf(LOG_INFO, "Deauthorize station: " MACSTR, MAC2STR(address));
/* */
nlmsg_free(msg);