Commit 4b0dd98e authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: clean up rx handling wrt. found_sta

If a station was found, then we'll have exited
the function already, so it is not necessary to
have a variable keeping track of it.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4406c376
...@@ -2651,7 +2651,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, ...@@ -2651,7 +2651,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
struct ieee80211_rx_data rx; struct ieee80211_rx_data rx;
struct ieee80211_sub_if_data *prev; struct ieee80211_sub_if_data *prev;
struct sta_info *sta, *tmp, *prev_sta; struct sta_info *sta, *tmp, *prev_sta;
bool found_sta = false;
int err = 0; int err = 0;
fc = ((struct ieee80211_hdr *)skb->data)->frame_control; fc = ((struct ieee80211_hdr *)skb->data)->frame_control;
...@@ -2684,8 +2683,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, ...@@ -2684,8 +2683,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
prev_sta = NULL; prev_sta = NULL;
for_each_sta_info(local, hdr->addr2, sta, tmp) { for_each_sta_info(local, hdr->addr2, sta, tmp) {
found_sta = true;
if (!prev_sta) { if (!prev_sta) {
prev_sta = sta; prev_sta = sta;
continue; continue;
...@@ -2707,7 +2704,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, ...@@ -2707,7 +2704,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
} }
} }
if (!found_sta) {
prev = NULL; prev = NULL;
list_for_each_entry_rcu(sdata, &local->interfaces, list) { list_for_each_entry_rcu(sdata, &local->interfaces, list) {
...@@ -2744,8 +2740,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, ...@@ -2744,8 +2740,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
return; return;
} }
}
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment