a0418b63098c39ecda8b893594483338fcc8dc2c
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 560-mac80211_wds_sta_fix.patch
1 --- a/net/mac80211/rx.c
2 +++ b/net/mac80211/rx.c
3 @@ -1561,9 +1561,13 @@ __ieee80211_data_to_8023(struct ieee8021
4 sdata->vif.type == NL80211_IFTYPE_AP_VLAN && !sdata->u.vlan.sta)
5 return -1;
6
7 + if (!ieee80211_802_1x_port_control(rx) &&
8 + sdata->vif.type == NL80211_IFTYPE_STATION &&
9 + !!sdata->u.mgd.use_4addr != !!ieee80211_has_a4(hdr->frame_control))
10 + return -1;
11 +
12 if (is_multicast_ether_addr(hdr->addr1) &&
13 - ((sdata->vif.type == NL80211_IFTYPE_AP_VLAN && sdata->u.vlan.sta) ||
14 - (sdata->vif.type == NL80211_IFTYPE_STATION && sdata->u.mgd.use_4addr)))
15 + sdata->vif.type == NL80211_IFTYPE_AP_VLAN && sdata->u.vlan.sta)
16 return -1;
17
18 return ieee80211_data_to_8023(rx->skb, sdata->vif.addr, sdata->vif.type);