Thread (3 messages) 3 messages, 2 authors, 2014-01-08

Re: [PATCH v3.5 17/19] mwifiex: slight optimization of addr compare

From: Ding Tianhong <hidden>
Date: 2014-01-08 02:59:21
Also in: linux-wireless, lkml

On 2014/1/8 10:50, Bing Zhao wrote:
Hi Ding,
quoted
Use possibly more efficient ether_addr_equal
instead of memcmp.
quoted
@@ -782,8 +782,7 @@ static int mwifiex_ret_ibss_coalescing_status(struct mwifiex_private *priv,
 	}

 	/* If BSSID is diff, modify current BSS parameters */
-	if (memcmp(priv->curr_bss_params.bss_descriptor.mac_address,
-		   ibss_coal_resp->bssid, ETH_ALEN)) {
+	if (!ether_addr_equal(priv->curr_bss_params.bss_descriptor.mac_address, ibss_coal_resp->bssid))
Could you break the line?
If you run "checkpatch.pl" you will spot this warning.
quoted
 	if (!IS_11N_ENABLED(priv) ||
-	    memcmp(priv->curr_addr, rx_pkt_hdr->eth803_hdr.h_dest, ETH_ALEN)) {
+	    !ether_addr_equal_unaligned(priv->curr_addr, rx_pkt_hdr->eth803_hdr.h_dest)) {
Also over 80 characters here.

Thanks,
Bing
Ok, thanks

Regards
Ding

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help