Search Linux Wireless

Re: [PATCH 01/16] iwlwifi: mvm: support mac80211 AMSDU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luca Coelho <luca@xxxxxxxxx> writes:

> From: Sara Sharon <sara.sharon@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>

[...]

> +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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux