diff options
author | David S. Miller <davem@davemloft.net> | 2009-04-23 07:08:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-23 07:08:24 -0400 |
commit | 5802b140ed52957ad150eaf40239a95f5f45fbd3 (patch) | |
tree | e5c37962611bc5f39c56a1ec479b9059072f056a | |
parent | 09488e2e0fab14ebe41135f0d066cfe2c56ba9e5 (diff) | |
parent | 29fe1b481283a1bada994a69f65736db4ae6f35f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/iucv/af_iucv.c
28 files changed, 298 insertions, 189 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 00fe1301a9c4..d90177509bf6 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -1383,6 +1383,11 @@ static void rtl8139_hw_start (struct net_device *dev) | |||
1383 | RTL_W32_F (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0))); | 1383 | RTL_W32_F (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0))); |
1384 | RTL_W32_F (MAC0 + 4, le16_to_cpu (*(__le16 *) (dev->dev_addr + 4))); | 1384 | RTL_W32_F (MAC0 + 4, le16_to_cpu (*(__le16 *) (dev->dev_addr + 4))); |
1385 | 1385 | ||
1386 | tp->cur_rx = 0; | ||
1387 | |||
1388 | /* init Rx ring buffer DMA address */ | ||
1389 | RTL_W32_F (RxBuf, tp->rx_ring_dma); | ||
1390 | |||
1386 | /* Must enable Tx/Rx before setting transfer thresholds! */ | 1391 | /* Must enable Tx/Rx before setting transfer thresholds! */ |
1387 | RTL_W8 (ChipCmd, CmdRxEnb | CmdTxEnb); | 1392 | RTL_W8 (ChipCmd, CmdRxEnb | CmdTxEnb); |
1388 | 1393 | ||
@@ -1390,8 +1395,6 @@ static void rtl8139_hw_start (struct net_device *dev) | |||
1390 | RTL_W32 (RxConfig, tp->rx_config); | 1395 | RTL_W32 (RxConfig, tp->rx_config); |
1391 | RTL_W32 (TxConfig, rtl8139_tx_config); | 1396 | RTL_W32 (TxConfig, rtl8139_tx_config); |
1392 | 1397 | ||
1393 | tp->cur_rx = 0; | ||
1394 | |||
1395 | rtl_check_media (dev, 1); | 1398 | rtl_check_media (dev, 1); |
1396 | 1399 | ||
1397 | if (tp->chipset >= CH_8139B) { | 1400 | if (tp->chipset >= CH_8139B) { |
@@ -1406,9 +1409,6 @@ static void rtl8139_hw_start (struct net_device *dev) | |||
1406 | /* Lock Config[01234] and BMCR register writes */ | 1409 | /* Lock Config[01234] and BMCR register writes */ |
1407 | RTL_W8 (Cfg9346, Cfg9346_Lock); | 1410 | RTL_W8 (Cfg9346, Cfg9346_Lock); |
1408 | 1411 | ||
1409 | /* init Rx ring buffer DMA address */ | ||
1410 | RTL_W32_F (RxBuf, tp->rx_ring_dma); | ||
1411 | |||
1412 | /* init Tx buffer DMA addresses */ | 1412 | /* init Tx buffer DMA addresses */ |
1413 | for (i = 0; i < NUM_TX_DESC; i++) | 1413 | for (i = 0; i < NUM_TX_DESC; i++) |
1414 | RTL_W32_F (TxAddr0 + (i * 4), tp->tx_bufs_dma + (tp->tx_buf[i] - tp->tx_bufs)); | 1414 | RTL_W32_F (TxAddr0 + (i * 4), tp->tx_bufs_dma + (tp->tx_buf[i] - tp->tx_bufs)); |
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index eda72dd2120f..510633fd57f6 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c | |||
@@ -181,7 +181,7 @@ static void *mlx4_en_add(struct mlx4_dev *dev) | |||
181 | mdev->workqueue = create_singlethread_workqueue("mlx4_en"); | 181 | mdev->workqueue = create_singlethread_workqueue("mlx4_en"); |
182 | if (!mdev->workqueue) { | 182 | if (!mdev->workqueue) { |
183 | err = -ENOMEM; | 183 | err = -ENOMEM; |
184 | goto err_close_nic; | 184 | goto err_mr; |
185 | } | 185 | } |
186 | 186 | ||
187 | /* At this stage all non-port specific tasks are complete: | 187 | /* At this stage all non-port specific tasks are complete: |
@@ -214,9 +214,8 @@ err_free_netdev: | |||
214 | flush_workqueue(mdev->workqueue); | 214 | flush_workqueue(mdev->workqueue); |
215 | 215 | ||
216 | /* Stop event queue before we drop down to release shared SW state */ | 216 | /* Stop event queue before we drop down to release shared SW state */ |
217 | |||
218 | err_close_nic: | ||
219 | destroy_workqueue(mdev->workqueue); | 217 | destroy_workqueue(mdev->workqueue); |
218 | |||
220 | err_mr: | 219 | err_mr: |
221 | mlx4_mr_free(dev, &mdev->mr); | 220 | mlx4_mr_free(dev, &mdev->mr); |
222 | err_uar: | 221 | err_uar: |
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 303c23de6cac..438678ab2a10 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -348,11 +348,9 @@ static void mlx4_en_tx_timeout(struct net_device *dev) | |||
348 | if (netif_msg_timer(priv)) | 348 | if (netif_msg_timer(priv)) |
349 | mlx4_warn(mdev, "Tx timeout called on port:%d\n", priv->port); | 349 | mlx4_warn(mdev, "Tx timeout called on port:%d\n", priv->port); |
350 | 350 | ||
351 | if (netif_carrier_ok(dev)) { | 351 | priv->port_stats.tx_timeout++; |
352 | priv->port_stats.tx_timeout++; | 352 | mlx4_dbg(DRV, priv, "Scheduling watchdog\n"); |
353 | mlx4_dbg(DRV, priv, "Scheduling watchdog\n"); | 353 | queue_work(mdev->workqueue, &priv->watchdog_task); |
354 | queue_work(mdev->workqueue, &priv->watchdog_task); | ||
355 | } | ||
356 | } | 354 | } |
357 | 355 | ||
358 | 356 | ||
@@ -761,9 +759,14 @@ static void mlx4_en_restart(struct work_struct *work) | |||
761 | struct net_device *dev = priv->dev; | 759 | struct net_device *dev = priv->dev; |
762 | 760 | ||
763 | mlx4_dbg(DRV, priv, "Watchdog task called for port %d\n", priv->port); | 761 | mlx4_dbg(DRV, priv, "Watchdog task called for port %d\n", priv->port); |
764 | mlx4_en_stop_port(dev); | 762 | |
765 | if (mlx4_en_start_port(dev)) | 763 | mutex_lock(&mdev->state_lock); |
766 | mlx4_err(mdev, "Failed restarting port %d\n", priv->port); | 764 | if (priv->port_up) { |
765 | mlx4_en_stop_port(dev); | ||
766 | if (mlx4_en_start_port(dev)) | ||
767 | mlx4_err(mdev, "Failed restarting port %d\n", priv->port); | ||
768 | } | ||
769 | mutex_unlock(&mdev->state_lock); | ||
767 | } | 770 | } |
768 | 771 | ||
769 | 772 | ||
@@ -1054,7 +1057,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, | |||
1054 | * Set driver features | 1057 | * Set driver features |
1055 | */ | 1058 | */ |
1056 | dev->features |= NETIF_F_SG; | 1059 | dev->features |= NETIF_F_SG; |
1057 | dev->features |= NETIF_F_HW_CSUM; | 1060 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; |
1058 | dev->features |= NETIF_F_HIGHDMA; | 1061 | dev->features |= NETIF_F_HIGHDMA; |
1059 | dev->features |= NETIF_F_HW_VLAN_TX | | 1062 | dev->features |= NETIF_F_HW_VLAN_TX | |
1060 | NETIF_F_HW_VLAN_RX | | 1063 | NETIF_F_HW_VLAN_RX | |
diff --git a/drivers/net/mlx4/en_port.c b/drivers/net/mlx4/en_port.c index c5a4c0389752..a29abe845d2e 100644 --- a/drivers/net/mlx4/en_port.c +++ b/drivers/net/mlx4/en_port.c | |||
@@ -151,6 +151,7 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset) | |||
151 | struct mlx4_cmd_mailbox *mailbox; | 151 | struct mlx4_cmd_mailbox *mailbox; |
152 | u64 in_mod = reset << 8 | port; | 152 | u64 in_mod = reset << 8 | port; |
153 | int err; | 153 | int err; |
154 | int i; | ||
154 | 155 | ||
155 | mailbox = mlx4_alloc_cmd_mailbox(mdev->dev); | 156 | mailbox = mlx4_alloc_cmd_mailbox(mdev->dev); |
156 | if (IS_ERR(mailbox)) | 157 | if (IS_ERR(mailbox)) |
@@ -165,38 +166,18 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset) | |||
165 | 166 | ||
166 | spin_lock_bh(&priv->stats_lock); | 167 | spin_lock_bh(&priv->stats_lock); |
167 | 168 | ||
168 | stats->rx_packets = be32_to_cpu(mlx4_en_stats->RTOTFRMS) - | 169 | stats->rx_packets = 0; |
169 | be32_to_cpu(mlx4_en_stats->RDROP); | 170 | stats->rx_bytes = 0; |
170 | stats->tx_packets = be64_to_cpu(mlx4_en_stats->TTOT_prio_0) + | 171 | for (i = 0; i < priv->rx_ring_num; i++) { |
171 | be64_to_cpu(mlx4_en_stats->TTOT_prio_1) + | 172 | stats->rx_packets += priv->rx_ring[i].packets; |
172 | be64_to_cpu(mlx4_en_stats->TTOT_prio_2) + | 173 | stats->rx_bytes += priv->rx_ring[i].bytes; |
173 | be64_to_cpu(mlx4_en_stats->TTOT_prio_3) + | 174 | } |
174 | be64_to_cpu(mlx4_en_stats->TTOT_prio_4) + | 175 | stats->tx_packets = 0; |
175 | be64_to_cpu(mlx4_en_stats->TTOT_prio_5) + | 176 | stats->tx_bytes = 0; |
176 | be64_to_cpu(mlx4_en_stats->TTOT_prio_6) + | 177 | for (i = 0; i <= priv->tx_ring_num; i++) { |
177 | be64_to_cpu(mlx4_en_stats->TTOT_prio_7) + | 178 | stats->tx_packets += priv->tx_ring[i].packets; |
178 | be64_to_cpu(mlx4_en_stats->TTOT_novlan) + | 179 | stats->tx_bytes += priv->tx_ring[i].bytes; |
179 | be64_to_cpu(mlx4_en_stats->TTOT_loopbk); | 180 | } |
180 | stats->rx_bytes = be64_to_cpu(mlx4_en_stats->ROCT_prio_0) + | ||
181 | be64_to_cpu(mlx4_en_stats->ROCT_prio_1) + | ||
182 | be64_to_cpu(mlx4_en_stats->ROCT_prio_2) + | ||
183 | be64_to_cpu(mlx4_en_stats->ROCT_prio_3) + | ||
184 | be64_to_cpu(mlx4_en_stats->ROCT_prio_4) + | ||
185 | be64_to_cpu(mlx4_en_stats->ROCT_prio_5) + | ||
186 | be64_to_cpu(mlx4_en_stats->ROCT_prio_6) + | ||
187 | be64_to_cpu(mlx4_en_stats->ROCT_prio_7) + | ||
188 | be64_to_cpu(mlx4_en_stats->ROCT_novlan); | ||
189 | |||
190 | stats->tx_bytes = be64_to_cpu(mlx4_en_stats->TTTLOCT_prio_0) + | ||
191 | be64_to_cpu(mlx4_en_stats->TTTLOCT_prio_1) + | ||
192 | be64_to_cpu(mlx4_en_stats->TTTLOCT_prio_2) + | ||
193 | be64_to_cpu(mlx4_en_stats->TTTLOCT_prio_3) + | ||
194 | be64_to_cpu(mlx4_en_stats->TTTLOCT_prio_4) + | ||
195 | be64_to_cpu(mlx4_en_stats->TTTLOCT_prio_5) + | ||
196 | be64_to_cpu(mlx4_en_stats->TTTLOCT_prio_6) + | ||
197 | be64_to_cpu(mlx4_en_stats->TTTLOCT_prio_7) + | ||
198 | be64_to_cpu(mlx4_en_stats->TTTLOCT_novlan) + | ||
199 | be64_to_cpu(mlx4_en_stats->TTTLOCT_loopbk); | ||
200 | 181 | ||
201 | stats->rx_errors = be64_to_cpu(mlx4_en_stats->PCS) + | 182 | stats->rx_errors = be64_to_cpu(mlx4_en_stats->PCS) + |
202 | be32_to_cpu(mlx4_en_stats->RdropLength) + | 183 | be32_to_cpu(mlx4_en_stats->RdropLength) + |
diff --git a/drivers/net/mlx4/en_resources.c b/drivers/net/mlx4/en_resources.c index a0545209e507..65ca706c04bb 100644 --- a/drivers/net/mlx4/en_resources.c +++ b/drivers/net/mlx4/en_resources.c | |||
@@ -94,3 +94,9 @@ void mlx4_en_unmap_buffer(struct mlx4_buf *buf) | |||
94 | 94 | ||
95 | vunmap(buf->direct.buf); | 95 | vunmap(buf->direct.buf); |
96 | } | 96 | } |
97 | |||
98 | void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event) | ||
99 | { | ||
100 | return; | ||
101 | } | ||
102 | |||
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index 7e40741fb7d8..0cbb78ca7b29 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c | |||
@@ -436,8 +436,9 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) | |||
436 | /* Initialize page allocators */ | 436 | /* Initialize page allocators */ |
437 | err = mlx4_en_init_allocator(priv, ring); | 437 | err = mlx4_en_init_allocator(priv, ring); |
438 | if (err) { | 438 | if (err) { |
439 | mlx4_err(mdev, "Failed initializing ring allocator\n"); | 439 | mlx4_err(mdev, "Failed initializing ring allocator\n"); |
440 | goto err_allocator; | 440 | ring_ind--; |
441 | goto err_allocator; | ||
441 | } | 442 | } |
442 | 443 | ||
443 | /* Fill Rx buffers */ | 444 | /* Fill Rx buffers */ |
@@ -467,6 +468,7 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) | |||
467 | ring->wqres.db.dma, &ring->srq); | 468 | ring->wqres.db.dma, &ring->srq); |
468 | if (err){ | 469 | if (err){ |
469 | mlx4_err(mdev, "Failed to allocate srq\n"); | 470 | mlx4_err(mdev, "Failed to allocate srq\n"); |
471 | ring_ind--; | ||
470 | goto err_srq; | 472 | goto err_srq; |
471 | } | 473 | } |
472 | ring->srq.event = mlx4_en_srq_event; | 474 | ring->srq.event = mlx4_en_srq_event; |
@@ -926,12 +928,6 @@ void mlx4_en_set_default_rss_map(struct mlx4_en_priv *priv, | |||
926 | } | 928 | } |
927 | } | 929 | } |
928 | 930 | ||
929 | static void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event) | ||
930 | { | ||
931 | return; | ||
932 | } | ||
933 | |||
934 | |||
935 | static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, | 931 | static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, |
936 | int qpn, int srqn, int cqn, | 932 | int qpn, int srqn, int cqn, |
937 | enum mlx4_qp_state *state, | 933 | enum mlx4_qp_state *state, |
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c index 4afd5993e31c..ac6fc499b280 100644 --- a/drivers/net/mlx4/en_tx.c +++ b/drivers/net/mlx4/en_tx.c | |||
@@ -112,6 +112,7 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, | |||
112 | mlx4_err(mdev, "Failed allocating qp %d\n", ring->qpn); | 112 | mlx4_err(mdev, "Failed allocating qp %d\n", ring->qpn); |
113 | goto err_reserve; | 113 | goto err_reserve; |
114 | } | 114 | } |
115 | ring->qp.event = mlx4_en_sqp_event; | ||
115 | 116 | ||
116 | return 0; | 117 | return 0; |
117 | 118 | ||
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h index e9af32d41ca4..ef840abbcd39 100644 --- a/drivers/net/mlx4/mlx4_en.h +++ b/drivers/net/mlx4/mlx4_en.h | |||
@@ -538,6 +538,7 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget); | |||
538 | void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride, | 538 | void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride, |
539 | int is_tx, int rss, int qpn, int cqn, int srqn, | 539 | int is_tx, int rss, int qpn, int cqn, int srqn, |
540 | struct mlx4_qp_context *context); | 540 | struct mlx4_qp_context *context); |
541 | void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event); | ||
541 | int mlx4_en_map_buffer(struct mlx4_buf *buf); | 542 | int mlx4_en_map_buffer(struct mlx4_buf *buf); |
542 | void mlx4_en_unmap_buffer(struct mlx4_buf *buf); | 543 | void mlx4_en_unmap_buffer(struct mlx4_buf *buf); |
543 | 544 | ||
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 2fbf9f9ddd37..652a36888361 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -1758,7 +1758,7 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
1758 | PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "DP83903.cis"), | 1758 | PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "DP83903.cis"), |
1759 | PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "DP83903.cis"), | 1759 | PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "DP83903.cis"), |
1760 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "DP83903.cis"), | 1760 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "DP83903.cis"), |
1761 | PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "LA-PCM.cis"), | 1761 | PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "cis/LA-PCM.cis"), |
1762 | PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), | 1762 | PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), |
1763 | PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"), | 1763 | PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"), |
1764 | PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), | 1764 | PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 98f961e92ca9..811f97cb0a29 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -1394,7 +1394,8 @@ static int adjust_enet_interface(struct ucc_geth_private *ugeth) | |||
1394 | (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) || | 1394 | (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) || |
1395 | (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) || | 1395 | (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) || |
1396 | (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) { | 1396 | (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) { |
1397 | upsmr |= UCC_GETH_UPSMR_RPM; | 1397 | if (ugeth->phy_interface != PHY_INTERFACE_MODE_RMII) |
1398 | upsmr |= UCC_GETH_UPSMR_RPM; | ||
1398 | switch (ugeth->max_speed) { | 1399 | switch (ugeth->max_speed) { |
1399 | case SPEED_10: | 1400 | case SPEED_10: |
1400 | upsmr |= UCC_GETH_UPSMR_R10M; | 1401 | upsmr |= UCC_GETH_UPSMR_R10M; |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 857d84148b1d..27eef8fb7107 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -1502,7 +1502,6 @@ static const struct net_device_ops atmel_netdev_ops = { | |||
1502 | .ndo_set_mac_address = atmel_set_mac_address, | 1502 | .ndo_set_mac_address = atmel_set_mac_address, |
1503 | .ndo_start_xmit = start_tx, | 1503 | .ndo_start_xmit = start_tx, |
1504 | .ndo_do_ioctl = atmel_ioctl, | 1504 | .ndo_do_ioctl = atmel_ioctl, |
1505 | .ndo_change_mtu = eth_change_mtu, | ||
1506 | .ndo_validate_addr = eth_validate_addr, | 1505 | .ndo_validate_addr = eth_validate_addr, |
1507 | }; | 1506 | }; |
1508 | 1507 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 2399328e8de7..527525cc0919 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1192,7 +1192,7 @@ int iwl3945_hw_nic_init(struct iwl_priv *priv) | |||
1192 | return -ENOMEM; | 1192 | return -ENOMEM; |
1193 | } | 1193 | } |
1194 | } else | 1194 | } else |
1195 | iwl_rx_queue_reset(priv, rxq); | 1195 | iwl3945_rx_queue_reset(priv, rxq); |
1196 | 1196 | ||
1197 | iwl3945_rx_replenish(priv); | 1197 | iwl3945_rx_replenish(priv); |
1198 | 1198 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index ab7aaf6872c7..55188844657b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -215,6 +215,7 @@ extern int iwl3945_calc_sig_qual(int rssi_dbm, int noise_dbm); | |||
215 | extern int iwl3945_tx_queue_init(struct iwl_priv *priv, | 215 | extern int iwl3945_tx_queue_init(struct iwl_priv *priv, |
216 | struct iwl_tx_queue *txq, int count, u32 id); | 216 | struct iwl_tx_queue *txq, int count, u32 id); |
217 | extern void iwl3945_rx_replenish(void *data); | 217 | extern void iwl3945_rx_replenish(void *data); |
218 | extern void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq); | ||
218 | extern void iwl3945_tx_queue_free(struct iwl_priv *priv, struct iwl_tx_queue *txq); | 219 | extern void iwl3945_tx_queue_free(struct iwl_priv *priv, struct iwl_tx_queue *txq); |
219 | extern int iwl3945_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len, | 220 | extern int iwl3945_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len, |
220 | const void *data); | 221 | const void *data); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 3889158b359c..1ef4192207a5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -976,11 +976,9 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
976 | 976 | ||
977 | rxq->queue[i] = NULL; | 977 | rxq->queue[i] = NULL; |
978 | 978 | ||
979 | dma_sync_single_range_for_cpu( | 979 | pci_unmap_single(priv->pci_dev, rxb->real_dma_addr, |
980 | &priv->pci_dev->dev, rxb->real_dma_addr, | 980 | priv->hw_params.rx_buf_size + 256, |
981 | rxb->aligned_dma_addr - rxb->real_dma_addr, | 981 | PCI_DMA_FROMDEVICE); |
982 | priv->hw_params.rx_buf_size, | ||
983 | PCI_DMA_FROMDEVICE); | ||
984 | pkt = (struct iwl_rx_packet *)rxb->skb->data; | 982 | pkt = (struct iwl_rx_packet *)rxb->skb->data; |
985 | 983 | ||
986 | /* Reclaim a command buffer only if this packet is a response | 984 | /* Reclaim a command buffer only if this packet is a response |
@@ -1031,9 +1029,6 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1031 | rxb->skb = NULL; | 1029 | rxb->skb = NULL; |
1032 | } | 1030 | } |
1033 | 1031 | ||
1034 | pci_unmap_single(priv->pci_dev, rxb->real_dma_addr, | ||
1035 | priv->hw_params.rx_buf_size + 256, | ||
1036 | PCI_DMA_FROMDEVICE); | ||
1037 | spin_lock_irqsave(&rxq->lock, flags); | 1032 | spin_lock_irqsave(&rxq->lock, flags); |
1038 | list_add_tail(&rxb->list, &priv->rxq.rx_used); | 1033 | list_add_tail(&rxb->list, &priv->rxq.rx_used); |
1039 | spin_unlock_irqrestore(&rxq->lock, flags); | 1034 | spin_unlock_irqrestore(&rxq->lock, flags); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h index 2f1242447b3b..6e983149b83b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-csr.h +++ b/drivers/net/wireless/iwlwifi/iwl-csr.h | |||
@@ -223,7 +223,7 @@ | |||
223 | #define CSR_EEPROM_REG_MSK_DATA (0xFFFF0000) | 223 | #define CSR_EEPROM_REG_MSK_DATA (0xFFFF0000) |
224 | 224 | ||
225 | /* EEPROM GP */ | 225 | /* EEPROM GP */ |
226 | #define CSR_EEPROM_GP_VALID_MSK (0x00000006) | 226 | #define CSR_EEPROM_GP_VALID_MSK (0x00000007) |
227 | #define CSR_EEPROM_GP_BAD_SIGNATURE (0x00000000) | 227 | #define CSR_EEPROM_GP_BAD_SIGNATURE (0x00000000) |
228 | #define CSR_EEPROM_GP_IF_OWNER_MSK (0x00000180) | 228 | #define CSR_EEPROM_GP_IF_OWNER_MSK (0x00000180) |
229 | 229 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index ec9a13846edd..cf7f0db58fcf 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -360,12 +360,16 @@ struct iwl_host_cmd { | |||
360 | 360 | ||
361 | /** | 361 | /** |
362 | * struct iwl_rx_queue - Rx queue | 362 | * struct iwl_rx_queue - Rx queue |
363 | * @bd: driver's pointer to buffer of receive buffer descriptors (rbd) | ||
364 | * @dma_addr: bus address of buffer of receive buffer descriptors (rbd) | ||
363 | * @read: Shared index to newest available Rx buffer | 365 | * @read: Shared index to newest available Rx buffer |
364 | * @write: Shared index to oldest written Rx packet | 366 | * @write: Shared index to oldest written Rx packet |
365 | * @free_count: Number of pre-allocated buffers in rx_free | 367 | * @free_count: Number of pre-allocated buffers in rx_free |
366 | * @rx_free: list of free SKBs for use | 368 | * @rx_free: list of free SKBs for use |
367 | * @rx_used: List of Rx buffers with no SKB | 369 | * @rx_used: List of Rx buffers with no SKB |
368 | * @need_update: flag to indicate we need to update read/write index | 370 | * @need_update: flag to indicate we need to update read/write index |
371 | * @rb_stts: driver's pointer to receive buffer status | ||
372 | * @rb_stts_dma: bus address of receive buffer status | ||
369 | * | 373 | * |
370 | * NOTE: rx_free and rx_used are used as a FIFO for iwl_rx_mem_buffers | 374 | * NOTE: rx_free and rx_used are used as a FIFO for iwl_rx_mem_buffers |
371 | */ | 375 | */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 1f117a49c569..71d5b8a1a73e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -799,6 +799,22 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
799 | /* Copy MAC header from skb into command buffer */ | 799 | /* Copy MAC header from skb into command buffer */ |
800 | memcpy(tx_cmd->hdr, hdr, hdr_len); | 800 | memcpy(tx_cmd->hdr, hdr, hdr_len); |
801 | 801 | ||
802 | |||
803 | /* Total # bytes to be transmitted */ | ||
804 | len = (u16)skb->len; | ||
805 | tx_cmd->len = cpu_to_le16(len); | ||
806 | |||
807 | if (info->control.hw_key) | ||
808 | iwl_tx_cmd_build_hwcrypto(priv, info, tx_cmd, skb, sta_id); | ||
809 | |||
810 | /* TODO need this for burst mode later on */ | ||
811 | iwl_tx_cmd_build_basic(priv, tx_cmd, info, hdr, sta_id); | ||
812 | |||
813 | /* set is_hcca to 0; it probably will never be implemented */ | ||
814 | iwl_tx_cmd_build_rate(priv, tx_cmd, info, fc, sta_id, 0); | ||
815 | |||
816 | iwl_update_tx_stats(priv, le16_to_cpu(fc), len); | ||
817 | |||
802 | /* | 818 | /* |
803 | * Use the first empty entry in this queue's command buffer array | 819 | * Use the first empty entry in this queue's command buffer array |
804 | * to contain the Tx command and MAC header concatenated together | 820 | * to contain the Tx command and MAC header concatenated together |
@@ -819,21 +835,30 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
819 | else | 835 | else |
820 | len_org = 0; | 836 | len_org = 0; |
821 | 837 | ||
838 | /* Tell NIC about any 2-byte padding after MAC header */ | ||
839 | if (len_org) | ||
840 | tx_cmd->tx_flags |= TX_CMD_FLG_MH_PAD_MSK; | ||
841 | |||
822 | /* Physical address of this Tx command's header (not MAC header!), | 842 | /* Physical address of this Tx command's header (not MAC header!), |
823 | * within command buffer array. */ | 843 | * within command buffer array. */ |
824 | txcmd_phys = pci_map_single(priv->pci_dev, | 844 | txcmd_phys = pci_map_single(priv->pci_dev, |
825 | out_cmd, sizeof(struct iwl_cmd), | 845 | &out_cmd->hdr, len, |
826 | PCI_DMA_BIDIRECTIONAL); | 846 | PCI_DMA_BIDIRECTIONAL); |
827 | pci_unmap_addr_set(&out_cmd->meta, mapping, txcmd_phys); | 847 | pci_unmap_addr_set(&out_cmd->meta, mapping, txcmd_phys); |
828 | pci_unmap_len_set(&out_cmd->meta, len, sizeof(struct iwl_cmd)); | 848 | pci_unmap_len_set(&out_cmd->meta, len, len); |
829 | /* Add buffer containing Tx command and MAC(!) header to TFD's | 849 | /* Add buffer containing Tx command and MAC(!) header to TFD's |
830 | * first entry */ | 850 | * first entry */ |
831 | txcmd_phys += offsetof(struct iwl_cmd, hdr); | ||
832 | priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, | 851 | priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, |
833 | txcmd_phys, len, 1, 0); | 852 | txcmd_phys, len, 1, 0); |
834 | 853 | ||
835 | if (info->control.hw_key) | 854 | if (!ieee80211_has_morefrags(hdr->frame_control)) { |
836 | iwl_tx_cmd_build_hwcrypto(priv, info, tx_cmd, skb, sta_id); | 855 | txq->need_update = 1; |
856 | if (qc) | ||
857 | priv->stations[sta_id].tid[tid].seq_number = seq_number; | ||
858 | } else { | ||
859 | wait_write_ptr = 1; | ||
860 | txq->need_update = 0; | ||
861 | } | ||
837 | 862 | ||
838 | /* Set up TFD's 2nd entry to point directly to remainder of skb, | 863 | /* Set up TFD's 2nd entry to point directly to remainder of skb, |
839 | * if any (802.11 null frames have no payload). */ | 864 | * if any (802.11 null frames have no payload). */ |
@@ -846,41 +871,29 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
846 | 0, 0); | 871 | 0, 0); |
847 | } | 872 | } |
848 | 873 | ||
849 | /* Tell NIC about any 2-byte padding after MAC header */ | ||
850 | if (len_org) | ||
851 | tx_cmd->tx_flags |= TX_CMD_FLG_MH_PAD_MSK; | ||
852 | |||
853 | /* Total # bytes to be transmitted */ | ||
854 | len = (u16)skb->len; | ||
855 | tx_cmd->len = cpu_to_le16(len); | ||
856 | /* TODO need this for burst mode later on */ | ||
857 | iwl_tx_cmd_build_basic(priv, tx_cmd, info, hdr, sta_id); | ||
858 | |||
859 | /* set is_hcca to 0; it probably will never be implemented */ | ||
860 | iwl_tx_cmd_build_rate(priv, tx_cmd, info, fc, sta_id, 0); | ||
861 | |||
862 | iwl_update_tx_stats(priv, le16_to_cpu(fc), len); | ||
863 | |||
864 | scratch_phys = txcmd_phys + sizeof(struct iwl_cmd_header) + | 874 | scratch_phys = txcmd_phys + sizeof(struct iwl_cmd_header) + |
865 | offsetof(struct iwl_tx_cmd, scratch); | 875 | offsetof(struct iwl_tx_cmd, scratch); |
876 | |||
877 | len = sizeof(struct iwl_tx_cmd) + | ||
878 | sizeof(struct iwl_cmd_header) + hdr_len; | ||
879 | /* take back ownership of DMA buffer to enable update */ | ||
880 | pci_dma_sync_single_for_cpu(priv->pci_dev, txcmd_phys, | ||
881 | len, PCI_DMA_BIDIRECTIONAL); | ||
866 | tx_cmd->dram_lsb_ptr = cpu_to_le32(scratch_phys); | 882 | tx_cmd->dram_lsb_ptr = cpu_to_le32(scratch_phys); |
867 | tx_cmd->dram_msb_ptr = iwl_get_dma_hi_addr(scratch_phys); | 883 | tx_cmd->dram_msb_ptr = iwl_get_dma_hi_addr(scratch_phys); |
868 | 884 | ||
869 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | 885 | IWL_DEBUG_TX(priv, "sequence nr = 0X%x \n", |
870 | txq->need_update = 1; | 886 | le16_to_cpu(out_cmd->hdr.sequence)); |
871 | if (qc) | 887 | IWL_DEBUG_TX(priv, "tx_flags = 0X%x \n", le32_to_cpu(tx_cmd->tx_flags)); |
872 | priv->stations[sta_id].tid[tid].seq_number = seq_number; | ||
873 | } else { | ||
874 | wait_write_ptr = 1; | ||
875 | txq->need_update = 0; | ||
876 | } | ||
877 | |||
878 | iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx_cmd, sizeof(*tx_cmd)); | 888 | iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx_cmd, sizeof(*tx_cmd)); |
879 | |||
880 | iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len); | 889 | iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len); |
881 | 890 | ||
882 | /* Set up entry for this TFD in Tx byte-count array */ | 891 | /* Set up entry for this TFD in Tx byte-count array */ |
883 | priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq, len); | 892 | priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq, |
893 | le16_to_cpu(tx_cmd->len)); | ||
894 | |||
895 | pci_dma_sync_single_for_device(priv->pci_dev, txcmd_phys, | ||
896 | len, PCI_DMA_BIDIRECTIONAL); | ||
884 | 897 | ||
885 | /* Tell device the write index *just past* this latest filled TFD */ | 898 | /* Tell device the write index *just past* this latest filled TFD */ |
886 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); | 899 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); |
@@ -968,18 +981,9 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
968 | INDEX_TO_SEQ(q->write_ptr)); | 981 | INDEX_TO_SEQ(q->write_ptr)); |
969 | if (out_cmd->meta.flags & CMD_SIZE_HUGE) | 982 | if (out_cmd->meta.flags & CMD_SIZE_HUGE) |
970 | out_cmd->hdr.sequence |= SEQ_HUGE_FRAME; | 983 | out_cmd->hdr.sequence |= SEQ_HUGE_FRAME; |
971 | len = (idx == TFD_CMD_SLOTS) ? | 984 | len = sizeof(struct iwl_cmd) - sizeof(struct iwl_cmd_meta); |
972 | IWL_MAX_SCAN_SIZE : sizeof(struct iwl_cmd); | 985 | len += (idx == TFD_CMD_SLOTS) ? IWL_MAX_SCAN_SIZE : 0; |
973 | |||
974 | phys_addr = pci_map_single(priv->pci_dev, out_cmd, | ||
975 | len, PCI_DMA_BIDIRECTIONAL); | ||
976 | pci_unmap_addr_set(&out_cmd->meta, mapping, phys_addr); | ||
977 | pci_unmap_len_set(&out_cmd->meta, len, len); | ||
978 | phys_addr += offsetof(struct iwl_cmd, hdr); | ||
979 | 986 | ||
980 | priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, | ||
981 | phys_addr, fix_size, 1, | ||
982 | U32_PAD(cmd->len)); | ||
983 | 987 | ||
984 | #ifdef CONFIG_IWLWIFI_DEBUG | 988 | #ifdef CONFIG_IWLWIFI_DEBUG |
985 | switch (out_cmd->hdr.cmd) { | 989 | switch (out_cmd->hdr.cmd) { |
@@ -1007,6 +1011,15 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
1007 | /* Set up entry in queue's byte count circular buffer */ | 1011 | /* Set up entry in queue's byte count circular buffer */ |
1008 | priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq, 0); | 1012 | priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq, 0); |
1009 | 1013 | ||
1014 | phys_addr = pci_map_single(priv->pci_dev, &out_cmd->hdr, | ||
1015 | fix_size, PCI_DMA_BIDIRECTIONAL); | ||
1016 | pci_unmap_addr_set(&out_cmd->meta, mapping, phys_addr); | ||
1017 | pci_unmap_len_set(&out_cmd->meta, len, fix_size); | ||
1018 | |||
1019 | priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, | ||
1020 | phys_addr, fix_size, 1, | ||
1021 | U32_PAD(cmd->len)); | ||
1022 | |||
1010 | /* Increment and update queue's write index */ | 1023 | /* Increment and update queue's write index */ |
1011 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); | 1024 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); |
1012 | ret = iwl_txq_update_write_ptr(priv, txq); | 1025 | ret = iwl_txq_update_write_ptr(priv, txq); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index da61ecd62882..617c4235d971 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -972,7 +972,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
972 | dma_addr_t phys_addr; | 972 | dma_addr_t phys_addr; |
973 | dma_addr_t txcmd_phys; | 973 | dma_addr_t txcmd_phys; |
974 | int txq_id = skb_get_queue_mapping(skb); | 974 | int txq_id = skb_get_queue_mapping(skb); |
975 | u16 len, idx, len_org, hdr_len; | 975 | u16 len, idx, len_org, hdr_len; /* TODO: len_org is not used */ |
976 | u8 id; | 976 | u8 id; |
977 | u8 unicast; | 977 | u8 unicast; |
978 | u8 sta_id; | 978 | u8 sta_id; |
@@ -1074,6 +1074,40 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
1074 | /* Copy MAC header from skb into command buffer */ | 1074 | /* Copy MAC header from skb into command buffer */ |
1075 | memcpy(tx->hdr, hdr, hdr_len); | 1075 | memcpy(tx->hdr, hdr, hdr_len); |
1076 | 1076 | ||
1077 | |||
1078 | if (info->control.hw_key) | ||
1079 | iwl3945_build_tx_cmd_hwcrypto(priv, info, out_cmd, skb, sta_id); | ||
1080 | |||
1081 | /* TODO need this for burst mode later on */ | ||
1082 | iwl3945_build_tx_cmd_basic(priv, out_cmd, info, hdr, sta_id); | ||
1083 | |||
1084 | /* set is_hcca to 0; it probably will never be implemented */ | ||
1085 | iwl3945_hw_build_tx_cmd_rate(priv, out_cmd, info, hdr, sta_id, 0); | ||
1086 | |||
1087 | /* Total # bytes to be transmitted */ | ||
1088 | len = (u16)skb->len; | ||
1089 | tx->len = cpu_to_le16(len); | ||
1090 | |||
1091 | |||
1092 | tx->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK; | ||
1093 | tx->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK; | ||
1094 | |||
1095 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | ||
1096 | txq->need_update = 1; | ||
1097 | if (qc) | ||
1098 | priv->stations_39[sta_id].tid[tid].seq_number = seq_number; | ||
1099 | } else { | ||
1100 | wait_write_ptr = 1; | ||
1101 | txq->need_update = 0; | ||
1102 | } | ||
1103 | |||
1104 | IWL_DEBUG_TX(priv, "sequence nr = 0X%x \n", | ||
1105 | le16_to_cpu(out_cmd->hdr.sequence)); | ||
1106 | IWL_DEBUG_TX(priv, "tx_flags = 0X%x \n", le32_to_cpu(tx->tx_flags)); | ||
1107 | iwl_print_hex_dump(priv, IWL_DL_TX, tx, sizeof(*tx)); | ||
1108 | iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx->hdr, | ||
1109 | ieee80211_hdrlen(fc)); | ||
1110 | |||
1077 | /* | 1111 | /* |
1078 | * Use the first empty entry in this queue's command buffer array | 1112 | * Use the first empty entry in this queue's command buffer array |
1079 | * to contain the Tx command and MAC header concatenated together | 1113 | * to contain the Tx command and MAC header concatenated together |
@@ -1096,22 +1130,18 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
1096 | 1130 | ||
1097 | /* Physical address of this Tx command's header (not MAC header!), | 1131 | /* Physical address of this Tx command's header (not MAC header!), |
1098 | * within command buffer array. */ | 1132 | * within command buffer array. */ |
1099 | txcmd_phys = pci_map_single(priv->pci_dev, | 1133 | txcmd_phys = pci_map_single(priv->pci_dev, &out_cmd->hdr, |
1100 | out_cmd, sizeof(struct iwl_cmd), | 1134 | len, PCI_DMA_TODEVICE); |
1101 | PCI_DMA_TODEVICE); | 1135 | /* we do not map meta data ... so we can safely access address to |
1136 | * provide to unmap command*/ | ||
1102 | pci_unmap_addr_set(&out_cmd->meta, mapping, txcmd_phys); | 1137 | pci_unmap_addr_set(&out_cmd->meta, mapping, txcmd_phys); |
1103 | pci_unmap_len_set(&out_cmd->meta, len, sizeof(struct iwl_cmd)); | 1138 | pci_unmap_len_set(&out_cmd->meta, len, len); |
1104 | /* Add buffer containing Tx command and MAC(!) header to TFD's | ||
1105 | * first entry */ | ||
1106 | txcmd_phys += offsetof(struct iwl_cmd, hdr); | ||
1107 | 1139 | ||
1108 | /* Add buffer containing Tx command and MAC(!) header to TFD's | 1140 | /* Add buffer containing Tx command and MAC(!) header to TFD's |
1109 | * first entry */ | 1141 | * first entry */ |
1110 | priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, | 1142 | priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, |
1111 | txcmd_phys, len, 1, 0); | 1143 | txcmd_phys, len, 1, 0); |
1112 | 1144 | ||
1113 | if (info->control.hw_key) | ||
1114 | iwl3945_build_tx_cmd_hwcrypto(priv, info, out_cmd, skb, sta_id); | ||
1115 | 1145 | ||
1116 | /* Set up TFD's 2nd entry to point directly to remainder of skb, | 1146 | /* Set up TFD's 2nd entry to point directly to remainder of skb, |
1117 | * if any (802.11 null frames have no payload). */ | 1147 | * if any (802.11 null frames have no payload). */ |
@@ -1124,32 +1154,6 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
1124 | 0, U32_PAD(len)); | 1154 | 0, U32_PAD(len)); |
1125 | } | 1155 | } |
1126 | 1156 | ||
1127 | /* Total # bytes to be transmitted */ | ||
1128 | len = (u16)skb->len; | ||
1129 | tx->len = cpu_to_le16(len); | ||
1130 | |||
1131 | /* TODO need this for burst mode later on */ | ||
1132 | iwl3945_build_tx_cmd_basic(priv, out_cmd, info, hdr, sta_id); | ||
1133 | |||
1134 | /* set is_hcca to 0; it probably will never be implemented */ | ||
1135 | iwl3945_hw_build_tx_cmd_rate(priv, out_cmd, info, hdr, sta_id, 0); | ||
1136 | |||
1137 | tx->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK; | ||
1138 | tx->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK; | ||
1139 | |||
1140 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | ||
1141 | txq->need_update = 1; | ||
1142 | if (qc) | ||
1143 | priv->stations_39[sta_id].tid[tid].seq_number = seq_number; | ||
1144 | } else { | ||
1145 | wait_write_ptr = 1; | ||
1146 | txq->need_update = 0; | ||
1147 | } | ||
1148 | |||
1149 | iwl_print_hex_dump(priv, IWL_DL_TX, tx, sizeof(*tx)); | ||
1150 | |||
1151 | iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx->hdr, | ||
1152 | ieee80211_hdrlen(fc)); | ||
1153 | 1157 | ||
1154 | /* Tell device the write index *just past* this latest filled TFD */ | 1158 | /* Tell device the write index *just past* this latest filled TFD */ |
1155 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); | 1159 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); |
@@ -1661,6 +1665,37 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv) | |||
1661 | spin_unlock_irqrestore(&rxq->lock, flags); | 1665 | spin_unlock_irqrestore(&rxq->lock, flags); |
1662 | } | 1666 | } |
1663 | 1667 | ||
1668 | void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | ||
1669 | { | ||
1670 | unsigned long flags; | ||
1671 | int i; | ||
1672 | spin_lock_irqsave(&rxq->lock, flags); | ||
1673 | INIT_LIST_HEAD(&rxq->rx_free); | ||
1674 | INIT_LIST_HEAD(&rxq->rx_used); | ||
1675 | /* Fill the rx_used queue with _all_ of the Rx buffers */ | ||
1676 | for (i = 0; i < RX_FREE_BUFFERS + RX_QUEUE_SIZE; i++) { | ||
1677 | /* In the reset function, these buffers may have been allocated | ||
1678 | * to an SKB, so we need to unmap and free potential storage */ | ||
1679 | if (rxq->pool[i].skb != NULL) { | ||
1680 | pci_unmap_single(priv->pci_dev, | ||
1681 | rxq->pool[i].real_dma_addr, | ||
1682 | priv->hw_params.rx_buf_size, | ||
1683 | PCI_DMA_FROMDEVICE); | ||
1684 | priv->alloc_rxb_skb--; | ||
1685 | dev_kfree_skb(rxq->pool[i].skb); | ||
1686 | rxq->pool[i].skb = NULL; | ||
1687 | } | ||
1688 | list_add_tail(&rxq->pool[i].list, &rxq->rx_used); | ||
1689 | } | ||
1690 | |||
1691 | /* Set us so that we have processed and used all buffers, but have | ||
1692 | * not restocked the Rx queue with fresh buffers */ | ||
1693 | rxq->read = rxq->write = 0; | ||
1694 | rxq->free_count = 0; | ||
1695 | spin_unlock_irqrestore(&rxq->lock, flags); | ||
1696 | } | ||
1697 | EXPORT_SYMBOL(iwl3945_rx_queue_reset); | ||
1698 | |||
1664 | /* | 1699 | /* |
1665 | * this should be called while priv->lock is locked | 1700 | * this should be called while priv->lock is locked |
1666 | */ | 1701 | */ |
@@ -1685,6 +1720,34 @@ void iwl3945_rx_replenish(void *data) | |||
1685 | spin_unlock_irqrestore(&priv->lock, flags); | 1720 | spin_unlock_irqrestore(&priv->lock, flags); |
1686 | } | 1721 | } |
1687 | 1722 | ||
1723 | /* Assumes that the skb field of the buffers in 'pool' is kept accurate. | ||
1724 | * If an SKB has been detached, the POOL needs to have its SKB set to NULL | ||
1725 | * This free routine walks the list of POOL entries and if SKB is set to | ||
1726 | * non NULL it is unmapped and freed | ||
1727 | */ | ||
1728 | static void iwl3945_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | ||
1729 | { | ||
1730 | int i; | ||
1731 | for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { | ||
1732 | if (rxq->pool[i].skb != NULL) { | ||
1733 | pci_unmap_single(priv->pci_dev, | ||
1734 | rxq->pool[i].real_dma_addr, | ||
1735 | priv->hw_params.rx_buf_size, | ||
1736 | PCI_DMA_FROMDEVICE); | ||
1737 | dev_kfree_skb(rxq->pool[i].skb); | ||
1738 | } | ||
1739 | } | ||
1740 | |||
1741 | pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd, | ||
1742 | rxq->dma_addr); | ||
1743 | pci_free_consistent(priv->pci_dev, sizeof(struct iwl_rb_status), | ||
1744 | rxq->rb_stts, rxq->rb_stts_dma); | ||
1745 | rxq->bd = NULL; | ||
1746 | rxq->rb_stts = NULL; | ||
1747 | } | ||
1748 | EXPORT_SYMBOL(iwl3945_rx_queue_free); | ||
1749 | |||
1750 | |||
1688 | /* Convert linear signal-to-noise ratio into dB */ | 1751 | /* Convert linear signal-to-noise ratio into dB */ |
1689 | static u8 ratio2dB[100] = { | 1752 | static u8 ratio2dB[100] = { |
1690 | /* 0 1 2 3 4 5 6 7 8 9 */ | 1753 | /* 0 1 2 3 4 5 6 7 8 9 */ |
@@ -1802,9 +1865,9 @@ static void iwl3945_rx_handle(struct iwl_priv *priv) | |||
1802 | 1865 | ||
1803 | rxq->queue[i] = NULL; | 1866 | rxq->queue[i] = NULL; |
1804 | 1867 | ||
1805 | pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->real_dma_addr, | 1868 | pci_unmap_single(priv->pci_dev, rxb->real_dma_addr, |
1806 | priv->hw_params.rx_buf_size, | 1869 | priv->hw_params.rx_buf_size, |
1807 | PCI_DMA_FROMDEVICE); | 1870 | PCI_DMA_FROMDEVICE); |
1808 | pkt = (struct iwl_rx_packet *)rxb->skb->data; | 1871 | pkt = (struct iwl_rx_packet *)rxb->skb->data; |
1809 | 1872 | ||
1810 | /* Reclaim a command buffer only if this packet is a response | 1873 | /* Reclaim a command buffer only if this packet is a response |
@@ -1852,9 +1915,6 @@ static void iwl3945_rx_handle(struct iwl_priv *priv) | |||
1852 | rxb->skb = NULL; | 1915 | rxb->skb = NULL; |
1853 | } | 1916 | } |
1854 | 1917 | ||
1855 | pci_unmap_single(priv->pci_dev, rxb->real_dma_addr, | ||
1856 | priv->hw_params.rx_buf_size, | ||
1857 | PCI_DMA_FROMDEVICE); | ||
1858 | spin_lock_irqsave(&rxq->lock, flags); | 1918 | spin_lock_irqsave(&rxq->lock, flags); |
1859 | list_add_tail(&rxb->list, &priv->rxq.rx_used); | 1919 | list_add_tail(&rxb->list, &priv->rxq.rx_used); |
1860 | spin_unlock_irqrestore(&rxq->lock, flags); | 1920 | spin_unlock_irqrestore(&rxq->lock, flags); |
@@ -5196,12 +5256,12 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) | |||
5196 | sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group); | 5256 | sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group); |
5197 | 5257 | ||
5198 | iwl_rfkill_unregister(priv); | 5258 | iwl_rfkill_unregister(priv); |
5199 | cancel_delayed_work(&priv->rfkill_poll); | 5259 | cancel_delayed_work_sync(&priv->rfkill_poll); |
5200 | 5260 | ||
5201 | iwl3945_dealloc_ucode_pci(priv); | 5261 | iwl3945_dealloc_ucode_pci(priv); |
5202 | 5262 | ||
5203 | if (priv->rxq.bd) | 5263 | if (priv->rxq.bd) |
5204 | iwl_rx_queue_free(priv, &priv->rxq); | 5264 | iwl3945_rx_queue_free(priv, &priv->rxq); |
5205 | iwl3945_hw_txq_ctx_free(priv); | 5265 | iwl3945_hw_txq_ctx_free(priv); |
5206 | 5266 | ||
5207 | iwl3945_unset_hw_params(priv); | 5267 | iwl3945_unset_hw_params(priv); |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index b5dbf6d9e517..a9a970469c2a 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -893,8 +893,7 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index) | |||
893 | rx_desc->next_rx_desc_phys_addr = | 893 | rx_desc->next_rx_desc_phys_addr = |
894 | cpu_to_le32(rxq->rx_desc_dma | 894 | cpu_to_le32(rxq->rx_desc_dma |
895 | + nexti * sizeof(*rx_desc)); | 895 | + nexti * sizeof(*rx_desc)); |
896 | rx_desc->rx_ctrl = | 896 | rx_desc->rx_ctrl = MWL8K_RX_CTRL_OWNED_BY_HOST; |
897 | cpu_to_le32(MWL8K_RX_CTRL_OWNED_BY_HOST); | ||
898 | } | 897 | } |
899 | 898 | ||
900 | return 0; | 899 | return 0; |
diff --git a/firmware/Makefile b/firmware/Makefile index 142c17ab9e57..25200d106ee8 100644 --- a/firmware/Makefile +++ b/firmware/Makefile | |||
@@ -46,6 +46,7 @@ fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin | |||
46 | fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \ | 46 | fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \ |
47 | e100/d102e_ucode.bin | 47 | e100/d102e_ucode.bin |
48 | fw-shipped-$(CONFIG_MYRI_SBUS) += myricom/lanai.bin | 48 | fw-shipped-$(CONFIG_MYRI_SBUS) += myricom/lanai.bin |
49 | fw-shipped-$(CONFIG_PCMCIA_PCNET) += cis/LA-PCM.cis | ||
49 | fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin | 50 | fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin |
50 | fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \ | 51 | fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \ |
51 | advansys/3550.bin advansys/38C0800.bin | 52 | advansys/3550.bin advansys/38C0800.bin |
diff --git a/firmware/WHENCE b/firmware/WHENCE index 10f61c9e5a8a..4c52984a8319 100644 --- a/firmware/WHENCE +++ b/firmware/WHENCE | |||
@@ -576,6 +576,16 @@ Found in hex form in kernel source. | |||
576 | 576 | ||
577 | -------------------------------------------------------------------------- | 577 | -------------------------------------------------------------------------- |
578 | 578 | ||
579 | Driver: PCMCIA_PCNET - NE2000 compatible PCMCIA adapter | ||
580 | |||
581 | File: cis/LA-PCM.cis | ||
582 | |||
583 | Licence: GPL | ||
584 | |||
585 | Originally developed by the pcmcia-cs project | ||
586 | |||
587 | -------------------------------------------------------------------------- | ||
588 | |||
579 | Driver: PCMCIA_SMC91C92 - SMC 91Cxx PCMCIA | 589 | Driver: PCMCIA_SMC91C92 - SMC 91Cxx PCMCIA |
580 | 590 | ||
581 | File: ositech/Xilinx7OD.bin | 591 | File: ositech/Xilinx7OD.bin |
diff --git a/firmware/cis/LA-PCM.cis.ihex b/firmware/cis/LA-PCM.cis.ihex new file mode 100644 index 000000000000..a0ff0c7b393d --- /dev/null +++ b/firmware/cis/LA-PCM.cis.ihex | |||
@@ -0,0 +1,20 @@ | |||
1 | :100000000105D4F953E9FF17035338FF20040FC04B | ||
2 | :1000100002002102060315390401416C6C69656414 | ||
3 | :100020002054656C657369732C4B2E4B00457468C6 | ||
4 | :1000300065726E6574204C414E20436172640043CA | ||
5 | :10004000656E747265434F4D004C412D50434D0019 | ||
6 | :10005000FF1A0602100000020B1B08810108E06075 | ||
7 | :1000600000021F1B08820108E06020021F1B08839A | ||
8 | :100070000108E06040021F1B08840108E060600284 | ||
9 | :100080001F1B08850108E06080021F1B088601080D | ||
10 | :10009000E060A0021F1B08870108E060C0021F1B70 | ||
11 | :1000A00008880108E060E0021F1B08890108E06081 | ||
12 | :1000B00000031F1B088A0108E06020031F1B088B38 | ||
13 | :1000C0000108E06040031F1B088C0108E06060032A | ||
14 | :1000D0001F1B088D0108E06080031F1B088E0108AC | ||
15 | :1000E000E060A0031F1B088F0108E060C0031F1B16 | ||
16 | :0D00F00008900108E060E0031F1400FF000D | ||
17 | :00000001FF | ||
18 | # | ||
19 | # Replacement CIS for Allied Telesis LA-PCM | ||
20 | # | ||
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 264c6b36931c..0fc00087ea8b 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
@@ -215,6 +215,7 @@ static void iucv_sock_close(struct sock *sk) | |||
215 | err = iucv_sock_wait_state(sk, IUCV_CLOSED, 0, timeo); | 215 | err = iucv_sock_wait_state(sk, IUCV_CLOSED, 0, timeo); |
216 | } | 216 | } |
217 | 217 | ||
218 | case IUCV_CLOSING: /* fall through */ | ||
218 | sk->sk_state = IUCV_CLOSED; | 219 | sk->sk_state = IUCV_CLOSED; |
219 | sk->sk_state_change(sk); | 220 | sk->sk_state_change(sk); |
220 | 221 | ||
@@ -269,6 +270,8 @@ static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio) | |||
269 | iucv_sk(sk)->send_tag = 0; | 270 | iucv_sk(sk)->send_tag = 0; |
270 | iucv_sk(sk)->flags = 0; | 271 | iucv_sk(sk)->flags = 0; |
271 | iucv_sk(sk)->msglimit = IUCV_QUEUELEN_DEFAULT; | 272 | iucv_sk(sk)->msglimit = IUCV_QUEUELEN_DEFAULT; |
273 | iucv_sk(sk)->path = NULL; | ||
274 | memset(&iucv_sk(sk)->src_user_id , 0, 32); | ||
272 | 275 | ||
273 | sk->sk_destruct = iucv_sock_destruct; | 276 | sk->sk_destruct = iucv_sock_destruct; |
274 | sk->sk_sndtimeo = IUCV_CONN_TIMEOUT; | 277 | sk->sk_sndtimeo = IUCV_CONN_TIMEOUT; |
@@ -979,6 +982,10 @@ static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
979 | if (flags & (MSG_OOB)) | 982 | if (flags & (MSG_OOB)) |
980 | return -EOPNOTSUPP; | 983 | return -EOPNOTSUPP; |
981 | 984 | ||
985 | target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); | ||
986 | |||
987 | /* receive/dequeue next skb: | ||
988 | * the function understands MSG_PEEK and, thus, does not dequeue skb */ | ||
982 | skb = skb_recv_datagram(sk, flags, noblock, &err); | 989 | skb = skb_recv_datagram(sk, flags, noblock, &err); |
983 | if (!skb) { | 990 | if (!skb) { |
984 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 991 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
@@ -1046,9 +1053,7 @@ static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1046 | iucv_process_message_q(sk); | 1053 | iucv_process_message_q(sk); |
1047 | spin_unlock_bh(&iucv->message_q.lock); | 1054 | spin_unlock_bh(&iucv->message_q.lock); |
1048 | } | 1055 | } |
1049 | 1056 | } | |
1050 | } else | ||
1051 | skb_queue_head(&sk->sk_receive_queue, skb); | ||
1052 | 1057 | ||
1053 | done: | 1058 | done: |
1054 | /* SOCK_SEQPACKET: return real length if MSG_TRUNC is set */ | 1059 | /* SOCK_SEQPACKET: return real length if MSG_TRUNC is set */ |
@@ -1125,6 +1130,9 @@ static int iucv_sock_shutdown(struct socket *sock, int how) | |||
1125 | 1130 | ||
1126 | lock_sock(sk); | 1131 | lock_sock(sk); |
1127 | switch (sk->sk_state) { | 1132 | switch (sk->sk_state) { |
1133 | case IUCV_DISCONN: | ||
1134 | case IUCV_CLOSING: | ||
1135 | case IUCV_SEVERED: | ||
1128 | case IUCV_CLOSED: | 1136 | case IUCV_CLOSED: |
1129 | err = -ENOTCONN; | 1137 | err = -ENOTCONN; |
1130 | goto fail; | 1138 | goto fail; |
@@ -1398,8 +1406,12 @@ static void iucv_callback_rx(struct iucv_path *path, struct iucv_message *msg) | |||
1398 | struct sock_msg_q *save_msg; | 1406 | struct sock_msg_q *save_msg; |
1399 | int len; | 1407 | int len; |
1400 | 1408 | ||
1401 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 1409 | if (sk->sk_shutdown & RCV_SHUTDOWN) { |
1410 | iucv_message_reject(path, msg); | ||
1402 | return; | 1411 | return; |
1412 | } | ||
1413 | |||
1414 | spin_lock(&iucv->message_q.lock); | ||
1403 | 1415 | ||
1404 | if (!list_empty(&iucv->message_q.list) || | 1416 | if (!list_empty(&iucv->message_q.list) || |
1405 | !skb_queue_empty(&iucv->backlog_skb_q)) | 1417 | !skb_queue_empty(&iucv->backlog_skb_q)) |
@@ -1414,9 +1426,8 @@ static void iucv_callback_rx(struct iucv_path *path, struct iucv_message *msg) | |||
1414 | if (!skb) | 1426 | if (!skb) |
1415 | goto save_message; | 1427 | goto save_message; |
1416 | 1428 | ||
1417 | spin_lock(&iucv->message_q.lock); | ||
1418 | iucv_process_message(sk, skb, path, msg); | 1429 | iucv_process_message(sk, skb, path, msg); |
1419 | spin_unlock(&iucv->message_q.lock); | 1430 | goto out_unlock; |
1420 | 1431 | ||
1421 | return; | 1432 | return; |
1422 | 1433 | ||
@@ -1427,8 +1438,9 @@ save_message: | |||
1427 | save_msg->path = path; | 1438 | save_msg->path = path; |
1428 | save_msg->msg = *msg; | 1439 | save_msg->msg = *msg; |
1429 | 1440 | ||
1430 | spin_lock(&iucv->message_q.lock); | ||
1431 | list_add_tail(&save_msg->list, &iucv->message_q.list); | 1441 | list_add_tail(&save_msg->list, &iucv->message_q.list); |
1442 | |||
1443 | out_unlock: | ||
1432 | spin_unlock(&iucv->message_q.lock); | 1444 | spin_unlock(&iucv->message_q.lock); |
1433 | } | 1445 | } |
1434 | 1446 | ||
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 027302326498..81985d27cbda 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -156,8 +156,19 @@ int __ieee80211_resume(struct ieee80211_hw *hw) | |||
156 | case NL80211_IFTYPE_ADHOC: | 156 | case NL80211_IFTYPE_ADHOC: |
157 | case NL80211_IFTYPE_AP: | 157 | case NL80211_IFTYPE_AP: |
158 | case NL80211_IFTYPE_MESH_POINT: | 158 | case NL80211_IFTYPE_MESH_POINT: |
159 | WARN_ON(ieee80211_if_config(sdata, changed)); | 159 | /* |
160 | ieee80211_bss_info_change_notify(sdata, ~0); | 160 | * Driver's config_interface can fail if rfkill is |
161 | * enabled. Accommodate this return code. | ||
162 | * FIXME: When mac80211 has knowledge of rfkill | ||
163 | * state the code below can change back to: | ||
164 | * WARN(ieee80211_if_config(sdata, changed)); | ||
165 | * ieee80211_bss_info_change_notify(sdata, ~0); | ||
166 | */ | ||
167 | if (ieee80211_if_config(sdata, changed)) | ||
168 | printk(KERN_DEBUG "%s: failed to configure interface during resume\n", | ||
169 | sdata->dev->name); | ||
170 | else | ||
171 | ieee80211_bss_info_change_notify(sdata, ~0); | ||
161 | break; | 172 | break; |
162 | case NL80211_IFTYPE_WDS: | 173 | case NL80211_IFTYPE_WDS: |
163 | break; | 174 | break; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5fa7aedd90ed..9776f73c51ad 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1397,7 +1397,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx) | |||
1397 | * mac80211. That also explains the __skb_push() | 1397 | * mac80211. That also explains the __skb_push() |
1398 | * below. | 1398 | * below. |
1399 | */ | 1399 | */ |
1400 | align = (unsigned long)skb->data & 4; | 1400 | align = (unsigned long)skb->data & 3; |
1401 | if (align) { | 1401 | if (align) { |
1402 | if (WARN_ON(skb_headroom(skb) < 3)) { | 1402 | if (WARN_ON(skb_headroom(skb) < 3)) { |
1403 | dev_kfree_skb(skb); | 1403 | dev_kfree_skb(skb); |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 0ea36e0c8a0e..f13fc57e1ecb 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -988,7 +988,7 @@ ctnetlink_change_helper(struct nf_conn *ct, struct nlattr *cda[]) | |||
988 | { | 988 | { |
989 | struct nf_conntrack_helper *helper; | 989 | struct nf_conntrack_helper *helper; |
990 | struct nf_conn_help *help = nfct_help(ct); | 990 | struct nf_conn_help *help = nfct_help(ct); |
991 | char *helpname; | 991 | char *helpname = NULL; |
992 | int err; | 992 | int err; |
993 | 993 | ||
994 | /* don't change helper of sibling connections */ | 994 | /* don't change helper of sibling connections */ |
@@ -1231,7 +1231,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
1231 | 1231 | ||
1232 | rcu_read_lock(); | 1232 | rcu_read_lock(); |
1233 | if (cda[CTA_HELP]) { | 1233 | if (cda[CTA_HELP]) { |
1234 | char *helpname; | 1234 | char *helpname = NULL; |
1235 | 1235 | ||
1236 | err = ctnetlink_parse_help(cda[CTA_HELP], &helpname); | 1236 | err = ctnetlink_parse_help(cda[CTA_HELP], &helpname); |
1237 | if (err < 0) | 1237 | if (err < 0) |
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c index 834c6eb7f484..c0519139679e 100644 --- a/net/netlabel/netlabel_addrlist.c +++ b/net/netlabel/netlabel_addrlist.c | |||
@@ -256,13 +256,11 @@ struct netlbl_af4list *netlbl_af4list_remove(__be32 addr, __be32 mask, | |||
256 | { | 256 | { |
257 | struct netlbl_af4list *entry; | 257 | struct netlbl_af4list *entry; |
258 | 258 | ||
259 | entry = netlbl_af4list_search(addr, head); | 259 | entry = netlbl_af4list_search_exact(addr, mask, head); |
260 | if (entry != NULL && entry->addr == addr && entry->mask == mask) { | 260 | if (entry == NULL) |
261 | netlbl_af4list_remove_entry(entry); | 261 | return NULL; |
262 | return entry; | 262 | netlbl_af4list_remove_entry(entry); |
263 | } | 263 | return entry; |
264 | |||
265 | return NULL; | ||
266 | } | 264 | } |
267 | 265 | ||
268 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 266 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
@@ -299,15 +297,11 @@ struct netlbl_af6list *netlbl_af6list_remove(const struct in6_addr *addr, | |||
299 | { | 297 | { |
300 | struct netlbl_af6list *entry; | 298 | struct netlbl_af6list *entry; |
301 | 299 | ||
302 | entry = netlbl_af6list_search(addr, head); | 300 | entry = netlbl_af6list_search_exact(addr, mask, head); |
303 | if (entry != NULL && | 301 | if (entry == NULL) |
304 | ipv6_addr_equal(&entry->addr, addr) && | 302 | return NULL; |
305 | ipv6_addr_equal(&entry->mask, mask)) { | 303 | netlbl_af6list_remove_entry(entry); |
306 | netlbl_af6list_remove_entry(entry); | 304 | return entry; |
307 | return entry; | ||
308 | } | ||
309 | |||
310 | return NULL; | ||
311 | } | 305 | } |
312 | #endif /* IPv6 */ | 306 | #endif /* IPv6 */ |
313 | 307 | ||
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 4e705f87969f..3be0e016ab7d 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -1084,8 +1084,10 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1084 | 1084 | ||
1085 | /* Build a packet - the conventional user limit is 236 bytes. We can | 1085 | /* Build a packet - the conventional user limit is 236 bytes. We can |
1086 | do ludicrously large NetROM frames but must not overflow */ | 1086 | do ludicrously large NetROM frames but must not overflow */ |
1087 | if (len > 65536) | 1087 | if (len > 65536) { |
1088 | return -EMSGSIZE; | 1088 | err = -EMSGSIZE; |
1089 | goto out; | ||
1090 | } | ||
1089 | 1091 | ||
1090 | SOCK_DEBUG(sk, "NET/ROM: sendto: building packet.\n"); | 1092 | SOCK_DEBUG(sk, "NET/ROM: sendto: building packet.\n"); |
1091 | size = len + NR_NETWORK_LEN + NR_TRANSPORT_LEN; | 1093 | size = len + NR_NETWORK_LEN + NR_TRANSPORT_LEN; |