diff options
author | David S. Miller <davem@davemloft.net> | 2015-01-12 00:23:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-12 00:23:45 -0500 |
commit | 81a07128214ec6658990194f49f1faa7597537d4 (patch) | |
tree | c0f46be25cdcf594b2505ca8d7daa9f8d23ecc9f /drivers/net | |
parent | 2bd822180446558dd13f6124f09fa3e80850dcaa (diff) | |
parent | c702674f99e612a22cf6e8f9b4bec341257970c0 (diff) |
Merge tag 'wireless-drivers-for-davem-2015-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
* rtlwifi: fix a regression in large skb allocation failure
iwlwifi:
* fix for 7265D NVM check
* fixes for scan: fix long scanning times and network discovery
* new firmware API for iwlmvm supported devices
* fixes in rate control
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-7000.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-8000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-fw-file.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/tx.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/utils.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/drv.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 32 |
9 files changed, 58 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c index e5be2d21868f..a5f9198d5747 100644 --- a/drivers/net/wireless/iwlwifi/iwl-7000.c +++ b/drivers/net/wireless/iwlwifi/iwl-7000.c | |||
@@ -69,8 +69,8 @@ | |||
69 | #include "iwl-agn-hw.h" | 69 | #include "iwl-agn-hw.h" |
70 | 70 | ||
71 | /* Highest firmware API version supported */ | 71 | /* Highest firmware API version supported */ |
72 | #define IWL7260_UCODE_API_MAX 10 | 72 | #define IWL7260_UCODE_API_MAX 12 |
73 | #define IWL3160_UCODE_API_MAX 10 | 73 | #define IWL3160_UCODE_API_MAX 12 |
74 | 74 | ||
75 | /* Oldest version we won't warn about */ | 75 | /* Oldest version we won't warn about */ |
76 | #define IWL7260_UCODE_API_OK 10 | 76 | #define IWL7260_UCODE_API_OK 10 |
@@ -105,7 +105,7 @@ | |||
105 | #define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode" | 105 | #define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode" |
106 | 106 | ||
107 | #define IWL7265D_FW_PRE "iwlwifi-7265D-" | 107 | #define IWL7265D_FW_PRE "iwlwifi-7265D-" |
108 | #define IWL7265D_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode" | 108 | #define IWL7265D_MODULE_FIRMWARE(api) IWL7265D_FW_PRE __stringify(api) ".ucode" |
109 | 109 | ||
110 | #define NVM_HW_SECTION_NUM_FAMILY_7000 0 | 110 | #define NVM_HW_SECTION_NUM_FAMILY_7000 0 |
111 | 111 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-8000.c b/drivers/net/wireless/iwlwifi/iwl-8000.c index bf0a95cb7153..3668fc57e770 100644 --- a/drivers/net/wireless/iwlwifi/iwl-8000.c +++ b/drivers/net/wireless/iwlwifi/iwl-8000.c | |||
@@ -69,7 +69,7 @@ | |||
69 | #include "iwl-agn-hw.h" | 69 | #include "iwl-agn-hw.h" |
70 | 70 | ||
71 | /* Highest firmware API version supported */ | 71 | /* Highest firmware API version supported */ |
72 | #define IWL8000_UCODE_API_MAX 10 | 72 | #define IWL8000_UCODE_API_MAX 12 |
73 | 73 | ||
74 | /* Oldest version we won't warn about */ | 74 | /* Oldest version we won't warn about */ |
75 | #define IWL8000_UCODE_API_OK 10 | 75 | #define IWL8000_UCODE_API_OK 10 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw-file.h b/drivers/net/wireless/iwlwifi/iwl-fw-file.h index f2a047f6bb3e..1bbe4fc47b97 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fw-file.h +++ b/drivers/net/wireless/iwlwifi/iwl-fw-file.h | |||
@@ -243,6 +243,9 @@ enum iwl_ucode_tlv_flag { | |||
243 | * @IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF: ucode supports disabling dummy notif. | 243 | * @IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF: ucode supports disabling dummy notif. |
244 | * @IWL_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time | 244 | * @IWL_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time |
245 | * longer than the passive one, which is essential for fragmented scan. | 245 | * longer than the passive one, which is essential for fragmented scan. |
246 | * @IWL_UCODE_TLV_API_BASIC_DWELL: use only basic dwell time in scan command, | ||
247 | * regardless of the band or the number of the probes. FW will calculate | ||
248 | * the actual dwell time. | ||
246 | */ | 249 | */ |
247 | enum iwl_ucode_tlv_api { | 250 | enum iwl_ucode_tlv_api { |
248 | IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID = BIT(0), | 251 | IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID = BIT(0), |
@@ -253,6 +256,7 @@ enum iwl_ucode_tlv_api { | |||
253 | IWL_UCODE_TLV_API_LMAC_SCAN = BIT(6), | 256 | IWL_UCODE_TLV_API_LMAC_SCAN = BIT(6), |
254 | IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF = BIT(7), | 257 | IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF = BIT(7), |
255 | IWL_UCODE_TLV_API_FRAGMENTED_SCAN = BIT(8), | 258 | IWL_UCODE_TLV_API_FRAGMENTED_SCAN = BIT(8), |
259 | IWL_UCODE_TLV_API_BASIC_DWELL = BIT(13), | ||
256 | }; | 260 | }; |
257 | 261 | ||
258 | /** | 262 | /** |
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h index 1f2acf47bfb2..201846de94e7 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h | |||
@@ -672,6 +672,7 @@ struct iwl_scan_channel_opt { | |||
672 | * @IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED: all passive scans will be fragmented | 672 | * @IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED: all passive scans will be fragmented |
673 | * @IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED: insert WFA vendor-specific TPC report | 673 | * @IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED: insert WFA vendor-specific TPC report |
674 | * and DS parameter set IEs into probe requests. | 674 | * and DS parameter set IEs into probe requests. |
675 | * @IWL_MVM_LMAC_SCAN_FLAG_MATCH: Send match found notification on matches | ||
675 | */ | 676 | */ |
676 | enum iwl_mvm_lmac_scan_flags { | 677 | enum iwl_mvm_lmac_scan_flags { |
677 | IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL = BIT(0), | 678 | IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL = BIT(0), |
@@ -681,6 +682,7 @@ enum iwl_mvm_lmac_scan_flags { | |||
681 | IWL_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS = BIT(4), | 682 | IWL_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS = BIT(4), |
682 | IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED = BIT(5), | 683 | IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED = BIT(5), |
683 | IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED = BIT(6), | 684 | IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED = BIT(6), |
685 | IWL_MVM_LMAC_SCAN_FLAG_MATCH = BIT(9), | ||
684 | }; | 686 | }; |
685 | 687 | ||
686 | enum iwl_scan_priority { | 688 | enum iwl_scan_priority { |
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index e5294d01181e..ec9a8e7bae1d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c | |||
@@ -171,15 +171,21 @@ static void iwl_mvm_scan_fill_ssids(struct iwl_ssid_ie *cmd_ssid, | |||
171 | * already included in the probe template, so we need to set only | 171 | * already included in the probe template, so we need to set only |
172 | * req->n_ssids - 1 bits in addition to the first bit. | 172 | * req->n_ssids - 1 bits in addition to the first bit. |
173 | */ | 173 | */ |
174 | static u16 iwl_mvm_get_active_dwell(enum ieee80211_band band, int n_ssids) | 174 | static u16 iwl_mvm_get_active_dwell(struct iwl_mvm *mvm, |
175 | enum ieee80211_band band, int n_ssids) | ||
175 | { | 176 | { |
177 | if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BASIC_DWELL) | ||
178 | return 10; | ||
176 | if (band == IEEE80211_BAND_2GHZ) | 179 | if (band == IEEE80211_BAND_2GHZ) |
177 | return 20 + 3 * (n_ssids + 1); | 180 | return 20 + 3 * (n_ssids + 1); |
178 | return 10 + 2 * (n_ssids + 1); | 181 | return 10 + 2 * (n_ssids + 1); |
179 | } | 182 | } |
180 | 183 | ||
181 | static u16 iwl_mvm_get_passive_dwell(enum ieee80211_band band) | 184 | static u16 iwl_mvm_get_passive_dwell(struct iwl_mvm *mvm, |
185 | enum ieee80211_band band) | ||
182 | { | 186 | { |
187 | if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BASIC_DWELL) | ||
188 | return 110; | ||
183 | return band == IEEE80211_BAND_2GHZ ? 100 + 20 : 100 + 10; | 189 | return band == IEEE80211_BAND_2GHZ ? 100 + 20 : 100 + 10; |
184 | } | 190 | } |
185 | 191 | ||
@@ -331,7 +337,8 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, | |||
331 | */ | 337 | */ |
332 | if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { | 338 | if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { |
333 | u32 passive_dwell = | 339 | u32 passive_dwell = |
334 | iwl_mvm_get_passive_dwell(IEEE80211_BAND_2GHZ); | 340 | iwl_mvm_get_passive_dwell(mvm, |
341 | IEEE80211_BAND_2GHZ); | ||
335 | params->max_out_time = passive_dwell; | 342 | params->max_out_time = passive_dwell; |
336 | } else { | 343 | } else { |
337 | params->passive_fragmented = true; | 344 | params->passive_fragmented = true; |
@@ -348,8 +355,8 @@ not_bound: | |||
348 | params->dwell[band].passive = frag_passive_dwell; | 355 | params->dwell[band].passive = frag_passive_dwell; |
349 | else | 356 | else |
350 | params->dwell[band].passive = | 357 | params->dwell[band].passive = |
351 | iwl_mvm_get_passive_dwell(band); | 358 | iwl_mvm_get_passive_dwell(mvm, band); |
352 | params->dwell[band].active = iwl_mvm_get_active_dwell(band, | 359 | params->dwell[band].active = iwl_mvm_get_active_dwell(mvm, band, |
353 | n_ssids); | 360 | n_ssids); |
354 | } | 361 | } |
355 | } | 362 | } |
@@ -1448,6 +1455,8 @@ int iwl_mvm_unified_sched_scan_lmac(struct iwl_mvm *mvm, | |||
1448 | 1455 | ||
1449 | if (iwl_mvm_scan_pass_all(mvm, req)) | 1456 | if (iwl_mvm_scan_pass_all(mvm, req)) |
1450 | flags |= IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL; | 1457 | flags |= IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL; |
1458 | else | ||
1459 | flags |= IWL_MVM_LMAC_SCAN_FLAG_MATCH; | ||
1451 | 1460 | ||
1452 | if (req->n_ssids == 1 && req->ssids[0].ssid_len != 0) | 1461 | if (req->n_ssids == 1 && req->ssids[0].ssid_len != 0) |
1453 | flags |= IWL_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION; | 1462 | flags |= IWL_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c index 4f15d9decc81..4333306ccdee 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/iwlwifi/mvm/tx.c | |||
@@ -108,8 +108,12 @@ void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
108 | tx_flags &= ~TX_CMD_FLG_SEQ_CTL; | 108 | tx_flags &= ~TX_CMD_FLG_SEQ_CTL; |
109 | } | 109 | } |
110 | 110 | ||
111 | /* tid_tspec will default to 0 = BE when QOS isn't enabled */ | 111 | /* Default to 0 (BE) when tid_spec is set to IWL_TID_NON_QOS */ |
112 | ac = tid_to_mac80211_ac[tx_cmd->tid_tspec]; | 112 | if (tx_cmd->tid_tspec < IWL_MAX_TID_COUNT) |
113 | ac = tid_to_mac80211_ac[tx_cmd->tid_tspec]; | ||
114 | else | ||
115 | ac = tid_to_mac80211_ac[0]; | ||
116 | |||
113 | tx_flags |= iwl_mvm_bt_coex_tx_prio(mvm, hdr, info, ac) << | 117 | tx_flags |= iwl_mvm_bt_coex_tx_prio(mvm, hdr, info, ac) << |
114 | TX_CMD_FLG_BT_PRIO_POS; | 118 | TX_CMD_FLG_BT_PRIO_POS; |
115 | 119 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/utils.c b/drivers/net/wireless/iwlwifi/mvm/utils.c index e56e77ef5d2e..917431e30f74 100644 --- a/drivers/net/wireless/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/iwlwifi/mvm/utils.c | |||
@@ -665,7 +665,7 @@ bool iwl_mvm_rx_diversity_allowed(struct iwl_mvm *mvm) | |||
665 | if (num_of_ant(mvm->fw->valid_rx_ant) == 1) | 665 | if (num_of_ant(mvm->fw->valid_rx_ant) == 1) |
666 | return false; | 666 | return false; |
667 | 667 | ||
668 | if (!mvm->cfg->rx_with_siso_diversity) | 668 | if (mvm->cfg->rx_with_siso_diversity) |
669 | return false; | 669 | return false; |
670 | 670 | ||
671 | ieee80211_iterate_active_interfaces_atomic( | 671 | ieee80211_iterate_active_interfaces_atomic( |
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index 2f0c4b170344..d5aadb00dd9e 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c | |||
@@ -527,8 +527,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
527 | else if (cfg == &iwl7265_n_cfg) | 527 | else if (cfg == &iwl7265_n_cfg) |
528 | cfg_7265d = &iwl7265d_n_cfg; | 528 | cfg_7265d = &iwl7265d_n_cfg; |
529 | if (cfg_7265d && | 529 | if (cfg_7265d && |
530 | (iwl_trans->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_7265D) | 530 | (iwl_trans->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_7265D) { |
531 | cfg = cfg_7265d; | 531 | cfg = cfg_7265d; |
532 | iwl_trans->cfg = cfg_7265d; | ||
533 | } | ||
532 | #endif | 534 | #endif |
533 | 535 | ||
534 | pci_set_drvdata(pdev, iwl_trans); | 536 | pci_set_drvdata(pdev, iwl_trans); |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 846a2e6e34d8..c70efb9a6e78 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -666,7 +666,8 @@ tx_status_ok: | |||
666 | } | 666 | } |
667 | 667 | ||
668 | static int _rtl_pci_init_one_rxdesc(struct ieee80211_hw *hw, | 668 | static int _rtl_pci_init_one_rxdesc(struct ieee80211_hw *hw, |
669 | u8 *entry, int rxring_idx, int desc_idx) | 669 | struct sk_buff *new_skb, u8 *entry, |
670 | int rxring_idx, int desc_idx) | ||
670 | { | 671 | { |
671 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 672 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
672 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 673 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
@@ -674,11 +675,15 @@ static int _rtl_pci_init_one_rxdesc(struct ieee80211_hw *hw, | |||
674 | u8 tmp_one = 1; | 675 | u8 tmp_one = 1; |
675 | struct sk_buff *skb; | 676 | struct sk_buff *skb; |
676 | 677 | ||
678 | if (likely(new_skb)) { | ||
679 | skb = new_skb; | ||
680 | goto remap; | ||
681 | } | ||
677 | skb = dev_alloc_skb(rtlpci->rxbuffersize); | 682 | skb = dev_alloc_skb(rtlpci->rxbuffersize); |
678 | if (!skb) | 683 | if (!skb) |
679 | return 0; | 684 | return 0; |
680 | rtlpci->rx_ring[rxring_idx].rx_buf[desc_idx] = skb; | ||
681 | 685 | ||
686 | remap: | ||
682 | /* just set skb->cb to mapping addr for pci_unmap_single use */ | 687 | /* just set skb->cb to mapping addr for pci_unmap_single use */ |
683 | *((dma_addr_t *)skb->cb) = | 688 | *((dma_addr_t *)skb->cb) = |
684 | pci_map_single(rtlpci->pdev, skb_tail_pointer(skb), | 689 | pci_map_single(rtlpci->pdev, skb_tail_pointer(skb), |
@@ -686,6 +691,7 @@ static int _rtl_pci_init_one_rxdesc(struct ieee80211_hw *hw, | |||
686 | bufferaddress = *((dma_addr_t *)skb->cb); | 691 | bufferaddress = *((dma_addr_t *)skb->cb); |
687 | if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress)) | 692 | if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress)) |
688 | return 0; | 693 | return 0; |
694 | rtlpci->rx_ring[rxring_idx].rx_buf[desc_idx] = skb; | ||
689 | if (rtlpriv->use_new_trx_flow) { | 695 | if (rtlpriv->use_new_trx_flow) { |
690 | rtlpriv->cfg->ops->set_desc(hw, (u8 *)entry, false, | 696 | rtlpriv->cfg->ops->set_desc(hw, (u8 *)entry, false, |
691 | HW_DESC_RX_PREPARE, | 697 | HW_DESC_RX_PREPARE, |
@@ -781,6 +787,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
781 | /*rx pkt */ | 787 | /*rx pkt */ |
782 | struct sk_buff *skb = rtlpci->rx_ring[rxring_idx].rx_buf[ | 788 | struct sk_buff *skb = rtlpci->rx_ring[rxring_idx].rx_buf[ |
783 | rtlpci->rx_ring[rxring_idx].idx]; | 789 | rtlpci->rx_ring[rxring_idx].idx]; |
790 | struct sk_buff *new_skb; | ||
784 | 791 | ||
785 | if (rtlpriv->use_new_trx_flow) { | 792 | if (rtlpriv->use_new_trx_flow) { |
786 | rx_remained_cnt = | 793 | rx_remained_cnt = |
@@ -807,6 +814,13 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
807 | pci_unmap_single(rtlpci->pdev, *((dma_addr_t *)skb->cb), | 814 | pci_unmap_single(rtlpci->pdev, *((dma_addr_t *)skb->cb), |
808 | rtlpci->rxbuffersize, PCI_DMA_FROMDEVICE); | 815 | rtlpci->rxbuffersize, PCI_DMA_FROMDEVICE); |
809 | 816 | ||
817 | /* get a new skb - if fail, old one will be reused */ | ||
818 | new_skb = dev_alloc_skb(rtlpci->rxbuffersize); | ||
819 | if (unlikely(!new_skb)) { | ||
820 | pr_err("Allocation of new skb failed in %s\n", | ||
821 | __func__); | ||
822 | goto no_new; | ||
823 | } | ||
810 | if (rtlpriv->use_new_trx_flow) { | 824 | if (rtlpriv->use_new_trx_flow) { |
811 | buffer_desc = | 825 | buffer_desc = |
812 | &rtlpci->rx_ring[rxring_idx].buffer_desc | 826 | &rtlpci->rx_ring[rxring_idx].buffer_desc |
@@ -911,14 +925,16 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
911 | schedule_work(&rtlpriv->works.lps_change_work); | 925 | schedule_work(&rtlpriv->works.lps_change_work); |
912 | } | 926 | } |
913 | end: | 927 | end: |
928 | skb = new_skb; | ||
929 | no_new: | ||
914 | if (rtlpriv->use_new_trx_flow) { | 930 | if (rtlpriv->use_new_trx_flow) { |
915 | _rtl_pci_init_one_rxdesc(hw, (u8 *)buffer_desc, | 931 | _rtl_pci_init_one_rxdesc(hw, skb, (u8 *)buffer_desc, |
916 | rxring_idx, | 932 | rxring_idx, |
917 | rtlpci->rx_ring[rxring_idx].idx); | 933 | rtlpci->rx_ring[rxring_idx].idx); |
918 | } else { | 934 | } else { |
919 | _rtl_pci_init_one_rxdesc(hw, (u8 *)pdesc, rxring_idx, | 935 | _rtl_pci_init_one_rxdesc(hw, skb, (u8 *)pdesc, |
936 | rxring_idx, | ||
920 | rtlpci->rx_ring[rxring_idx].idx); | 937 | rtlpci->rx_ring[rxring_idx].idx); |
921 | |||
922 | if (rtlpci->rx_ring[rxring_idx].idx == | 938 | if (rtlpci->rx_ring[rxring_idx].idx == |
923 | rtlpci->rxringcount - 1) | 939 | rtlpci->rxringcount - 1) |
924 | rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, | 940 | rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, |
@@ -1307,7 +1323,7 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw, int rxring_idx) | |||
1307 | rtlpci->rx_ring[rxring_idx].idx = 0; | 1323 | rtlpci->rx_ring[rxring_idx].idx = 0; |
1308 | for (i = 0; i < rtlpci->rxringcount; i++) { | 1324 | for (i = 0; i < rtlpci->rxringcount; i++) { |
1309 | entry = &rtlpci->rx_ring[rxring_idx].buffer_desc[i]; | 1325 | entry = &rtlpci->rx_ring[rxring_idx].buffer_desc[i]; |
1310 | if (!_rtl_pci_init_one_rxdesc(hw, (u8 *)entry, | 1326 | if (!_rtl_pci_init_one_rxdesc(hw, NULL, (u8 *)entry, |
1311 | rxring_idx, i)) | 1327 | rxring_idx, i)) |
1312 | return -ENOMEM; | 1328 | return -ENOMEM; |
1313 | } | 1329 | } |
@@ -1332,7 +1348,7 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw, int rxring_idx) | |||
1332 | 1348 | ||
1333 | for (i = 0; i < rtlpci->rxringcount; i++) { | 1349 | for (i = 0; i < rtlpci->rxringcount; i++) { |
1334 | entry = &rtlpci->rx_ring[rxring_idx].desc[i]; | 1350 | entry = &rtlpci->rx_ring[rxring_idx].desc[i]; |
1335 | if (!_rtl_pci_init_one_rxdesc(hw, (u8 *)entry, | 1351 | if (!_rtl_pci_init_one_rxdesc(hw, NULL, (u8 *)entry, |
1336 | rxring_idx, i)) | 1352 | rxring_idx, i)) |
1337 | return -ENOMEM; | 1353 | return -ENOMEM; |
1338 | } | 1354 | } |