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