all: remove use of struct ether_addr / ether_aton()

Lots of old code used struct ether_addr to store hardware addresses,
and ether_aton() to parse them, but more recent code generally uses
guint8 arrays, and the nm_utils_hwaddr_* methods, to be able to share
code between ETH_ALEN and INFINIBAND_ALEN cases. So update the old
code to match the new. (In many places, this ends up getting rid of
casts between struct ether_addr and guint8* anyway.)

(Also, in some places, variables were switched from struct ether_addr
to guint8[] a while back, but some code still used "&" when referring
to them even though that's unnecessary now. Clean that up.)
This commit is contained in:
Dan Winship
2014-07-07 12:04:14 -04:00
parent 0dcba8a9a0
commit ea456aaa81
28 changed files with 124 additions and 154 deletions

View File

@@ -50,8 +50,8 @@ guint32 wifi_utils_find_freq (WifiData *data, const guint32 *freqs);
/* Caller must free returned byte array */
GByteArray *wifi_utils_get_ssid (WifiData *data);
/* Caller must free returned byte array */
gboolean wifi_utils_get_bssid (WifiData *data, struct ether_addr *out_bssid);
/* out_bssid must be ETH_ALEN bytes */
gboolean wifi_utils_get_bssid (WifiData *data, guint8 *out_bssid);
/* Returns current bitrate in Kbps */
guint32 wifi_utils_get_rate (WifiData *data);