diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2007-11-26 09:14:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:46 -0500 |
commit | 9ee1ba474fc37bcaf6a958bf7e995006fc69893b (patch) | |
tree | 42224488712bfd808909ce48e0a4c2a8bc69c606 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 270243a50574455f593378377c0fa74284730f7d (diff) |
iwlwifi: 802.11n add support to 8K A-MSDU Rx frames
This patch give the iwlwifi the ability to support A-MSDU up to 8K
Please notice - in order to work in 8K A-MSDU ucode support is needed,
version 4.44.1.19 (soon to be published). 4K A-MSDU works in current ucode
version as well.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 9f89f596283c..3a9f14d8f26a 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -70,6 +70,7 @@ static int iwl4965_param_antenna; /* def: 0 = both antennas (use diversity) */ | |||
70 | int iwl4965_param_hwcrypto; /* def: using software encryption */ | 70 | int iwl4965_param_hwcrypto; /* def: using software encryption */ |
71 | static int iwl4965_param_qos_enable = 1; /* def: 1 = use quality of service */ | 71 | static int iwl4965_param_qos_enable = 1; /* def: 1 = use quality of service */ |
72 | int iwl4965_param_queues_num = IWL_MAX_NUM_QUEUES; /* def: 16 Tx queues */ | 72 | int iwl4965_param_queues_num = IWL_MAX_NUM_QUEUES; /* def: 16 Tx queues */ |
73 | int iwl4965_param_amsdu_size_8K; /* def: enable 8K amsdu size */ | ||
73 | 74 | ||
74 | /* | 75 | /* |
75 | * module name, copyright, version, etc. | 76 | * module name, copyright, version, etc. |
@@ -3263,7 +3264,7 @@ void iwl4965_handle_data_packet_monitor(struct iwl4965_priv *priv, | |||
3263 | __le16 phy_flags_hw = cpu_to_le16(phy_flags); | 3264 | __le16 phy_flags_hw = cpu_to_le16(phy_flags); |
3264 | 3265 | ||
3265 | /* We received data from the HW, so stop the watchdog */ | 3266 | /* We received data from the HW, so stop the watchdog */ |
3266 | if (len > IWL_RX_BUF_SIZE - sizeof(*iwl4965_rt)) { | 3267 | if (len > priv->hw_setting.rx_buf_size - sizeof(*iwl4965_rt)) { |
3267 | IWL_DEBUG_DROP("Dropping too large packet in monitor\n"); | 3268 | IWL_DEBUG_DROP("Dropping too large packet in monitor\n"); |
3268 | return; | 3269 | return; |
3269 | } | 3270 | } |
@@ -4506,7 +4507,8 @@ static void iwl4965_rx_allocate(struct iwl4965_priv *priv) | |||
4506 | 4507 | ||
4507 | /* Alloc a new receive buffer */ | 4508 | /* Alloc a new receive buffer */ |
4508 | rxb->skb = | 4509 | rxb->skb = |
4509 | alloc_skb(IWL_RX_BUF_SIZE, __GFP_NOWARN | GFP_ATOMIC); | 4510 | alloc_skb(priv->hw_setting.rx_buf_size, |
4511 | __GFP_NOWARN | GFP_ATOMIC); | ||
4510 | if (!rxb->skb) { | 4512 | if (!rxb->skb) { |
4511 | if (net_ratelimit()) | 4513 | if (net_ratelimit()) |
4512 | printk(KERN_CRIT DRV_NAME | 4514 | printk(KERN_CRIT DRV_NAME |
@@ -4522,7 +4524,7 @@ static void iwl4965_rx_allocate(struct iwl4965_priv *priv) | |||
4522 | /* Get physical address of RB/SKB */ | 4524 | /* Get physical address of RB/SKB */ |
4523 | rxb->dma_addr = | 4525 | rxb->dma_addr = |
4524 | pci_map_single(priv->pci_dev, rxb->skb->data, | 4526 | pci_map_single(priv->pci_dev, rxb->skb->data, |
4525 | IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); | 4527 | priv->hw_setting.rx_buf_size, PCI_DMA_FROMDEVICE); |
4526 | list_add_tail(&rxb->list, &rxq->rx_free); | 4528 | list_add_tail(&rxb->list, &rxq->rx_free); |
4527 | rxq->free_count++; | 4529 | rxq->free_count++; |
4528 | } | 4530 | } |
@@ -4565,7 +4567,8 @@ static void iwl4965_rx_queue_free(struct iwl4965_priv *priv, struct iwl4965_rx_q | |||
4565 | if (rxq->pool[i].skb != NULL) { | 4567 | if (rxq->pool[i].skb != NULL) { |
4566 | pci_unmap_single(priv->pci_dev, | 4568 | pci_unmap_single(priv->pci_dev, |
4567 | rxq->pool[i].dma_addr, | 4569 | rxq->pool[i].dma_addr, |
4568 | IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); | 4570 | priv->hw_setting.rx_buf_size, |
4571 | PCI_DMA_FROMDEVICE); | ||
4569 | dev_kfree_skb(rxq->pool[i].skb); | 4572 | dev_kfree_skb(rxq->pool[i].skb); |
4570 | } | 4573 | } |
4571 | } | 4574 | } |
@@ -4616,7 +4619,8 @@ void iwl4965_rx_queue_reset(struct iwl4965_priv *priv, struct iwl4965_rx_queue * | |||
4616 | if (rxq->pool[i].skb != NULL) { | 4619 | if (rxq->pool[i].skb != NULL) { |
4617 | pci_unmap_single(priv->pci_dev, | 4620 | pci_unmap_single(priv->pci_dev, |
4618 | rxq->pool[i].dma_addr, | 4621 | rxq->pool[i].dma_addr, |
4619 | IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); | 4622 | priv->hw_setting.rx_buf_size, |
4623 | PCI_DMA_FROMDEVICE); | ||
4620 | priv->alloc_rxb_skb--; | 4624 | priv->alloc_rxb_skb--; |
4621 | dev_kfree_skb(rxq->pool[i].skb); | 4625 | dev_kfree_skb(rxq->pool[i].skb); |
4622 | rxq->pool[i].skb = NULL; | 4626 | rxq->pool[i].skb = NULL; |
@@ -4750,7 +4754,7 @@ static void iwl4965_rx_handle(struct iwl4965_priv *priv) | |||
4750 | rxq->queue[i] = NULL; | 4754 | rxq->queue[i] = NULL; |
4751 | 4755 | ||
4752 | pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr, | 4756 | pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr, |
4753 | IWL_RX_BUF_SIZE, | 4757 | priv->hw_setting.rx_buf_size, |
4754 | PCI_DMA_FROMDEVICE); | 4758 | PCI_DMA_FROMDEVICE); |
4755 | pkt = (struct iwl4965_rx_packet *)rxb->skb->data; | 4759 | pkt = (struct iwl4965_rx_packet *)rxb->skb->data; |
4756 | 4760 | ||
@@ -4803,7 +4807,8 @@ static void iwl4965_rx_handle(struct iwl4965_priv *priv) | |||
4803 | } | 4807 | } |
4804 | 4808 | ||
4805 | pci_unmap_single(priv->pci_dev, rxb->dma_addr, | 4809 | pci_unmap_single(priv->pci_dev, rxb->dma_addr, |
4806 | IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); | 4810 | priv->hw_setting.rx_buf_size, |
4811 | PCI_DMA_FROMDEVICE); | ||
4807 | spin_lock_irqsave(&rxq->lock, flags); | 4812 | spin_lock_irqsave(&rxq->lock, flags); |
4808 | list_add_tail(&rxb->list, &priv->rxq.rx_used); | 4813 | list_add_tail(&rxb->list, &priv->rxq.rx_used); |
4809 | spin_unlock_irqrestore(&rxq->lock, flags); | 4814 | spin_unlock_irqrestore(&rxq->lock, flags); |
@@ -9523,6 +9528,8 @@ MODULE_PARM_DESC(queues_num, "number of hw queues."); | |||
9523 | /* QoS */ | 9528 | /* QoS */ |
9524 | module_param_named(qos_enable, iwl4965_param_qos_enable, int, 0444); | 9529 | module_param_named(qos_enable, iwl4965_param_qos_enable, int, 0444); |
9525 | MODULE_PARM_DESC(qos_enable, "enable all QoS functionality"); | 9530 | MODULE_PARM_DESC(qos_enable, "enable all QoS functionality"); |
9531 | module_param_named(amsdu_size_8K, iwl4965_param_amsdu_size_8K, int, 0444); | ||
9532 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); | ||
9526 | 9533 | ||
9527 | module_exit(iwl4965_exit); | 9534 | module_exit(iwl4965_exit); |
9528 | module_init(iwl4965_init); | 9535 | module_init(iwl4965_init); |