Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0b0dc25 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

ANDROID: GKI: Preserve abi change in ieee80211_data_to_8023_exthdr()



Commit a1d5ff5651ea ("mac80211: properly handle A-MSDUs that start with
an RFC 1042 header") changed ieee80211_data_to_8023_exthdr() to have a
new parameter.

As the inline function that uses this always passes 'false' to the
function, make a new one internally to correctly handle a 'true' value
when needed so that external users will still work properly without
having to be rebuilt.

Bug: 161946584
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I5710144acb3f70aa5c64bd35b9fe5d63b9685e8c
parent 696a13ef
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -5411,8 +5411,11 @@ unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr);
 */
int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
				  const u8 *addr, enum nl80211_iftype iftype,
				  u8 data_offset, bool is_amsdu);
				  u8 data_offset);

int ieee80211_data_to_8023_exthdr_bool(struct sk_buff *skb, struct ethhdr *ehdr,
				       const u8 *addr, enum nl80211_iftype iftype,
				       u8 data_offset, bool is_amsdu);
/**
 * ieee80211_data_to_8023 - convert an 802.11 data frame to 802.3
 * @skb: the 802.11 data frame
@@ -5423,7 +5426,7 @@ int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
static inline int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
					 enum nl80211_iftype iftype)
{
	return ieee80211_data_to_8023_exthdr(skb, NULL, addr, iftype, 0, false);
	return ieee80211_data_to_8023_exthdr(skb, NULL, addr, iftype, 0);
}

/**
+4 −4
Original line number Diff line number Diff line
@@ -2691,7 +2691,7 @@ __ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx, u8 data_offset)
	skb->dev = dev;
	__skb_queue_head_init(&frame_list);

	if (ieee80211_data_to_8023_exthdr(skb, &ethhdr,
	if (ieee80211_data_to_8023_exthdr_bool(skb, &ethhdr,
					       rx->sdata->vif.addr,
					       rx->sdata->vif.type,
					       data_offset, true))
+12 −3
Original line number Diff line number Diff line
@@ -462,7 +462,7 @@ unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr)
}
EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen);

int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
int ieee80211_data_to_8023_exthdr_bool(struct sk_buff *skb, struct ethhdr *ehdr,
				       const u8 *addr, enum nl80211_iftype iftype,
				       u8 data_offset, bool is_amsdu)
{
@@ -570,6 +570,15 @@ int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,

	return 0;
}
EXPORT_SYMBOL_GPL(ieee80211_data_to_8023_exthdr_bool);

int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
				  const u8 *addr, enum nl80211_iftype iftype,
				  u8 data_offset)
{
	return ieee80211_data_to_8023_exthdr_bool(skb, ehdr, addr, iftype,
						  data_offset, false);
}
EXPORT_SYMBOL(ieee80211_data_to_8023_exthdr);

static void