diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-01-05 17:18:59 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-05 17:18:59 -0500 |
commit | 4f9b2a7dea2bf1dd81f280aa5e8a40ed910d2f0a (patch) | |
tree | 52046049957a87103a383869155f43461963f089 /drivers/net/wireless/rt2x00 | |
parent | f3f66b69c8ff08b46975d9e99c7ecb92a8b12eda (diff) | |
parent | 7a4a77b7771164d61ce702a588067d1e1d66db7c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
net/mac80211/iface.c
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 6 |
4 files changed, 21 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 8ff7db853286..126899091707 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -339,7 +339,7 @@ static int rt2800_blink_set(struct led_classdev *led_cdev, | |||
339 | rt2x00_set_field32(®, LED_CFG_OFF_PERIOD, *delay_off); | 339 | rt2x00_set_field32(®, LED_CFG_OFF_PERIOD, *delay_off); |
340 | rt2x00_set_field32(®, LED_CFG_SLOW_BLINK_PERIOD, 3); | 340 | rt2x00_set_field32(®, LED_CFG_SLOW_BLINK_PERIOD, 3); |
341 | rt2x00_set_field32(®, LED_CFG_R_LED_MODE, 3); | 341 | rt2x00_set_field32(®, LED_CFG_R_LED_MODE, 3); |
342 | rt2x00_set_field32(®, LED_CFG_G_LED_MODE, 12); | 342 | rt2x00_set_field32(®, LED_CFG_G_LED_MODE, 3); |
343 | rt2x00_set_field32(®, LED_CFG_Y_LED_MODE, 3); | 343 | rt2x00_set_field32(®, LED_CFG_Y_LED_MODE, 3); |
344 | rt2x00_set_field32(®, LED_CFG_LED_POLAR, 1); | 344 | rt2x00_set_field32(®, LED_CFG_LED_POLAR, 1); |
345 | rt2800_register_write(led->rt2x00dev, LED_CFG, reg); | 345 | rt2800_register_write(led->rt2x00dev, LED_CFG, reg); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index b4c6e0a6d7e0..096da85a66fa 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -119,6 +119,12 @@ | |||
119 | ( ((unsigned long)((__skb)->data + (__header))) & 3 ) | 119 | ( ((unsigned long)((__skb)->data + (__header))) & 3 ) |
120 | 120 | ||
121 | /* | 121 | /* |
122 | * Constants for extra TX headroom for alignment purposes. | ||
123 | */ | ||
124 | #define RT2X00_ALIGN_SIZE 4 /* Only whole frame needs alignment */ | ||
125 | #define RT2X00_L2PAD_SIZE 8 /* Both header & payload need alignment */ | ||
126 | |||
127 | /* | ||
122 | * Standard timing and size defines. | 128 | * Standard timing and size defines. |
123 | * These values should follow the ieee80211 specifications. | 129 | * These values should follow the ieee80211 specifications. |
124 | */ | 130 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index d7711e4d4751..b93731b79903 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -688,7 +688,17 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
688 | /* | 688 | /* |
689 | * Initialize extra TX headroom required. | 689 | * Initialize extra TX headroom required. |
690 | */ | 690 | */ |
691 | rt2x00dev->hw->extra_tx_headroom = rt2x00dev->ops->extra_tx_headroom; | 691 | rt2x00dev->hw->extra_tx_headroom = |
692 | max_t(unsigned int, IEEE80211_TX_STATUS_HEADROOM, | ||
693 | rt2x00dev->ops->extra_tx_headroom); | ||
694 | |||
695 | /* | ||
696 | * Take TX headroom required for alignment into account. | ||
697 | */ | ||
698 | if (test_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags)) | ||
699 | rt2x00dev->hw->extra_tx_headroom += RT2X00_L2PAD_SIZE; | ||
700 | else if (test_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags)) | ||
701 | rt2x00dev->hw->extra_tx_headroom += RT2X00_ALIGN_SIZE; | ||
692 | 702 | ||
693 | /* | 703 | /* |
694 | * Register HW. | 704 | * Register HW. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 3d8fb684b4eb..0b4801a14601 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -104,7 +104,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
104 | * is also mapped to the DMA so it can be used for transfering | 104 | * is also mapped to the DMA so it can be used for transfering |
105 | * additional descriptor information to the hardware. | 105 | * additional descriptor information to the hardware. |
106 | */ | 106 | */ |
107 | skb_push(skb, rt2x00dev->hw->extra_tx_headroom); | 107 | skb_push(skb, rt2x00dev->ops->extra_tx_headroom); |
108 | 108 | ||
109 | skbdesc->skb_dma = | 109 | skbdesc->skb_dma = |
110 | dma_map_single(rt2x00dev->dev, skb->data, skb->len, DMA_TO_DEVICE); | 110 | dma_map_single(rt2x00dev->dev, skb->data, skb->len, DMA_TO_DEVICE); |
@@ -112,7 +112,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
112 | /* | 112 | /* |
113 | * Restore data pointer to original location again. | 113 | * Restore data pointer to original location again. |
114 | */ | 114 | */ |
115 | skb_pull(skb, rt2x00dev->hw->extra_tx_headroom); | 115 | skb_pull(skb, rt2x00dev->ops->extra_tx_headroom); |
116 | 116 | ||
117 | skbdesc->flags |= SKBDESC_DMA_MAPPED_TX; | 117 | skbdesc->flags |= SKBDESC_DMA_MAPPED_TX; |
118 | } | 118 | } |
@@ -134,7 +134,7 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
134 | * by the driver, but it was actually mapped to DMA. | 134 | * by the driver, but it was actually mapped to DMA. |
135 | */ | 135 | */ |
136 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, | 136 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, |
137 | skb->len + rt2x00dev->hw->extra_tx_headroom, | 137 | skb->len + rt2x00dev->ops->extra_tx_headroom, |
138 | DMA_TO_DEVICE); | 138 | DMA_TO_DEVICE); |
139 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; | 139 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; |
140 | } | 140 | } |