diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas_tf/if_usb.c | 2 |
5 files changed, 23 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 8d690a0eb1a9..444c5cc05f03 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1384,7 +1384,7 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1384 | 1384 | ||
1385 | rxq->queue[i] = NULL; | 1385 | rxq->queue[i] = NULL; |
1386 | 1386 | ||
1387 | pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr, | 1387 | pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr, |
1388 | priv->hw_params.rx_buf_size, | 1388 | priv->hw_params.rx_buf_size, |
1389 | PCI_DMA_FROMDEVICE); | 1389 | PCI_DMA_FROMDEVICE); |
1390 | pkt = (struct iwl_rx_packet *)rxb->skb->data; | 1390 | pkt = (struct iwl_rx_packet *)rxb->skb->data; |
@@ -1436,8 +1436,8 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1436 | rxb->skb = NULL; | 1436 | rxb->skb = NULL; |
1437 | } | 1437 | } |
1438 | 1438 | ||
1439 | pci_unmap_single(priv->pci_dev, rxb->dma_addr, | 1439 | pci_unmap_single(priv->pci_dev, rxb->real_dma_addr, |
1440 | priv->hw_params.rx_buf_size, | 1440 | priv->hw_params.rx_buf_size + 256, |
1441 | PCI_DMA_FROMDEVICE); | 1441 | PCI_DMA_FROMDEVICE); |
1442 | spin_lock_irqsave(&rxq->lock, flags); | 1442 | spin_lock_irqsave(&rxq->lock, flags); |
1443 | list_add_tail(&rxb->list, &priv->rxq.rx_used); | 1443 | list_add_tail(&rxb->list, &priv->rxq.rx_used); |
@@ -2341,7 +2341,6 @@ static void iwl_bg_alive_start(struct work_struct *data) | |||
2341 | mutex_lock(&priv->mutex); | 2341 | mutex_lock(&priv->mutex); |
2342 | iwl_alive_start(priv); | 2342 | iwl_alive_start(priv); |
2343 | mutex_unlock(&priv->mutex); | 2343 | mutex_unlock(&priv->mutex); |
2344 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
2345 | } | 2344 | } |
2346 | 2345 | ||
2347 | static void iwl4965_bg_rf_kill(struct work_struct *work) | 2346 | static void iwl4965_bg_rf_kill(struct work_struct *work) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index c018121085e9..9966d4e384ce 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -89,7 +89,8 @@ extern struct iwl_cfg iwl5100_abg_cfg; | |||
89 | #define DEFAULT_LONG_RETRY_LIMIT 4U | 89 | #define DEFAULT_LONG_RETRY_LIMIT 4U |
90 | 90 | ||
91 | struct iwl_rx_mem_buffer { | 91 | struct iwl_rx_mem_buffer { |
92 | dma_addr_t dma_addr; | 92 | dma_addr_t real_dma_addr; |
93 | dma_addr_t aligned_dma_addr; | ||
93 | struct sk_buff *skb; | 94 | struct sk_buff *skb; |
94 | struct list_head list; | 95 | struct list_head list; |
95 | }; | 96 | }; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 7cde9d76ff5d..0509c16dbe75 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -204,7 +204,7 @@ int iwl_rx_queue_restock(struct iwl_priv *priv) | |||
204 | list_del(element); | 204 | list_del(element); |
205 | 205 | ||
206 | /* Point to Rx buffer via next RBD in circular buffer */ | 206 | /* Point to Rx buffer via next RBD in circular buffer */ |
207 | rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->dma_addr); | 207 | rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->aligned_dma_addr); |
208 | rxq->queue[rxq->write] = rxb; | 208 | rxq->queue[rxq->write] = rxb; |
209 | rxq->write = (rxq->write + 1) & RX_QUEUE_MASK; | 209 | rxq->write = (rxq->write + 1) & RX_QUEUE_MASK; |
210 | rxq->free_count--; | 210 | rxq->free_count--; |
@@ -251,7 +251,7 @@ void iwl_rx_allocate(struct iwl_priv *priv) | |||
251 | rxb = list_entry(element, struct iwl_rx_mem_buffer, list); | 251 | rxb = list_entry(element, struct iwl_rx_mem_buffer, list); |
252 | 252 | ||
253 | /* Alloc a new receive buffer */ | 253 | /* Alloc a new receive buffer */ |
254 | rxb->skb = alloc_skb(priv->hw_params.rx_buf_size, | 254 | rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256, |
255 | __GFP_NOWARN | GFP_ATOMIC); | 255 | __GFP_NOWARN | GFP_ATOMIC); |
256 | if (!rxb->skb) { | 256 | if (!rxb->skb) { |
257 | if (net_ratelimit()) | 257 | if (net_ratelimit()) |
@@ -266,9 +266,17 @@ void iwl_rx_allocate(struct iwl_priv *priv) | |||
266 | list_del(element); | 266 | list_del(element); |
267 | 267 | ||
268 | /* Get physical address of RB/SKB */ | 268 | /* Get physical address of RB/SKB */ |
269 | rxb->dma_addr = | 269 | rxb->real_dma_addr = pci_map_single( |
270 | pci_map_single(priv->pci_dev, rxb->skb->data, | 270 | priv->pci_dev, |
271 | priv->hw_params.rx_buf_size, PCI_DMA_FROMDEVICE); | 271 | rxb->skb->data, |
272 | priv->hw_params.rx_buf_size + 256, | ||
273 | PCI_DMA_FROMDEVICE); | ||
274 | /* dma address must be no more than 36 bits */ | ||
275 | BUG_ON(rxb->real_dma_addr & ~DMA_BIT_MASK(36)); | ||
276 | /* and also 256 byte aligned! */ | ||
277 | rxb->aligned_dma_addr = ALIGN(rxb->real_dma_addr, 256); | ||
278 | skb_reserve(rxb->skb, rxb->aligned_dma_addr - rxb->real_dma_addr); | ||
279 | |||
272 | list_add_tail(&rxb->list, &rxq->rx_free); | 280 | list_add_tail(&rxb->list, &rxq->rx_free); |
273 | rxq->free_count++; | 281 | rxq->free_count++; |
274 | } | 282 | } |
@@ -300,8 +308,8 @@ void iwl_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
300 | for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { | 308 | for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { |
301 | if (rxq->pool[i].skb != NULL) { | 309 | if (rxq->pool[i].skb != NULL) { |
302 | pci_unmap_single(priv->pci_dev, | 310 | pci_unmap_single(priv->pci_dev, |
303 | rxq->pool[i].dma_addr, | 311 | rxq->pool[i].real_dma_addr, |
304 | priv->hw_params.rx_buf_size, | 312 | priv->hw_params.rx_buf_size + 256, |
305 | PCI_DMA_FROMDEVICE); | 313 | PCI_DMA_FROMDEVICE); |
306 | dev_kfree_skb(rxq->pool[i].skb); | 314 | dev_kfree_skb(rxq->pool[i].skb); |
307 | } | 315 | } |
@@ -354,8 +362,8 @@ void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
354 | * to an SKB, so we need to unmap and free potential storage */ | 362 | * to an SKB, so we need to unmap and free potential storage */ |
355 | if (rxq->pool[i].skb != NULL) { | 363 | if (rxq->pool[i].skb != NULL) { |
356 | pci_unmap_single(priv->pci_dev, | 364 | pci_unmap_single(priv->pci_dev, |
357 | rxq->pool[i].dma_addr, | 365 | rxq->pool[i].real_dma_addr, |
358 | priv->hw_params.rx_buf_size, | 366 | priv->hw_params.rx_buf_size + 256, |
359 | PCI_DMA_FROMDEVICE); | 367 | PCI_DMA_FROMDEVICE); |
360 | priv->alloc_rxb_skb--; | 368 | priv->alloc_rxb_skb--; |
361 | dev_kfree_skb(rxq->pool[i].skb); | 369 | dev_kfree_skb(rxq->pool[i].skb); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 285b53e7e261..45a6b0c35695 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6012,7 +6012,6 @@ static void iwl3945_bg_alive_start(struct work_struct *data) | |||
6012 | mutex_lock(&priv->mutex); | 6012 | mutex_lock(&priv->mutex); |
6013 | iwl3945_alive_start(priv); | 6013 | iwl3945_alive_start(priv); |
6014 | mutex_unlock(&priv->mutex); | 6014 | mutex_unlock(&priv->mutex); |
6015 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
6016 | } | 6015 | } |
6017 | 6016 | ||
6018 | static void iwl3945_bg_rf_kill(struct work_struct *work) | 6017 | static void iwl3945_bg_rf_kill(struct work_struct *work) |
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c index 1cc03a8dd67a..59634c33b1f9 100644 --- a/drivers/net/wireless/libertas_tf/if_usb.c +++ b/drivers/net/wireless/libertas_tf/if_usb.c | |||
@@ -331,7 +331,7 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp, | |||
331 | /* Fill the receive configuration URB and initialise the Rx call back */ | 331 | /* Fill the receive configuration URB and initialise the Rx call back */ |
332 | usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, | 332 | usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, |
333 | usb_rcvbulkpipe(cardp->udev, cardp->ep_in), | 333 | usb_rcvbulkpipe(cardp->udev, cardp->ep_in), |
334 | (void *) (skb->tail), | 334 | skb_tail_pointer(skb), |
335 | MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, cardp); | 335 | MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, cardp); |
336 | 336 | ||
337 | cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET; | 337 | cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET; |