Skip to content

Commit 2ef7b45

Browse files
committed
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
2 parents 07117e3 + b582ad8 commit 2ef7b45

File tree

18 files changed

+93
-46
lines changed

18 files changed

+93
-46
lines changed

Documentation/networking/scaling.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ configured. The number of entries in the global flow table is set through:
243243

244244
The number of entries in the per-queue flow table are set through:
245245

246-
/sys/class/net/<dev>/queues/tx-<n>/rps_flow_cnt
246+
/sys/class/net/<dev>/queues/rx-<n>/rps_flow_cnt
247247

248248
== Suggested Configuration
249249

drivers/net/bnx2x/bnx2x_dcb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,7 @@ static u8 bnx2x_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap)
21202120
break;
21212121
case DCB_CAP_ATTR_DCBX:
21222122
*cap = BNX2X_DCBX_CAPS;
2123+
break;
21232124
default:
21242125
rval = -EINVAL;
21252126
break;

drivers/net/bnx2x/bnx2x_main.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4943,7 +4943,7 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
49434943
int igu_seg_id;
49444944
int port = BP_PORT(bp);
49454945
int func = BP_FUNC(bp);
4946-
int reg_offset;
4946+
int reg_offset, reg_offset_en5;
49474947
u64 section;
49484948
int index;
49494949
struct hc_sp_status_block_data sp_sb_data;
@@ -4966,6 +4966,8 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
49664966

49674967
reg_offset = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 :
49684968
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);
49694971
for (index = 0; index < MAX_DYNAMIC_ATTN_GRPS; index++) {
49704972
int sindex;
49714973
/* take care of sig[0]..sig[4] */
@@ -4980,7 +4982,7 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
49804982
* and not 16 between the different groups
49814983
*/
49824984
bp->attn_group[index].sig[4] = REG_RD(bp,
4983-
reg_offset + 0x10 + 0x4*index);
4985+
reg_offset_en5 + 0x4*index);
49844986
else
49854987
bp->attn_group[index].sig[4] = 0;
49864988
}
@@ -7625,8 +7627,11 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
76257627
u32 emac_base = port ? GRCBASE_EMAC1 : GRCBASE_EMAC0;
76267628
u8 *mac_addr = bp->dev->dev_addr;
76277629
u32 val;
7630+
u16 pmc;
7631+
76287632
/* 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+
*/
76307635
u8 entry = (BP_VN(bp) + 1)*8;
76317636

76327637
val = (mac_addr[0] << 8) | mac_addr[1];
@@ -7636,6 +7641,11 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
76367641
(mac_addr[4] << 8) | mac_addr[5];
76377642
EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + entry + 4, val);
76387643

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+
76397649
reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_EN;
76407650

76417651
} else

drivers/net/bnx2x/bnx2x_reg.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,18 @@
13841384
Latched ump_tx_parity; [31] MCP Latched scpad_parity; */
13851385
#define MISC_REG_AEU_ENABLE4_PXP_0 0xa108
13861386
#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
13871399
/* [RW 1] set/clr general attention 0; this will set/clr bit 94 in the aeu
13881400
128 bit vector */
13891401
#define MISC_REG_AEU_GENERAL_ATTN_0 0xa000

drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ static const u32 ar9300_2p2_mac_core[][2] = {
15141514
{0x00008258, 0x00000000},
15151515
{0x0000825c, 0x40000000},
15161516
{0x00008260, 0x00080922},
1517-
{0x00008264, 0x9bc00010},
1517+
{0x00008264, 0x9d400010},
15181518
{0x00008268, 0xffffffff},
15191519
{0x0000826c, 0x0000ffff},
15201520
{0x00008270, 0x00000000},

drivers/net/wireless/ath/ath9k/recv.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,22 @@ static void ath_rx_remove_buffer(struct ath_softc *sc,
205205

206206
static void ath_rx_edma_cleanup(struct ath_softc *sc)
207207
{
208+
struct ath_hw *ah = sc->sc_ah;
209+
struct ath_common *common = ath9k_hw_common(ah);
208210
struct ath_buf *bf;
209211

210212
ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_LP);
211213
ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_HP);
212214

213215
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);
215220
dev_kfree_skb_any(bf->bf_mpdu);
221+
bf->bf_buf_addr = 0;
222+
bf->bf_mpdu = NULL;
223+
}
216224
}
217225

