From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=/W8khm62aK064ersf9BbxBRVAXtb6sPuxQ1t0Zt23rk=; b=cYRMTASSzx1QtIa2g9m8KKIsgXWLS7O8u3s6T5nJHKrCd4j1EKwTVf8D/Tl3dwmByV M2rFLz0lh0YOux8rdsz5UNSl+1eueF2qiTyTMoJj252uy12KoIeMPx0Hv/dl0uIBKc9/ 0eMvgUVGmV/3gpegNfdv2MyYafYU39pcrWSFE= References: <20180314110119.13631-1-zajec5@gmail.com> <878tau7n23.fsf@codeaurora.org> <52b1812dd3e843adb63ff67fbe95975f@milecki.pl> <877eqe63kr.fsf@codeaurora.org> From: Arend van Spriel Message-ID: <5AA98C3B.2070406@broadcom.com> MIME-Version: 1.0 In-Reply-To: <877eqe63kr.fsf@codeaurora.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Subject: Re: [Bridge] [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Wed, 14 Mar 2018 20:55:28 -0000 To: Kalle Valo , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: James Hughes , brcm80211-dev-list.pdl@broadcom.com, bridge@lists.linux-foundation.org, netdev@vger.kernel.org, Chi-Hsien Lin , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , linux-wireless@vger.kernel.org, Hante Meuleman , Pieter-Paul Giesberts , Wright Feng , Felix Fietkau , brcm80211-dev-list@cypress.com, Franky Lin On 3/14/2018 5:10 PM, Kalle Valo wrote: > Rafał Miłecki writes: > >>>> + unsigned char *eth_data = skb_mac_header(skb) + ETH_HLEN; >>>> +#if !defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) >>> >>> #ifndef? >> >> I followed what is used in the include/linux/etherdevice.h. Is that a >> good exceuse? Could it be there any some good reason for #if defined()? > > Don't know, maybe just a matter of taste? But it would be nice to know > the background behind #ifdef vs #if defined(), never figured it out why > two different forms. Well. In this case you could use either one, but if you have more conditions #if defined() is bit more efficient: #ifdef A #ifdef B #endif #endif vs. #if defined(A) && defined(B) Regards, Arend From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wm0-f50.google.com ([74.125.82.50]:34322 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbeCNUz0 (ORCPT ); Wed, 14 Mar 2018 16:55:26 -0400 Received: by mail-wm0-f50.google.com with SMTP id a20so20214349wmd.1 for ; Wed, 14 Mar 2018 13:55:25 -0700 (PDT) Subject: Re: [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default To: Kalle Valo , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= References: <20180314110119.13631-1-zajec5@gmail.com> <878tau7n23.fsf@codeaurora.org> <52b1812dd3e843adb63ff67fbe95975f@milecki.pl> <877eqe63kr.fsf@codeaurora.org> Cc: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Pieter-Paul Giesberts , James Hughes , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, =?UTF-8?Q?Linus_L=c3=bcssing?= , Felix Fietkau , bridge@lists.linux-foundation.org From: Arend van Spriel Message-ID: <5AA98C3B.2070406@broadcom.com> (sfid-20180314_215529_956986_F47430AC) Date: Wed, 14 Mar 2018 21:55:23 +0100 MIME-Version: 1.0 In-Reply-To: <877eqe63kr.fsf@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 3/14/2018 5:10 PM, Kalle Valo wrote: > Rafał Miłecki writes: > >>>> + unsigned char *eth_data = skb_mac_header(skb) + ETH_HLEN; >>>> +#if !defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) >>> >>> #ifndef? >> >> I followed what is used in the include/linux/etherdevice.h. Is that a >> good exceuse? Could it be there any some good reason for #if defined()? > > Don't know, maybe just a matter of taste? But it would be nice to know > the background behind #ifdef vs #if defined(), never figured it out why > two different forms. Well. In this case you could use either one, but if you have more conditions #if defined() is bit more efficient: #ifdef A #ifdef B #endif #endif vs. #if defined(A) && defined(B) Regards, Arend From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arend van Spriel Subject: Re: [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default Date: Wed, 14 Mar 2018 21:55:23 +0100 Message-ID: <5AA98C3B.2070406@broadcom.com> References: <20180314110119.13631-1-zajec5@gmail.com> <878tau7n23.fsf@codeaurora.org> <52b1812dd3e843adb63ff67fbe95975f@milecki.pl> <877eqe63kr.fsf@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Pieter-Paul Giesberts , James Hughes , linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, brcm80211-dev-list.pdl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, brcm80211-dev-list-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, =?UTF-8?Q?Linus_L=c3=bcssing?= , Felix Fietkau , bridge-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Kalle Valo , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Return-path: In-Reply-To: <877eqe63kr.fsf-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 3/14/2018 5:10 PM, Kalle Valo wrote: > Rafał Miłecki writes: > >>>> + unsigned char *eth_data = skb_mac_header(skb) + ETH_HLEN; >>>> +#if !defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) >>> >>> #ifndef? >> >> I followed what is used in the include/linux/etherdevice.h. Is that a >> good exceuse? Could it be there any some good reason for #if defined()? > > Don't know, maybe just a matter of taste? But it would be nice to know > the background behind #ifdef vs #if defined(), never figured it out why > two different forms. Well. In this case you could use either one, but if you have more conditions #if defined() is bit more efficient: #ifdef A #ifdef B #endif #endif vs. #if defined(A) && defined(B) Regards, Arend