From: Johannes Berg Date: Fri, 20 Mar 2015 13:05:02 +0000 (+0100) Subject: mac80211: drop 4-addr VLAN frames earlier if not connected X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8d15ff0050aef96a14a185b5138f01f98109b40;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git mac80211: drop 4-addr VLAN frames earlier if not connected If there's no station on the 4-addr VLAN interface, then frames cannot be transmitted. Drop such frames earlier, before setting up all the information for them. We should keep the old check though since that code might be used for other internally-generated frames. Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index dcf60ee38b93..1d6344679bf1 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1842,6 +1842,9 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); wme_sta = sta->sta.wme; have_station = true; + } else if (sdata->wdev.use_4addr) { + ret = -ENOLINK; + goto free; } ap_sdata = container_of(sdata->bss, struct ieee80211_sub_if_data, u.ap);