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

Commit 7cbf9d01 authored by Marco Porsch's avatar Marco Porsch Committed by Johannes Berg
Browse files

mac80211: fix oops on mesh PS broadcast forwarding



Introduced with de74a1d9
"mac80211: fix WPA with VLAN on AP side with ps-sta".
Apparently overwrites the sdata pointer with non-valid data in
the case of mesh.
Fix this by checking for IFTYPE_AP_VLAN.

Signed-off-by: default avatarMarco Porsch <marco@cozybit.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 645e77de
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2755,6 +2755,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
				cpu_to_le16(IEEE80211_FCTL_MOREDATA);
				cpu_to_le16(IEEE80211_FCTL_MOREDATA);
		}
		}


		if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
			sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
			sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
		if (!ieee80211_tx_prepare(sdata, &tx, skb))
		if (!ieee80211_tx_prepare(sdata, &tx, skb))
			break;
			break;