aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-26 02:22:42 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 02:22:42 -0500
commit04488734806948624dabc4514f96f14cd75b9a50 (patch)
tree74f3a3c10a7177a5f86398b83ad7bf0569fe8b89
parent54831a83bfe656c4c54e287c734c6b0ccaa3719b (diff)
parentc4d49794ff2838038fd9756eae39c39a5a685833 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
-rw-r--r--Documentation/networking/ip-sysctl.txt8
-rw-r--r--MAINTAINERS4
-rw-r--r--drivers/net/e1000/e1000_main.c19
-rw-r--r--drivers/net/sfc/falcon_boards.c45
-rw-r--r--drivers/net/sfc/mcdi.c2
-rw-r--r--drivers/net/tc35815.c1
-rw-r--r--drivers/net/usb/cdc_ether.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c22
-rw-r--r--net/core/net-sysfs.c3
-rw-r--r--net/ipv4/devinet.c7
-rw-r--r--net/ipv6/addrconf.c16
15 files changed, 106 insertions, 40 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 2571a62d923e..8b72c88ba213 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1126,10 +1126,10 @@ regen_max_retry - INTEGER
1126 Default: 5 1126 Default: 5
1127 1127
1128max_addresses - INTEGER 1128max_addresses - INTEGER
1129 Number of maximum addresses per interface. 0 disables limitation. 1129 Maximum number of autoconfigured addresses per interface. Setting
1130 It is recommended not set too large value (or 0) because it would 1130 to zero disables the limitation. It is not recommended to set this
1131 be too easy way to crash kernel to allow to create too much of 1131 value too large (or to zero) because it would be an easy way to
1132 autoconfigured addresses. 1132 crash the kernel by allowing too many addresses to be created.
1133 Default: 16 1133 Default: 16
1134 1134
1135disable_ipv6 - BOOLEAN 1135disable_ipv6 - BOOLEAN
diff --git a/MAINTAINERS b/MAINTAINERS
index 9b0557a42a9a..2a479c7005b8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3495,9 +3495,9 @@ S: Maintained
3495F: drivers/net/wireless/libertas/ 3495F: drivers/net/wireless/libertas/
3496 3496
3497MARVELL MV643XX ETHERNET DRIVER 3497MARVELL MV643XX ETHERNET DRIVER
3498M: Lennert Buytenhek <buytenh@marvell.com> 3498M: Lennert Buytenhek <buytenh@wantstofly.org>
3499L: netdev@vger.kernel.org 3499L: netdev@vger.kernel.org
3500S: Supported 3500S: Maintained
3501F: drivers/net/mv643xx_eth.* 3501F: drivers/net/mv643xx_eth.*
3502F: include/linux/mv643xx.h 3502F: include/linux/mv643xx.h
3503 3503
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 319c2b5281e9..8be6faee43e6 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4005,11 +4005,21 @@ check_page:
4005 } 4005 }
4006 } 4006 }
4007 4007
4008 if (!buffer_info->dma) 4008 if (!buffer_info->dma) {
4009 buffer_info->dma = pci_map_page(pdev, 4009 buffer_info->dma = pci_map_page(pdev,
4010 buffer_info->page, 0, 4010 buffer_info->page, 0,
4011 buffer_info->length, 4011 buffer_info->length,
4012 PCI_DMA_FROMDEVICE); 4012 PCI_DMA_FROMDEVICE);
4013 if (pci_dma_mapping_error(pdev, buffer_info->dma)) {
4014 put_page(buffer_info->page);
4015 dev_kfree_skb(skb);
4016 buffer_info->page = NULL;
4017 buffer_info->skb = NULL;
4018 buffer_info->dma = 0;
4019 adapter->alloc_rx_buff_failed++;
4020 break; /* while !buffer_info->skb */
4021 }
4022 }
4013 4023
4014 rx_desc = E1000_RX_DESC(*rx_ring, i); 4024 rx_desc = E1000_RX_DESC(*rx_ring, i);
4015 rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma); 4025 rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma);
@@ -4100,6 +4110,13 @@ map_skb:
4100 skb->data, 4110 skb->data,
4101 buffer_info->length, 4111 buffer_info->length,
4102 PCI_DMA_FROMDEVICE); 4112 PCI_DMA_FROMDEVICE);
4113 if (pci_dma_mapping_error(pdev, buffer_info->dma)) {
4114 dev_kfree_skb(skb);
4115 buffer_info->skb = NULL;
4116 buffer_info->dma = 0;
4117 adapter->alloc_rx_buff_failed++;
4118 break; /* while !buffer_info->skb */
4119 }
4103 4120
4104 /* 4121 /*
4105 * XXX if it was allocated cleanly it will never map to a 4122 * XXX if it was allocated cleanly it will never map to a
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c
index bf0b96af5334..5712fddd72f2 100644
--- a/drivers/net/sfc/falcon_boards.c
+++ b/drivers/net/sfc/falcon_boards.c
@@ -29,6 +29,15 @@
29#define FALCON_BOARD_SFN4111T 0x51 29#define FALCON_BOARD_SFN4111T 0x51
30#define FALCON_BOARD_SFN4112F 0x52 30#define FALCON_BOARD_SFN4112F 0x52
31 31
32/* Board temperature is about 15°C above ambient when air flow is
33 * limited. */
34#define FALCON_BOARD_TEMP_BIAS 15
35
36/* SFC4000 datasheet says: 'The maximum permitted junction temperature
37 * is 125°C; the thermal design of the environment for the SFC4000
38 * should aim to keep this well below 100°C.' */
39#define FALCON_JUNC_TEMP_MAX 90
40
32/***************************************************************************** 41/*****************************************************************************
33 * Support for LM87 sensor chip used on several boards 42 * Support for LM87 sensor chip used on several boards
34 */ 43 */
@@ -548,16 +557,16 @@ fail_hwmon:
548static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */ 557static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */
549 558
550static const u8 sfe4002_lm87_regs[] = { 559static const u8 sfe4002_lm87_regs[] = {
551 LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ 560 LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */
552 LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ 561 LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */
553 LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ 562 LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */
554 LM87_IN_LIMITS(3, 0xb0, 0xc9), /* 5V: 4.6-5.2V */ 563 LM87_IN_LIMITS(3, 0xac, 0xd4), /* 5V: 5.0V +/- 10% */
555 LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ 564 LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */
556 LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ 565 LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */
557 LM87_AIN_LIMITS(0, 0xa0, 0xb2), /* AIN1: 1.66V +/- 5% */ 566 LM87_AIN_LIMITS(0, 0x98, 0xbb), /* AIN1: 1.66V +/- 10% */
558 LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ 567 LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */
559 LM87_TEMP_INT_LIMITS(10, 60), /* board */ 568 LM87_TEMP_INT_LIMITS(0, 80 + FALCON_BOARD_TEMP_BIAS),
560 LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ 569 LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX),
561 0 570 0
562}; 571};
563 572
@@ -619,14 +628,14 @@ static int sfe4002_init(struct efx_nic *efx)
619static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */ 628static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */
620 629
621static const u8 sfn4112f_lm87_regs[] = { 630static const u8 sfn4112f_lm87_regs[] = {
622 LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ 631 LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */
623 LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ 632 LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */
624 LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ 633 LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */
625 LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ 634 LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */
626 LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ 635 LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */
627 LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ 636 LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */
628 LM87_TEMP_INT_LIMITS(10, 60), /* board */ 637 LM87_TEMP_INT_LIMITS(0, 60 + FALCON_BOARD_TEMP_BIAS),
629 LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ 638 LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX),
630 0 639 0
631}; 640};
632 641
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c
index 86610db2cff5..c48669c77414 100644
--- a/drivers/net/sfc/mcdi.c
+++ b/drivers/net/sfc/mcdi.c
@@ -127,7 +127,7 @@ static int efx_mcdi_poll(struct efx_nic *efx)
127 efx_dword_t reg; 127 efx_dword_t reg;
128 128
129 /* Check for a reboot atomically with respect to efx_mcdi_copyout() */ 129 /* Check for a reboot atomically with respect to efx_mcdi_copyout() */
130 rc = efx_mcdi_poll_reboot(efx); 130 rc = -efx_mcdi_poll_reboot(efx);
131 if (rc) 131 if (rc)
132 goto out; 132 goto out;
133 133
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index d838d4015c63..a2c635ecdab8 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -1437,7 +1437,6 @@ static int tc35815_do_interrupt(struct net_device *dev, u32 status, int limit)
1437 /* Transmit complete. */ 1437 /* Transmit complete. */
1438 lp->lstats.tx_ints++; 1438 lp->lstats.tx_ints++;
1439 tc35815_txdone(dev); 1439 tc35815_txdone(dev);
1440 netif_wake_queue(dev);
1441 if (ret < 0) 1440 if (ret < 0)
1442 ret = 0; 1441 ret = 0;
1443 } 1442 }
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 3486e8ca039a..c8cdb7f30adc 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -582,6 +582,11 @@ static const struct usb_device_id products [] = {
582 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), 582 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
583 .driver_info = (unsigned long) &mbm_info, 583 .driver_info = (unsigned long) &mbm_info,
584}, { 584}, {
585 /* Ericsson C3607w ver 2 */
586 USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x190b, USB_CLASS_COMM,
587 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
588 .driver_info = (unsigned long) &mbm_info,
589}, {
585 /* Toshiba F3507g */ 590 /* Toshiba F3507g */
586 USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM, 591 USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM,
587 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), 592 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index aebe8c51d3e1..b07874f7da7f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2008,7 +2008,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2008 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " 2008 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn "
2009 "%d index %d\n", scd_ssn , index); 2009 "%d index %d\n", scd_ssn , index);
2010 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 2010 freed = iwl_tx_queue_reclaim(priv, txq_id, index);
2011 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 2011 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
2012 2012
2013 if (priv->mac80211_registered && 2013 if (priv->mac80211_registered &&
2014 (iwl_queue_space(&txq->q) > txq->q.low_mark) && 2014 (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index f3d662c8cbcf..2cf92a51f041 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1116,7 +1116,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1116 scd_ssn , index, txq_id, txq->swq_id); 1116 scd_ssn , index, txq_id, txq->swq_id);
1117 1117
1118 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 1118 freed = iwl_tx_queue_reclaim(priv, txq_id, index);
1119 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 1119 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
1120 1120
1121 if (priv->mac80211_registered && 1121 if (priv->mac80211_registered &&
1122 (iwl_queue_space(&txq->q) > txq->q.low_mark) && 1122 (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
@@ -1144,16 +1144,14 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1144 tx_resp->failure_frame); 1144 tx_resp->failure_frame);
1145 1145
1146 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 1146 freed = iwl_tx_queue_reclaim(priv, txq_id, index);
1147 if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) 1147 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
1148 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
1149 1148
1150 if (priv->mac80211_registered && 1149 if (priv->mac80211_registered &&
1151 (iwl_queue_space(&txq->q) > txq->q.low_mark)) 1150 (iwl_queue_space(&txq->q) > txq->q.low_mark))
1152 iwl_wake_queue(priv, txq_id); 1151 iwl_wake_queue(priv, txq_id);
1153 } 1152 }
1154 1153
1155 if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) 1154 iwl_txq_check_empty(priv, sta_id, tid, txq_id);
1156 iwl_txq_check_empty(priv, sta_id, tid, txq_id);
1157 1155
1158 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) 1156 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
1159 IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); 1157 IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index d390eef2efe5..728410083cb8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2787,8 +2787,8 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
2787 if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) 2787 if ((le16_to_cpu(priv->staging_rxon.channel) != ch))
2788 priv->staging_rxon.flags = 0; 2788 priv->staging_rxon.flags = 0;
2789 2789
2790 iwl_set_rxon_ht(priv, ht_conf);
2791 iwl_set_rxon_channel(priv, conf->channel); 2790 iwl_set_rxon_channel(priv, conf->channel);
2791 iwl_set_rxon_ht(priv, ht_conf);
2792 2792
2793 iwl_set_flags_for_band(priv, conf->channel->band); 2793 iwl_set_flags_for_band(priv, conf->channel->band);
2794 spin_unlock_irqrestore(&priv->lock, flags); 2794 spin_unlock_irqrestore(&priv->lock, flags);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 8f0c564e68b0..1b0701b876c3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -451,6 +451,8 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv);
451int iwl_hw_tx_queue_init(struct iwl_priv *priv, 451int iwl_hw_tx_queue_init(struct iwl_priv *priv,
452 struct iwl_tx_queue *txq); 452 struct iwl_tx_queue *txq);
453int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); 453int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq);
454void iwl_free_tfds_in_queue(struct iwl_priv *priv,
455 int sta_id, int tid, int freed);
454int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, 456int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
455 int slots_num, u32 txq_id); 457 int slots_num, u32 txq_id);
456void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); 458void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id);
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index d365d13e3291..6eff3d4d0616 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -120,6 +120,20 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
120EXPORT_SYMBOL(iwl_txq_update_write_ptr); 120EXPORT_SYMBOL(iwl_txq_update_write_ptr);
121 121
122 122
123void iwl_free_tfds_in_queue(struct iwl_priv *priv,
124 int sta_id, int tid, int freed)
125{
126 if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed)
127 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
128 else {
129 IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n",
130 priv->stations[sta_id].tid[tid].tfds_in_queue,
131 freed);
132 priv->stations[sta_id].tid[tid].tfds_in_queue = 0;
133 }
134}
135EXPORT_SYMBOL(iwl_free_tfds_in_queue);
136
123/** 137/**
124 * iwl_tx_queue_free - Deallocate DMA queue. 138 * iwl_tx_queue_free - Deallocate DMA queue.
125 * @txq: Transmit queue to deallocate. 139 * @txq: Transmit queue to deallocate.
@@ -1131,6 +1145,7 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
1131 struct iwl_queue *q = &txq->q; 1145 struct iwl_queue *q = &txq->q;
1132 struct iwl_tx_info *tx_info; 1146 struct iwl_tx_info *tx_info;
1133 int nfreed = 0; 1147 int nfreed = 0;
1148 struct ieee80211_hdr *hdr;
1134 1149
1135 if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { 1150 if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) {
1136 IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, " 1151 IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
@@ -1145,13 +1160,16 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
1145 1160
1146 tx_info = &txq->txb[txq->q.read_ptr]; 1161 tx_info = &txq->txb[txq->q.read_ptr];
1147 iwl_tx_status(priv, tx_info->skb[0]); 1162 iwl_tx_status(priv, tx_info->skb[0]);
1163
1164 hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data;
1165 if (hdr && ieee80211_is_data_qos(hdr->frame_control))
1166 nfreed++;
1148 tx_info->skb[0] = NULL; 1167 tx_info->skb[0] = NULL;
1149 1168
1150 if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) 1169 if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl)
1151 priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq); 1170 priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq);
1152 1171
1153 priv->cfg->ops->lib->txq_free_tfd(priv, txq); 1172 priv->cfg->ops->lib->txq_free_tfd(priv, txq);
1154 nfreed++;
1155 } 1173 }
1156 return nfreed; 1174 return nfreed;
1157} 1175}
@@ -1559,7 +1577,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
1559 if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { 1577 if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) {
1560 /* calculate mac80211 ampdu sw queue to wake */ 1578 /* calculate mac80211 ampdu sw queue to wake */
1561 int freed = iwl_tx_queue_reclaim(priv, scd_flow, index); 1579 int freed = iwl_tx_queue_reclaim(priv, scd_flow, index);
1562 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 1580 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
1563 1581
1564 if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && 1582 if ((iwl_queue_space(&txq->q) > txq->q.low_mark) &&
1565 priv->mac80211_registered && 1583 priv->mac80211_registered &&
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index fbc1c7472c5e..099c753c4213 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -410,7 +410,8 @@ static ssize_t wireless_show(struct device *d, char *buf,
410 const struct iw_statistics *iw; 410 const struct iw_statistics *iw;
411 ssize_t ret = -EINVAL; 411 ssize_t ret = -EINVAL;
412 412
413 rtnl_lock(); 413 if (!rtnl_trylock())
414 return restart_syscall();
414 if (dev_isalive(dev)) { 415 if (dev_isalive(dev)) {
415 iw = get_wireless_stats(dev); 416 iw = get_wireless_stats(dev);
416 if (iw) 417 if (iw)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 014982b61564..51ca946e3392 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1317,14 +1317,19 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
1317{ 1317{
1318 int *valp = ctl->data; 1318 int *valp = ctl->data;
1319 int val = *valp; 1319 int val = *valp;
1320 loff_t pos = *ppos;
1320 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); 1321 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
1321 1322
1322 if (write && *valp != val) { 1323 if (write && *valp != val) {
1323 struct net *net = ctl->extra2; 1324 struct net *net = ctl->extra2;
1324 1325
1325 if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) { 1326 if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) {
1326 if (!rtnl_trylock()) 1327 if (!rtnl_trylock()) {
1328 /* Restore the original values before restarting */
1329 *valp = val;
1330 *ppos = pos;
1327 return restart_syscall(); 1331 return restart_syscall();
1332 }
1328 if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) { 1333 if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) {
1329 inet_forward_change(net); 1334 inet_forward_change(net);
1330 } else if (*valp) { 1335 } else if (*valp) {
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b0d4a4b23db5..1b327f15e7e7 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -502,8 +502,11 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old)
502 if (p == &net->ipv6.devconf_dflt->forwarding) 502 if (p == &net->ipv6.devconf_dflt->forwarding)
503 return 0; 503 return 0;
504 504
505 if (!rtnl_trylock()) 505 if (!rtnl_trylock()) {
506 /* Restore the original values before restarting */
507 *p = old;
506 return restart_syscall(); 508 return restart_syscall();
509 }
507 510
508 if (p == &net->ipv6.devconf_all->forwarding) { 511 if (p == &net->ipv6.devconf_all->forwarding) {
509 __s32 newf = net->ipv6.devconf_all->forwarding; 512 __s32 newf = net->ipv6.devconf_all->forwarding;
@@ -4042,12 +4045,15 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write,
4042{ 4045{
4043 int *valp = ctl->data; 4046 int *valp = ctl->data;
4044 int val = *valp; 4047 int val = *valp;
4048 loff_t pos = *ppos;
4045 int ret; 4049 int ret;
4046 4050
4047 ret = proc_dointvec(ctl, write, buffer, lenp, ppos); 4051 ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
4048 4052
4049 if (write) 4053 if (write)
4050 ret = addrconf_fixup_forwarding(ctl, valp, val); 4054 ret = addrconf_fixup_forwarding(ctl, valp, val);
4055 if (ret)
4056 *ppos = pos;
4051 return ret; 4057 return ret;
4052} 4058}
4053 4059
@@ -4089,8 +4095,11 @@ static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int old)
4089 if (p == &net->ipv6.devconf_dflt->disable_ipv6) 4095 if (p == &net->ipv6.devconf_dflt->disable_ipv6)
4090 return 0; 4096 return 0;
4091 4097
4092 if (!rtnl_trylock()) 4098 if (!rtnl_trylock()) {
4099 /* Restore the original values before restarting */
4100 *p = old;
4093 return restart_syscall(); 4101 return restart_syscall();
4102 }
4094 4103
4095 if (p == &net->ipv6.devconf_all->disable_ipv6) { 4104 if (p == &net->ipv6.devconf_all->disable_ipv6) {
4096 __s32 newf = net->ipv6.devconf_all->disable_ipv6; 4105 __s32 newf = net->ipv6.devconf_all->disable_ipv6;
@@ -4109,12 +4118,15 @@ int addrconf_sysctl_disable(ctl_table *ctl, int write,
4109{ 4118{
4110 int *valp = ctl->data; 4119 int *valp = ctl->data;
4111 int val = *valp; 4120 int val = *valp;
4121 loff_t pos = *ppos;
4112 int ret; 4122 int ret;
4113 4123
4114 ret = proc_dointvec(ctl, write, buffer, lenp, ppos); 4124 ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
4115 4125
4116 if (write) 4126 if (write)
4117 ret = addrconf_disable_ipv6(ctl, valp, val); 4127 ret = addrconf_disable_ipv6(ctl, valp, val);
4128 if (ret)
4129 *ppos = pos;
4118 return ret; 4130 return ret;
4119} 4131}
4120 4132