aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/p54.h2
-rw-r--r--drivers/net/wireless/p54/p54common.c138
-rw-r--r--drivers/net/wireless/p54/p54common.h1
-rw-r--r--drivers/net/wireless/p54/p54pci.c2
4 files changed, 64 insertions, 79 deletions
diff --git a/drivers/net/wireless/p54/p54.h b/drivers/net/wireless/p54/p54.h
index 06d2c67f4c81..c6f27b9022f9 100644
--- a/drivers/net/wireless/p54/p54.h
+++ b/drivers/net/wireless/p54/p54.h
@@ -64,7 +64,7 @@ struct p54_common {
64 unsigned int tx_hdr_len; 64 unsigned int tx_hdr_len;
65 void *cached_vdcf; 65 void *cached_vdcf;
66 unsigned int fw_var; 66 unsigned int fw_var;
67 struct ieee80211_tx_queue_stats tx_stats; 67 struct ieee80211_tx_queue_stats tx_stats[4];
68}; 68};
69 69
70int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb); 70int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb);
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 63f9badf3f52..ffaf7a6b6810 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -146,10 +146,10 @@ void p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
146 146
147 if (priv->fw_var >= 0x300) { 147 if (priv->fw_var >= 0x300) {
148 /* Firmware supports QoS, use it! */ 148 /* Firmware supports QoS, use it! */
149 priv->tx_stats.data[0].limit = 3; 149 priv->tx_stats[0].limit = 3;
150 priv->tx_stats.data[1].limit = 4; 150 priv->tx_stats[1].limit = 4;
151 priv->tx_stats.data[2].limit = 3; 151 priv->tx_stats[2].limit = 3;
152 priv->tx_stats.data[3].limit = 1; 152 priv->tx_stats[3].limit = 1;
153 dev->queues = 4; 153 dev->queues = 4;
154 } 154 }
155} 155}
@@ -355,8 +355,9 @@ static void p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
355 struct ieee80211_rx_status rx_status = {0}; 355 struct ieee80211_rx_status rx_status = {0};
356 u16 freq = le16_to_cpu(hdr->freq); 356 u16 freq = le16_to_cpu(hdr->freq);
357 357
358 rx_status.ssi = hdr->rssi; 358 rx_status.signal = hdr->rssi;
359 /* XX correct? */ 359 /* XX correct? */
360 rx_status.qual = (100 * hdr->rssi) / 127;
360 rx_status.rate_idx = hdr->rate & 0xf; 361 rx_status.rate_idx = hdr->rate & 0xf;
361 rx_status.freq = freq; 362 rx_status.freq = freq;
362 rx_status.band = IEEE80211_BAND_2GHZ; 363 rx_status.band = IEEE80211_BAND_2GHZ;
@@ -375,11 +376,8 @@ static void inline p54_wake_free_queues(struct ieee80211_hw *dev)
375 struct p54_common *priv = dev->priv; 376 struct p54_common *priv = dev->priv;
376 int i; 377 int i;
377 378
378 /* ieee80211_start_queues is great if all queues are really empty.
379 * But, what if some are full? */
380
381 for (i = 0; i < dev->queues; i++) 379 for (i = 0; i < dev->queues; i++)
382 if (priv->tx_stats.data[i].len < priv->tx_stats.data[i].limit) 380 if (priv->tx_stats[i].len < priv->tx_stats[i].limit)
383 ieee80211_wake_queue(dev, i); 381 ieee80211_wake_queue(dev, i);
384} 382}
385 383
@@ -395,45 +393,42 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
395 u32 last_addr = priv->rx_start; 393 u32 last_addr = priv->rx_start;
396 394
397 while (entry != (struct sk_buff *)&priv->tx_queue) { 395 while (entry != (struct sk_buff *)&priv->tx_queue) {
398 range = (struct memrecord *)&entry->cb; 396 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry);
397 range = (void *)info->driver_data;
399 if (range->start_addr == addr) { 398 if (range->start_addr == addr) {
400 struct ieee80211_tx_status status;
401 struct p54_control_hdr *entry_hdr; 399 struct p54_control_hdr *entry_hdr;
402 struct p54_tx_control_allocdata *entry_data; 400 struct p54_tx_control_allocdata *entry_data;
403 int pad = 0; 401 int pad = 0;
404 402
405 if (entry->next != (struct sk_buff *)&priv->tx_queue) 403 if (entry->next != (struct sk_buff *)&priv->tx_queue) {
406 freed = ((struct memrecord *)&entry->next->cb)->start_addr - last_addr; 404 struct ieee80211_tx_info *ni;
407 else 405 struct memrecord *mr;
406
407 ni = IEEE80211_SKB_CB(entry->next);
408 mr = (struct memrecord *)ni->driver_data;
409 freed = mr->start_addr - last_addr;
410 } else
408 freed = priv->rx_end - last_addr; 411 freed = priv->rx_end - last_addr;
409 412
410 last_addr = range->end_addr; 413 last_addr = range->end_addr;
411 __skb_unlink(entry, &priv->tx_queue); 414 __skb_unlink(entry, &priv->tx_queue);
412 if (!range->control) { 415 memset(&info->status, 0, sizeof(info->status));
413 kfree_skb(entry); 416 priv->tx_stats[skb_get_queue_mapping(skb)].len--;
414 break;
415 }
416 memset(&status, 0, sizeof(status));
417 memcpy(&status.control, range->control,
418 sizeof(status.control));
419 kfree(range->control);
420 priv->tx_stats.data[status.control.queue].len--;
421
422 entry_hdr = (struct p54_control_hdr *) entry->data; 417 entry_hdr = (struct p54_control_hdr *) entry->data;
423 entry_data = (struct p54_tx_control_allocdata *) entry_hdr->data; 418 entry_data = (struct p54_tx_control_allocdata *) entry_hdr->data;
424 if ((entry_hdr->magic1 & cpu_to_le16(0x4000)) != 0) 419 if ((entry_hdr->magic1 & cpu_to_le16(0x4000)) != 0)
425 pad = entry_data->align[0]; 420 pad = entry_data->align[0];
426 421
427 if (!(status.control.flags & IEEE80211_TXCTL_NO_ACK)) { 422 if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
428 if (!(payload->status & 0x01)) 423 if (!(payload->status & 0x01))
429 status.flags |= IEEE80211_TX_STATUS_ACK; 424 info->flags |= IEEE80211_TX_STAT_ACK;
430 else 425 else
431 status.excessive_retries = 1; 426 info->status.excessive_retries = 1;
432 } 427 }
433 status.retry_count = payload->retries - 1; 428 info->status.retry_count = payload->retries - 1;
434 status.ack_signal = le16_to_cpu(payload->ack_rssi); 429 info->status.ack_signal = le16_to_cpu(payload->ack_rssi);
435 skb_pull(entry, sizeof(*hdr) + pad + sizeof(*entry_data)); 430 skb_pull(entry, sizeof(*hdr) + pad + sizeof(*entry_data));
436 ieee80211_tx_status_irqsafe(dev, entry, &status); 431 ieee80211_tx_status_irqsafe(dev, entry);
437 break; 432 break;
438 } else 433 } else
439 last_addr = range->end_addr; 434 last_addr = range->end_addr;
@@ -498,13 +493,11 @@ EXPORT_SYMBOL_GPL(p54_rx);
498 * allocated areas. 493 * allocated areas.
499 */ 494 */
500static void p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb, 495static void p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
501 struct p54_control_hdr *data, u32 len, 496 struct p54_control_hdr *data, u32 len)
502 struct ieee80211_tx_control *control)
503{ 497{
504 struct p54_common *priv = dev->priv; 498 struct p54_common *priv = dev->priv;
505 struct sk_buff *entry = priv->tx_queue.next; 499 struct sk_buff *entry = priv->tx_queue.next;
506 struct sk_buff *target_skb = NULL; 500 struct sk_buff *target_skb = NULL;
507 struct memrecord *range;
508 u32 last_addr = priv->rx_start; 501 u32 last_addr = priv->rx_start;
509 u32 largest_hole = 0; 502 u32 largest_hole = 0;
510 u32 target_addr = priv->rx_start; 503 u32 target_addr = priv->rx_start;
@@ -516,7 +509,8 @@ static void p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
516 left = skb_queue_len(&priv->tx_queue); 509 left = skb_queue_len(&priv->tx_queue);
517 while (left--) { 510 while (left--) {
518 u32 hole_size; 511 u32 hole_size;
519 range = (struct memrecord *)&entry->cb; 512 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry);
513 struct memrecord *range = (void *)info->driver_data;
520 hole_size = range->start_addr - last_addr; 514 hole_size = range->start_addr - last_addr;
521 if (!target_skb && hole_size >= len) { 515 if (!target_skb && hole_size >= len) {
522 target_skb = entry->prev; 516 target_skb = entry->prev;
@@ -531,17 +525,18 @@ static void p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
531 target_skb = priv->tx_queue.prev; 525 target_skb = priv->tx_queue.prev;
532 largest_hole = max(largest_hole, priv->rx_end - last_addr - len); 526 largest_hole = max(largest_hole, priv->rx_end - last_addr - len);
533 if (!skb_queue_empty(&priv->tx_queue)) { 527 if (!skb_queue_empty(&priv->tx_queue)) {
534 range = (struct memrecord *)&target_skb->cb; 528 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(target_skb);
529 struct memrecord *range = (void *)info->driver_data;
535 target_addr = range->end_addr; 530 target_addr = range->end_addr;
536 } 531 }
537 } else 532 } else
538 largest_hole = max(largest_hole, priv->rx_end - last_addr); 533 largest_hole = max(largest_hole, priv->rx_end - last_addr);
539 534
540 if (skb) { 535 if (skb) {
541 range = (struct memrecord *)&skb->cb; 536 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
537 struct memrecord *range = (void *)info->driver_data;
542 range->start_addr = target_addr; 538 range->start_addr = target_addr;
543 range->end_addr = target_addr + len; 539 range->end_addr = target_addr + len;
544 range->control = control;
545 __skb_queue_after(&priv->tx_queue, target_skb, skb); 540 __skb_queue_after(&priv->tx_queue, target_skb, skb);
546 if (largest_hole < IEEE80211_MAX_RTS_THRESHOLD + 0x170 + 541 if (largest_hole < IEEE80211_MAX_RTS_THRESHOLD + 0x170 +
547 sizeof(struct p54_control_hdr)) 542 sizeof(struct p54_control_hdr))
@@ -552,32 +547,27 @@ static void p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
552 data->req_id = cpu_to_le32(target_addr + 0x70); 547 data->req_id = cpu_to_le32(target_addr + 0x70);
553} 548}
554 549
555static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb, 550static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
556 struct ieee80211_tx_control *control)
557{ 551{
558 struct ieee80211_tx_queue_stats_data *current_queue; 552 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
553 struct ieee80211_tx_queue_stats *current_queue;
559 struct p54_common *priv = dev->priv; 554 struct p54_common *priv = dev->priv;
560 struct p54_control_hdr *hdr; 555 struct p54_control_hdr *hdr;
561 struct p54_tx_control_allocdata *txhdr; 556 struct p54_tx_control_allocdata *txhdr;
562 struct ieee80211_tx_control *control_copy;
563 size_t padding, len; 557 size_t padding, len;
564 u8 rate; 558 u8 rate;
565 559
566 current_queue = &priv->tx_stats.data[control->queue]; 560 current_queue = &priv->tx_stats[skb_get_queue_mapping(skb)];
567 if (unlikely(current_queue->len > current_queue->limit)) 561 if (unlikely(current_queue->len > current_queue->limit))
568 return NETDEV_TX_BUSY; 562 return NETDEV_TX_BUSY;
569 current_queue->len++; 563 current_queue->len++;
570 current_queue->count++; 564 current_queue->count++;
571 if (current_queue->len == current_queue->limit) 565 if (current_queue->len == current_queue->limit)
572 ieee80211_stop_queue(dev, control->queue); 566 ieee80211_stop_queue(dev, skb_get_queue_mapping(skb));
573 567
574 padding = (unsigned long)(skb->data - (sizeof(*hdr) + sizeof(*txhdr))) & 3; 568 padding = (unsigned long)(skb->data - (sizeof(*hdr) + sizeof(*txhdr))) & 3;
575 len = skb->len; 569 len = skb->len;
576 570
577 control_copy = kmalloc(sizeof(*control), GFP_ATOMIC);
578 if (control_copy)
579 memcpy(control_copy, control, sizeof(*control));
580
581 txhdr = (struct p54_tx_control_allocdata *) 571 txhdr = (struct p54_tx_control_allocdata *)
582 skb_push(skb, sizeof(*txhdr) + padding); 572 skb_push(skb, sizeof(*txhdr) + padding);
583 hdr = (struct p54_control_hdr *) skb_push(skb, sizeof(*hdr)); 573 hdr = (struct p54_control_hdr *) skb_push(skb, sizeof(*hdr));
@@ -587,35 +577,37 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
587 else 577 else
588 hdr->magic1 = cpu_to_le16(0x0010); 578 hdr->magic1 = cpu_to_le16(0x0010);
589 hdr->len = cpu_to_le16(len); 579 hdr->len = cpu_to_le16(len);
590 hdr->type = (control->flags & IEEE80211_TXCTL_NO_ACK) ? 0 : cpu_to_le16(1); 580 hdr->type = (info->flags & IEEE80211_TX_CTL_NO_ACK) ? 0 : cpu_to_le16(1);
591 hdr->retry1 = hdr->retry2 = control->retry_limit; 581 hdr->retry1 = hdr->retry2 = info->control.retry_limit;
592 p54_assign_address(dev, skb, hdr, skb->len, control_copy);
593 582
594 memset(txhdr->wep_key, 0x0, 16); 583 memset(txhdr->wep_key, 0x0, 16);
595 txhdr->padding = 0; 584 txhdr->padding = 0;
596 txhdr->padding2 = 0; 585 txhdr->padding2 = 0;
597 586
598 /* TODO: add support for alternate retry TX rates */ 587 /* TODO: add support for alternate retry TX rates */
599 rate = control->tx_rate->hw_value; 588 rate = ieee80211_get_tx_rate(dev, info)->hw_value;
600 if (control->flags & IEEE80211_TXCTL_SHORT_PREAMBLE) 589 if (info->flags & IEEE80211_TX_CTL_SHORT_PREAMBLE)
601 rate |= 0x10; 590 rate |= 0x10;
602 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) 591 if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS)
603 rate |= 0x40; 592 rate |= 0x40;
604 else if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) 593 else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)
605 rate |= 0x20; 594 rate |= 0x20;
606 memset(txhdr->rateset, rate, 8); 595 memset(txhdr->rateset, rate, 8);
607 txhdr->wep_key_present = 0; 596 txhdr->wep_key_present = 0;
608 txhdr->wep_key_len = 0; 597 txhdr->wep_key_len = 0;
609 txhdr->frame_type = cpu_to_le32(control->queue + 4); 598 txhdr->frame_type = cpu_to_le32(skb_get_queue_mapping(skb) + 4);
610 txhdr->magic4 = 0; 599 txhdr->magic4 = 0;
611 txhdr->antenna = (control->antenna_sel_tx == 0) ? 600 txhdr->antenna = (info->antenna_sel_tx == 0) ?
612 2 : control->antenna_sel_tx - 1; 601 2 : info->antenna_sel_tx - 1;
613 txhdr->output_power = 0x7f; // HW Maximum 602 txhdr->output_power = 0x7f; // HW Maximum
614 txhdr->magic5 = (control->flags & IEEE80211_TXCTL_NO_ACK) ? 603 txhdr->magic5 = (info->flags & IEEE80211_TX_CTL_NO_ACK) ?
615 0 : ((rate > 0x3) ? cpu_to_le32(0x33) : cpu_to_le32(0x23)); 604 0 : ((rate > 0x3) ? cpu_to_le32(0x33) : cpu_to_le32(0x23));
616 if (padding) 605 if (padding)
617 txhdr->align[0] = padding; 606 txhdr->align[0] = padding;
618 607
608 /* modifies skb->cb and with it info, so must be last! */
609 p54_assign_address(dev, skb, hdr, skb->len);
610
619 priv->tx(dev, hdr, skb->len, 0); 611 priv->tx(dev, hdr, skb->len, 0);
620 return 0; 612 return 0;
621} 613}
@@ -638,7 +630,7 @@ static int p54_set_filter(struct ieee80211_hw *dev, u16 filter_type,
638 filter = (struct p54_tx_control_filter *) hdr->data; 630 filter = (struct p54_tx_control_filter *) hdr->data;
639 hdr->magic1 = cpu_to_le16(0x8001); 631 hdr->magic1 = cpu_to_le16(0x8001);
640 hdr->len = cpu_to_le16(sizeof(*filter)); 632 hdr->len = cpu_to_le16(sizeof(*filter));
641 p54_assign_address(dev, NULL, hdr, sizeof(*hdr) + sizeof(*filter), NULL); 633 p54_assign_address(dev, NULL, hdr, sizeof(*hdr) + sizeof(*filter));
642 hdr->type = cpu_to_le16(P54_CONTROL_TYPE_FILTER_SET); 634 hdr->type = cpu_to_le16(P54_CONTROL_TYPE_FILTER_SET);
643 635
644 filter->filter_type = cpu_to_le16(filter_type); 636 filter->filter_type = cpu_to_le16(filter_type);
@@ -682,7 +674,7 @@ static int p54_set_freq(struct ieee80211_hw *dev, __le16 freq)
682 hdr->magic1 = cpu_to_le16(0x8001); 674 hdr->magic1 = cpu_to_le16(0x8001);
683 hdr->len = cpu_to_le16(sizeof(*chan)); 675 hdr->len = cpu_to_le16(sizeof(*chan));
684 hdr->type = cpu_to_le16(P54_CONTROL_TYPE_CHANNEL_CHANGE); 676 hdr->type = cpu_to_le16(P54_CONTROL_TYPE_CHANNEL_CHANGE);
685 p54_assign_address(dev, NULL, hdr, sizeof(*hdr) + payload_len, NULL); 677 p54_assign_address(dev, NULL, hdr, sizeof(*hdr) + payload_len);
686 678
687 chan->magic1 = cpu_to_le16(0x1); 679 chan->magic1 = cpu_to_le16(0x1);
688 chan->magic2 = cpu_to_le16(0x0); 680 chan->magic2 = cpu_to_le16(0x0);
@@ -755,7 +747,7 @@ static int p54_set_leds(struct ieee80211_hw *dev, int mode, int link, int act)
755 hdr->magic1 = cpu_to_le16(0x8001); 747 hdr->magic1 = cpu_to_le16(0x8001);
756 hdr->len = cpu_to_le16(sizeof(*led)); 748 hdr->len = cpu_to_le16(sizeof(*led));
757 hdr->type = cpu_to_le16(P54_CONTROL_TYPE_LED); 749 hdr->type = cpu_to_le16(P54_CONTROL_TYPE_LED);
758 p54_assign_address(dev, NULL, hdr, sizeof(*hdr) + sizeof(*led), NULL); 750 p54_assign_address(dev, NULL, hdr, sizeof(*hdr) + sizeof(*led));
759 751
760 led = (struct p54_tx_control_led *) hdr->data; 752 led = (struct p54_tx_control_led *) hdr->data;
761 led->mode = cpu_to_le16(mode); 753 led->mode = cpu_to_le16(mode);
@@ -805,7 +797,7 @@ static void p54_set_vdcf(struct ieee80211_hw *dev)
805 797
806 hdr = (void *)priv->cached_vdcf + priv->tx_hdr_len; 798 hdr = (void *)priv->cached_vdcf + priv->tx_hdr_len;
807 799
808 p54_assign_address(dev, NULL, hdr, sizeof(*hdr) + sizeof(*vdcf), NULL); 800 p54_assign_address(dev, NULL, hdr, sizeof(*hdr) + sizeof(*vdcf));
809 801
810 vdcf = (struct p54_tx_control_vdcf *) hdr->data; 802 vdcf = (struct p54_tx_control_vdcf *) hdr->data;
811 803
@@ -841,12 +833,8 @@ static void p54_stop(struct ieee80211_hw *dev)
841{ 833{
842 struct p54_common *priv = dev->priv; 834 struct p54_common *priv = dev->priv;
843 struct sk_buff *skb; 835 struct sk_buff *skb;
844 while ((skb = skb_dequeue(&priv->tx_queue))) { 836 while ((skb = skb_dequeue(&priv->tx_queue)))
845 struct memrecord *range = (struct memrecord *)&skb->cb;
846 if (range->control)
847 kfree(range->control);
848 kfree_skb(skb); 837 kfree_skb(skb);
849 }
850 priv->stop(dev); 838 priv->stop(dev);
851 priv->mode = IEEE80211_IF_TYPE_INVALID; 839 priv->mode = IEEE80211_IF_TYPE_INVALID;
852} 840}
@@ -936,7 +924,7 @@ static void p54_configure_filter(struct ieee80211_hw *dev,
936 } 924 }
937} 925}
938 926
939static int p54_conf_tx(struct ieee80211_hw *dev, int queue, 927static int p54_conf_tx(struct ieee80211_hw *dev, u16 queue,
940 const struct ieee80211_tx_queue_params *params) 928 const struct ieee80211_tx_queue_params *params)
941{ 929{
942 struct p54_common *priv = dev->priv; 930 struct p54_common *priv = dev->priv;
@@ -945,7 +933,7 @@ static int p54_conf_tx(struct ieee80211_hw *dev, int queue,
945 vdcf = (struct p54_tx_control_vdcf *)(((struct p54_control_hdr *) 933 vdcf = (struct p54_tx_control_vdcf *)(((struct p54_control_hdr *)
946 ((void *)priv->cached_vdcf + priv->tx_hdr_len))->data); 934 ((void *)priv->cached_vdcf + priv->tx_hdr_len))->data);
947 935
948 if ((params) && !((queue < 0) || (queue > 4))) { 936 if ((params) && !(queue > 4)) {
949 P54_SET_QUEUE(vdcf->queue[queue], params->aifs, 937 P54_SET_QUEUE(vdcf->queue[queue], params->aifs,
950 params->cw_min, params->cw_max, params->txop); 938 params->cw_min, params->cw_max, params->txop);
951 } else 939 } else
@@ -967,11 +955,8 @@ static int p54_get_tx_stats(struct ieee80211_hw *dev,
967 struct ieee80211_tx_queue_stats *stats) 955 struct ieee80211_tx_queue_stats *stats)
968{ 956{
969 struct p54_common *priv = dev->priv; 957 struct p54_common *priv = dev->priv;
970 unsigned int i;
971 958
972 for (i = 0; i < dev->queues; i++) 959 memcpy(stats, &priv->tx_stats, sizeof(stats[0]) * dev->queues);
973 memcpy(&stats->data[i], &priv->tx_stats.data[i],
974 sizeof(stats->data[i]));
975 960
976 return 0; 961 return 0;
977} 962}
@@ -1004,11 +989,12 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
1004 skb_queue_head_init(&priv->tx_queue); 989 skb_queue_head_init(&priv->tx_queue);
1005 dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &band_2GHz; 990 dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &band_2GHz;
1006 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | /* not sure */ 991 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | /* not sure */
1007 IEEE80211_HW_RX_INCLUDES_FCS; 992 IEEE80211_HW_RX_INCLUDES_FCS |
993 IEEE80211_HW_SIGNAL_UNSPEC;
1008 dev->channel_change_time = 1000; /* TODO: find actual value */ 994 dev->channel_change_time = 1000; /* TODO: find actual value */
1009 dev->max_rssi = 127; 995 dev->max_signal = 127;
1010 996
1011 priv->tx_stats.data[0].limit = 5; 997 priv->tx_stats[0].limit = 5;
1012 dev->queues = 1; 998 dev->queues = 1;
1013 999
1014 dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 + 1000 dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 +
diff --git a/drivers/net/wireless/p54/p54common.h b/drivers/net/wireless/p54/p54common.h
index c15b56e1d75e..2245fcce92dc 100644
--- a/drivers/net/wireless/p54/p54common.h
+++ b/drivers/net/wireless/p54/p54common.h
@@ -152,7 +152,6 @@ struct pda_pa_curve_data {
152struct memrecord { 152struct memrecord {
153 u32 start_addr; 153 u32 start_addr;
154 u32 end_addr; 154 u32 end_addr;
155 struct ieee80211_tx_control *control;
156}; 155};
157 156
158struct p54_eeprom_lm86 { 157struct p54_eeprom_lm86 {
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index fa527723fbe0..7dd4add4bf4e 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -665,7 +665,7 @@ static int p54p_resume(struct pci_dev *pdev)
665 665
666 if (priv->common.mode != IEEE80211_IF_TYPE_INVALID) { 666 if (priv->common.mode != IEEE80211_IF_TYPE_INVALID) {
667 p54p_open(dev); 667 p54p_open(dev);
668 ieee80211_start_queues(dev); 668 ieee80211_wake_queues(dev);
669 } 669 }
670 670
671 return 0; 671 return 0;