aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-09 08:55:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-11 15:53:39 -0400
commit759ef3eb1eeba8ff7411771e7b9cf6bfd6bb9cfe (patch)
treefdb6700c59f2c1e48579896a0c4ad051ac7671d7
parent39192c0bcf556c8521dcf0203714e9d48ac0b9f6 (diff)
mac80211: make ieee80211_rx_h_mgmt more readable
That function isn't exactly easy to read especially since it does something in an if branch that continues after the if because the else returns. Express it in a more readable way. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/rx.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index d00ace78bf8d..d0803797902b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1586,20 +1586,20 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
1586static ieee80211_rx_result debug_noinline 1586static ieee80211_rx_result debug_noinline
1587ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx) 1587ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
1588{ 1588{
1589 struct ieee80211_sub_if_data *sdata; 1589 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
1590 1590
1591 if (!(rx->flags & IEEE80211_RX_RA_MATCH)) 1591 if (!(rx->flags & IEEE80211_RX_RA_MATCH))
1592 return RX_DROP_MONITOR; 1592 return RX_DROP_MONITOR;
1593 1593
1594 sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); 1594 if (sdata->vif.type != IEEE80211_IF_TYPE_STA &&
1595 if ((sdata->vif.type == IEEE80211_IF_TYPE_STA || 1595 sdata->vif.type != IEEE80211_IF_TYPE_IBSS &&
1596 sdata->vif.type == IEEE80211_IF_TYPE_IBSS || 1596 sdata->vif.type != IEEE80211_IF_TYPE_MESH_POINT)
1597 sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) && 1597 return RX_DROP_MONITOR;
1598 !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) 1598
1599 ieee80211_sta_rx_mgmt(sdata, rx->skb, rx->status); 1599 if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)
1600 else
1601 return RX_DROP_MONITOR; 1600 return RX_DROP_MONITOR;
1602 1601
1602 ieee80211_sta_rx_mgmt(sdata, rx->skb, rx->status);
1603 return RX_QUEUED; 1603 return RX_QUEUED;
1604} 1604}
1605 1605