diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 10 |
8 files changed, 81 insertions, 21 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index ad2c98af7e9d..1e543ac2f86f 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1076,9 +1076,6 @@ static void rt2400pci_write_beacon(struct queue_entry *entry, | |||
1076 | struct txentry_desc *txdesc) | 1076 | struct txentry_desc *txdesc) |
1077 | { | 1077 | { |
1078 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 1078 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
1079 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; | ||
1080 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | ||
1081 | u32 word; | ||
1082 | u32 reg; | 1079 | u32 reg; |
1083 | 1080 | ||
1084 | /* | 1081 | /* |
@@ -1091,9 +1088,15 @@ static void rt2400pci_write_beacon(struct queue_entry *entry, | |||
1091 | 1088 | ||
1092 | rt2x00queue_map_txskb(rt2x00dev, entry->skb); | 1089 | rt2x00queue_map_txskb(rt2x00dev, entry->skb); |
1093 | 1090 | ||
1094 | rt2x00_desc_read(entry_priv->desc, 1, &word); | 1091 | /* |
1095 | rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); | 1092 | * Write the TX descriptor for the beacon. |
1096 | rt2x00_desc_write(entry_priv->desc, 1, word); | 1093 | */ |
1094 | rt2400pci_write_tx_desc(rt2x00dev, entry->skb, txdesc); | ||
1095 | |||
1096 | /* | ||
1097 | * Dump beacon to userspace through debugfs. | ||
1098 | */ | ||
1099 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | ||
1097 | 1100 | ||
1098 | /* | 1101 | /* |
1099 | * Enable beaconing again. | 1102 | * Enable beaconing again. |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 41da3d218c65..1582cabd3a1e 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1233,9 +1233,6 @@ static void rt2500pci_write_beacon(struct queue_entry *entry, | |||
1233 | struct txentry_desc *txdesc) | 1233 | struct txentry_desc *txdesc) |
1234 | { | 1234 | { |
1235 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 1235 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
1236 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; | ||
1237 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | ||
1238 | u32 word; | ||
1239 | u32 reg; | 1236 | u32 reg; |
1240 | 1237 | ||
1241 | /* | 1238 | /* |
@@ -1248,9 +1245,15 @@ static void rt2500pci_write_beacon(struct queue_entry *entry, | |||
1248 | 1245 | ||
1249 | rt2x00queue_map_txskb(rt2x00dev, entry->skb); | 1246 | rt2x00queue_map_txskb(rt2x00dev, entry->skb); |
1250 | 1247 | ||
1251 | rt2x00_desc_read(entry_priv->desc, 1, &word); | 1248 | /* |
1252 | rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); | 1249 | * Write the TX descriptor for the beacon. |
1253 | rt2x00_desc_write(entry_priv->desc, 1, word); | 1250 | */ |
1251 | rt2500pci_write_tx_desc(rt2x00dev, entry->skb, txdesc); | ||
1252 | |||
1253 | /* | ||
1254 | * Dump beacon to userspace through debugfs. | ||
1255 | */ | ||
1256 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | ||
1254 | 1257 | ||
1255 | /* | 1258 | /* |
1256 | * Enable beaconing again. | 1259 | * Enable beaconing again. |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 9ae96a626e6d..d19f29a53523 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1108,6 +1108,16 @@ static void rt2500usb_write_beacon(struct queue_entry *entry, | |||
1108 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); | 1108 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); |
1109 | 1109 | ||
1110 | /* | 1110 | /* |
1111 | * Write the TX descriptor for the beacon. | ||
1112 | */ | ||
1113 | rt2500usb_write_tx_desc(rt2x00dev, entry->skb, txdesc); | ||
1114 | |||
1115 | /* | ||
1116 | * Dump beacon to userspace through debugfs. | ||
1117 | */ | ||
1118 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | ||
1119 | |||
1120 | /* | ||
1111 | * Take the descriptor in front of the skb into account. | 1121 | * Take the descriptor in front of the skb into account. |
1112 | */ | 1122 | */ |
1113 | skb_push(entry->skb, TXD_DESC_SIZE); | 1123 | skb_push(entry->skb, TXD_DESC_SIZE); |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index b2f23272c3aa..88dba7f76aef 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -688,6 +688,7 @@ static void rt2800pci_write_beacon(struct queue_entry *entry, | |||
688 | struct txentry_desc *txdesc) | 688 | struct txentry_desc *txdesc) |
689 | { | 689 | { |
690 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 690 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
691 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | ||
691 | unsigned int beacon_base; | 692 | unsigned int beacon_base; |
692 | u32 reg; | 693 | u32 reg; |
693 | 694 | ||
@@ -700,9 +701,24 @@ static void rt2800pci_write_beacon(struct queue_entry *entry, | |||
700 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); | 701 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); |
701 | 702 | ||
702 | /* | 703 | /* |
704 | * Register descriptor details in skb frame descriptor. | ||
705 | */ | ||
706 | skbdesc->desc = entry->skb->data - TXWI_DESC_SIZE; | ||
707 | skbdesc->desc_len = TXWI_DESC_SIZE; | ||
708 | |||
709 | /* | ||
703 | * Add the TXWI for the beacon to the skb. | 710 | * Add the TXWI for the beacon to the skb. |
704 | */ | 711 | */ |
705 | rt2800_write_txwi(entry->skb, txdesc); | 712 | rt2800_write_txwi(entry->skb, txdesc); |
713 | |||
714 | /* | ||
715 | * Dump beacon to userspace through debugfs. | ||
716 | */ | ||
717 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | ||
718 | |||
719 | /* | ||
720 | * Adjust skb to take TXWI into account. | ||
721 | */ | ||
706 | skb_push(entry->skb, TXWI_DESC_SIZE); | 722 | skb_push(entry->skb, TXWI_DESC_SIZE); |
707 | 723 | ||
708 | /* | 724 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 0f8b84b7224c..d0d8060040ba 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -437,6 +437,7 @@ static void rt2800usb_write_beacon(struct queue_entry *entry, | |||
437 | struct txentry_desc *txdesc) | 437 | struct txentry_desc *txdesc) |
438 | { | 438 | { |
439 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 439 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
440 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | ||
440 | unsigned int beacon_base; | 441 | unsigned int beacon_base; |
441 | u32 reg; | 442 | u32 reg; |
442 | 443 | ||
@@ -449,9 +450,24 @@ static void rt2800usb_write_beacon(struct queue_entry *entry, | |||
449 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); | 450 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); |
450 | 451 | ||
451 | /* | 452 | /* |
453 | * Register descriptor details in skb frame descriptor. | ||
454 | */ | ||
455 | skbdesc->desc = entry->skb->data - TXWI_DESC_SIZE; | ||
456 | skbdesc->desc_len = TXWI_DESC_SIZE; | ||
457 | |||
458 | /* | ||
452 | * Add the TXWI for the beacon to the skb. | 459 | * Add the TXWI for the beacon to the skb. |
453 | */ | 460 | */ |
454 | rt2800_write_txwi(entry->skb, txdesc); | 461 | rt2800_write_txwi(entry->skb, txdesc); |
462 | |||
463 | /* | ||
464 | * Dump beacon to userspace through debugfs. | ||
465 | */ | ||
466 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | ||
467 | |||
468 | /* | ||
469 | * Adjust skb to take TXWI into account. | ||
470 | */ | ||
455 | skb_push(entry->skb, TXWI_DESC_SIZE); | 471 | skb_push(entry->skb, TXWI_DESC_SIZE); |
456 | 472 | ||
457 | /* | 473 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 20dbdd6fb904..cf7bfe774e00 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -421,7 +421,6 @@ static void rt2x00queue_write_tx_descriptor(struct queue_entry *entry, | |||
421 | { | 421 | { |
422 | struct data_queue *queue = entry->queue; | 422 | struct data_queue *queue = entry->queue; |
423 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; | 423 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; |
424 | enum rt2x00_dump_type dump_type; | ||
425 | 424 | ||
426 | rt2x00dev->ops->lib->write_tx_desc(rt2x00dev, entry->skb, txdesc); | 425 | rt2x00dev->ops->lib->write_tx_desc(rt2x00dev, entry->skb, txdesc); |
427 | 426 | ||
@@ -429,9 +428,7 @@ static void rt2x00queue_write_tx_descriptor(struct queue_entry *entry, | |||
429 | * All processing on the frame has been completed, this means | 428 | * All processing on the frame has been completed, this means |
430 | * it is now ready to be dumped to userspace through debugfs. | 429 | * it is now ready to be dumped to userspace through debugfs. |
431 | */ | 430 | */ |
432 | dump_type = (txdesc->queue == QID_BEACON) ? | 431 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TX, entry->skb); |
433 | DUMP_FRAME_BEACON : DUMP_FRAME_TX; | ||
434 | rt2x00debug_dump_frame(rt2x00dev, dump_type, entry->skb); | ||
435 | } | 432 | } |
436 | 433 | ||
437 | static void rt2x00queue_kick_tx_queue(struct queue_entry *entry, | 434 | static void rt2x00queue_kick_tx_queue(struct queue_entry *entry, |
@@ -595,11 +592,6 @@ int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev, | |||
595 | skbdesc->entry = intf->beacon; | 592 | skbdesc->entry = intf->beacon; |
596 | 593 | ||
597 | /* | 594 | /* |
598 | * Write TX descriptor into reserved room in front of the beacon. | ||
599 | */ | ||
600 | rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc); | ||
601 | |||
602 | /* | ||
603 | * Send beacon to hardware and enable beacon genaration.. | 595 | * Send beacon to hardware and enable beacon genaration.. |
604 | */ | 596 | */ |
605 | rt2x00dev->ops->lib->write_beacon(intf->beacon, &txdesc); | 597 | rt2x00dev->ops->lib->write_beacon(intf->beacon, &txdesc); |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 6a74baf4e934..a7205c1711de 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1874,6 +1874,16 @@ static void rt61pci_write_beacon(struct queue_entry *entry, | |||
1874 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | 1874 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); |
1875 | 1875 | ||
1876 | /* | 1876 | /* |
1877 | * Write the TX descriptor for the beacon. | ||
1878 | */ | ||
1879 | rt61pci_write_tx_desc(rt2x00dev, entry->skb, txdesc); | ||
1880 | |||
1881 | /* | ||
1882 | * Dump beacon to userspace through debugfs. | ||
1883 | */ | ||
1884 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | ||
1885 | |||
1886 | /* | ||
1877 | * Write entire beacon with descriptor to register. | 1887 | * Write entire beacon with descriptor to register. |
1878 | */ | 1888 | */ |
1879 | beacon_base = HW_BEACON_OFFSET(entry->entry_idx); | 1889 | beacon_base = HW_BEACON_OFFSET(entry->entry_idx); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 6e0d82efe924..bd9a53e5fd9f 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1528,6 +1528,16 @@ static void rt73usb_write_beacon(struct queue_entry *entry, | |||
1528 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg); | 1528 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg); |
1529 | 1529 | ||
1530 | /* | 1530 | /* |
1531 | * Write the TX descriptor for the beacon. | ||
1532 | */ | ||
1533 | rt73usb_write_tx_desc(rt2x00dev, entry->skb, txdesc); | ||
1534 | |||
1535 | /* | ||
1536 | * Dump beacon to userspace through debugfs. | ||
1537 | */ | ||
1538 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); | ||
1539 | |||
1540 | /* | ||
1531 | * Take the descriptor in front of the skb into account. | 1541 | * Take the descriptor in front of the skb into account. |
1532 | */ | 1542 | */ |
1533 | skb_push(entry->skb, TXD_DESC_SIZE); | 1543 | skb_push(entry->skb, TXD_DESC_SIZE); |