218226
INIT_LIST_HEAD(&sc->rx.rxbuf);

drivers/net/wireless/iwlegacy/iwl-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ void iwl_legacy_irq_handle_error(struct iwl_priv *priv)
937937
&priv->contexts[IWL_RXON_CTX_BSS]);
938938
#endif
939939

940-
wake_up_interruptible(&priv->wait_command_queue);
940+
wake_up(&priv->wait_command_queue);
941941

942942
/* Keep the restart process from trying to send host
943943
* commands by clearing the INIT status bit */
@@ -1746,7 +1746,7 @@ int iwl_legacy_force_reset(struct iwl_priv *priv, bool external)
17461746

17471747
/* Set the FW error flag -- cleared on iwl_down */
17481748
set_bit(STATUS_FW_ERROR, &priv->status);
1749-
wake_up_interruptible(&priv->wait_command_queue);
1749+
wake_up(&priv->wait_command_queue);
17501750
/*
17511751
* Keep the restart process from trying to send host
17521752
* commands by clearing the INIT status bit

drivers/net/wireless/iwlegacy/iwl-hcmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ int iwl_legacy_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
167167
goto out;
168168
}
169169

170-
ret = wait_event_interruptible_timeout(priv->wait_command_queue,
170+
ret = wait_event_timeout(priv->wait_command_queue,
171171
!test_bit(STATUS_HCMD_ACTIVE, &priv->status),
172172
HOST_COMPLETE_TIMEOUT);
173173
if (!ret) {

drivers/net/wireless/iwlegacy/iwl-tx.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,8 @@ iwl_legacy_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
625625
cmd = txq->cmd[cmd_index];
626626
meta = &txq->meta[cmd_index];
627627

628+
txq->time_stamp = jiffies;
629+
628630
pci_unmap_single(priv->pci_dev,
629631
dma_unmap_addr(meta, mapping),
630632
dma_unmap_len(meta, len),
@@ -645,7 +647,7 @@ iwl_legacy_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
645647
clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
646648
IWL_DEBUG_INFO(priv, "Clearing HCMD_ACTIVE for command %s\n",
647649
iwl_legacy_get_cmd_string(cmd->hdr.cmd));
648-
wake_up_interruptible(&priv->wait_command_queue);
650+
wake_up(&priv->wait_command_queue);
649651
}
650652

651653
/* Mark as unmapped */

drivers/net/wireless/iwlegacy/iwl3945-base.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ static void iwl3945_rx_card_state_notif(struct iwl_priv *priv,
841841
wiphy_rfkill_set_hw_state(priv->hw->wiphy,
842842
test_bit(STATUS_RF_KILL_HW, &priv->status));
843843
else
844-
wake_up_interruptible(&priv->wait_command_queue);
844+
wake_up(&priv->wait_command_queue);
845845
}
846846

847847
/**
@@ -2269,7 +2269,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
22692269
iwl3945_reg_txpower_periodic(priv);
22702270

22712271
IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n");
2272-
wake_up_interruptible(&priv->wait_command_queue);
2272+
wake_up(&priv->wait_command_queue);
22732273

22742274
return;
22752275

@@ -2300,7 +2300,7 @@ static void __iwl3945_down(struct iwl_priv *priv)
23002300
iwl_legacy_clear_driver_stations(priv);
23012301

23022302
/* Unblock any waiting calls */
2303-
wake_up_interruptible_all(&priv->wait_command_queue);
2303+
wake_up_all(&priv->wait_command_queue);
23042304

23052305
/* Wipe out the EXIT_PENDING status bit if we are not actually
23062306
* exiting the module */
@@ -2853,7 +2853,7 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)
28532853

28542854
/* Wait for START_ALIVE from ucode. Otherwise callbacks from
28552855
* 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,
28572857
test_bit(STATUS_READY, &priv->status),
28582858
UCODE_READY_TIMEOUT);
28592859
if (!ret) {

0 commit comments

Comments
 (0)