Commit 759ef3eb authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 39192c0b
...@@ -1586,20 +1586,20 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) ...@@ -1586,20 +1586,20 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
static ieee80211_rx_result debug_noinline static ieee80211_rx_result debug_noinline
ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx) ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
{ {
struct ieee80211_sub_if_data *sdata; struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
if (!(rx->flags & IEEE80211_RX_RA_MATCH)) if (!(rx->flags & IEEE80211_RX_RA_MATCH))
return RX_DROP_MONITOR; return RX_DROP_MONITOR;
sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); if (sdata->vif.type != IEEE80211_IF_TYPE_STA &&
if ((sdata->vif.type == IEEE80211_IF_TYPE_STA || sdata->vif.type != IEEE80211_IF_TYPE_IBSS &&
sdata->vif.type == IEEE80211_IF_TYPE_IBSS || sdata->vif.type != IEEE80211_IF_TYPE_MESH_POINT)
sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) && return RX_DROP_MONITOR;
!(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME))
ieee80211_sta_rx_mgmt(sdata, rx->skb, rx->status); if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)
else
return RX_DROP_MONITOR; return RX_DROP_MONITOR;
ieee80211_sta_rx_mgmt(sdata, rx->skb, rx->status);
return RX_QUEUED; return RX_QUEUED;
} }
......
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