aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-09-28 11:39:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-09-28 11:39:05 -0400
commit2ef7b45a5925c54d948f858e42babb0533b9a3c5 (patch)
tree9733a7b50854654162d9e15551a7edd74bfdef2c /drivers/net
parent07117e305487b0d4251a97d3529fa2c7d930d36a (diff)
parentb582ad8e961c78458005250ae28fdd7a25db55aa (diff)
Merge git://github.com/davem330/net
* git://github.com/davem330/net: ipv6-multicast: Fix memory leak in IPv6 multicast. ipv6: check return value for dst_alloc net: check return value for dst_alloc ipv6-multicast: Fix memory leak in input path. bnx2x: add missing break in bnx2x_dcbnl_get_cap bnx2x: fix WOL by enablement PME in config space bnx2x: fix hw attention handling net: fix a typo in Documentation/networking/scaling.txt ath9k: Fix a dma warning/memory leak rtlwifi: rtl8192cu: Fix unitialized struct iwlagn: fix dangling scan request batman-adv: do_bcast has to be true for broadcast packets only cfg80211: Fix validation of AKM suites iwlegacy: do not use interruptible waits iwlegacy: fix command queue timeout ath9k_hw: Fix Rx DMA stuck for AR9003 chips
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnx2x/bnx2x_dcb.c1
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c16
-rw-r--r--drivers/net/bnx2x/bnx2x_reg.h12
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c10
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-core.c4
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-hcmd.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-tx.c4
-rw-r--r--drivers/net/wireless/iwlegacy/iwl3945-base.c8
-rw-r--r--drivers/net/wireless/iwlegacy/iwl4965-base.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c30
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c1
12 files changed, 68 insertions, 32 deletions
diff --git a/drivers/net/bnx2x/bnx2x_dcb.c b/drivers/net/bnx2x/bnx2x_dcb.c
index a1e004a82f7a..0b4acf67e0c6 100644
--- a/drivers/net/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/bnx2x/bnx2x_dcb.c
@@ -2120,6 +2120,7 @@ static u8 bnx2x_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap)
2120 break; 2120 break;
2121 case DCB_CAP_ATTR_DCBX: 2121 case DCB_CAP_ATTR_DCBX:
2122 *cap = BNX2X_DCBX_CAPS; 2122 *cap = BNX2X_DCBX_CAPS;
2123 break;
2123 default: 2124 default:
2124 rval = -EINVAL; 2125 rval = -EINVAL;
2125 break; 2126 break;
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index c027e9341a1a..15f800085bb2 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -4943,7 +4943,7 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
4943 int igu_seg_id; 4943 int igu_seg_id;
4944 int port = BP_PORT(bp); 4944 int port = BP_PORT(bp);
4945 int func = BP_FUNC(bp); 4945 int func = BP_FUNC(bp);
4946 int reg_offset; 4946 int reg_offset, reg_offset_en5;
4947 u64 section; 4947 u64 section;
4948 int index; 4948 int index;
4949 struct hc_sp_status_block_data sp_sb_data; 4949 struct hc_sp_status_block_data sp_sb_data;
@@ -4966,6 +4966,8 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
4966 4966
4967 reg_offset = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 : 4967 reg_offset = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 :
4968 MISC_REG_AEU_ENABLE1_FUNC_0_OUT_0); 4968 MISC_REG_AEU_ENABLE1_FUNC_0_OUT_0);
4969 reg_offset_en5 = (port ? MISC_REG_AEU_ENABLE5_FUNC_1_OUT_0 :
4970 MISC_REG_AEU_ENABLE5_FUNC_0_OUT_0);
4969 for (index = 0; index < MAX_DYNAMIC_ATTN_GRPS; index++) { 4971 for (index = 0; index < MAX_DYNAMIC_ATTN_GRPS; index++) {
4970 int sindex; 4972 int sindex;
4971 /* take care of sig[0]..sig[4] */ 4973 /* take care of sig[0]..sig[4] */
@@ -4980,7 +4982,7 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
4980 * and not 16 between the different groups 4982 * and not 16 between the different groups
4981 */ 4983 */
4982 bp->attn_group[index].sig[4] = REG_RD(bp, 4984 bp->attn_group[index].sig[4] = REG_RD(bp,
4983 reg_offset + 0x10 + 0x4*index); 4985 reg_offset_en5 + 0x4*index);
4984 else 4986 else
4985 bp->attn_group[index].sig[4] = 0; 4987 bp->attn_group[index].sig[4] = 0;
4986 } 4988 }
@@ -7625,8 +7627,11 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
7625 u32 emac_base = port ? GRCBASE_EMAC1 : GRCBASE_EMAC0; 7627 u32 emac_base = port ? GRCBASE_EMAC1 : GRCBASE_EMAC0;
7626 u8 *mac_addr = bp->dev->dev_addr; 7628 u8 *mac_addr = bp->dev->dev_addr;
7627 u32 val; 7629 u32 val;
7630 u16 pmc;
7631
7628 /* The mac address is written to entries 1-4 to 7632 /* The mac address is written to entries 1-4 to
7629 preserve entry 0 which is used by the PMF */ 7633 * preserve entry 0 which is used by the PMF
7634 */
7630 u8 entry = (BP_VN(bp) + 1)*8; 7635 u8 entry = (BP_VN(bp) + 1)*8;
7631 7636
7632 val = (mac_addr[0] << 8) | mac_addr[1]; 7637 val = (mac_addr[0] << 8) | mac_addr[1];
@@ -7636,6 +7641,11 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
7636 (mac_addr[4] << 8) | mac_addr[5]; 7641 (mac_addr[4] << 8) | mac_addr[5];
7637 EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + entry + 4, val); 7642 EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + entry + 4, val);
7638 7643
7644 /* Enable the PME and clear the status */
7645 pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmc);
7646 pmc |= PCI_PM_CTRL_PME_ENABLE | PCI_PM_CTRL_PME_STATUS;
7647 pci_write_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, pmc);
7648
7639 reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_EN; 7649 reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_EN;
7640 7650
7641 } else 7651 } else
diff --git a/drivers/net/bnx2x/bnx2x_reg.h b/drivers/net/bnx2x/bnx2x_reg.h
index 750e8445dac4..fc7bd0f23c0b 100644
--- a/drivers/net/bnx2x/bnx2x_reg.h
+++ b/drivers/net/bnx2x/bnx2x_reg.h
@@ -1384,6 +1384,18 @@
1384 Latched ump_tx_parity; [31] MCP Latched scpad_parity; */ 1384 Latched ump_tx_parity; [31] MCP Latched scpad_parity; */
1385#define MISC_REG_AEU_ENABLE4_PXP_0 0xa108 1385#define MISC_REG_AEU_ENABLE4_PXP_0 0xa108
1386#define MISC_REG_AEU_ENABLE4_PXP_1 0xa1a8 1386#define MISC_REG_AEU_ENABLE4_PXP_1 0xa1a8
1387/* [RW 32] fifth 32b for enabling the output for function 0 output0. Mapped
1388 * as follows: [0] PGLUE config_space; [1] PGLUE misc_flr; [2] PGLUE B RBC
1389 * attention [3] PGLUE B RBC parity; [4] ATC attention; [5] ATC parity; [6]
1390 * mstat0 attention; [7] mstat0 parity; [8] mstat1 attention; [9] mstat1
1391 * parity; [31-10] Reserved; */
1392#define MISC_REG_AEU_ENABLE5_FUNC_0_OUT_0 0xa688
1393/* [RW 32] Fifth 32b for enabling the output for function 1 output0. Mapped
1394 * as follows: [0] PGLUE config_space; [1] PGLUE misc_flr; [2] PGLUE B RBC
1395 * attention [3] PGLUE B RBC parity; [4] ATC attention; [5] ATC parity; [6]
1396 * mstat0 attention; [7] mstat0 parity; [8] mstat1 attention; [9] mstat1
1397 * parity; [31-10] Reserved; */
1398#define MISC_REG_AEU_ENABLE5_FUNC_1_OUT_0 0xa6b0
1387/* [RW 1] set/clr general attention 0; this will set/clr bit 94 in the aeu 1399/* [RW 1] set/clr general attention 0; this will set/clr bit 94 in the aeu
1388 128 bit vector */ 1400 128 bit vector */
1389#define MISC_REG_AEU_GENERAL_ATTN_0 0xa000 1401#define MISC_REG_AEU_GENERAL_ATTN_0 0xa000
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
index 2339728a7306..3e69c631ebb4 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
@@ -1514,7 +1514,7 @@ static const u32 ar9300_2p2_mac_core[][2] = {
1514 {0x00008258, 0x00000000}, 1514 {0x00008258, 0x00000000},
1515 {0x0000825c, 0x40000000}, 1515 {0x0000825c, 0x40000000},
1516 {0x00008260, 0x00080922}, 1516 {0x00008260, 0x00080922},
1517 {0x00008264, 0x9bc00010}, 1517 {0x00008264, 0x9d400010},
1518 {0x00008268, 0xffffffff}, 1518 {0x00008268, 0xffffffff},
1519 {0x0000826c, 0x0000ffff}, 1519 {0x0000826c, 0x0000ffff},
1520 {0x00008270, 0x00000000}, 1520 {0x00008270, 0x00000000},
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 9a4850154fb2..4c21f8cbdeb5 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -205,14 +205,22 @@ static void ath_rx_remove_buffer(struct ath_softc *sc,
205 205
206static void ath_rx_edma_cleanup(struct ath_softc *sc) 206static void ath_rx_edma_cleanup(struct ath_softc *sc)
207{ 207{
208 struct ath_hw *ah = sc->sc_ah;
209 struct ath_common *common = ath9k_hw_common(ah);
208 struct ath_buf *bf; 210 struct ath_buf *bf;
209 211
210 ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_LP); 212 ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_LP);
211 ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_HP); 213 ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_HP);
212 214
213 list_for_each_entry(bf, &sc->rx.rxbuf, list) { 215 list_for_each_entry(bf, &sc->rx.rxbuf, list) {
214 if (bf->bf_mpdu) 216 if (bf->bf_mpdu) {
217 dma_unmap_single(sc->dev, bf->bf_buf_addr,
218 common->rx_bufsize,
219 DMA_BIDIRECTIONAL);
215 dev_kfree_skb_any(bf->bf_mpdu); 220 dev_kfree_skb_any(bf->bf_mpdu);
221 bf->bf_buf_addr = 0;
222 bf->bf_mpdu = NULL;
223 }
216 } 224 }
217 225
218 INIT_LIST_HEAD(&sc->rx.rxbuf); 226 INIT_LIST_HEAD(&sc->rx.rxbuf);
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c
index 35cd2537e7fd..e5971fe9d169 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -937,7 +937,7 @@ void iwl_legacy_irq_handle_error(struct iwl_priv *priv)
937 &priv->contexts[IWL_RXON_CTX_BSS]); 937 &priv->contexts[IWL_RXON_CTX_BSS]);
938#endif 938#endif
939 939
940 wake_up_interruptible(&priv->wait_command_queue); 940 wake_up(&priv->wait_command_queue);
941 941
942 /* Keep the restart process from trying to send host 942 /* Keep the restart process from trying to send host
943 * commands by clearing the INIT status bit */ 943 * commands by clearing the INIT status bit */
@@ -1746,7 +1746,7 @@ int iwl_legacy_force_reset(struct iwl_priv *priv, bool external)
1746 1746
1747 /* Set the FW error flag -- cleared on iwl_down */ 1747 /* Set the FW error flag -- cleared on iwl_down */
1748 set_bit(STATUS_FW_ERROR, &priv->status); 1748 set_bit(STATUS_FW_ERROR, &priv->status);
1749 wake_up_interruptible(&priv->wait_command_queue); 1749 wake_up(&priv->wait_command_queue);
1750 /* 1750 /*
1751 * Keep the restart process from trying to send host 1751 * Keep the restart process from trying to send host
1752 * commands by clearing the INIT status bit 1752 * commands by clearing the INIT status bit
diff --git a/drivers/net/wireless/iwlegacy/iwl-hcmd.c b/drivers/net/wireless/iwlegacy/iwl-hcmd.c
index 62b4b09122cb..ce1fc9feb61f 100644
--- a/drivers/net/wireless/iwlegacy/iwl-hcmd.c
+++ b/drivers/net/wireless/iwlegacy/iwl-hcmd.c
@@ -167,7 +167,7 @@ int iwl_legacy_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
167 goto out; 167 goto out;
168 } 168 }
169 169
170 ret = wait_event_interruptible_timeout(priv->wait_command_queue, 170 ret = wait_event_timeout(priv->wait_command_queue,
171 !test_bit(STATUS_HCMD_ACTIVE, &priv->status), 171 !test_bit(STATUS_HCMD_ACTIVE, &priv->status),
172 HOST_COMPLETE_TIMEOUT); 172 HOST_COMPLETE_TIMEOUT);
173 if (!ret) { 173 if (!ret) {
diff --git a/drivers/net/wireless/iwlegacy/iwl-tx.c b/drivers/net/wireless/iwlegacy/iwl-tx.c
index 4fff995c6f3e..ef9e268bf8a0 100644
--- a/drivers/net/wireless/iwlegacy/iwl-tx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-tx.c
@@ -625,6 +625,8 @@ iwl_legacy_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
625 cmd = txq->cmd[cmd_index]; 625 cmd = txq->cmd[cmd_index];
626 meta = &txq->meta[cmd_index]; 626 meta = &txq->meta[cmd_index];
627 627
628 txq->time_stamp = jiffies;
629
628 pci_unmap_single(priv->pci_dev, 630 pci_unmap_single(priv->pci_dev,
629 dma_unmap_addr(meta, mapping), 631 dma_unmap_addr(meta, mapping),
630 dma_unmap_len(meta, len), 632 dma_unmap_len(meta, len),
@@ -645,7 +647,7 @@ iwl_legacy_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
645 clear_bit(STATUS_HCMD_ACTIVE, &priv->status); 647 clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
646 IWL_DEBUG_INFO(priv, "Clearing HCMD_ACTIVE for command %s\n", 648 IWL_DEBUG_INFO(priv, "Clearing HCMD_ACTIVE for command %s\n",
647 iwl_legacy_get_cmd_string(cmd->hdr.cmd)); 649 iwl_legacy_get_cmd_string(cmd->hdr.cmd));
648 wake_up_interruptible(&priv->wait_command_queue); 650 wake_up(&priv->wait_command_queue);
649 } 651 }
650 652
651 /* Mark as unmapped */ 653 /* Mark as unmapped */
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
index 795826a014ed..66ee15629a76 100644
--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
@@ -841,7 +841,7 @@ static void iwl3945_rx_card_state_notif(struct iwl_priv *priv,
841 wiphy_rfkill_set_hw_state(priv->hw->wiphy, 841 wiphy_rfkill_set_hw_state(priv->hw->wiphy,
842 test_bit(STATUS_RF_KILL_HW, &priv->status)); 842 test_bit(STATUS_RF_KILL_HW, &priv->status));
843 else 843 else
844 wake_up_interruptible(&priv->wait_command_queue); 844 wake_up(&priv->wait_command_queue);
845} 845}
846 846
847/** 847/**
@@ -2269,7 +2269,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
2269 iwl3945_reg_txpower_periodic(priv); 2269 iwl3945_reg_txpower_periodic(priv);
2270 2270
2271 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); 2271 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n");
2272 wake_up_interruptible(&priv->wait_command_queue); 2272 wake_up(&priv->wait_command_queue);
2273 2273
2274 return; 2274 return;
2275 2275
@@ -2300,7 +2300,7 @@ static void __iwl3945_down(struct iwl_priv *priv)
2300 iwl_legacy_clear_driver_stations(priv); 2300 iwl_legacy_clear_driver_stations(priv);
2301 2301
2302 /* Unblock any waiting calls */ 2302 /* Unblock any waiting calls */
2303 wake_up_interruptible_all(&priv->wait_command_queue); 2303 wake_up_all(&priv->wait_command_queue);
2304 2304
2305 /* Wipe out the EXIT_PENDING status bit if we are not actually 2305 /* Wipe out the EXIT_PENDING status bit if we are not actually
2306 * exiting the module */ 2306 * exiting the module */
@@ -2853,7 +2853,7 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)
2853 2853
2854 /* Wait for START_ALIVE from ucode. Otherwise callbacks from 2854 /* Wait for START_ALIVE from ucode. Otherwise callbacks from
2855 * mac80211 will not be run successfully. */ 2855 * mac80211 will not be run successfully. */
2856 ret = wait_event_interruptible_timeout(priv->wait_command_queue, 2856 ret = wait_event_timeout(priv->wait_command_queue,
2857 test_bit(STATUS_READY, &priv->status), 2857 test_bit(STATUS_READY, &priv->status),
2858 UCODE_READY_TIMEOUT); 2858 UCODE_READY_TIMEOUT);
2859 if (!ret) { 2859 if (!ret) {
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c
index 14334668034e..aa0c2539761e 100644
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -576,7 +576,7 @@ static void iwl4965_rx_card_state_notif(struct iwl_priv *priv,
576 wiphy_rfkill_set_hw_state(priv->hw->wiphy, 576 wiphy_rfkill_set_hw_state(priv->hw->wiphy,
577 test_bit(STATUS_RF_KILL_HW, &priv->status)); 577 test_bit(STATUS_RF_KILL_HW, &priv->status));
578 else 578 else
579 wake_up_interruptible(&priv->wait_command_queue); 579 wake_up(&priv->wait_command_queue);
580} 580}
581 581
582/** 582/**
@@ -926,7 +926,7 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
926 handled |= CSR_INT_BIT_FH_TX; 926 handled |= CSR_INT_BIT_FH_TX;
927 /* Wake up uCode load routine, now that load is complete */ 927 /* Wake up uCode load routine, now that load is complete */
928 priv->ucode_write_complete = 1; 928 priv->ucode_write_complete = 1;
929 wake_up_interruptible(&priv->wait_command_queue); 929 wake_up(&priv->wait_command_queue);
930 } 930 }
931 931
932 if (inta & ~handled) { 932 if (inta & ~handled) {
@@ -1795,7 +1795,7 @@ static void iwl4965_alive_start(struct iwl_priv *priv)
1795 iwl4965_rf_kill_ct_config(priv); 1795 iwl4965_rf_kill_ct_config(priv);
1796 1796
1797 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); 1797 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n");
1798 wake_up_interruptible(&priv->wait_command_queue); 1798 wake_up(&priv->wait_command_queue);
1799 1799
1800 iwl_legacy_power_update_mode(priv, true); 1800 iwl_legacy_power_update_mode(priv, true);
1801 IWL_DEBUG_INFO(priv, "Updated power mode\n"); 1801 IWL_DEBUG_INFO(priv, "Updated power mode\n");
@@ -1828,7 +1828,7 @@ static void __iwl4965_down(struct iwl_priv *priv)
1828 iwl_legacy_clear_driver_stations(priv); 1828 iwl_legacy_clear_driver_stations(priv);
1829 1829
1830 /* Unblock any waiting calls */ 1830 /* Unblock any waiting calls */
1831 wake_up_interruptible_all(&priv->wait_command_queue); 1831 wake_up_all(&priv->wait_command_queue);
1832 1832
1833 /* Wipe out the EXIT_PENDING status bit if we are not actually 1833 /* Wipe out the EXIT_PENDING status bit if we are not actually
1834 * exiting the module */ 1834 * exiting the module */
@@ -2266,7 +2266,7 @@ int iwl4965_mac_start(struct ieee80211_hw *hw)
2266 2266
2267 /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from 2267 /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from
2268 * mac80211 will not be run successfully. */ 2268 * mac80211 will not be run successfully. */
2269 ret = wait_event_interruptible_timeout(priv->wait_command_queue, 2269 ret = wait_event_timeout(priv->wait_command_queue,
2270 test_bit(STATUS_READY, &priv->status), 2270 test_bit(STATUS_READY, &priv->status),
2271 UCODE_READY_TIMEOUT); 2271 UCODE_READY_TIMEOUT);
2272 if (!ret) { 2272 if (!ret) {
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index dd6937e97055..77e528f5db88 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -405,31 +405,33 @@ int iwl_mac_hw_scan(struct ieee80211_hw *hw,
405 405
406 mutex_lock(&priv->mutex); 406 mutex_lock(&priv->mutex);
407 407
408 if (test_bit(STATUS_SCANNING, &priv->status) &&
409 priv->scan_type != IWL_SCAN_NORMAL) {
410 IWL_DEBUG_SCAN(priv, "Scan already in progress.\n");
411 ret = -EAGAIN;
412 goto out_unlock;
413 }
414
415 /* mac80211 will only ask for one band at a time */
416 priv->scan_request = req;
417 priv->scan_vif = vif;
418
419 /* 408 /*
420 * If an internal scan is in progress, just set 409 * If an internal scan is in progress, just set
421 * up the scan_request as per above. 410 * up the scan_request as per above.
422 */ 411 */
423 if (priv->scan_type != IWL_SCAN_NORMAL) { 412 if (priv->scan_type != IWL_SCAN_NORMAL) {
424 IWL_DEBUG_SCAN(priv, "SCAN request during internal scan\n"); 413 IWL_DEBUG_SCAN(priv,
414 "SCAN request during internal scan - defer\n");
415 priv->scan_request = req;
416 priv->scan_vif = vif;
425 ret = 0; 417 ret = 0;
426 } else 418 } else {
419 priv->scan_request = req;
420 priv->scan_vif = vif;
421 /*
422 * mac80211 will only ask for one band at a time
423 * so using channels[0] here is ok
424 */
427 ret = iwl_scan_initiate(priv, vif, IWL_SCAN_NORMAL, 425 ret = iwl_scan_initiate(priv, vif, IWL_SCAN_NORMAL,
428 req->channels[0]->band); 426 req->channels[0]->band);
427 if (ret) {
428 priv->scan_request = NULL;
429 priv->scan_vif = NULL;
430 }
431 }
429 432
430 IWL_DEBUG_MAC80211(priv, "leave\n"); 433 IWL_DEBUG_MAC80211(priv, "leave\n");
431 434
432out_unlock:
433 mutex_unlock(&priv->mutex); 435 mutex_unlock(&priv->mutex);
434 436
435 return ret; 437 return ret;
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 8b1cef0ffde6..4bf3cf457ef0 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -863,6 +863,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
863 u8 tid = 0; 863 u8 tid = 0;
864 u16 seq_number = 0; 864 u16 seq_number = 0;
865 865
866 memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc));
866 if (ieee80211_is_auth(fc)) { 867 if (ieee80211_is_auth(fc)) {
867 RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n")); 868 RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n"));
868 rtl_ips_nic_on(hw); 869 rtl_ips_nic_on(hw);