aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-06-11 17:21:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:13 -0400
commit87228f57434108d8463ff10fd408d8d1273a23d2 (patch)
tree1ba172f6a1528a220e5dc2317d94865cef3110f0 /net
parent002aaf4ea6be3247c246d274979359c3bc93c82a (diff)
mac80211: rx.c use new helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/rx.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index a3643fd86af9..e80336f8f1ea 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -67,12 +67,9 @@ static inline int should_drop_frame(struct ieee80211_rx_status *status,
67 return 1; 67 return 1;
68 if (unlikely(skb->len < 16 + present_fcs_len + radiotap_len)) 68 if (unlikely(skb->len < 16 + present_fcs_len + radiotap_len))
69 return 1; 69 return 1;
70 if (((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == 70 if (ieee80211_is_ctl(hdr->frame_control) &&
71 cpu_to_le16(IEEE80211_FTYPE_CTL)) && 71 !ieee80211_is_pspoll(hdr->frame_control) &&
72 ((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_STYPE)) != 72 !ieee80211_is_back_req(hdr->frame_control))
73 cpu_to_le16(IEEE80211_STYPE_PSPOLL)) &&
74 ((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_STYPE)) !=
75 cpu_to_le16(IEEE80211_STYPE_BACK_REQ)))
76 return 1; 73 return 1;
77 return 0; 74 return 0;
78} 75}
@@ -2118,7 +2115,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,
2118 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 2115 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
2119 struct sta_info *sta; 2116 struct sta_info *sta;
2120 struct tid_ampdu_rx *tid_agg_rx; 2117 struct tid_ampdu_rx *tid_agg_rx;
2121 u16 fc, sc; 2118 u16 sc;
2122 u16 mpdu_seq_num; 2119 u16 mpdu_seq_num;
2123 u8 ret = 0, *qc; 2120 u8 ret = 0, *qc;
2124 int tid; 2121 int tid;
@@ -2127,14 +2124,12 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,
2127 if (!sta) 2124 if (!sta)
2128 return ret; 2125 return ret;
2129 2126
2130 fc = le16_to_cpu(hdr->frame_control);
2131
2132 /* filter the QoS data rx stream according to 2127 /* filter the QoS data rx stream according to
2133 * STA/TID and check if this STA/TID is on aggregation */ 2128 * STA/TID and check if this STA/TID is on aggregation */
2134 if (!WLAN_FC_IS_QOS_DATA(fc)) 2129 if (!ieee80211_is_data_qos(hdr->frame_control))
2135 goto end_reorder; 2130 goto end_reorder;
2136 2131
2137 qc = skb->data + ieee80211_get_hdrlen(fc) - QOS_CONTROL_LEN; 2132 qc = ieee80211_get_qos_ctl(hdr);
2138 tid = qc[0] & QOS_CONTROL_TID_MASK; 2133 tid = qc[0] & QOS_CONTROL_TID_MASK;
2139 2134
2140 if (sta->ampdu_mlme.tid_state_rx[tid] != HT_AGG_STATE_OPERATIONAL) 2135 if (sta->ampdu_mlme.tid_state_rx[tid] != HT_AGG_STATE_OPERATIONAL)
@@ -2143,7 +2138,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,
2143 tid_agg_rx = sta->ampdu_mlme.tid_rx[tid]; 2138 tid_agg_rx = sta->ampdu_mlme.tid_rx[tid];
2144 2139
2145 /* null data frames are excluded */ 2140 /* null data frames are excluded */
2146 if (unlikely(fc & IEEE80211_STYPE_NULLFUNC)) 2141 if (unlikely(ieee80211_is_nullfunc(hdr->frame_control)))
2147 goto end_reorder; 2142 goto end_reorder;
2148 2143
2149 /* new un-ordered ampdu frame - process it */ 2144 /* new un-ordered ampdu frame - process it */