aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211/ieee80211_rx.c
diff options
context:
space:
mode:
authorJames Ketrenos <jketreno@linux.intel.com>2005-09-21 12:54:36 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-21 23:02:30 -0400
commitee34af37c095482b9dba254b9cd7cb5e65e9a25e (patch)
treeeed75aee11663053e658d839fb91bc8dfae56ecb /net/ieee80211/ieee80211_rx.c
parente0d369d1d969fc9e4fd08a20f6dad04d369aceea (diff)
[PATCH] ieee80211: Renamed ieee80211_hdr to ieee80211_hdr_3addr
tree e9c18b2c8e5ad446a4d213243c2dcf9fd1652a7b parent 4e97ad6ae7084a4f741e94e76c41c68bc7c5a76a author James Ketrenos <jketreno@linux.intel.com> 1124444315 -0500 committer James Ketrenos <jketreno@linux.intel.com> 1127312922 -0500 Renamed ieee80211_hdr to ieee80211_hdr_3addr and modified ieee80211_hdr to just contain the frame_ctrl and duration_id. Changed uses of ieee80211_hdr to ieee80211_hdr_4addr or ieee80211_hdr_3addr based on what was expected for that portion of code. NOTE: This requires changes to ipw2100, ipw2200, hostap, and atmel drivers. Signed-off-by: James Ketrenos <jketreno@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'net/ieee80211/ieee80211_rx.c')
-rw-r--r--net/ieee80211/ieee80211_rx.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 9a125d45289a..71d14c7d915c 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -87,7 +87,7 @@ static struct ieee80211_frag_entry *ieee80211_frag_cache_find(struct
87 87
88/* Called only as a tasklet (software IRQ) */ 88/* Called only as a tasklet (software IRQ) */
89static struct sk_buff *ieee80211_frag_cache_get(struct ieee80211_device *ieee, 89static struct sk_buff *ieee80211_frag_cache_get(struct ieee80211_device *ieee,
90 struct ieee80211_hdr *hdr) 90 struct ieee80211_hdr_4addr *hdr)
91{ 91{
92 struct sk_buff *skb = NULL; 92 struct sk_buff *skb = NULL;
93 u16 sc; 93 u16 sc;
@@ -101,7 +101,7 @@ static struct sk_buff *ieee80211_frag_cache_get(struct ieee80211_device *ieee,
101 if (frag == 0) { 101 if (frag == 0) {
102 /* Reserve enough space to fit maximum frame length */ 102 /* Reserve enough space to fit maximum frame length */
103 skb = dev_alloc_skb(ieee->dev->mtu + 103 skb = dev_alloc_skb(ieee->dev->mtu +
104 sizeof(struct ieee80211_hdr) + 104 sizeof(struct ieee80211_hdr_4addr) +
105 8 /* LLC */ + 105 8 /* LLC */ +
106 2 /* alignment */ + 106 2 /* alignment */ +
107 8 /* WEP */ + ETH_ALEN /* WDS */ ); 107 8 /* WEP */ + ETH_ALEN /* WDS */ );
@@ -138,7 +138,7 @@ static struct sk_buff *ieee80211_frag_cache_get(struct ieee80211_device *ieee,
138 138
139/* Called only as a tasklet (software IRQ) */ 139/* Called only as a tasklet (software IRQ) */
140static int ieee80211_frag_cache_invalidate(struct ieee80211_device *ieee, 140static int ieee80211_frag_cache_invalidate(struct ieee80211_device *ieee,
141 struct ieee80211_hdr *hdr) 141 struct ieee80211_hdr_4addr *hdr)
142{ 142{
143 u16 sc; 143 u16 sc;
144 unsigned int seq; 144 unsigned int seq;
@@ -176,7 +176,7 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
176 ieee->dev->name); 176 ieee->dev->name);
177 return 0; 177 return 0;
178/* 178/*
179 hostap_update_sta_ps(ieee, (struct hostap_ieee80211_hdr *) 179 hostap_update_sta_ps(ieee, (struct hostap_ieee80211_hdr_4addr *)
180 skb->data);*/ 180 skb->data);*/
181 } 181 }
182 182
@@ -232,13 +232,13 @@ static int ieee80211_is_eapol_frame(struct ieee80211_device *ieee,
232{ 232{
233 struct net_device *dev = ieee->dev; 233 struct net_device *dev = ieee->dev;
234 u16 fc, ethertype; 234 u16 fc, ethertype;
235 struct ieee80211_hdr *hdr; 235 struct ieee80211_hdr_3addr *hdr;
236 u8 *pos; 236 u8 *pos;
237 237
238 if (skb->len < 24) 238 if (skb->len < 24)
239 return 0; 239 return 0;
240 240
241 hdr = (struct ieee80211_hdr *)skb->data; 241 hdr = (struct ieee80211_hdr_3addr *)skb->data;
242 fc = le16_to_cpu(hdr->frame_ctl); 242 fc = le16_to_cpu(hdr->frame_ctl);
243 243
244 /* check that the frame is unicast frame to us */ 244 /* check that the frame is unicast frame to us */
@@ -271,13 +271,13 @@ static inline int
271ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb, 271ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb,
272 struct ieee80211_crypt_data *crypt) 272 struct ieee80211_crypt_data *crypt)
273{ 273{
274 struct ieee80211_hdr *hdr; 274 struct ieee80211_hdr_3addr *hdr;
275 int res, hdrlen; 275 int res, hdrlen;
276 276
277 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) 277 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL)
278 return 0; 278 return 0;
279 279
280 hdr = (struct ieee80211_hdr *)skb->data; 280 hdr = (struct ieee80211_hdr_3addr *)skb->data;
281 hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); 281 hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
282 282
283 atomic_inc(&crypt->refcnt); 283 atomic_inc(&crypt->refcnt);
@@ -303,13 +303,13 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee,
303 struct sk_buff *skb, int keyidx, 303 struct sk_buff *skb, int keyidx,
304 struct ieee80211_crypt_data *crypt) 304 struct ieee80211_crypt_data *crypt)
305{ 305{
306 struct ieee80211_hdr *hdr; 306 struct ieee80211_hdr_3addr *hdr;
307 int res, hdrlen; 307 int res, hdrlen;
308 308
309 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) 309 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL)
310 return 0; 310 return 0;
311 311
312 hdr = (struct ieee80211_hdr *)skb->data; 312 hdr = (struct ieee80211_hdr_3addr *)skb->data;
313 hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); 313 hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
314 314
315 atomic_inc(&crypt->refcnt); 315 atomic_inc(&crypt->refcnt);
@@ -332,7 +332,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
332 struct ieee80211_rx_stats *rx_stats) 332 struct ieee80211_rx_stats *rx_stats)
333{ 333{
334 struct net_device *dev = ieee->dev; 334 struct net_device *dev = ieee->dev;
335 struct ieee80211_hdr *hdr; 335 struct ieee80211_hdr_4addr *hdr;
336 size_t hdrlen; 336 size_t hdrlen;
337 u16 fc, type, stype, sc; 337 u16 fc, type, stype, sc;
338 struct net_device_stats *stats; 338 struct net_device_stats *stats;
@@ -352,7 +352,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
352 struct ieee80211_crypt_data *crypt = NULL; 352 struct ieee80211_crypt_data *crypt = NULL;
353 int keyidx = 0; 353 int keyidx = 0;
354 354
355 hdr = (struct ieee80211_hdr *)skb->data; 355 hdr = (struct ieee80211_hdr_4addr *)skb->data;
356 stats = &ieee->stats; 356 stats = &ieee->stats;
357 357
358 if (skb->len < 10) { 358 if (skb->len < 10) {
@@ -552,7 +552,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
552 (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0) 552 (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0)
553 goto rx_dropped; 553 goto rx_dropped;
554 554
555 hdr = (struct ieee80211_hdr *)skb->data; 555 hdr = (struct ieee80211_hdr_4addr *)skb->data;
556 556
557 /* skb: hdr + (possibly fragmented) plaintext payload */ 557 /* skb: hdr + (possibly fragmented) plaintext payload */
558 // PR: FIXME: hostap has additional conditions in the "if" below: 558 // PR: FIXME: hostap has additional conditions in the "if" below:
@@ -606,7 +606,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
606 /* this was the last fragment and the frame will be 606 /* this was the last fragment and the frame will be
607 * delivered, so remove skb from fragment cache */ 607 * delivered, so remove skb from fragment cache */
608 skb = frag_skb; 608 skb = frag_skb;
609 hdr = (struct ieee80211_hdr *)skb->data; 609 hdr = (struct ieee80211_hdr_4addr *)skb->data;
610 ieee80211_frag_cache_invalidate(ieee, hdr); 610 ieee80211_frag_cache_invalidate(ieee, hdr);
611 } 611 }
612 612
@@ -616,7 +616,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
616 ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) 616 ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt))
617 goto rx_dropped; 617 goto rx_dropped;
618 618
619 hdr = (struct ieee80211_hdr *)skb->data; 619 hdr = (struct ieee80211_hdr_4addr *)skb->data;
620 if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep) { 620 if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep) {
621 if ( /*ieee->ieee802_1x && */ 621 if ( /*ieee->ieee802_1x && */
622 ieee80211_is_eapol_frame(ieee, skb)) { 622 ieee80211_is_eapol_frame(ieee, skb)) {
@@ -1148,7 +1148,7 @@ static inline void ieee80211_process_probe_response(struct ieee80211_device
1148} 1148}
1149 1149
1150void ieee80211_rx_mgt(struct ieee80211_device *ieee, 1150void ieee80211_rx_mgt(struct ieee80211_device *ieee,
1151 struct ieee80211_hdr *header, 1151 struct ieee80211_hdr_4addr *header,
1152 struct ieee80211_rx_stats *stats) 1152 struct ieee80211_rx_stats *stats)
1153{ 1153{
1154 switch (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl))) { 1154 switch (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl))) {