mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
net: skbuff: hide wifi_acked when CONFIG_WIRELESS not set
Datacenter kernel builds will very likely not include WIRELESS, so let them shave 2 bits off the skb by hiding the wifi fields. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4edd97fbdc
commit
eb6fba7555
4 changed files with 16 additions and 1 deletions
|
@ -953,8 +953,10 @@ struct sk_buff {
|
|||
|
||||
__u8 l4_hash:1;
|
||||
__u8 sw_hash:1;
|
||||
#ifdef CONFIG_WIRELESS
|
||||
__u8 wifi_acked_valid:1;
|
||||
__u8 wifi_acked:1;
|
||||
#endif
|
||||
__u8 no_fcs:1;
|
||||
/* Indicates the inner headers are valid in the skbuff. */
|
||||
__u8 encapsulation:1;
|
||||
|
@ -1187,6 +1189,15 @@ static inline unsigned int skb_napi_id(const struct sk_buff *skb)
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline bool skb_wifi_acked_valid(const struct sk_buff *skb)
|
||||
{
|
||||
#ifdef CONFIG_WIRELESS
|
||||
return skb->wifi_acked_valid;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_unref - decrement the skb's reference count
|
||||
* @skb: buffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue