linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Luca Coelho <luca@coelho.fi>
Cc: linux-wireless@vger.kernel.org,
	Sara Sharon <sara.sharon@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: Re: [PATCH 01/16] iwlwifi: mvm: support mac80211 AMSDU
Date: Tue, 22 Jan 2019 14:53:41 +0200	[thread overview]
Message-ID: <87va2gn99m.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20190121075026.25059-2-luca@coelho.fi> (Luca Coelho's message of "Mon, 21 Jan 2019 09:50:11 +0200")

Luca Coelho <luca@coelho.fi> writes:

> From: Sara Sharon <sara.sharon@intel.com>
>
> Support getting mac80211 building AMSDUs for us. Remove GSO
> support from mvm - we don't need it anymore.
>
> Signed-off-by: Sara Sharon <sara.sharon@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

[...]

> +static bool iwl_mvm_can_hw_csum(struct sk_buff *skb)
> +{
> +#if IS_ENABLED(CONFIG_INET)
> +	u8 protocol = ip_hdr(skb)->protocol;
> +
> +	return protocol == IPPROTO_TCP || protocol == IPPROTO_UDP;
> +#else
> +	return false;
> +#endif
> +}

I remember Andrew Morton a long time ago saying "Write in C, not in CPP"
or something like that. So would this work instead:

	u8 protocol = ip_hdr(skb)->protocol;

        if (!IS_ENABLED(CONFIG_INET))
                return false;

	return protocol == IPPROTO_TCP || protocol == IPPROTO_UDP;

Totally untested, of course :)

-- 
Kalle Valo

  reply	other threads:[~2019-01-22 12:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21  7:50 [PATCH 00/16] iwlwifi: updates intended for v4.21 2019-01-21 Luca Coelho
2019-01-21  7:50 ` [PATCH 01/16] iwlwifi: mvm: support mac80211 AMSDU Luca Coelho
2019-01-22 12:53   ` Kalle Valo [this message]
2019-01-23  8:25     ` [PATCH v2] " Luca Coelho
2019-01-21  7:50 ` [PATCH 02/16] iwlwifi: mvm: fix values in the table example Luca Coelho
2019-01-21  7:50 ` [PATCH 03/16] iwlwifi: use kmemdup in iwl_parse_nvm_mcc_info() Luca Coelho
2019-01-21  7:50 ` [PATCH 04/16] iwlwifi: fix spelling mistake "registrating" -> "registering" Luca Coelho
2019-01-21  7:50 ` [PATCH 05/16] iwlwifi: mvm: bring back mvm GSO code Luca Coelho
2019-01-21  7:50 ` [PATCH 06/16] iwlwifi: mvm: Flush transmit queues on P2P Device ROC done Luca Coelho
2019-01-21  7:50 ` [PATCH 07/16] iwlwifi: mvm: Set Tx rate and flags when there is not station Luca Coelho
2019-01-21  7:50 ` [PATCH 08/16] iwlwifi: mvm: Do not set RTS/CTS protection for P2P Device MAC Luca Coelho
2019-01-21  7:50 ` [PATCH 09/16] iwlwifi: update hcmds documentation Luca Coelho
2019-01-21  7:50 ` [PATCH 10/16] iwlwifi: mvm: make num_active_macs unsigned Luca Coelho
2019-01-21  7:50 ` [PATCH 11/16] iwlwifi: tighten boundary checks Luca Coelho
2019-01-21  7:50 ` [PATCH 12/16] iwlwifi: memcpy from dev_cmd and not dev_cmd->hdr Luca Coelho
2019-01-21  7:50 ` [PATCH 13/16] iwlwifi: mvm: avoid possible access out of array Luca Coelho
2019-01-21  7:50 ` [PATCH 14/16] iwlwifi: avoid access out of memory allocated Luca Coelho
2019-01-21  7:50 ` [PATCH 15/16] iwlwifi: fw api: remove unused/deprecated filter status Luca Coelho
2019-01-21  7:50 ` [PATCH 16/16] iwlwifi: fw api: document WoWLAN patterns command Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87va2gn99m.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luca@coelho.fi \
    --cc=luciano.coelho@intel.com \
    --cc=sara.sharon@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).