mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-12 17:02:05 +03:00
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26744 3c298f89-4303-0410-b956-a3cf2f4a3e73
68 lines
2.4 KiB
Diff
68 lines
2.4 KiB
Diff
--- a/net/mac80211/agg-tx.c
|
|
+++ b/net/mac80211/agg-tx.c
|
|
@@ -79,7 +79,8 @@ static void ieee80211_send_addba_request
|
|
memcpy(mgmt->da, da, ETH_ALEN);
|
|
memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
|
|
if (sdata->vif.type == NL80211_IFTYPE_AP ||
|
|
- sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
|
|
+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
|
|
+ sdata->vif.type == NL80211_IFTYPE_WDS)
|
|
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
|
|
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
|
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
|
|
@@ -377,7 +378,8 @@ int ieee80211_start_tx_ba_session(struct
|
|
*/
|
|
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
|
|
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
|
|
- sdata->vif.type != NL80211_IFTYPE_AP)
|
|
+ sdata->vif.type != NL80211_IFTYPE_AP &&
|
|
+ sdata->vif.type != NL80211_IFTYPE_WDS)
|
|
return -EINVAL;
|
|
|
|
if (test_sta_flags(sta, WLAN_STA_BLOCK_BA)) {
|
|
--- a/net/mac80211/agg-rx.c
|
|
+++ b/net/mac80211/agg-rx.c
|
|
@@ -160,6 +160,8 @@ static void ieee80211_send_addba_resp(st
|
|
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
|
|
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
|
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
|
|
+ else if (sdata->vif.type == NL80211_IFTYPE_WDS)
|
|
+ memcpy(mgmt->bssid, da, ETH_ALEN);
|
|
|
|
mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
|
|
IEEE80211_STYPE_ACTION);
|
|
--- a/net/mac80211/rx.c
|
|
+++ b/net/mac80211/rx.c
|
|
@@ -2132,7 +2132,8 @@ ieee80211_rx_h_action(struct ieee80211_r
|
|
*/
|
|
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
|
|
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
|
|
- sdata->vif.type != NL80211_IFTYPE_AP)
|
|
+ sdata->vif.type != NL80211_IFTYPE_AP &&
|
|
+ sdata->vif.type != NL80211_IFTYPE_WDS)
|
|
break;
|
|
|
|
/* verify action_code is present */
|
|
@@ -2717,13 +2718,16 @@ static int prepare_for_handlers(struct i
|
|
}
|
|
break;
|
|
case NL80211_IFTYPE_WDS:
|
|
- if (bssid) {
|
|
- if (!ieee80211_is_beacon(hdr->frame_control))
|
|
- return 0;
|
|
- } else if (!ieee80211_is_data(hdr->frame_control))
|
|
- return 0;
|
|
if (compare_ether_addr(sdata->u.wds.remote_addr, hdr->addr2))
|
|
return 0;
|
|
+
|
|
+ if (ieee80211_is_data(hdr->frame_control) ||
|
|
+ ieee80211_is_action(hdr->frame_control)) {
|
|
+ if (compare_ether_addr(sdata->vif.addr, hdr->addr1))
|
|
+ return 0;
|
|
+ } else if (!ieee80211_is_beacon(hdr->frame_control))
|
|
+ return 0;
|
|
+
|
|
break;
|
|
default:
|
|
/* should never get here */
|