aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c26
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c2
4 files changed, 22 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 8264d3742d08..35cfa1524c35 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1379,7 +1379,7 @@ void iwl_rx_handle(struct iwl_priv *priv)
1379 1379
1380 rxq->queue[i] = NULL; 1380 rxq->queue[i] = NULL;
1381 1381
1382 pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr, 1382 pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr,
1383 priv->hw_params.rx_buf_size, 1383 priv->hw_params.rx_buf_size,
1384 PCI_DMA_FROMDEVICE); 1384 PCI_DMA_FROMDEVICE);
1385 pkt = (struct iwl_rx_packet *)rxb->skb->data; 1385 pkt = (struct iwl_rx_packet *)rxb->skb->data;
@@ -1432,8 +1432,8 @@ void iwl_rx_handle(struct iwl_priv *priv)
1432 rxb->skb = NULL; 1432 rxb->skb = NULL;
1433 } 1433 }
1434 1434
1435 pci_unmap_single(priv->pci_dev, rxb->dma_addr, 1435 pci_unmap_single(priv->pci_dev, rxb->real_dma_addr,
1436 priv->hw_params.rx_buf_size, 1436 priv->hw_params.rx_buf_size + 256,
1437 PCI_DMA_FROMDEVICE); 1437 PCI_DMA_FROMDEVICE);
1438 spin_lock_irqsave(&rxq->lock, flags); 1438 spin_lock_irqsave(&rxq->lock, flags);
1439 list_add_tail(&rxb->list, &priv->rxq.rx_used); 1439 list_add_tail(&rxb->list, &priv->rxq.rx_used);
@@ -2334,7 +2334,6 @@ static void iwl_bg_alive_start(struct work_struct *data)
2334 mutex_lock(&priv->mutex); 2334 mutex_lock(&priv->mutex);
2335 iwl_alive_start(priv); 2335 iwl_alive_start(priv);
2336 mutex_unlock(&priv->mutex); 2336 mutex_unlock(&priv->mutex);
2337 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
2338} 2337}
2339 2338
2340static void iwl_bg_rf_kill(struct work_struct *work) 2339static void iwl_bg_rf_kill(struct work_struct *work)
@@ -2390,7 +2389,6 @@ static void iwl_bg_set_monitor(struct work_struct *work)
2390 } 2389 }
2391 2390
2392 mutex_unlock(&priv->mutex); 2391 mutex_unlock(&priv->mutex);
2393 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
2394} 2392}
2395 2393
2396static void iwl_bg_run_time_calib_work(struct work_struct *work) 2394static void iwl_bg_run_time_calib_work(struct work_struct *work)
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index eb396f26730c..d509aed5567a 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
91struct iwl_rx_mem_buffer { 91struct 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 b86f9586acde..b3c35c64d042 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 119185fb1e26..a3ec4d0467a2 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -5948,7 +5948,6 @@ static void iwl3945_bg_alive_start(struct work_struct *data)
5948 mutex_lock(&priv->mutex); 5948 mutex_lock(&priv->mutex);
5949 iwl3945_alive_start(priv); 5949 iwl3945_alive_start(priv);
5950 mutex_unlock(&priv->mutex); 5950 mutex_unlock(&priv->mutex);
5951 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
5952} 5951}
5953 5952
5954static void iwl3945_bg_rf_kill(struct work_struct *work) 5953static void iwl3945_bg_rf_kill(struct work_struct *work)
@@ -5999,7 +5998,6 @@ static void iwl3945_bg_set_monitor(struct work_struct *work)
5999 IWL_ERROR("iwl3945_set_mode() failed\n"); 5998 IWL_ERROR("iwl3945_set_mode() failed\n");
6000 5999
6001 mutex_unlock(&priv->mutex); 6000 mutex_unlock(&priv->mutex);
6002 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
6003} 6001}
6004 6002
6005#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ) 6003#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ)