Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1244167
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() |
| Date | 2015-10-11 19:30 +0200 |
| Message-ID | <qisBA-6Ef-7@gated-at.bofh.it> (permalink) |
| References | <qi5F1-6Nw-17@gated-at.bofh.it> <qicQ9-oE-1@gated-at.bofh.it> <qimPw-6GL-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, 2015-10-11 at 16:42 +0530, punit vara wrote:
> following are the two structure need to be consider for alignment.
>
> struct iw_pmksa {
> __u32 cmd; /* 0 4 */
> struct sockaddr bssid; /* 4 16 */
> __u8 pmkid[16]; /* 20 16 */
wrong bssid, bssid here is on the stack
after a char *, so bssid is aligned on a
pointer boundary, either 4 or 8.
> /* size: 36, cachelines: 1, members: 3 */
> /* last cacheline: 36 bytes */
> };
>
> struct wlan_bssid_ex {
[]
> unsigned char MacAddress[6]; /* 4 6 */
> As I understood both are not aligned to u16 so
> ether_addr_equal_unaligned() should be used.
u16s are aligned when on any even address
So ether_addr_equal could be used.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/4] Staging: rtl8712: Fix coding style warnings Punit Vara <punitvara@gmail.com> - 2015-10-10 19:00 +0200
[PATCH 3/4] Staging: rtl8712: Coding style warnings fix for block comments Punit Vara <punitvara@gmail.com> - 2015-10-10 19:00 +0200
[PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() Punit Vara <punitvara@gmail.com> - 2015-10-10 19:00 +0200
Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() Larry Finger <Larry.Finger@lwfinger.net> - 2015-10-10 19:40 +0200
Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() punit vara <punitvara@gmail.com> - 2015-10-10 21:50 +0200
Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() Julia Lawall <julia.lawall@lip6.fr> - 2015-10-10 22:00 +0200
Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() punit vara <punitvara@gmail.com> - 2015-10-10 22:30 +0200
Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() punit vara <punitvara@gmail.com> - 2015-10-10 22:30 +0200
Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() kbuild test robot <lkp@intel.com> - 2015-10-11 02:40 +0200
Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() punit vara <punitvara@gmail.com> - 2015-10-11 13:20 +0200
Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() Joe Perches <joe@perches.com> - 2015-10-11 19:30 +0200
csiph-web