aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/ip-sysctl.txt10
-rw-r--r--drivers/net/ethernet/pasemi/Makefile3
-rw-r--r--drivers/net/ethernet/realtek/r8169.c53
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c36
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-sta.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c34
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c22
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h4
-rw-r--r--drivers/net/xen-netback/netback.c2
-rw-r--r--net/core/request_sock.c7
-rw-r--r--net/core/secure_seq.c2
-rw-r--r--net/ipv4/route.c47
-rw-r--r--net/mac80211/main.c6
-rw-r--r--net/mac80211/util.c1
-rw-r--r--net/wireless/reg.c49
19 files changed, 155 insertions, 132 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index f049a1ca186f..589f2da5d545 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -282,11 +282,11 @@ tcp_max_ssthresh - INTEGER
282 Default: 0 (off) 282 Default: 0 (off)
283 283
284tcp_max_syn_backlog - INTEGER 284tcp_max_syn_backlog - INTEGER
285 Maximal number of remembered connection requests, which are 285 Maximal number of remembered connection requests, which have not
286 still did not receive an acknowledgment from connecting client. 286 received an acknowledgment from connecting client.
287 Default value is 1024 for systems with more than 128Mb of memory, 287 The minimal value is 128 for low memory machines, and it will
288 and 128 for low memory machines. If server suffers of overload, 288 increase in proportion to the memory of machine.
289 try to increase this number. 289 If server suffers from overload, try increasing this number.
290 290
291tcp_max_tw_buckets - INTEGER 291tcp_max_tw_buckets - INTEGER
292 Maximal number of timewait sockets held by system simultaneously. 292 Maximal number of timewait sockets held by system simultaneously.
diff --git a/drivers/net/ethernet/pasemi/Makefile b/drivers/net/ethernet/pasemi/Makefile
index 05db5434bafc..90497ffb1ac3 100644
--- a/drivers/net/ethernet/pasemi/Makefile
+++ b/drivers/net/ethernet/pasemi/Makefile
@@ -2,4 +2,5 @@
2# Makefile for the A Semi network device drivers. 2# Makefile for the A Semi network device drivers.
3# 3#
4 4
5obj-$(CONFIG_PASEMI_MAC) += pasemi_mac.o pasemi_mac_ethtool.o 5obj-$(CONFIG_PASEMI_MAC) += pasemi_mac_driver.o
6pasemi_mac_driver-objs := pasemi_mac.o pasemi_mac_ethtool.o
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 6f06aa10f0d7..67bf07819992 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -1183,11 +1183,13 @@ static u8 rtl8168d_efuse_read(void __iomem *ioaddr, int reg_addr)
1183 return value; 1183 return value;
1184} 1184}
1185 1185
1186static void rtl8169_irq_mask_and_ack(void __iomem *ioaddr) 1186static void rtl8169_irq_mask_and_ack(struct rtl8169_private *tp)
1187{ 1187{
1188 RTL_W16(IntrMask, 0x0000); 1188 void __iomem *ioaddr = tp->mmio_addr;
1189 1189
1190 RTL_W16(IntrStatus, 0xffff); 1190 RTL_W16(IntrMask, 0x0000);
1191 RTL_W16(IntrStatus, tp->intr_event);
1192 RTL_R8(ChipCmd);
1191} 1193}
1192 1194
1193static unsigned int rtl8169_tbi_reset_pending(struct rtl8169_private *tp) 1195static unsigned int rtl8169_tbi_reset_pending(struct rtl8169_private *tp)
@@ -3933,8 +3935,6 @@ static void rtl_hw_reset(struct rtl8169_private *tp)
3933 break; 3935 break;
3934 udelay(100); 3936 udelay(100);
3935 } 3937 }
3936
3937 rtl8169_init_ring_indexes(tp);
3938} 3938}
3939 3939
3940static int __devinit 3940static int __devinit
@@ -4339,7 +4339,7 @@ static void rtl8169_hw_reset(struct rtl8169_private *tp)
4339 void __iomem *ioaddr = tp->mmio_addr; 4339 void __iomem *ioaddr = tp->mmio_addr;
4340 4340
4341 /* Disable interrupts */ 4341 /* Disable interrupts */
4342 rtl8169_irq_mask_and_ack(ioaddr); 4342 rtl8169_irq_mask_and_ack(tp);
4343 4343
4344 rtl_rx_close(tp); 4344 rtl_rx_close(tp);
4345 4345
@@ -4885,8 +4885,7 @@ static void rtl_hw_start_8168(struct net_device *dev)
4885 RTL_W16(IntrMitigate, 0x5151); 4885 RTL_W16(IntrMitigate, 0x5151);
4886 4886
4887 /* Work around for RxFIFO overflow. */ 4887 /* Work around for RxFIFO overflow. */
4888 if (tp->mac_version == RTL_GIGA_MAC_VER_11 || 4888 if (tp->mac_version == RTL_GIGA_MAC_VER_11) {
4889 tp->mac_version == RTL_GIGA_MAC_VER_22) {
4890 tp->intr_event |= RxFIFOOver | PCSTimeout; 4889 tp->intr_event |= RxFIFOOver | PCSTimeout;
4891 tp->intr_event &= ~RxOverflow; 4890 tp->intr_event &= ~RxOverflow;
4892 } 4891 }
@@ -5076,6 +5075,11 @@ static void rtl_hw_start_8101(struct net_device *dev)
5076 void __iomem *ioaddr = tp->mmio_addr; 5075 void __iomem *ioaddr = tp->mmio_addr;
5077 struct pci_dev *pdev = tp->pci_dev; 5076 struct pci_dev *pdev = tp->pci_dev;
5078 5077
5078 if (tp->mac_version >= RTL_GIGA_MAC_VER_30) {
5079 tp->intr_event &= ~RxFIFOOver;
5080 tp->napi_event &= ~RxFIFOOver;
5081 }
5082
5079 if (tp->mac_version == RTL_GIGA_MAC_VER_13 || 5083 if (tp->mac_version == RTL_GIGA_MAC_VER_13 ||
5080 tp->mac_version == RTL_GIGA_MAC_VER_16) { 5084 tp->mac_version == RTL_GIGA_MAC_VER_16) {
5081 int cap = pci_pcie_cap(pdev); 5085 int cap = pci_pcie_cap(pdev);
@@ -5342,7 +5346,7 @@ static void rtl8169_wait_for_quiescence(struct net_device *dev)
5342 /* Wait for any pending NAPI task to complete */ 5346 /* Wait for any pending NAPI task to complete */
5343 napi_disable(&tp->napi); 5347 napi_disable(&tp->napi);
5344 5348
5345 rtl8169_irq_mask_and_ack(ioaddr); 5349 rtl8169_irq_mask_and_ack(tp);
5346 5350
5347 tp->intr_mask = 0xffff; 5351 tp->intr_mask = 0xffff;
5348 RTL_W16(IntrMask, tp->intr_event); 5352 RTL_W16(IntrMask, tp->intr_event);
@@ -5389,14 +5393,16 @@ static void rtl8169_reset_task(struct work_struct *work)
5389 if (!netif_running(dev)) 5393 if (!netif_running(dev))
5390 goto out_unlock; 5394 goto out_unlock;
5391 5395
5396 rtl8169_hw_reset(tp);
5397
5392 rtl8169_wait_for_quiescence(dev); 5398 rtl8169_wait_for_quiescence(dev);
5393 5399
5394 for (i = 0; i < NUM_RX_DESC; i++) 5400 for (i = 0; i < NUM_RX_DESC; i++)
5395 rtl8169_mark_to_asic(tp->RxDescArray + i, rx_buf_sz); 5401 rtl8169_mark_to_asic(tp->RxDescArray + i, rx_buf_sz);
5396 5402
5397 rtl8169_tx_clear(tp); 5403 rtl8169_tx_clear(tp);
5404 rtl8169_init_ring_indexes(tp);
5398 5405
5399 rtl8169_hw_reset(tp);
5400 rtl_hw_start(dev); 5406 rtl_hw_start(dev);
5401 netif_wake_queue(dev); 5407 netif_wake_queue(dev);
5402 rtl8169_check_link_status(dev, tp, tp->mmio_addr); 5408 rtl8169_check_link_status(dev, tp, tp->mmio_addr);
@@ -5407,11 +5413,6 @@ out_unlock:
5407 5413
5408static void rtl8169_tx_timeout(struct net_device *dev) 5414static void rtl8169_tx_timeout(struct net_device *dev)
5409{ 5415{
5410 struct rtl8169_private *tp = netdev_priv(dev);
5411
5412 rtl8169_hw_reset(tp);
5413
5414 /* Let's wait a bit while any (async) irq lands on */
5415 rtl8169_schedule_work(dev, rtl8169_reset_task); 5416 rtl8169_schedule_work(dev, rtl8169_reset_task);
5416} 5417}
5417 5418
@@ -5804,6 +5805,10 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
5804 */ 5805 */
5805 status = RTL_R16(IntrStatus); 5806 status = RTL_R16(IntrStatus);
5806 while (status && status != 0xffff) { 5807 while (status && status != 0xffff) {
5808 status &= tp->intr_event;
5809 if (!status)
5810 break;
5811
5807 handled = 1; 5812 handled = 1;
5808 5813
5809 /* Handle all of the error cases first. These will reset 5814 /* Handle all of the error cases first. These will reset
@@ -5818,27 +5823,9 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
5818 switch (tp->mac_version) { 5823 switch (tp->mac_version) {
5819 /* Work around for rx fifo overflow */ 5824 /* Work around for rx fifo overflow */
5820 case RTL_GIGA_MAC_VER_11: 5825 case RTL_GIGA_MAC_VER_11:
5821 case RTL_GIGA_MAC_VER_22:
5822 case RTL_GIGA_MAC_VER_26:
5823 netif_stop_queue(dev); 5826 netif_stop_queue(dev);
5824 rtl8169_tx_timeout(dev); 5827 rtl8169_tx_timeout(dev);
5825 goto done; 5828 goto done;
5826 /* Testers needed. */
5827 case RTL_GIGA_MAC_VER_17:
5828 case RTL_GIGA_MAC_VER_19:
5829 case RTL_GIGA_MAC_VER_20:
5830 case RTL_GIGA_MAC_VER_21:
5831 case RTL_GIGA_MAC_VER_23:
5832 case RTL_GIGA_MAC_VER_24:
5833 case RTL_GIGA_MAC_VER_27:
5834 case RTL_GIGA_MAC_VER_28:
5835 case RTL_GIGA_MAC_VER_31:
5836 /* Experimental science. Pktgen proof. */
5837 case RTL_GIGA_MAC_VER_12:
5838 case RTL_GIGA_MAC_VER_25:
5839 if (status == RxFIFOOver)
5840 goto done;
5841 break;
5842 default: 5829 default:
5843 break; 5830 break;
5844 } 5831 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index e12b48c2cff6..dd008b0e6417 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -191,6 +191,7 @@ static struct iwl_base_params iwl1000_base_params = {
191 .chain_noise_scale = 1000, 191 .chain_noise_scale = 1000,
192 .wd_timeout = IWL_DEF_WD_TIMEOUT, 192 .wd_timeout = IWL_DEF_WD_TIMEOUT,
193 .max_event_log_size = 128, 193 .max_event_log_size = 128,
194 .wd_disable = true,
194}; 195};
195static struct iwl_ht_params iwl1000_ht_params = { 196static struct iwl_ht_params iwl1000_ht_params = {
196 .ht_greenfield_support = true, 197 .ht_greenfield_support = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index c511c98a89a8..f55fb2d1af52 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -364,6 +364,7 @@ static struct iwl_base_params iwl5000_base_params = {
364 .wd_timeout = IWL_LONG_WD_TIMEOUT, 364 .wd_timeout = IWL_LONG_WD_TIMEOUT,
365 .max_event_log_size = 512, 365 .max_event_log_size = 512,
366 .no_idle_support = true, 366 .no_idle_support = true,
367 .wd_disable = true,
367}; 368};
368static struct iwl_ht_params iwl5000_ht_params = { 369static struct iwl_ht_params iwl5000_ht_params = {
369 .ht_greenfield_support = true, 370 .ht_greenfield_support = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 58a381c01c89..a7a6def40d05 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -528,6 +528,24 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
528 return 0; 528 return 0;
529} 529}
530 530
531void iwlagn_config_ht40(struct ieee80211_conf *conf,
532 struct iwl_rxon_context *ctx)
533{
534 if (conf_is_ht40_minus(conf)) {
535 ctx->ht.extension_chan_offset =
536 IEEE80211_HT_PARAM_CHA_SEC_BELOW;
537 ctx->ht.is_40mhz = true;
538 } else if (conf_is_ht40_plus(conf)) {
539 ctx->ht.extension_chan_offset =
540 IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
541 ctx->ht.is_40mhz = true;
542 } else {
543 ctx->ht.extension_chan_offset =
544 IEEE80211_HT_PARAM_CHA_SEC_NONE;
545 ctx->ht.is_40mhz = false;
546 }
547}
548
531int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) 549int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
532{ 550{
533 struct iwl_priv *priv = hw->priv; 551 struct iwl_priv *priv = hw->priv;
@@ -586,19 +604,11 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
586 ctx->ht.enabled = conf_is_ht(conf); 604 ctx->ht.enabled = conf_is_ht(conf);
587 605
588 if (ctx->ht.enabled) { 606 if (ctx->ht.enabled) {
589 if (conf_is_ht40_minus(conf)) { 607 /* if HT40 is used, it should not change
590 ctx->ht.extension_chan_offset = 608 * after associated except channel switch */
591 IEEE80211_HT_PARAM_CHA_SEC_BELOW; 609 if (iwl_is_associated_ctx(ctx) &&
592 ctx->ht.is_40mhz = true; 610 !ctx->ht.is_40mhz)
593 } else if (conf_is_ht40_plus(conf)) { 611 iwlagn_config_ht40(conf, ctx);
594 ctx->ht.extension_chan_offset =
595 IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
596 ctx->ht.is_40mhz = true;
597 } else {
598 ctx->ht.extension_chan_offset =
599 IEEE80211_HT_PARAM_CHA_SEC_NONE;
600 ctx->ht.is_40mhz = false;
601 }
602 } else 612 } else
603 ctx->ht.is_40mhz = false; 613 ctx->ht.is_40mhz = false;
604 614
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index ed6283623932..4b2aa1da0953 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -1268,9 +1268,6 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
1268 1268
1269 switch (keyconf->cipher) { 1269 switch (keyconf->cipher) {
1270 case WLAN_CIPHER_SUITE_TKIP: 1270 case WLAN_CIPHER_SUITE_TKIP:
1271 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
1272 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
1273
1274 if (sta) 1271 if (sta)
1275 addr = sta->addr; 1272 addr = sta->addr;
1276 else /* station mode case only */ 1273 else /* station mode case only */
@@ -1283,8 +1280,6 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
1283 seq.tkip.iv32, p1k, CMD_SYNC); 1280 seq.tkip.iv32, p1k, CMD_SYNC);
1284 break; 1281 break;
1285 case WLAN_CIPHER_SUITE_CCMP: 1282 case WLAN_CIPHER_SUITE_CCMP:
1286 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
1287 /* fall through */
1288 case WLAN_CIPHER_SUITE_WEP40: 1283 case WLAN_CIPHER_SUITE_WEP40:
1289 case WLAN_CIPHER_SUITE_WEP104: 1284 case WLAN_CIPHER_SUITE_WEP104:
1290 ret = iwlagn_send_sta_key(priv, keyconf, sta_id, 1285 ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index ccba69b7f8a7..bacc06c95e7a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2316,6 +2316,17 @@ static int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2316 return -EOPNOTSUPP; 2316 return -EOPNOTSUPP;
2317 } 2317 }
2318 2318
2319 switch (key->cipher) {
2320 case WLAN_CIPHER_SUITE_TKIP:
2321 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
2322 /* fall through */
2323 case WLAN_CIPHER_SUITE_CCMP:
2324 key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
2325 break;
2326 default:
2327 break;
2328 }
2329
2319 /* 2330 /*
2320 * We could program these keys into the hardware as well, but we 2331 * We could program these keys into the hardware as well, but we
2321 * don't expect much multicast traffic in IBSS and having keys 2332 * don't expect much multicast traffic in IBSS and having keys
@@ -2599,21 +2610,9 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
2599 2610
2600 /* Configure HT40 channels */ 2611 /* Configure HT40 channels */
2601 ctx->ht.enabled = conf_is_ht(conf); 2612 ctx->ht.enabled = conf_is_ht(conf);
2602 if (ctx->ht.enabled) { 2613 if (ctx->ht.enabled)
2603 if (conf_is_ht40_minus(conf)) { 2614 iwlagn_config_ht40(conf, ctx);
2604 ctx->ht.extension_chan_offset = 2615 else
2605 IEEE80211_HT_PARAM_CHA_SEC_BELOW;
2606 ctx->ht.is_40mhz = true;
2607 } else if (conf_is_ht40_plus(conf)) {
2608 ctx->ht.extension_chan_offset =
2609 IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
2610 ctx->ht.is_40mhz = true;
2611 } else {
2612 ctx->ht.extension_chan_offset =
2613 IEEE80211_HT_PARAM_CHA_SEC_NONE;
2614 ctx->ht.is_40mhz = false;
2615 }
2616 } else
2617 ctx->ht.is_40mhz = false; 2616 ctx->ht.is_40mhz = false;
2618 2617
2619 if ((le16_to_cpu(ctx->staging.channel) != ch)) 2618 if ((le16_to_cpu(ctx->staging.channel) != ch))
@@ -3499,9 +3498,10 @@ MODULE_PARM_DESC(plcp_check, "Check plcp health (default: 1 [enabled])");
3499module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO); 3498module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO);
3500MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])"); 3499MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])");
3501 3500
3502module_param_named(wd_disable, iwlagn_mod_params.wd_disable, bool, S_IRUGO); 3501module_param_named(wd_disable, iwlagn_mod_params.wd_disable, int, S_IRUGO);
3503MODULE_PARM_DESC(wd_disable, 3502MODULE_PARM_DESC(wd_disable,
3504 "Disable stuck queue watchdog timer (default: 0 [enabled])"); 3503 "Disable stuck queue watchdog timer 0=system default, "
3504 "1=disable, 2=enable (default: 0)");
3505 3505
3506/* 3506/*
3507 * set bt_coex_active to true, uCode will do kill/defer 3507 * set bt_coex_active to true, uCode will do kill/defer
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index 5b936ec1a541..3856abaea507 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -86,6 +86,8 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
86 struct ieee80211_vif *vif, 86 struct ieee80211_vif *vif,
87 struct ieee80211_bss_conf *bss_conf, 87 struct ieee80211_bss_conf *bss_conf,
88 u32 changes); 88 u32 changes);
89void iwlagn_config_ht40(struct ieee80211_conf *conf,
90 struct iwl_rxon_context *ctx);
89 91
90/* uCode */ 92/* uCode */
91int iwlagn_rx_calib_result(struct iwl_priv *priv, 93int iwlagn_rx_calib_result(struct iwl_priv *priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 001fdf140abb..fcf54160e4ed 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1810,11 +1810,23 @@ void iwl_setup_watchdog(struct iwl_priv *priv)
1810{ 1810{
1811 unsigned int timeout = priv->cfg->base_params->wd_timeout; 1811 unsigned int timeout = priv->cfg->base_params->wd_timeout;
1812 1812
1813 if (timeout && !iwlagn_mod_params.wd_disable) 1813 if (!iwlagn_mod_params.wd_disable) {
1814 mod_timer(&priv->watchdog, 1814 /* use system default */
1815 jiffies + msecs_to_jiffies(IWL_WD_TICK(timeout))); 1815 if (timeout && !priv->cfg->base_params->wd_disable)
1816 else 1816 mod_timer(&priv->watchdog,
1817 del_timer(&priv->watchdog); 1817 jiffies +
1818 msecs_to_jiffies(IWL_WD_TICK(timeout)));
1819 else
1820 del_timer(&priv->watchdog);
1821 } else {
1822 /* module parameter overwrite default configuration */
1823 if (timeout && iwlagn_mod_params.wd_disable == 2)
1824 mod_timer(&priv->watchdog,
1825 jiffies +
1826 msecs_to_jiffies(IWL_WD_TICK(timeout)));
1827 else
1828 del_timer(&priv->watchdog);
1829 }
1818} 1830}
1819 1831
1820/** 1832/**
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 137da3380704..f2fc288f3dd3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -113,6 +113,7 @@ struct iwl_lib_ops {
113 * @shadow_reg_enable: HW shadhow register bit 113 * @shadow_reg_enable: HW shadhow register bit
114 * @no_idle_support: do not support idle mode 114 * @no_idle_support: do not support idle mode
115 * @hd_v2: v2 of enhanced sensitivity value, used for 2000 series and up 115 * @hd_v2: v2 of enhanced sensitivity value, used for 2000 series and up
116 * wd_disable: disable watchdog timer
116 */ 117 */
117struct iwl_base_params { 118struct iwl_base_params {
118 int eeprom_size; 119 int eeprom_size;
@@ -134,6 +135,7 @@ struct iwl_base_params {
134 const bool shadow_reg_enable; 135 const bool shadow_reg_enable;
135 const bool no_idle_support; 136 const bool no_idle_support;
136 const bool hd_v2; 137 const bool hd_v2;
138 const bool wd_disable;
137}; 139};
138/* 140/*
139 * @advanced_bt_coexist: support advanced bt coexist 141 * @advanced_bt_coexist: support advanced bt coexist
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index 1f7a93c67c45..14eaf37ce3b1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -120,7 +120,7 @@ extern struct iwl_mod_params iwlagn_mod_params;
120 * @restart_fw: restart firmware, default = 1 120 * @restart_fw: restart firmware, default = 1
121 * @plcp_check: enable plcp health check, default = true 121 * @plcp_check: enable plcp health check, default = true
122 * @ack_check: disable ack health check, default = false 122 * @ack_check: disable ack health check, default = false
123 * @wd_disable: enable stuck queue check, default = false 123 * @wd_disable: enable stuck queue check, default = 0
124 * @bt_coex_active: enable bt coex, default = true 124 * @bt_coex_active: enable bt coex, default = true
125 * @led_mode: system default, default = 0 125 * @led_mode: system default, default = 0
126 * @no_sleep_autoadjust: disable autoadjust, default = true 126 * @no_sleep_autoadjust: disable autoadjust, default = true
@@ -141,7 +141,7 @@ struct iwl_mod_params {
141 int restart_fw; 141 int restart_fw;
142 bool plcp_check; 142 bool plcp_check;
143 bool ack_check; 143 bool ack_check;
144 bool wd_disable; 144 int wd_disable;
145 bool bt_coex_active; 145 bool bt_coex_active;
146 int led_mode; 146 int led_mode;
147 bool no_sleep_autoadjust; 147 bool no_sleep_autoadjust;
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 1ae270eed51a..15e332d08c8d 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1668,7 +1668,7 @@ static int __init netback_init(void)
1668 "netback/%u", group); 1668 "netback/%u", group);
1669 1669
1670 if (IS_ERR(netbk->task)) { 1670 if (IS_ERR(netbk->task)) {
1671 printk(KERN_ALERT "kthread_run() fails at netback\n"); 1671 printk(KERN_ALERT "kthread_create() fails at netback\n");
1672 del_timer(&netbk->net_timer); 1672 del_timer(&netbk->net_timer);
1673 rc = PTR_ERR(netbk->task); 1673 rc = PTR_ERR(netbk->task);
1674 goto failed_init; 1674 goto failed_init;
diff --git a/net/core/request_sock.c b/net/core/request_sock.c
index 182236b2510a..9b570a6a33c5 100644
--- a/net/core/request_sock.c
+++ b/net/core/request_sock.c
@@ -26,10 +26,11 @@
26 * but then some measure against one socket starving all other sockets 26 * but then some measure against one socket starving all other sockets
27 * would be needed. 27 * would be needed.
28 * 28 *
29 * It was 128 by default. Experiments with real servers show, that 29 * The minimum value of it is 128. Experiments with real servers show that
30 * it is absolutely not enough even at 100conn/sec. 256 cures most 30 * it is absolutely not enough even at 100conn/sec. 256 cures most
31 * of problems. This value is adjusted to 128 for very small machines 31 * of problems.
32 * (<=32Mb of memory) and to 1024 on normal or better ones (>=256Mb). 32 * This value is adjusted to 128 for low memory machines,
33 * and it will increase in proportion to the memory of machine.
33 * Note : Dont forget somaxconn that may limit backlog too. 34 * Note : Dont forget somaxconn that may limit backlog too.
34 */ 35 */
35int sysctl_max_syn_backlog = 256; 36int sysctl_max_syn_backlog = 256;
diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c
index 025233de25f9..925991ae6f52 100644
--- a/net/core/secure_seq.c
+++ b/net/core/secure_seq.c
@@ -19,6 +19,7 @@ static int __init net_secret_init(void)
19} 19}
20late_initcall(net_secret_init); 20late_initcall(net_secret_init);
21 21
22#ifdef CONFIG_INET
22static u32 seq_scale(u32 seq) 23static u32 seq_scale(u32 seq)
23{ 24{
24 /* 25 /*
@@ -33,6 +34,7 @@ static u32 seq_scale(u32 seq)
33 */ 34 */
34 return seq + (ktime_to_ns(ktime_get_real()) >> 6); 35 return seq + (ktime_to_ns(ktime_get_real()) >> 6);
35} 36}
37#endif
36 38
37#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 39#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
38__u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr, 40__u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr,
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index ca5e237df029..46af62363b8c 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -112,7 +112,7 @@
112#include <net/secure_seq.h> 112#include <net/secure_seq.h>
113 113
114#define RT_FL_TOS(oldflp4) \ 114#define RT_FL_TOS(oldflp4) \
115 ((u32)(oldflp4->flowi4_tos & (IPTOS_RT_MASK | RTO_ONLINK))) 115 ((oldflp4)->flowi4_tos & (IPTOS_RT_MASK | RTO_ONLINK))
116 116
117#define IP_MAX_MTU 0xFFF0 117#define IP_MAX_MTU 0xFFF0
118 118
@@ -1310,7 +1310,7 @@ static void rt_del(unsigned hash, struct rtable *rt)
1310 spin_unlock_bh(rt_hash_lock_addr(hash)); 1310 spin_unlock_bh(rt_hash_lock_addr(hash));
1311} 1311}
1312 1312
1313static int check_peer_redir(struct dst_entry *dst, struct inet_peer *peer) 1313static void check_peer_redir(struct dst_entry *dst, struct inet_peer *peer)
1314{ 1314{
1315 struct rtable *rt = (struct rtable *) dst; 1315 struct rtable *rt = (struct rtable *) dst;
1316 __be32 orig_gw = rt->rt_gateway; 1316 __be32 orig_gw = rt->rt_gateway;
@@ -1321,21 +1321,19 @@ static int check_peer_redir(struct dst_entry *dst, struct inet_peer *peer)
1321 rt->rt_gateway = peer->redirect_learned.a4; 1321 rt->rt_gateway = peer->redirect_learned.a4;
1322 1322
1323 n = ipv4_neigh_lookup(&rt->dst, &rt->rt_gateway); 1323 n = ipv4_neigh_lookup(&rt->dst, &rt->rt_gateway);
1324 if (IS_ERR(n)) 1324 if (IS_ERR(n)) {
1325 return PTR_ERR(n); 1325 rt->rt_gateway = orig_gw;
1326 return;
1327 }
1326 old_n = xchg(&rt->dst._neighbour, n); 1328 old_n = xchg(&rt->dst._neighbour, n);
1327 if (old_n) 1329 if (old_n)
1328 neigh_release(old_n); 1330 neigh_release(old_n);
1329 if (!n || !(n->nud_state & NUD_VALID)) { 1331 if (!(n->nud_state & NUD_VALID)) {
1330 if (n) 1332 neigh_event_send(n, NULL);
1331 neigh_event_send(n, NULL);
1332 rt->rt_gateway = orig_gw;
1333 return -EAGAIN;
1334 } else { 1333 } else {
1335 rt->rt_flags |= RTCF_REDIRECTED; 1334 rt->rt_flags |= RTCF_REDIRECTED;
1336 call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, n); 1335 call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, n);
1337 } 1336 }
1338 return 0;
1339} 1337}
1340 1338
1341/* called in rcu_read_lock() section */ 1339/* called in rcu_read_lock() section */
@@ -1693,7 +1691,7 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
1693} 1691}
1694 1692
1695 1693
1696static struct rtable *ipv4_validate_peer(struct rtable *rt) 1694static void ipv4_validate_peer(struct rtable *rt)
1697{ 1695{
1698 if (rt->rt_peer_genid != rt_peer_genid()) { 1696 if (rt->rt_peer_genid != rt_peer_genid()) {
1699 struct inet_peer *peer; 1697 struct inet_peer *peer;
@@ -1708,15 +1706,12 @@ static struct rtable *ipv4_validate_peer(struct rtable *rt)
1708 if (peer->redirect_genid != redirect_genid) 1706 if (peer->redirect_genid != redirect_genid)
1709 peer->redirect_learned.a4 = 0; 1707 peer->redirect_learned.a4 = 0;
1710 if (peer->redirect_learned.a4 && 1708 if (peer->redirect_learned.a4 &&
1711 peer->redirect_learned.a4 != rt->rt_gateway) { 1709 peer->redirect_learned.a4 != rt->rt_gateway)
1712 if (check_peer_redir(&rt->dst, peer)) 1710 check_peer_redir(&rt->dst, peer);
1713 return NULL;
1714 }
1715 } 1711 }
1716 1712
1717 rt->rt_peer_genid = rt_peer_genid(); 1713 rt->rt_peer_genid = rt_peer_genid();
1718 } 1714 }
1719 return rt;
1720} 1715}
1721 1716
1722static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie) 1717static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
@@ -1725,7 +1720,7 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
1725 1720
1726 if (rt_is_expired(rt)) 1721 if (rt_is_expired(rt))
1727 return NULL; 1722 return NULL;
1728 dst = (struct dst_entry *) ipv4_validate_peer(rt); 1723 ipv4_validate_peer(rt);
1729 return dst; 1724 return dst;
1730} 1725}
1731 1726
@@ -2380,9 +2375,7 @@ int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr,
2380 rth->rt_mark == skb->mark && 2375 rth->rt_mark == skb->mark &&
2381 net_eq(dev_net(rth->dst.dev), net) && 2376 net_eq(dev_net(rth->dst.dev), net) &&
2382 !rt_is_expired(rth)) { 2377 !rt_is_expired(rth)) {
2383 rth = ipv4_validate_peer(rth); 2378 ipv4_validate_peer(rth);
2384 if (!rth)
2385 continue;
2386 if (noref) { 2379 if (noref) {
2387 dst_use_noref(&rth->dst, jiffies); 2380 dst_use_noref(&rth->dst, jiffies);
2388 skb_dst_set_noref(skb, &rth->dst); 2381 skb_dst_set_noref(skb, &rth->dst);
@@ -2441,11 +2434,11 @@ EXPORT_SYMBOL(ip_route_input_common);
2441static struct rtable *__mkroute_output(const struct fib_result *res, 2434static struct rtable *__mkroute_output(const struct fib_result *res,
2442 const struct flowi4 *fl4, 2435 const struct flowi4 *fl4,
2443 __be32 orig_daddr, __be32 orig_saddr, 2436 __be32 orig_daddr, __be32 orig_saddr,
2444 int orig_oif, struct net_device *dev_out, 2437 int orig_oif, __u8 orig_rtos,
2438 struct net_device *dev_out,
2445 unsigned int flags) 2439 unsigned int flags)
2446{ 2440{
2447 struct fib_info *fi = res->fi; 2441 struct fib_info *fi = res->fi;
2448 u32 tos = RT_FL_TOS(fl4);
2449 struct in_device *in_dev; 2442 struct in_device *in_dev;
2450 u16 type = res->type; 2443 u16 type = res->type;
2451 struct rtable *rth; 2444 struct rtable *rth;
@@ -2496,7 +2489,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
2496 rth->rt_genid = rt_genid(dev_net(dev_out)); 2489 rth->rt_genid = rt_genid(dev_net(dev_out));
2497 rth->rt_flags = flags; 2490 rth->rt_flags = flags;
2498 rth->rt_type = type; 2491 rth->rt_type = type;
2499 rth->rt_key_tos = tos; 2492 rth->rt_key_tos = orig_rtos;
2500 rth->rt_dst = fl4->daddr; 2493 rth->rt_dst = fl4->daddr;
2501 rth->rt_src = fl4->saddr; 2494 rth->rt_src = fl4->saddr;
2502 rth->rt_route_iif = 0; 2495 rth->rt_route_iif = 0;
@@ -2546,7 +2539,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
2546static struct rtable *ip_route_output_slow(struct net *net, struct flowi4 *fl4) 2539static struct rtable *ip_route_output_slow(struct net *net, struct flowi4 *fl4)
2547{ 2540{
2548 struct net_device *dev_out = NULL; 2541 struct net_device *dev_out = NULL;
2549 u32 tos = RT_FL_TOS(fl4); 2542 __u8 tos = RT_FL_TOS(fl4);
2550 unsigned int flags = 0; 2543 unsigned int flags = 0;
2551 struct fib_result res; 2544 struct fib_result res;
2552 struct rtable *rth; 2545 struct rtable *rth;
@@ -2722,7 +2715,7 @@ static struct rtable *ip_route_output_slow(struct net *net, struct flowi4 *fl4)
2722 2715
2723make_route: 2716make_route:
2724 rth = __mkroute_output(&res, fl4, orig_daddr, orig_saddr, orig_oif, 2717 rth = __mkroute_output(&res, fl4, orig_daddr, orig_saddr, orig_oif,
2725 dev_out, flags); 2718 tos, dev_out, flags);
2726 if (!IS_ERR(rth)) { 2719 if (!IS_ERR(rth)) {
2727 unsigned int hash; 2720 unsigned int hash;
2728 2721
@@ -2758,9 +2751,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *flp4)
2758 (IPTOS_RT_MASK | RTO_ONLINK)) && 2751 (IPTOS_RT_MASK | RTO_ONLINK)) &&
2759 net_eq(dev_net(rth->dst.dev), net) && 2752 net_eq(dev_net(rth->dst.dev), net) &&
2760 !rt_is_expired(rth)) { 2753 !rt_is_expired(rth)) {
2761 rth = ipv4_validate_peer(rth); 2754 ipv4_validate_peer(rth);
2762 if (!rth)
2763 continue;
2764 dst_use(&rth->dst, jiffies); 2755 dst_use(&rth->dst, jiffies);
2765 RT_CACHE_STAT_INC(out_hit); 2756 RT_CACHE_STAT_INC(out_hit);
2766 rcu_read_unlock_bh(); 2757 rcu_read_unlock_bh();
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index d999bf3b84e1..cae443563ec9 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -757,6 +757,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
757 if (!local->int_scan_req) 757 if (!local->int_scan_req)
758 return -ENOMEM; 758 return -ENOMEM;
759 759
760 for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
761 if (!local->hw.wiphy->bands[band])
762 continue;
763 local->int_scan_req->rates[band] = (u32) -1;
764 }
765
760 /* if low-level driver supports AP, we also support VLAN */ 766 /* if low-level driver supports AP, we also support VLAN */
761 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) { 767 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
762 hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN); 768 hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index eca0fad09709..d5230ecc784d 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1039,7 +1039,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1039 struct ieee80211_sub_if_data, 1039 struct ieee80211_sub_if_data,
1040 u.ap); 1040 u.ap);
1041 1041
1042 memset(&sta->sta.drv_priv, 0, hw->sta_data_size);
1043 WARN_ON(drv_sta_add(local, sdata, &sta->sta)); 1042 WARN_ON(drv_sta_add(local, sdata, &sta->sta));
1044 } 1043 }
1045 } 1044 }
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 77e926738014..3302c56f60d1 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -57,8 +57,17 @@
57#define REG_DBG_PRINT(args...) 57#define REG_DBG_PRINT(args...)
58#endif 58#endif
59 59
60static struct regulatory_request core_request_world = {
61 .initiator = NL80211_REGDOM_SET_BY_CORE,
62 .alpha2[0] = '0',
63 .alpha2[1] = '0',
64 .intersect = false,
65 .processed = true,
66 .country_ie_env = ENVIRON_ANY,
67};
68
60/* Receipt of information from last regulatory request */ 69/* Receipt of information from last regulatory request */
61static struct regulatory_request *last_request; 70static struct regulatory_request *last_request = &core_request_world;
62 71
63/* To trigger userspace events */ 72/* To trigger userspace events */
64static struct platform_device *reg_pdev; 73static struct platform_device *reg_pdev;
@@ -150,7 +159,7 @@ static char user_alpha2[2];
150module_param(ieee80211_regdom, charp, 0444); 159module_param(ieee80211_regdom, charp, 0444);
151MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain code"); 160MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain code");
152 161
153static void reset_regdomains(void) 162static void reset_regdomains(bool full_reset)
154{ 163{
155 /* avoid freeing static information or freeing something twice */ 164 /* avoid freeing static information or freeing something twice */
156 if (cfg80211_regdomain == cfg80211_world_regdom) 165 if (cfg80211_regdomain == cfg80211_world_regdom)
@@ -165,6 +174,13 @@ static void reset_regdomains(void)
165 174
166 cfg80211_world_regdom = &world_regdom; 175 cfg80211_world_regdom = &world_regdom;
167 cfg80211_regdomain = NULL; 176 cfg80211_regdomain = NULL;
177
178 if (!full_reset)
179 return;
180
181 if (last_request != &core_request_world)
182 kfree(last_request);
183 last_request = &core_request_world;
168} 184}
169 185
170/* 186/*
@@ -175,7 +191,7 @@ static void update_world_regdomain(const struct ieee80211_regdomain *rd)
175{ 191{
176 BUG_ON(!last_request); 192 BUG_ON(!last_request);
177 193
178 reset_regdomains(); 194 reset_regdomains(false);
179 195
180 cfg80211_world_regdom = rd; 196 cfg80211_world_regdom = rd;
181 cfg80211_regdomain = rd; 197 cfg80211_regdomain = rd;
@@ -1407,7 +1423,8 @@ static int __regulatory_hint(struct wiphy *wiphy,
1407 } 1423 }
1408 1424
1409new_request: 1425new_request:
1410 kfree(last_request); 1426 if (last_request != &core_request_world)
1427 kfree(last_request);
1411 1428
1412 last_request = pending_request; 1429 last_request = pending_request;
1413 last_request->intersect = intersect; 1430 last_request->intersect = intersect;
@@ -1577,9 +1594,6 @@ static int regulatory_hint_core(const char *alpha2)
1577{ 1594{
1578 struct regulatory_request *request; 1595 struct regulatory_request *request;
1579 1596
1580 kfree(last_request);
1581 last_request = NULL;
1582
1583 request = kzalloc(sizeof(struct regulatory_request), 1597 request = kzalloc(sizeof(struct regulatory_request),
1584 GFP_KERNEL); 1598 GFP_KERNEL);
1585 if (!request) 1599 if (!request)
@@ -1777,7 +1791,7 @@ static void restore_regulatory_settings(bool reset_user)
1777 mutex_lock(&cfg80211_mutex); 1791 mutex_lock(&cfg80211_mutex);
1778 mutex_lock(&reg_mutex); 1792 mutex_lock(&reg_mutex);
1779 1793
1780 reset_regdomains(); 1794 reset_regdomains(true);
1781 restore_alpha2(alpha2, reset_user); 1795 restore_alpha2(alpha2, reset_user);
1782 1796
1783 /* 1797 /*
@@ -2037,8 +2051,10 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2037 } 2051 }
2038 2052
2039 request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); 2053 request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
2040 if (!request_wiphy) { 2054 if (!request_wiphy &&
2041 reg_set_request_processed(); 2055 (last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER ||
2056 last_request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE)) {
2057 schedule_delayed_work(&reg_timeout, 0);
2042 return -ENODEV; 2058 return -ENODEV;
2043 } 2059 }
2044 2060
@@ -2046,7 +2062,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2046 int r; 2062 int r;
2047 2063
2048 if (last_request->initiator != NL80211_REGDOM_SET_BY_DRIVER) { 2064 if (last_request->initiator != NL80211_REGDOM_SET_BY_DRIVER) {
2049 reset_regdomains(); 2065 reset_regdomains(false);
2050 cfg80211_regdomain = rd; 2066 cfg80211_regdomain = rd;
2051 return 0; 2067 return 0;
2052 } 2068 }
@@ -2067,7 +2083,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2067 if (r) 2083 if (r)
2068 return r; 2084 return r;
2069 2085
2070 reset_regdomains(); 2086 reset_regdomains(false);
2071 cfg80211_regdomain = rd; 2087 cfg80211_regdomain = rd;
2072 return 0; 2088 return 0;
2073 } 2089 }
@@ -2092,7 +2108,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2092 2108
2093 rd = NULL; 2109 rd = NULL;
2094 2110
2095 reset_regdomains(); 2111 reset_regdomains(false);
2096 cfg80211_regdomain = intersected_rd; 2112 cfg80211_regdomain = intersected_rd;
2097 2113
2098 return 0; 2114 return 0;
@@ -2112,7 +2128,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2112 kfree(rd); 2128 kfree(rd);
2113 rd = NULL; 2129 rd = NULL;
2114 2130
2115 reset_regdomains(); 2131 reset_regdomains(false);
2116 cfg80211_regdomain = intersected_rd; 2132 cfg80211_regdomain = intersected_rd;
2117 2133
2118 return 0; 2134 return 0;
@@ -2265,11 +2281,8 @@ void /* __init_or_exit */ regulatory_exit(void)
2265 mutex_lock(&cfg80211_mutex); 2281 mutex_lock(&cfg80211_mutex);
2266 mutex_lock(&reg_mutex); 2282 mutex_lock(&reg_mutex);
2267 2283
2268 reset_regdomains(); 2284 reset_regdomains(true);
2269
2270 kfree(last_request);
2271 2285
2272 last_request = NULL;
2273 dev_set_uevent_suppress(&reg_pdev->dev, true); 2286 dev_set_uevent_suppress(&reg_pdev->dev, true);
2274 2287
2275 platform_device_unregister(reg_pdev); 2288 platform_device_unregister(reg_pdev);