diff options
Diffstat (limited to 'drivers/net/wireless/orinoco.c')
-rw-r--r-- | drivers/net/wireless/orinoco.c | 255 |
1 files changed, 72 insertions, 183 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index c2d0b09e0418..8a31b591a901 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -201,41 +201,12 @@ static struct { | |||
201 | /* Data types */ | 201 | /* Data types */ |
202 | /********************************************************************/ | 202 | /********************************************************************/ |
203 | 203 | ||
204 | /* Used in Event handling. | 204 | /* Beginning of the Tx descriptor, used in TxExc handling */ |
205 | * We avoid nested structures as they break on ARM -- Moustafa */ | 205 | struct hermes_txexc_data { |
206 | struct hermes_tx_descriptor_802_11 { | 206 | struct hermes_tx_descriptor desc; |
207 | /* hermes_tx_descriptor */ | ||
208 | __le16 status; | ||
209 | __le16 reserved1; | ||
210 | __le16 reserved2; | ||
211 | __le32 sw_support; | ||
212 | u8 retry_count; | ||
213 | u8 tx_rate; | ||
214 | __le16 tx_control; | ||
215 | |||
216 | /* ieee80211_hdr */ | ||
217 | __le16 frame_ctl; | 207 | __le16 frame_ctl; |
218 | __le16 duration_id; | 208 | __le16 duration_id; |
219 | u8 addr1[ETH_ALEN]; | 209 | u8 addr1[ETH_ALEN]; |
220 | u8 addr2[ETH_ALEN]; | ||
221 | u8 addr3[ETH_ALEN]; | ||
222 | __le16 seq_ctl; | ||
223 | u8 addr4[ETH_ALEN]; | ||
224 | |||
225 | __le16 data_len; | ||
226 | |||
227 | /* ethhdr */ | ||
228 | u8 h_dest[ETH_ALEN]; /* destination eth addr */ | ||
229 | u8 h_source[ETH_ALEN]; /* source ether addr */ | ||
230 | __be16 h_proto; /* packet type ID field */ | ||
231 | |||
232 | /* p8022_hdr */ | ||
233 | u8 dsap; | ||
234 | u8 ssap; | ||
235 | u8 ctrl; | ||
236 | u8 oui[3]; | ||
237 | |||
238 | __be16 ethertype; | ||
239 | } __attribute__ ((packed)); | 210 | } __attribute__ ((packed)); |
240 | 211 | ||
241 | /* Rx frame header except compatibility 802.3 header */ | 212 | /* Rx frame header except compatibility 802.3 header */ |
@@ -450,53 +421,39 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
450 | hermes_t *hw = &priv->hw; | 421 | hermes_t *hw = &priv->hw; |
451 | int err = 0; | 422 | int err = 0; |
452 | u16 txfid = priv->txfid; | 423 | u16 txfid = priv->txfid; |
453 | char *p; | ||
454 | struct ethhdr *eh; | 424 | struct ethhdr *eh; |
455 | int len, data_len, data_off; | 425 | int data_off; |
456 | struct hermes_tx_descriptor desc; | 426 | struct hermes_tx_descriptor desc; |
457 | unsigned long flags; | 427 | unsigned long flags; |
458 | 428 | ||
459 | TRACE_ENTER(dev->name); | ||
460 | |||
461 | if (! netif_running(dev)) { | 429 | if (! netif_running(dev)) { |
462 | printk(KERN_ERR "%s: Tx on stopped device!\n", | 430 | printk(KERN_ERR "%s: Tx on stopped device!\n", |
463 | dev->name); | 431 | dev->name); |
464 | TRACE_EXIT(dev->name); | 432 | return NETDEV_TX_BUSY; |
465 | return 1; | ||
466 | } | 433 | } |
467 | 434 | ||
468 | if (netif_queue_stopped(dev)) { | 435 | if (netif_queue_stopped(dev)) { |
469 | printk(KERN_DEBUG "%s: Tx while transmitter busy!\n", | 436 | printk(KERN_DEBUG "%s: Tx while transmitter busy!\n", |
470 | dev->name); | 437 | dev->name); |
471 | TRACE_EXIT(dev->name); | 438 | return NETDEV_TX_BUSY; |
472 | return 1; | ||
473 | } | 439 | } |
474 | 440 | ||
475 | if (orinoco_lock(priv, &flags) != 0) { | 441 | if (orinoco_lock(priv, &flags) != 0) { |
476 | printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n", | 442 | printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n", |
477 | dev->name); | 443 | dev->name); |
478 | TRACE_EXIT(dev->name); | 444 | return NETDEV_TX_BUSY; |
479 | return 1; | ||
480 | } | 445 | } |
481 | 446 | ||
482 | if (! netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) { | 447 | if (! netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) { |
483 | /* Oops, the firmware hasn't established a connection, | 448 | /* Oops, the firmware hasn't established a connection, |
484 | silently drop the packet (this seems to be the | 449 | silently drop the packet (this seems to be the |
485 | safest approach). */ | 450 | safest approach). */ |
486 | stats->tx_errors++; | 451 | goto drop; |
487 | orinoco_unlock(priv, &flags); | ||
488 | dev_kfree_skb(skb); | ||
489 | TRACE_EXIT(dev->name); | ||
490 | return 0; | ||
491 | } | 452 | } |
492 | 453 | ||
493 | /* Length of the packet body */ | 454 | /* Check packet length */ |
494 | /* FIXME: what if the skb is smaller than this? */ | 455 | if (skb->len < ETH_HLEN) |
495 | len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN); | 456 | goto drop; |
496 | skb = skb_padto(skb, len); | ||
497 | if (skb == NULL) | ||
498 | goto fail; | ||
499 | len -= ETH_HLEN; | ||
500 | 457 | ||
501 | eh = (struct ethhdr *)skb->data; | 458 | eh = (struct ethhdr *)skb->data; |
502 | 459 | ||
@@ -507,8 +464,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
507 | if (net_ratelimit()) | 464 | if (net_ratelimit()) |
508 | printk(KERN_ERR "%s: Error %d writing Tx descriptor " | 465 | printk(KERN_ERR "%s: Error %d writing Tx descriptor " |
509 | "to BAP\n", dev->name, err); | 466 | "to BAP\n", dev->name, err); |
510 | stats->tx_errors++; | 467 | goto busy; |
511 | goto fail; | ||
512 | } | 468 | } |
513 | 469 | ||
514 | /* Clear the 802.11 header and data length fields - some | 470 | /* Clear the 802.11 header and data length fields - some |
@@ -519,50 +475,38 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
519 | 475 | ||
520 | /* Encapsulate Ethernet-II frames */ | 476 | /* Encapsulate Ethernet-II frames */ |
521 | if (ntohs(eh->h_proto) > ETH_DATA_LEN) { /* Ethernet-II frame */ | 477 | if (ntohs(eh->h_proto) > ETH_DATA_LEN) { /* Ethernet-II frame */ |
522 | struct header_struct hdr; | 478 | struct header_struct { |
523 | data_len = len; | 479 | struct ethhdr eth; /* 802.3 header */ |
524 | data_off = HERMES_802_3_OFFSET + sizeof(hdr); | 480 | u8 encap[6]; /* 802.2 header */ |
525 | p = skb->data + ETH_HLEN; | 481 | } __attribute__ ((packed)) hdr; |
526 | 482 | ||
527 | /* 802.3 header */ | 483 | /* Strip destination and source from the data */ |
528 | memcpy(hdr.dest, eh->h_dest, ETH_ALEN); | 484 | skb_pull(skb, 2 * ETH_ALEN); |
529 | memcpy(hdr.src, eh->h_source, ETH_ALEN); | 485 | data_off = HERMES_802_2_OFFSET + sizeof(encaps_hdr); |
530 | hdr.len = htons(data_len + ENCAPS_OVERHEAD); | 486 | |
531 | 487 | /* And move them to a separate header */ | |
532 | /* 802.2 header */ | 488 | memcpy(&hdr.eth, eh, 2 * ETH_ALEN); |
533 | memcpy(&hdr.dsap, &encaps_hdr, sizeof(encaps_hdr)); | 489 | hdr.eth.h_proto = htons(sizeof(encaps_hdr) + skb->len); |
534 | 490 | memcpy(hdr.encap, encaps_hdr, sizeof(encaps_hdr)); | |
535 | hdr.ethertype = eh->h_proto; | 491 | |
536 | err = hermes_bap_pwrite(hw, USER_BAP, &hdr, sizeof(hdr), | 492 | err = hermes_bap_pwrite(hw, USER_BAP, &hdr, sizeof(hdr), |
537 | txfid, HERMES_802_3_OFFSET); | 493 | txfid, HERMES_802_3_OFFSET); |
538 | if (err) { | 494 | if (err) { |
539 | if (net_ratelimit()) | 495 | if (net_ratelimit()) |
540 | printk(KERN_ERR "%s: Error %d writing packet " | 496 | printk(KERN_ERR "%s: Error %d writing packet " |
541 | "header to BAP\n", dev->name, err); | 497 | "header to BAP\n", dev->name, err); |
542 | stats->tx_errors++; | 498 | goto busy; |
543 | goto fail; | ||
544 | } | 499 | } |
545 | /* Actual xfer length - allow for padding */ | ||
546 | len = ALIGN(data_len, 2); | ||
547 | if (len < ETH_ZLEN - ETH_HLEN) | ||
548 | len = ETH_ZLEN - ETH_HLEN; | ||
549 | } else { /* IEEE 802.3 frame */ | 500 | } else { /* IEEE 802.3 frame */ |
550 | data_len = len + ETH_HLEN; | ||
551 | data_off = HERMES_802_3_OFFSET; | 501 | data_off = HERMES_802_3_OFFSET; |
552 | p = skb->data; | ||
553 | /* Actual xfer length - round up for odd length packets */ | ||
554 | len = ALIGN(data_len, 2); | ||
555 | if (len < ETH_ZLEN) | ||
556 | len = ETH_ZLEN; | ||
557 | } | 502 | } |
558 | 503 | ||
559 | err = hermes_bap_pwrite_pad(hw, USER_BAP, p, data_len, len, | 504 | err = hermes_bap_pwrite(hw, USER_BAP, skb->data, skb->len, |
560 | txfid, data_off); | 505 | txfid, data_off); |
561 | if (err) { | 506 | if (err) { |
562 | printk(KERN_ERR "%s: Error %d writing packet to BAP\n", | 507 | printk(KERN_ERR "%s: Error %d writing packet to BAP\n", |
563 | dev->name, err); | 508 | dev->name, err); |
564 | stats->tx_errors++; | 509 | goto busy; |
565 | goto fail; | ||
566 | } | 510 | } |
567 | 511 | ||
568 | /* Finally, we actually initiate the send */ | 512 | /* Finally, we actually initiate the send */ |
@@ -575,25 +519,27 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
575 | if (net_ratelimit()) | 519 | if (net_ratelimit()) |
576 | printk(KERN_ERR "%s: Error %d transmitting packet\n", | 520 | printk(KERN_ERR "%s: Error %d transmitting packet\n", |
577 | dev->name, err); | 521 | dev->name, err); |
578 | stats->tx_errors++; | 522 | goto busy; |
579 | goto fail; | ||
580 | } | 523 | } |
581 | 524 | ||
582 | dev->trans_start = jiffies; | 525 | dev->trans_start = jiffies; |
583 | stats->tx_bytes += data_off + data_len; | 526 | stats->tx_bytes += data_off + skb->len; |
527 | goto ok; | ||
584 | 528 | ||
585 | orinoco_unlock(priv, &flags); | 529 | drop: |
530 | stats->tx_errors++; | ||
531 | stats->tx_dropped++; | ||
586 | 532 | ||
533 | ok: | ||
534 | orinoco_unlock(priv, &flags); | ||
587 | dev_kfree_skb(skb); | 535 | dev_kfree_skb(skb); |
536 | return NETDEV_TX_OK; | ||
588 | 537 | ||
589 | TRACE_EXIT(dev->name); | 538 | busy: |
590 | 539 | if (err == -EIO) | |
591 | return 0; | 540 | schedule_work(&priv->reset_work); |
592 | fail: | ||
593 | TRACE_EXIT(dev->name); | ||
594 | |||
595 | orinoco_unlock(priv, &flags); | 541 | orinoco_unlock(priv, &flags); |
596 | return err; | 542 | return NETDEV_TX_BUSY; |
597 | } | 543 | } |
598 | 544 | ||
599 | static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw) | 545 | static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw) |
@@ -629,7 +575,7 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) | |||
629 | struct net_device_stats *stats = &priv->stats; | 575 | struct net_device_stats *stats = &priv->stats; |
630 | u16 fid = hermes_read_regn(hw, TXCOMPLFID); | 576 | u16 fid = hermes_read_regn(hw, TXCOMPLFID); |
631 | u16 status; | 577 | u16 status; |
632 | struct hermes_tx_descriptor_802_11 hdr; | 578 | struct hermes_txexc_data hdr; |
633 | int err = 0; | 579 | int err = 0; |
634 | 580 | ||
635 | if (fid == DUMMY_FID) | 581 | if (fid == DUMMY_FID) |
@@ -637,8 +583,7 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) | |||
637 | 583 | ||
638 | /* Read part of the frame header - we need status and addr1 */ | 584 | /* Read part of the frame header - we need status and addr1 */ |
639 | err = hermes_bap_pread(hw, IRQ_BAP, &hdr, | 585 | err = hermes_bap_pread(hw, IRQ_BAP, &hdr, |
640 | offsetof(struct hermes_tx_descriptor_802_11, | 586 | sizeof(struct hermes_txexc_data), |
641 | addr2), | ||
642 | fid, 0); | 587 | fid, 0); |
643 | 588 | ||
644 | hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); | 589 | hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); |
@@ -658,7 +603,7 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) | |||
658 | * exceeded, because that's the only status that really mean | 603 | * exceeded, because that's the only status that really mean |
659 | * that this particular node went away. | 604 | * that this particular node went away. |
660 | * Other errors means that *we* screwed up. - Jean II */ | 605 | * Other errors means that *we* screwed up. - Jean II */ |
661 | status = le16_to_cpu(hdr.status); | 606 | status = le16_to_cpu(hdr.desc.status); |
662 | if (status & (HERMES_TXSTAT_RETRYERR | HERMES_TXSTAT_AGEDERR)) { | 607 | if (status & (HERMES_TXSTAT_RETRYERR | HERMES_TXSTAT_AGEDERR)) { |
663 | union iwreq_data wrqu; | 608 | union iwreq_data wrqu; |
664 | 609 | ||
@@ -1398,16 +1343,12 @@ int __orinoco_down(struct net_device *dev) | |||
1398 | return 0; | 1343 | return 0; |
1399 | } | 1344 | } |
1400 | 1345 | ||
1401 | int orinoco_reinit_firmware(struct net_device *dev) | 1346 | static int orinoco_allocate_fid(struct net_device *dev) |
1402 | { | 1347 | { |
1403 | struct orinoco_private *priv = netdev_priv(dev); | 1348 | struct orinoco_private *priv = netdev_priv(dev); |
1404 | struct hermes *hw = &priv->hw; | 1349 | struct hermes *hw = &priv->hw; |
1405 | int err; | 1350 | int err; |
1406 | 1351 | ||
1407 | err = hermes_init(hw); | ||
1408 | if (err) | ||
1409 | return err; | ||
1410 | |||
1411 | err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); | 1352 | err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); |
1412 | if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) { | 1353 | if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) { |
1413 | /* Try workaround for old Symbol firmware bug */ | 1354 | /* Try workaround for old Symbol firmware bug */ |
@@ -1426,6 +1367,19 @@ int orinoco_reinit_firmware(struct net_device *dev) | |||
1426 | return err; | 1367 | return err; |
1427 | } | 1368 | } |
1428 | 1369 | ||
1370 | int orinoco_reinit_firmware(struct net_device *dev) | ||
1371 | { | ||
1372 | struct orinoco_private *priv = netdev_priv(dev); | ||
1373 | struct hermes *hw = &priv->hw; | ||
1374 | int err; | ||
1375 | |||
1376 | err = hermes_init(hw); | ||
1377 | if (!err) | ||
1378 | err = orinoco_allocate_fid(dev); | ||
1379 | |||
1380 | return err; | ||
1381 | } | ||
1382 | |||
1429 | static int __orinoco_hw_set_bitrate(struct orinoco_private *priv) | 1383 | static int __orinoco_hw_set_bitrate(struct orinoco_private *priv) |
1430 | { | 1384 | { |
1431 | hermes_t *hw = &priv->hw; | 1385 | hermes_t *hw = &priv->hw; |
@@ -1833,7 +1787,9 @@ static int __orinoco_program_rids(struct net_device *dev) | |||
1833 | /* Set promiscuity / multicast*/ | 1787 | /* Set promiscuity / multicast*/ |
1834 | priv->promiscuous = 0; | 1788 | priv->promiscuous = 0; |
1835 | priv->mc_count = 0; | 1789 | priv->mc_count = 0; |
1836 | __orinoco_set_multicast_list(dev); /* FIXME: what about the xmit_lock */ | 1790 | |
1791 | /* FIXME: what about netif_tx_lock */ | ||
1792 | __orinoco_set_multicast_list(dev); | ||
1837 | 1793 | ||
1838 | return 0; | 1794 | return 0; |
1839 | } | 1795 | } |
@@ -2272,14 +2228,12 @@ static int orinoco_init(struct net_device *dev) | |||
2272 | u16 reclen; | 2228 | u16 reclen; |
2273 | int len; | 2229 | int len; |
2274 | 2230 | ||
2275 | TRACE_ENTER(dev->name); | ||
2276 | |||
2277 | /* No need to lock, the hw_unavailable flag is already set in | 2231 | /* No need to lock, the hw_unavailable flag is already set in |
2278 | * alloc_orinocodev() */ | 2232 | * alloc_orinocodev() */ |
2279 | priv->nicbuf_size = IEEE80211_FRAME_LEN + ETH_HLEN; | 2233 | priv->nicbuf_size = IEEE80211_FRAME_LEN + ETH_HLEN; |
2280 | 2234 | ||
2281 | /* Initialize the firmware */ | 2235 | /* Initialize the firmware */ |
2282 | err = orinoco_reinit_firmware(dev); | 2236 | err = hermes_init(hw); |
2283 | if (err != 0) { | 2237 | if (err != 0) { |
2284 | printk(KERN_ERR "%s: failed to initialize firmware (err = %d)\n", | 2238 | printk(KERN_ERR "%s: failed to initialize firmware (err = %d)\n", |
2285 | dev->name, err); | 2239 | dev->name, err); |
@@ -2337,6 +2291,13 @@ static int orinoco_init(struct net_device *dev) | |||
2337 | 2291 | ||
2338 | printk(KERN_DEBUG "%s: Station name \"%s\"\n", dev->name, priv->nick); | 2292 | printk(KERN_DEBUG "%s: Station name \"%s\"\n", dev->name, priv->nick); |
2339 | 2293 | ||
2294 | err = orinoco_allocate_fid(dev); | ||
2295 | if (err) { | ||
2296 | printk(KERN_ERR "%s: failed to allocate NIC buffer!\n", | ||
2297 | dev->name); | ||
2298 | goto out; | ||
2299 | } | ||
2300 | |||
2340 | /* Get allowed channels */ | 2301 | /* Get allowed channels */ |
2341 | err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CHANNELLIST, | 2302 | err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CHANNELLIST, |
2342 | &priv->channel_mask); | 2303 | &priv->channel_mask); |
@@ -2427,7 +2388,6 @@ static int orinoco_init(struct net_device *dev) | |||
2427 | printk(KERN_DEBUG "%s: ready\n", dev->name); | 2388 | printk(KERN_DEBUG "%s: ready\n", dev->name); |
2428 | 2389 | ||
2429 | out: | 2390 | out: |
2430 | TRACE_EXIT(dev->name); | ||
2431 | return err; | 2391 | return err; |
2432 | } | 2392 | } |
2433 | 2393 | ||
@@ -2795,8 +2755,6 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev, | |||
2795 | int numrates; | 2755 | int numrates; |
2796 | int i, k; | 2756 | int i, k; |
2797 | 2757 | ||
2798 | TRACE_ENTER(dev->name); | ||
2799 | |||
2800 | rrq->length = sizeof(struct iw_range); | 2758 | rrq->length = sizeof(struct iw_range); |
2801 | memset(range, 0, sizeof(struct iw_range)); | 2759 | memset(range, 0, sizeof(struct iw_range)); |
2802 | 2760 | ||
@@ -2886,8 +2844,6 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev, | |||
2886 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); | 2844 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); |
2887 | IW_EVENT_CAPA_SET(range->event_capa, IWEVTXDROP); | 2845 | IW_EVENT_CAPA_SET(range->event_capa, IWEVTXDROP); |
2888 | 2846 | ||
2889 | TRACE_EXIT(dev->name); | ||
2890 | |||
2891 | return 0; | 2847 | return 0; |
2892 | } | 2848 | } |
2893 | 2849 | ||
@@ -3069,8 +3025,6 @@ static int orinoco_ioctl_getessid(struct net_device *dev, | |||
3069 | int err = 0; | 3025 | int err = 0; |
3070 | unsigned long flags; | 3026 | unsigned long flags; |
3071 | 3027 | ||
3072 | TRACE_ENTER(dev->name); | ||
3073 | |||
3074 | if (netif_running(dev)) { | 3028 | if (netif_running(dev)) { |
3075 | err = orinoco_hw_get_essid(priv, &active, essidbuf); | 3029 | err = orinoco_hw_get_essid(priv, &active, essidbuf); |
3076 | if (err) | 3030 | if (err) |
@@ -3085,8 +3039,6 @@ static int orinoco_ioctl_getessid(struct net_device *dev, | |||
3085 | erq->flags = 1; | 3039 | erq->flags = 1; |
3086 | erq->length = strlen(essidbuf) + 1; | 3040 | erq->length = strlen(essidbuf) + 1; |
3087 | 3041 | ||
3088 | TRACE_EXIT(dev->name); | ||
3089 | |||
3090 | return 0; | 3042 | return 0; |
3091 | } | 3043 | } |
3092 | 3044 | ||
@@ -4347,69 +4299,6 @@ static struct ethtool_ops orinoco_ethtool_ops = { | |||
4347 | }; | 4299 | }; |
4348 | 4300 | ||
4349 | /********************************************************************/ | 4301 | /********************************************************************/ |
4350 | /* Debugging */ | ||
4351 | /********************************************************************/ | ||
4352 | |||
4353 | #if 0 | ||
4354 | static void show_rx_frame(struct orinoco_rxframe_hdr *frame) | ||
4355 | { | ||
4356 | printk(KERN_DEBUG "RX descriptor:\n"); | ||
4357 | printk(KERN_DEBUG " status = 0x%04x\n", frame->desc.status); | ||
4358 | printk(KERN_DEBUG " time = 0x%08x\n", frame->desc.time); | ||
4359 | printk(KERN_DEBUG " silence = 0x%02x\n", frame->desc.silence); | ||
4360 | printk(KERN_DEBUG " signal = 0x%02x\n", frame->desc.signal); | ||
4361 | printk(KERN_DEBUG " rate = 0x%02x\n", frame->desc.rate); | ||
4362 | printk(KERN_DEBUG " rxflow = 0x%02x\n", frame->desc.rxflow); | ||
4363 | printk(KERN_DEBUG " reserved = 0x%08x\n", frame->desc.reserved); | ||
4364 | |||
4365 | printk(KERN_DEBUG "IEEE 802.11 header:\n"); | ||
4366 | printk(KERN_DEBUG " frame_ctl = 0x%04x\n", | ||
4367 | frame->p80211.frame_ctl); | ||
4368 | printk(KERN_DEBUG " duration_id = 0x%04x\n", | ||
4369 | frame->p80211.duration_id); | ||
4370 | printk(KERN_DEBUG " addr1 = %02x:%02x:%02x:%02x:%02x:%02x\n", | ||
4371 | frame->p80211.addr1[0], frame->p80211.addr1[1], | ||
4372 | frame->p80211.addr1[2], frame->p80211.addr1[3], | ||
4373 | frame->p80211.addr1[4], frame->p80211.addr1[5]); | ||
4374 | printk(KERN_DEBUG " addr2 = %02x:%02x:%02x:%02x:%02x:%02x\n", | ||
4375 | frame->p80211.addr2[0], frame->p80211.addr2[1], | ||
4376 | frame->p80211.addr2[2], frame->p80211.addr2[3], | ||
4377 | frame->p80211.addr2[4], frame->p80211.addr2[5]); | ||
4378 | printk(KERN_DEBUG " addr3 = %02x:%02x:%02x:%02x:%02x:%02x\n", | ||
4379 | frame->p80211.addr3[0], frame->p80211.addr3[1], | ||
4380 | frame->p80211.addr3[2], frame->p80211.addr3[3], | ||
4381 | frame->p80211.addr3[4], frame->p80211.addr3[5]); | ||
4382 | printk(KERN_DEBUG " seq_ctl = 0x%04x\n", | ||
4383 | frame->p80211.seq_ctl); | ||
4384 | printk(KERN_DEBUG " addr4 = %02x:%02x:%02x:%02x:%02x:%02x\n", | ||
4385 | frame->p80211.addr4[0], frame->p80211.addr4[1], | ||
4386 | frame->p80211.addr4[2], frame->p80211.addr4[3], | ||
4387 | frame->p80211.addr4[4], frame->p80211.addr4[5]); | ||
4388 | printk(KERN_DEBUG " data_len = 0x%04x\n", | ||
4389 | frame->p80211.data_len); | ||
4390 | |||
4391 | printk(KERN_DEBUG "IEEE 802.3 header:\n"); | ||
4392 | printk(KERN_DEBUG " dest = %02x:%02x:%02x:%02x:%02x:%02x\n", | ||
4393 | frame->p8023.h_dest[0], frame->p8023.h_dest[1], | ||
4394 | frame->p8023.h_dest[2], frame->p8023.h_dest[3], | ||
4395 | frame->p8023.h_dest[4], frame->p8023.h_dest[5]); | ||
4396 | printk(KERN_DEBUG " src = %02x:%02x:%02x:%02x:%02x:%02x\n", | ||
4397 | frame->p8023.h_source[0], frame->p8023.h_source[1], | ||
4398 | frame->p8023.h_source[2], frame->p8023.h_source[3], | ||
4399 | frame->p8023.h_source[4], frame->p8023.h_source[5]); | ||
4400 | printk(KERN_DEBUG " len = 0x%04x\n", frame->p8023.h_proto); | ||
4401 | |||
4402 | printk(KERN_DEBUG "IEEE 802.2 LLC/SNAP header:\n"); | ||
4403 | printk(KERN_DEBUG " DSAP = 0x%02x\n", frame->p8022.dsap); | ||
4404 | printk(KERN_DEBUG " SSAP = 0x%02x\n", frame->p8022.ssap); | ||
4405 | printk(KERN_DEBUG " ctrl = 0x%02x\n", frame->p8022.ctrl); | ||
4406 | printk(KERN_DEBUG " OUI = %02x:%02x:%02x\n", | ||
4407 | frame->p8022.oui[0], frame->p8022.oui[1], frame->p8022.oui[2]); | ||
4408 | printk(KERN_DEBUG " ethertype = 0x%04x\n", frame->ethertype); | ||
4409 | } | ||
4410 | #endif /* 0 */ | ||
4411 | |||
4412 | /********************************************************************/ | ||
4413 | /* Module initialization */ | 4302 | /* Module initialization */ |
4414 | /********************************************************************/ | 4303 | /********************************************************************/ |
4415 | 4304 | ||