Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214872
b: refs/heads/master
c: 4b0dd98
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 27, 2010
1 parent 082f05d commit 9cf43bd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4406c376895608375105013bf405ecac720ef558
refs/heads/master: 4b0dd98e70b6516c2c26f28091c2fb09f0ecf215
56 changes: 25 additions & 31 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2651,7 +2651,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
struct ieee80211_rx_data rx;
struct ieee80211_sub_if_data *prev;
struct sta_info *sta, *tmp, *prev_sta;
bool found_sta = false;
int err = 0;

fc = ((struct ieee80211_hdr *)skb->data)->frame_control;
Expand Down Expand Up @@ -2684,8 +2683,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
prev_sta = NULL;

for_each_sta_info(local, hdr->addr2, sta, tmp) {
found_sta = true;

if (!prev_sta) {
prev_sta = sta;
continue;
Expand All @@ -2707,43 +2704,40 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
}
}

if (!found_sta) {
prev = NULL;

list_for_each_entry_rcu(sdata, &local->interfaces, list) {
if (!ieee80211_sdata_running(sdata))
continue;

if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
continue;
prev = NULL;

/*
* frame is destined for this interface, but if it's
* not also for the previous one we handle that after
* the loop to avoid copying the SKB once too much
*/
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
if (!ieee80211_sdata_running(sdata))
continue;

if (!prev) {
prev = sdata;
continue;
}
if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
continue;

rx.sta = sta_info_get_bss(prev, hdr->addr2);
rx.sdata = prev;
ieee80211_prepare_and_rx_handle(&rx, skb, false);
/*
* frame is destined for this interface, but if it's
* not also for the previous one we handle that after
* the loop to avoid copying the SKB once too much
*/

if (!prev) {
prev = sdata;
continue;
}

if (prev) {
rx.sta = sta_info_get_bss(prev, hdr->addr2);
rx.sdata = prev;
rx.sta = sta_info_get_bss(prev, hdr->addr2);
rx.sdata = prev;
ieee80211_prepare_and_rx_handle(&rx, skb, false);

if (ieee80211_prepare_and_rx_handle(&rx, skb, true))
return;
}
prev = sdata;
}

if (prev) {
rx.sta = sta_info_get_bss(prev, hdr->addr2);
rx.sdata = prev;

if (ieee80211_prepare_and_rx_handle(&rx, skb, true))
return;
}

dev_kfree_skb(skb);
Expand Down

0 comments on commit 9cf43bd

Please sign in to comment.