diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-01-31 13:48:20 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:01 -0500 |
commit | 9ae54c8463691b64ca6e6d8680787a6527810984 (patch) | |
tree | 02ace411ce3ba8eb8d1862852f52ff042fd59290 /net/mac80211/ieee80211_sta.c | |
parent | 78330fddec4e326af5e6aede0fc97824c690ba1d (diff) |
mac80211: split ieee80211_txrx_result
The _DROP result will need to be split in the RX path but not
in the TX path, so for preparation split up the type into two
types, one for RX and one for TX. Also make sure (via sparse)
that they cannot be confused.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index dac02d001ef0..991689371bdc 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -2559,7 +2559,7 @@ static void ieee80211_sta_rx_queued_mgmt(struct net_device *dev, | |||
2559 | } | 2559 | } |
2560 | 2560 | ||
2561 | 2561 | ||
2562 | ieee80211_txrx_result | 2562 | ieee80211_rx_result |
2563 | ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb, | 2563 | ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb, |
2564 | struct ieee80211_rx_status *rx_status) | 2564 | struct ieee80211_rx_status *rx_status) |
2565 | { | 2565 | { |
@@ -2567,31 +2567,31 @@ ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb, | |||
2567 | u16 fc; | 2567 | u16 fc; |
2568 | 2568 | ||
2569 | if (skb->len < 2) | 2569 | if (skb->len < 2) |
2570 | return TXRX_DROP; | 2570 | return RX_DROP; |
2571 | 2571 | ||
2572 | mgmt = (struct ieee80211_mgmt *) skb->data; | 2572 | mgmt = (struct ieee80211_mgmt *) skb->data; |
2573 | fc = le16_to_cpu(mgmt->frame_control); | 2573 | fc = le16_to_cpu(mgmt->frame_control); |
2574 | 2574 | ||
2575 | if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) | 2575 | if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) |
2576 | return TXRX_CONTINUE; | 2576 | return RX_CONTINUE; |
2577 | 2577 | ||
2578 | if (skb->len < 24) | 2578 | if (skb->len < 24) |
2579 | return TXRX_DROP; | 2579 | return RX_DROP; |
2580 | 2580 | ||
2581 | if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) { | 2581 | if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) { |
2582 | if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP) { | 2582 | if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP) { |
2583 | ieee80211_rx_mgmt_probe_resp(dev, mgmt, | 2583 | ieee80211_rx_mgmt_probe_resp(dev, mgmt, |
2584 | skb->len, rx_status); | 2584 | skb->len, rx_status); |
2585 | dev_kfree_skb(skb); | 2585 | dev_kfree_skb(skb); |
2586 | return TXRX_QUEUED; | 2586 | return RX_QUEUED; |
2587 | } else if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON) { | 2587 | } else if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON) { |
2588 | ieee80211_rx_mgmt_beacon(dev, mgmt, skb->len, | 2588 | ieee80211_rx_mgmt_beacon(dev, mgmt, skb->len, |
2589 | rx_status); | 2589 | rx_status); |
2590 | dev_kfree_skb(skb); | 2590 | dev_kfree_skb(skb); |
2591 | return TXRX_QUEUED; | 2591 | return RX_QUEUED; |
2592 | } | 2592 | } |
2593 | } | 2593 | } |
2594 | return TXRX_CONTINUE; | 2594 | return RX_CONTINUE; |
2595 | } | 2595 | } |
2596 | 2596 | ||
2597 | 2597 | ||