aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/net/bpf_jit_comp.c8
-rw-r--r--drivers/net/ethernet/sfc/io.h7
-rw-r--r--drivers/net/ethernet/sfc/tx.c22
-rw-r--r--drivers/net/macvlan.c1
-rw-r--r--drivers/net/usb/qmi_wwan.c7
-rw-r--r--net/core/dev.c5
-rw-r--r--net/core/rtnetlink.c3
-rw-r--r--net/core/skbuff.c2
-rw-r--r--net/dns_resolver/dns_query.c4
-rw-r--r--net/ipv4/ip_tunnel.c16
-rw-r--r--net/ipv4/ip_vti.c8
-rw-r--r--net/ipv4/ipip.c4
-rw-r--r--net/ipv6/output_core.c1
-rw-r--r--net/ipv6/sit.c4
-rw-r--r--net/mac80211/iface.c1
15 files changed, 66 insertions, 27 deletions
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c
index c88cf147deed..892a102671ad 100644
--- a/arch/sparc/net/bpf_jit_comp.c
+++ b/arch/sparc/net/bpf_jit_comp.c
@@ -83,9 +83,9 @@ static void bpf_flush_icache(void *start_, void *end_)
83#define BNE (F2(0, 2) | CONDNE) 83#define BNE (F2(0, 2) | CONDNE)
84 84
85#ifdef CONFIG_SPARC64 85#ifdef CONFIG_SPARC64
86#define BNE_PTR (F2(0, 1) | CONDNE | (2 << 20)) 86#define BE_PTR (F2(0, 1) | CONDE | (2 << 20))
87#else 87#else
88#define BNE_PTR BNE 88#define BE_PTR BE
89#endif 89#endif
90 90
91#define SETHI(K, REG) \ 91#define SETHI(K, REG) \
@@ -592,7 +592,7 @@ void bpf_jit_compile(struct sk_filter *fp)
592 case BPF_ANC | SKF_AD_IFINDEX: 592 case BPF_ANC | SKF_AD_IFINDEX:
593 emit_skb_loadptr(dev, r_A); 593 emit_skb_loadptr(dev, r_A);
594 emit_cmpi(r_A, 0); 594 emit_cmpi(r_A, 0);
595 emit_branch(BNE_PTR, cleanup_addr + 4); 595 emit_branch(BE_PTR, cleanup_addr + 4);
596 emit_nop(); 596 emit_nop();
597 emit_load32(r_A, struct net_device, ifindex, r_A); 597 emit_load32(r_A, struct net_device, ifindex, r_A);
598 break; 598 break;
@@ -605,7 +605,7 @@ void bpf_jit_compile(struct sk_filter *fp)
605 case BPF_ANC | SKF_AD_HATYPE: 605 case BPF_ANC | SKF_AD_HATYPE:
606 emit_skb_loadptr(dev, r_A); 606 emit_skb_loadptr(dev, r_A);
607 emit_cmpi(r_A, 0); 607 emit_cmpi(r_A, 0);
608 emit_branch(BNE_PTR, cleanup_addr + 4); 608 emit_branch(BE_PTR, cleanup_addr + 4);
609 emit_nop(); 609 emit_nop();
610 emit_load16(r_A, struct net_device, type, r_A); 610 emit_load16(r_A, struct net_device, type, r_A);
611 break; 611 break;
diff --git a/drivers/net/ethernet/sfc/io.h b/drivers/net/ethernet/sfc/io.h
index 4d3f119b67b3..afb94aa2c15e 100644
--- a/drivers/net/ethernet/sfc/io.h
+++ b/drivers/net/ethernet/sfc/io.h
@@ -66,10 +66,17 @@
66#define EFX_USE_QWORD_IO 1 66#define EFX_USE_QWORD_IO 1
67#endif 67#endif
68 68
69/* Hardware issue requires that only 64-bit naturally aligned writes
70 * are seen by hardware. Its not strictly necessary to restrict to
71 * x86_64 arch, but done for safety since unusual write combining behaviour
72 * can break PIO.
73 */
74#ifdef CONFIG_X86_64
69/* PIO is a win only if write-combining is possible */ 75/* PIO is a win only if write-combining is possible */
70#ifdef ARCH_HAS_IOREMAP_WC 76#ifdef ARCH_HAS_IOREMAP_WC
71#define EFX_USE_PIO 1 77#define EFX_USE_PIO 1
72#endif 78#endif
79#endif
73 80
74#ifdef EFX_USE_QWORD_IO 81#ifdef EFX_USE_QWORD_IO
75static inline void _efx_writeq(struct efx_nic *efx, __le64 value, 82static inline void _efx_writeq(struct efx_nic *efx, __le64 value,
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index fa9475300411..ede8dcca0ff3 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -189,6 +189,18 @@ struct efx_short_copy_buffer {
189 u8 buf[L1_CACHE_BYTES]; 189 u8 buf[L1_CACHE_BYTES];
190}; 190};
191 191
192/* Copy in explicit 64-bit writes. */
193static void efx_memcpy_64(void __iomem *dest, void *src, size_t len)
194{
195 u64 *src64 = src;
196 u64 __iomem *dest64 = dest;
197 size_t l64 = len / 8;
198 size_t i;
199
200 for (i = 0; i < l64; i++)
201 writeq(src64[i], &dest64[i]);
202}
203
192/* Copy to PIO, respecting that writes to PIO buffers must be dword aligned. 204/* Copy to PIO, respecting that writes to PIO buffers must be dword aligned.
193 * Advances piobuf pointer. Leaves additional data in the copy buffer. 205 * Advances piobuf pointer. Leaves additional data in the copy buffer.
194 */ 206 */
@@ -198,7 +210,7 @@ static void efx_memcpy_toio_aligned(struct efx_nic *efx, u8 __iomem **piobuf,
198{ 210{
199 int block_len = len & ~(sizeof(copy_buf->buf) - 1); 211 int block_len = len & ~(sizeof(copy_buf->buf) - 1);
200 212
201 memcpy_toio(*piobuf, data, block_len); 213 efx_memcpy_64(*piobuf, data, block_len);
202 *piobuf += block_len; 214 *piobuf += block_len;
203 len -= block_len; 215 len -= block_len;
204 216
@@ -230,7 +242,7 @@ static void efx_memcpy_toio_aligned_cb(struct efx_nic *efx, u8 __iomem **piobuf,
230 if (copy_buf->used < sizeof(copy_buf->buf)) 242 if (copy_buf->used < sizeof(copy_buf->buf))
231 return; 243 return;
232 244
233 memcpy_toio(*piobuf, copy_buf->buf, sizeof(copy_buf->buf)); 245 efx_memcpy_64(*piobuf, copy_buf->buf, sizeof(copy_buf->buf));
234 *piobuf += sizeof(copy_buf->buf); 246 *piobuf += sizeof(copy_buf->buf);
235 data += copy_to_buf; 247 data += copy_to_buf;
236 len -= copy_to_buf; 248 len -= copy_to_buf;
@@ -245,7 +257,7 @@ static void efx_flush_copy_buffer(struct efx_nic *efx, u8 __iomem *piobuf,
245{ 257{
246 /* if there's anything in it, write the whole buffer, including junk */ 258 /* if there's anything in it, write the whole buffer, including junk */
247 if (copy_buf->used) 259 if (copy_buf->used)
248 memcpy_toio(piobuf, copy_buf->buf, sizeof(copy_buf->buf)); 260 efx_memcpy_64(piobuf, copy_buf->buf, sizeof(copy_buf->buf));
249} 261}
250 262
251/* Traverse skb structure and copy fragments in to PIO buffer. 263/* Traverse skb structure and copy fragments in to PIO buffer.
@@ -304,8 +316,8 @@ efx_enqueue_skb_pio(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
304 */ 316 */
305 BUILD_BUG_ON(L1_CACHE_BYTES > 317 BUILD_BUG_ON(L1_CACHE_BYTES >
306 SKB_DATA_ALIGN(sizeof(struct skb_shared_info))); 318 SKB_DATA_ALIGN(sizeof(struct skb_shared_info)));
307 memcpy_toio(tx_queue->piobuf, skb->data, 319 efx_memcpy_64(tx_queue->piobuf, skb->data,
308 ALIGN(skb->len, L1_CACHE_BYTES)); 320 ALIGN(skb->len, L1_CACHE_BYTES));
309 } 321 }
310 322
311 EFX_POPULATE_QWORD_5(buffer->option, 323 EFX_POPULATE_QWORD_5(buffer->option,
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 453d55a02492..958df383068a 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -1204,7 +1204,6 @@ static int macvlan_device_event(struct notifier_block *unused,
1204 list_for_each_entry_safe(vlan, next, &port->vlans, list) 1204 list_for_each_entry_safe(vlan, next, &port->vlans, list)
1205 vlan->dev->rtnl_link_ops->dellink(vlan->dev, &list_kill); 1205 vlan->dev->rtnl_link_ops->dellink(vlan->dev, &list_kill);
1206 unregister_netdevice_many(&list_kill); 1206 unregister_netdevice_many(&list_kill);
1207 list_del(&list_kill);
1208 break; 1207 break;
1209 case NETDEV_PRE_TYPE_CHANGE: 1208 case NETDEV_PRE_TYPE_CHANGE:
1210 /* Forbid underlaying device to change its type. */ 1209 /* Forbid underlaying device to change its type. */
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index dc4bf06948c7..cf62d7e8329f 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -763,7 +763,12 @@ static const struct usb_device_id products[] = {
763 {QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */ 763 {QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */
764 {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */ 764 {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
765 {QMI_FIXED_INTF(0x1bc7, 0x1201, 2)}, /* Telit LE920 */ 765 {QMI_FIXED_INTF(0x1bc7, 0x1201, 2)}, /* Telit LE920 */
766 {QMI_FIXED_INTF(0x0b3c, 0xc005, 6)}, /* Olivetti Olicard 200 */ 766 {QMI_FIXED_INTF(0x0b3c, 0xc000, 4)}, /* Olivetti Olicard 100 */
767 {QMI_FIXED_INTF(0x0b3c, 0xc001, 4)}, /* Olivetti Olicard 120 */
768 {QMI_FIXED_INTF(0x0b3c, 0xc002, 4)}, /* Olivetti Olicard 140 */
769 {QMI_FIXED_INTF(0x0b3c, 0xc004, 6)}, /* Olivetti Olicard 155 */
770 {QMI_FIXED_INTF(0x0b3c, 0xc005, 6)}, /* Olivetti Olicard 200 */
771 {QMI_FIXED_INTF(0x0b3c, 0xc00a, 6)}, /* Olivetti Olicard 160 */
767 {QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */ 772 {QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */
768 {QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */ 773 {QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */
769 {QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */ 774 {QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */
diff --git a/net/core/dev.c b/net/core/dev.c
index ed8fe62d41af..ab6c491bd2d3 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6634,6 +6634,9 @@ EXPORT_SYMBOL(unregister_netdevice_queue);
6634/** 6634/**
6635 * unregister_netdevice_many - unregister many devices 6635 * unregister_netdevice_many - unregister many devices
6636 * @head: list of devices 6636 * @head: list of devices
6637 *
6638 * Note: As most callers use a stack allocated list_head,
6639 * we force a list_del() to make sure stack wont be corrupted later.
6637 */ 6640 */
6638void unregister_netdevice_many(struct list_head *head) 6641void unregister_netdevice_many(struct list_head *head)
6639{ 6642{
@@ -6643,6 +6646,7 @@ void unregister_netdevice_many(struct list_head *head)
6643 rollback_registered_many(head); 6646 rollback_registered_many(head);
6644 list_for_each_entry(dev, head, unreg_list) 6647 list_for_each_entry(dev, head, unreg_list)
6645 net_set_todo(dev); 6648 net_set_todo(dev);
6649 list_del(head);
6646 } 6650 }
6647} 6651}
6648EXPORT_SYMBOL(unregister_netdevice_many); 6652EXPORT_SYMBOL(unregister_netdevice_many);
@@ -7098,7 +7102,6 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list)
7098 } 7102 }
7099 } 7103 }
7100 unregister_netdevice_many(&dev_kill_list); 7104 unregister_netdevice_many(&dev_kill_list);
7101 list_del(&dev_kill_list);
7102 rtnl_unlock(); 7105 rtnl_unlock();
7103} 7106}
7104 7107
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 741b22c62acf..233b5ae87583 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1216,6 +1216,8 @@ static const struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = {
1216 .len = sizeof(struct ifla_vf_spoofchk) }, 1216 .len = sizeof(struct ifla_vf_spoofchk) },
1217 [IFLA_VF_RATE] = { .type = NLA_BINARY, 1217 [IFLA_VF_RATE] = { .type = NLA_BINARY,
1218 .len = sizeof(struct ifla_vf_rate) }, 1218 .len = sizeof(struct ifla_vf_rate) },
1219 [IFLA_VF_LINK_STATE] = { .type = NLA_BINARY,
1220 .len = sizeof(struct ifla_vf_link_state) },
1219}; 1221};
1220 1222
1221static const struct nla_policy ifla_port_policy[IFLA_PORT_MAX+1] = { 1223static const struct nla_policy ifla_port_policy[IFLA_PORT_MAX+1] = {
@@ -1770,7 +1772,6 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
1770 1772
1771 ops->dellink(dev, &list_kill); 1773 ops->dellink(dev, &list_kill);
1772 unregister_netdevice_many(&list_kill); 1774 unregister_netdevice_many(&list_kill);
1773 list_del(&list_kill);
1774 return 0; 1775 return 0;
1775} 1776}
1776 1777
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index b9e85e6cb26a..bf92824af3f7 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2885,6 +2885,7 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
2885 int pos; 2885 int pos;
2886 int dummy; 2886 int dummy;
2887 2887
2888 __skb_push(head_skb, doffset);
2888 proto = skb_network_protocol(head_skb, &dummy); 2889 proto = skb_network_protocol(head_skb, &dummy);
2889 if (unlikely(!proto)) 2890 if (unlikely(!proto))
2890 return ERR_PTR(-EINVAL); 2891 return ERR_PTR(-EINVAL);
@@ -2892,7 +2893,6 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
2892 csum = !head_skb->encap_hdr_csum && 2893 csum = !head_skb->encap_hdr_csum &&
2893 !!can_checksum_protocol(features, proto); 2894 !!can_checksum_protocol(features, proto);
2894 2895
2895 __skb_push(head_skb, doffset);
2896 headroom = skb_headroom(head_skb); 2896 headroom = skb_headroom(head_skb);
2897 pos = skb_headlen(head_skb); 2897 pos = skb_headlen(head_skb);
2898 2898
diff --git a/net/dns_resolver/dns_query.c b/net/dns_resolver/dns_query.c
index 5b499589613f..9acec61f5433 100644
--- a/net/dns_resolver/dns_query.c
+++ b/net/dns_resolver/dns_query.c
@@ -149,7 +149,9 @@ int dns_query(const char *type, const char *name, size_t namelen,
149 if (!*_result) 149 if (!*_result)
150 goto put; 150 goto put;
151 151
152 memcpy(*_result, upayload->data, len + 1); 152 memcpy(*_result, upayload->data, len);
153 *_result[len] = '\0';
154
153 if (_expiry) 155 if (_expiry)
154 *_expiry = rkey->expiry; 156 *_expiry = rkey->expiry;
155 157
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 86a00bd6684c..097b3e7c1e8f 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -268,6 +268,7 @@ static struct ip_tunnel *ip_tunnel_find(struct ip_tunnel_net *itn,
268 __be32 remote = parms->iph.daddr; 268 __be32 remote = parms->iph.daddr;
269 __be32 local = parms->iph.saddr; 269 __be32 local = parms->iph.saddr;
270 __be32 key = parms->i_key; 270 __be32 key = parms->i_key;
271 __be16 flags = parms->i_flags;
271 int link = parms->link; 272 int link = parms->link;
272 struct ip_tunnel *t = NULL; 273 struct ip_tunnel *t = NULL;
273 struct hlist_head *head = ip_bucket(itn, parms); 274 struct hlist_head *head = ip_bucket(itn, parms);
@@ -275,9 +276,9 @@ static struct ip_tunnel *ip_tunnel_find(struct ip_tunnel_net *itn,
275 hlist_for_each_entry_rcu(t, head, hash_node) { 276 hlist_for_each_entry_rcu(t, head, hash_node) {
276 if (local == t->parms.iph.saddr && 277 if (local == t->parms.iph.saddr &&
277 remote == t->parms.iph.daddr && 278 remote == t->parms.iph.daddr &&
278 key == t->parms.i_key &&
279 link == t->parms.link && 279 link == t->parms.link &&
280 type == t->dev->type) 280 type == t->dev->type &&
281 ip_tunnel_key_match(&t->parms, flags, key))
281 break; 282 break;
282 } 283 }
283 return t; 284 return t;
@@ -667,6 +668,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
667 dev->needed_headroom = max_headroom; 668 dev->needed_headroom = max_headroom;
668 669
669 if (skb_cow_head(skb, dev->needed_headroom)) { 670 if (skb_cow_head(skb, dev->needed_headroom)) {
671 ip_rt_put(rt);
670 dev->stats.tx_dropped++; 672 dev->stats.tx_dropped++;
671 kfree_skb(skb); 673 kfree_skb(skb);
672 return; 674 return;
@@ -746,10 +748,12 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
746 goto done; 748 goto done;
747 if (p->iph.ttl) 749 if (p->iph.ttl)
748 p->iph.frag_off |= htons(IP_DF); 750 p->iph.frag_off |= htons(IP_DF);
749 if (!(p->i_flags&TUNNEL_KEY)) 751 if (!(p->i_flags & VTI_ISVTI)) {
750 p->i_key = 0; 752 if (!(p->i_flags & TUNNEL_KEY))
751 if (!(p->o_flags&TUNNEL_KEY)) 753 p->i_key = 0;
752 p->o_key = 0; 754 if (!(p->o_flags & TUNNEL_KEY))
755 p->o_key = 0;
756 }
753 757
754 t = ip_tunnel_find(itn, p, itn->fb_tunnel_dev->type); 758 t = ip_tunnel_find(itn, p, itn->fb_tunnel_dev->type);
755 759
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 13ef00f1e17b..b8960f3527f3 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -313,7 +313,13 @@ vti_tunnel_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
313 return -EINVAL; 313 return -EINVAL;
314 } 314 }
315 315
316 p.i_flags |= VTI_ISVTI; 316 if (!(p.i_flags & GRE_KEY))
317 p.i_key = 0;
318 if (!(p.o_flags & GRE_KEY))
319 p.o_key = 0;
320
321 p.i_flags = VTI_ISVTI;
322
317 err = ip_tunnel_ioctl(dev, &p, cmd); 323 err = ip_tunnel_ioctl(dev, &p, cmd);
318 if (err) 324 if (err)
319 return err; 325 return err;
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 4bc508f0db90..62eaa005e146 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -149,13 +149,13 @@ static int ipip_err(struct sk_buff *skb, u32 info)
149 149
150 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { 150 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
151 ipv4_update_pmtu(skb, dev_net(skb->dev), info, 151 ipv4_update_pmtu(skb, dev_net(skb->dev), info,
152 t->dev->ifindex, 0, IPPROTO_IPIP, 0); 152 t->parms.link, 0, IPPROTO_IPIP, 0);
153 err = 0; 153 err = 0;
154 goto out; 154 goto out;
155 } 155 }
156 156
157 if (type == ICMP_REDIRECT) { 157 if (type == ICMP_REDIRECT) {
158 ipv4_redirect(skb, dev_net(skb->dev), t->dev->ifindex, 0, 158 ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 0,
159 IPPROTO_IPIP, 0); 159 IPPROTO_IPIP, 0);
160 err = 0; 160 err = 0;
161 goto out; 161 goto out;
diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c
index ffa029305a09..5ec867e4a8b7 100644
--- a/net/ipv6/output_core.c
+++ b/net/ipv6/output_core.c
@@ -78,6 +78,7 @@ int __ip6_local_out(struct sk_buff *skb)
78 if (len > IPV6_MAXPLEN) 78 if (len > IPV6_MAXPLEN)
79 len = 0; 79 len = 0;
80 ipv6_hdr(skb)->payload_len = htons(len); 80 ipv6_hdr(skb)->payload_len = htons(len);
81 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
81 82
82 return nf_hook(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, 83 return nf_hook(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL,
83 skb_dst(skb)->dev, dst_output); 84 skb_dst(skb)->dev, dst_output);
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index f4380041f5e7..4f408176dc64 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -560,12 +560,12 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
560 560
561 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { 561 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
562 ipv4_update_pmtu(skb, dev_net(skb->dev), info, 562 ipv4_update_pmtu(skb, dev_net(skb->dev), info,
563 t->dev->ifindex, 0, IPPROTO_IPV6, 0); 563 t->parms.link, 0, IPPROTO_IPV6, 0);
564 err = 0; 564 err = 0;
565 goto out; 565 goto out;
566 } 566 }
567 if (type == ICMP_REDIRECT) { 567 if (type == ICMP_REDIRECT) {
568 ipv4_redirect(skb, dev_net(skb->dev), t->dev->ifindex, 0, 568 ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 0,
569 IPPROTO_IPV6, 0); 569 IPPROTO_IPV6, 0);
570 err = 0; 570 err = 0;
571 goto out; 571 goto out;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 81a8e2a0b6aa..388b863e821c 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1780,7 +1780,6 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
1780 } 1780 }
1781 mutex_unlock(&local->iflist_mtx); 1781 mutex_unlock(&local->iflist_mtx);
1782 unregister_netdevice_many(&unreg_list); 1782 unregister_netdevice_many(&unreg_list);
1783 list_del(&unreg_list);
1784 1783
1785 list_for_each_entry_safe(sdata, tmp, &wdev_list, list) { 1784 list_for_each_entry_safe(sdata, tmp, &wdev_list, list) {
1786 list_del(&sdata->list); 1785 list_del(&sdata->list);