Maciek Borzecki
a305cf3162
staging: wlan-ng: prism2sta: replace memcmp with ether_addr_equal
Replace memcmp() with ether_addr_equal(). In every location where the
replacement was done, the addresses accessed are
__aligned(2). Structures accessed either stack or heap allocated, no
direct memory casts to possibly unaligned structs are used.
Involved structures:
typedef struct hfa384x_authenticateStation_data {
u8 address[ETH_ALEN]; /* 0 offset */
...
} __packed hfa384x_authenticateStation_data_t;
struct prism2sta_authlist {
unsigned int cnt;
u8 addr[WLAN_AUTH_MAX][ETH_ALEN]; /* 4 bytes offset,
addresses start
at u16 boundary */
u8 assoc[WLAN_AUTH_MAX];
};
struct prism2sta_accesslist {
unsigned int modify;
unsigned int cnt;
u8 addr[WLAN_ACCESS_MAX][ETH_ALEN]; /* 8 bytes offset,
multiple of u16 */
...
u8 addr1[WLAN_ACCESS_MAX][ETH_ALEN]; /* starts at u32 boundary,
struct not packed */
};
typedef struct hfa384x_AssocStatus {
u16 assocstatus;
u8 sta_addr[ETH_ALEN]; /* 2 bytes offset,
struct is packed */
u8 old_ap_addr[ETH_ALEN]; /* 8 bytes offset */
...
} __packed hfa384x_AssocStatus_t;
The patch resolves the following checkpatch warnings:
WARNING: Prefer ether_addr_equal() or ether_addr_equal_unaligned()
over memcmp()
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 08:27:48 +01:00
..
2015-09-15 03:05:45 +02:00
2015-09-10 13:29:01 -07:00
2015-09-03 16:55:55 -07:00
2015-09-17 21:29:07 -07:00
2015-08-14 17:27:17 -07:00
2015-09-26 20:54:53 -04:00
2015-08-18 09:08:47 +03:00
2015-09-19 18:57:09 -07:00
2015-08-28 21:09:14 +02:00
2015-09-08 16:48:55 -07:00
2015-09-26 21:05:23 -04:00
2015-09-19 20:17:40 -07:00
2015-09-04 11:35:03 -07:00
2015-09-16 02:17:49 +02:00
2015-09-11 19:11:06 -07:00
2015-09-26 21:05:23 -04:00
2015-09-11 14:23:30 +09:00
2015-09-16 15:47:51 +02:00
2015-09-11 16:21:12 -07:00
2015-09-21 15:07:19 +09:00
2015-09-27 06:45:18 -04:00
2015-09-18 08:11:42 -07:00
2015-09-25 06:52:37 +10:00
2015-09-04 12:02:11 -07:00
2015-09-10 13:29:01 -07:00
2015-09-20 22:44:51 -07:00
2015-09-12 19:43:02 -07:00
2015-09-08 16:16:26 -07:00
2015-08-15 22:10:26 -04:00
2015-09-30 03:37:48 +02:00
2015-09-26 21:02:42 -04:00
2015-09-11 19:17:28 -07:00
2015-09-11 15:21:34 -07:00
2015-09-22 15:55:51 +02:00
2015-09-08 14:35:59 -07:00
2015-09-17 10:02:20 +02:00
2015-09-03 16:41:38 -07:00
2015-09-05 18:11:04 -07:00
2015-09-14 12:04:24 -04:00
2015-09-11 16:42:39 -07:00
2015-09-08 17:22:35 -07:00
2015-08-26 07:11:45 -07:00
2015-09-16 15:47:51 +02:00
2015-09-26 20:53:15 -04:00
2015-09-08 16:33:16 -07:00
2015-09-09 11:17:33 -07:00
2015-09-26 06:01:33 -04:00
2015-09-04 10:07:45 -07:00
2015-09-07 15:27:12 -04:00
2015-09-17 11:49:28 -04:00
2015-09-26 06:01:33 -04:00
2015-09-15 13:18:04 -05:00
2015-09-25 11:16:53 -07:00
2015-09-03 16:01:03 +01:00
2015-09-04 10:07:45 -07:00
2015-09-18 08:11:42 -07:00
2015-09-17 21:41:02 -07:00
2015-08-10 23:07:06 -04:00
2015-09-17 12:25:42 -07:00
2015-08-29 01:46:40 +02:00
2015-09-09 10:55:32 -07:00
2015-08-13 10:12:54 +02:00
2015-09-24 16:23:20 -07:00
2015-09-01 14:48:40 +02:00
2015-09-05 19:37:31 +02:00
2015-09-18 09:28:20 -07:00
2015-09-11 19:00:42 -07:00
2015-09-21 12:02:27 -07:00
2015-09-16 15:47:51 +02:00
2015-09-22 09:48:41 -07:00
2015-09-16 15:47:51 +02:00
2015-10-04 08:27:48 +01:00
2015-09-24 23:24:46 -07:00
2015-09-20 15:37:16 +08:00
2015-09-20 15:20:11 -07:00
2015-09-22 09:09:15 -07:00
2015-09-23 12:15:19 -07:00
2015-09-18 09:28:20 -07:00
2015-09-10 18:19:42 -07:00
2015-09-08 13:32:11 +03:00
2015-09-01 18:46:42 -07:00
2015-09-11 15:12:59 -07:00
2015-09-10 18:19:42 -07:00
2015-09-03 16:27:01 -07:00
2015-09-04 10:22:09 -07:00