iwlegacy: use ether_addr_equal_64bits
Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be used when each argument is an array within a structure that contains at least two bytes of data beyond the array. The structures involved are: ieee80211_hdr defined in include/linux/ieee80211.h, il_priv defined in drivers/net/wireless/iwlegacy/common.h and il_rxon_cmd defined in drivers/net/wireless/iwlegacy/commands.h This was done using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
John W. Linville

vecāks
90908e1cd1
revīzija
ccbac29055
@@ -466,10 +466,10 @@ il3945_is_network_packet(struct il_priv *il, struct ieee80211_hdr *header)
|
||||
switch (il->iw_mode) {
|
||||
case NL80211_IFTYPE_ADHOC: /* Header: Dest. | Source | BSSID */
|
||||
/* packets to our IBSS update information */
|
||||
return ether_addr_equal(header->addr3, il->bssid);
|
||||
return ether_addr_equal_64bits(header->addr3, il->bssid);
|
||||
case NL80211_IFTYPE_STATION: /* Header: Dest. | AP{BSSID} | Source */
|
||||
/* packets to our IBSS update information */
|
||||
return ether_addr_equal(header->addr2, il->bssid);
|
||||
return ether_addr_equal_64bits(header->addr2, il->bssid);
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user