diff options
-rw-r--r-- | drivers/net/Makefile | 6 | ||||
-rw-r--r-- | drivers/net/bonding/bond_3ad.h | 10 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 6 | ||||
-rw-r--r-- | drivers/net/hydra.c | 14 | ||||
-rw-r--r-- | drivers/net/ne-h8300.c | 16 | ||||
-rw-r--r-- | drivers/net/sfc/mcdi.c | 49 | ||||
-rw-r--r-- | drivers/net/sfc/nic.c | 7 | ||||
-rw-r--r-- | drivers/net/sfc/nic.h | 2 | ||||
-rw-r--r-- | drivers/net/sfc/siena.c | 25 | ||||
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_ethtool.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-core.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-dev.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 6 | ||||
-rw-r--r-- | drivers/net/zorro8390.c | 12 | ||||
-rw-r--r-- | include/net/inet_ecn.h | 16 | ||||
-rw-r--r-- | include/net/llc_pdu.h | 8 | ||||
-rw-r--r-- | net/bridge/br_netfilter.c | 2 | ||||
-rw-r--r-- | net/core/dev.c | 26 | ||||
-rw-r--r-- | net/core/ethtool.c | 2 | ||||
-rw-r--r-- | net/mac80211/tx.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_app.c | 2 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_conn.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 6 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 16 | ||||
-rw-r--r-- | net/socket.c | 6 |
26 files changed, 173 insertions, 94 deletions
diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 01b604ad155e..e5a7375685ad 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile | |||
@@ -144,7 +144,7 @@ obj-$(CONFIG_NE3210) += ne3210.o 8390.o | |||
144 | obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o | 144 | obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o |
145 | obj-$(CONFIG_B44) += b44.o | 145 | obj-$(CONFIG_B44) += b44.o |
146 | obj-$(CONFIG_FORCEDETH) += forcedeth.o | 146 | obj-$(CONFIG_FORCEDETH) += forcedeth.o |
147 | obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o | 147 | obj-$(CONFIG_NE_H8300) += ne-h8300.o |
148 | obj-$(CONFIG_AX88796) += ax88796.o | 148 | obj-$(CONFIG_AX88796) += ax88796.o |
149 | obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o | 149 | obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o |
150 | obj-$(CONFIG_FTMAC100) += ftmac100.o | 150 | obj-$(CONFIG_FTMAC100) += ftmac100.o |
@@ -219,7 +219,7 @@ obj-$(CONFIG_SC92031) += sc92031.o | |||
219 | obj-$(CONFIG_LP486E) += lp486e.o | 219 | obj-$(CONFIG_LP486E) += lp486e.o |
220 | 220 | ||
221 | obj-$(CONFIG_ETH16I) += eth16i.o | 221 | obj-$(CONFIG_ETH16I) += eth16i.o |
222 | obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o | 222 | obj-$(CONFIG_ZORRO8390) += zorro8390.o |
223 | obj-$(CONFIG_HPLANCE) += hplance.o 7990.o | 223 | obj-$(CONFIG_HPLANCE) += hplance.o 7990.o |
224 | obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o | 224 | obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o |
225 | obj-$(CONFIG_EQUALIZER) += eql.o | 225 | obj-$(CONFIG_EQUALIZER) += eql.o |
@@ -231,7 +231,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o | |||
231 | obj-$(CONFIG_DECLANCE) += declance.o | 231 | obj-$(CONFIG_DECLANCE) += declance.o |
232 | obj-$(CONFIG_ATARILANCE) += atarilance.o | 232 | obj-$(CONFIG_ATARILANCE) += atarilance.o |
233 | obj-$(CONFIG_A2065) += a2065.o | 233 | obj-$(CONFIG_A2065) += a2065.o |
234 | obj-$(CONFIG_HYDRA) += hydra.o 8390.o | 234 | obj-$(CONFIG_HYDRA) += hydra.o |
235 | obj-$(CONFIG_ARIADNE) += ariadne.o | 235 | obj-$(CONFIG_ARIADNE) += ariadne.o |
236 | obj-$(CONFIG_CS89x0) += cs89x0.o | 236 | obj-$(CONFIG_CS89x0) += cs89x0.o |
237 | obj-$(CONFIG_MACSONIC) += macsonic.o | 237 | obj-$(CONFIG_MACSONIC) += macsonic.o |
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h index 291dbd4d1f3d..0ee3f1632c46 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/drivers/net/bonding/bond_3ad.h | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | typedef struct mac_addr { | 40 | typedef struct mac_addr { |
41 | u8 mac_addr_value[ETH_ALEN]; | 41 | u8 mac_addr_value[ETH_ALEN]; |
42 | } mac_addr_t; | 42 | } __packed mac_addr_t; |
43 | 43 | ||
44 | enum { | 44 | enum { |
45 | BOND_AD_STABLE = 0, | 45 | BOND_AD_STABLE = 0, |
@@ -134,12 +134,12 @@ typedef struct lacpdu { | |||
134 | u8 tlv_type_terminator; // = terminator | 134 | u8 tlv_type_terminator; // = terminator |
135 | u8 terminator_length; // = 0 | 135 | u8 terminator_length; // = 0 |
136 | u8 reserved_50[50]; // = 0 | 136 | u8 reserved_50[50]; // = 0 |
137 | } lacpdu_t; | 137 | } __packed lacpdu_t; |
138 | 138 | ||
139 | typedef struct lacpdu_header { | 139 | typedef struct lacpdu_header { |
140 | struct ethhdr hdr; | 140 | struct ethhdr hdr; |
141 | struct lacpdu lacpdu; | 141 | struct lacpdu lacpdu; |
142 | } lacpdu_header_t; | 142 | } __packed lacpdu_header_t; |
143 | 143 | ||
144 | // Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) | 144 | // Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) |
145 | typedef struct bond_marker { | 145 | typedef struct bond_marker { |
@@ -155,12 +155,12 @@ typedef struct bond_marker { | |||
155 | u8 tlv_type_terminator; // = 0x00 | 155 | u8 tlv_type_terminator; // = 0x00 |
156 | u8 terminator_length; // = 0x00 | 156 | u8 terminator_length; // = 0x00 |
157 | u8 reserved_90[90]; // = 0 | 157 | u8 reserved_90[90]; // = 0 |
158 | } bond_marker_t; | 158 | } __packed bond_marker_t; |
159 | 159 | ||
160 | typedef struct bond_marker_header { | 160 | typedef struct bond_marker_header { |
161 | struct ethhdr hdr; | 161 | struct ethhdr hdr; |
162 | struct bond_marker marker; | 162 | struct bond_marker marker; |
163 | } bond_marker_header_t; | 163 | } __packed bond_marker_header_t; |
164 | 164 | ||
165 | #pragma pack() | 165 | #pragma pack() |
166 | 166 | ||
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index a004bbcf72e6..ba763e0481e3 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2688,9 +2688,6 @@ static int ehea_open(struct net_device *dev) | |||
2688 | netif_start_queue(dev); | 2688 | netif_start_queue(dev); |
2689 | } | 2689 | } |
2690 | 2690 | ||
2691 | init_waitqueue_head(&port->swqe_avail_wq); | ||
2692 | init_waitqueue_head(&port->restart_wq); | ||
2693 | |||
2694 | mutex_unlock(&port->port_lock); | 2691 | mutex_unlock(&port->port_lock); |
2695 | 2692 | ||
2696 | return ret; | 2693 | return ret; |
@@ -3278,6 +3275,9 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, | |||
3278 | 3275 | ||
3279 | INIT_WORK(&port->reset_task, ehea_reset_port); | 3276 | INIT_WORK(&port->reset_task, ehea_reset_port); |
3280 | 3277 | ||
3278 | init_waitqueue_head(&port->swqe_avail_wq); | ||
3279 | init_waitqueue_head(&port->restart_wq); | ||
3280 | |||
3281 | ret = register_netdev(dev); | 3281 | ret = register_netdev(dev); |
3282 | if (ret) { | 3282 | if (ret) { |
3283 | pr_err("register_netdev failed. ret=%d\n", ret); | 3283 | pr_err("register_netdev failed. ret=%d\n", ret); |
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c index c5ef62ceb840..1cd481c04202 100644 --- a/drivers/net/hydra.c +++ b/drivers/net/hydra.c | |||
@@ -98,15 +98,15 @@ static const struct net_device_ops hydra_netdev_ops = { | |||
98 | .ndo_open = hydra_open, | 98 | .ndo_open = hydra_open, |
99 | .ndo_stop = hydra_close, | 99 | .ndo_stop = hydra_close, |
100 | 100 | ||
101 | .ndo_start_xmit = ei_start_xmit, | 101 | .ndo_start_xmit = __ei_start_xmit, |
102 | .ndo_tx_timeout = ei_tx_timeout, | 102 | .ndo_tx_timeout = __ei_tx_timeout, |
103 | .ndo_get_stats = ei_get_stats, | 103 | .ndo_get_stats = __ei_get_stats, |
104 | .ndo_set_multicast_list = ei_set_multicast_list, | 104 | .ndo_set_multicast_list = __ei_set_multicast_list, |
105 | .ndo_validate_addr = eth_validate_addr, | 105 | .ndo_validate_addr = eth_validate_addr, |
106 | .ndo_set_mac_address = eth_mac_addr, | 106 | .ndo_set_mac_address = eth_mac_addr, |
107 | .ndo_change_mtu = eth_change_mtu, | 107 | .ndo_change_mtu = eth_change_mtu, |
108 | #ifdef CONFIG_NET_POLL_CONTROLLER | 108 | #ifdef CONFIG_NET_POLL_CONTROLLER |
109 | .ndo_poll_controller = ei_poll, | 109 | .ndo_poll_controller = __ei_poll, |
110 | #endif | 110 | #endif |
111 | }; | 111 | }; |
112 | 112 | ||
@@ -125,7 +125,7 @@ static int __devinit hydra_init(struct zorro_dev *z) | |||
125 | 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, | 125 | 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | dev = alloc_ei_netdev(); | 128 | dev = ____alloc_ei_netdev(0); |
129 | if (!dev) | 129 | if (!dev) |
130 | return -ENOMEM; | 130 | return -ENOMEM; |
131 | 131 | ||
diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c index 30be8c634ebd..7298a34bc795 100644 --- a/drivers/net/ne-h8300.c +++ b/drivers/net/ne-h8300.c | |||
@@ -167,7 +167,7 @@ static void cleanup_card(struct net_device *dev) | |||
167 | #ifndef MODULE | 167 | #ifndef MODULE |
168 | struct net_device * __init ne_probe(int unit) | 168 | struct net_device * __init ne_probe(int unit) |
169 | { | 169 | { |
170 | struct net_device *dev = alloc_ei_netdev(); | 170 | struct net_device *dev = ____alloc_ei_netdev(0); |
171 | int err; | 171 | int err; |
172 | 172 | ||
173 | if (!dev) | 173 | if (!dev) |
@@ -197,15 +197,15 @@ static const struct net_device_ops ne_netdev_ops = { | |||
197 | .ndo_open = ne_open, | 197 | .ndo_open = ne_open, |
198 | .ndo_stop = ne_close, | 198 | .ndo_stop = ne_close, |
199 | 199 | ||
200 | .ndo_start_xmit = ei_start_xmit, | 200 | .ndo_start_xmit = __ei_start_xmit, |
201 | .ndo_tx_timeout = ei_tx_timeout, | 201 | .ndo_tx_timeout = __ei_tx_timeout, |
202 | .ndo_get_stats = ei_get_stats, | 202 | .ndo_get_stats = __ei_get_stats, |
203 | .ndo_set_multicast_list = ei_set_multicast_list, | 203 | .ndo_set_multicast_list = __ei_set_multicast_list, |
204 | .ndo_validate_addr = eth_validate_addr, | 204 | .ndo_validate_addr = eth_validate_addr, |
205 | .ndo_set_mac_address = eth_mac_addr, | 205 | .ndo_set_mac_address = eth_mac_addr, |
206 | .ndo_change_mtu = eth_change_mtu, | 206 | .ndo_change_mtu = eth_change_mtu, |
207 | #ifdef CONFIG_NET_POLL_CONTROLLER | 207 | #ifdef CONFIG_NET_POLL_CONTROLLER |
208 | .ndo_poll_controller = ei_poll, | 208 | .ndo_poll_controller = __ei_poll, |
209 | #endif | 209 | #endif |
210 | }; | 210 | }; |
211 | 211 | ||
@@ -637,7 +637,7 @@ int init_module(void) | |||
637 | int err; | 637 | int err; |
638 | 638 | ||
639 | for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { | 639 | for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { |
640 | struct net_device *dev = alloc_ei_netdev(); | 640 | struct net_device *dev = ____alloc_ei_netdev(0); |
641 | if (!dev) | 641 | if (!dev) |
642 | break; | 642 | break; |
643 | if (io[this_dev]) { | 643 | if (io[this_dev]) { |
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index d98479030ef2..3dd45ed61f0a 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c | |||
@@ -50,6 +50,20 @@ static inline struct efx_mcdi_iface *efx_mcdi(struct efx_nic *efx) | |||
50 | return &nic_data->mcdi; | 50 | return &nic_data->mcdi; |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline void | ||
54 | efx_mcdi_readd(struct efx_nic *efx, efx_dword_t *value, unsigned reg) | ||
55 | { | ||
56 | struct siena_nic_data *nic_data = efx->nic_data; | ||
57 | value->u32[0] = (__force __le32)__raw_readl(nic_data->mcdi_smem + reg); | ||
58 | } | ||
59 | |||
60 | static inline void | ||
61 | efx_mcdi_writed(struct efx_nic *efx, const efx_dword_t *value, unsigned reg) | ||
62 | { | ||
63 | struct siena_nic_data *nic_data = efx->nic_data; | ||
64 | __raw_writel((__force u32)value->u32[0], nic_data->mcdi_smem + reg); | ||
65 | } | ||
66 | |||
53 | void efx_mcdi_init(struct efx_nic *efx) | 67 | void efx_mcdi_init(struct efx_nic *efx) |
54 | { | 68 | { |
55 | struct efx_mcdi_iface *mcdi; | 69 | struct efx_mcdi_iface *mcdi; |
@@ -70,8 +84,8 @@ static void efx_mcdi_copyin(struct efx_nic *efx, unsigned cmd, | |||
70 | const u8 *inbuf, size_t inlen) | 84 | const u8 *inbuf, size_t inlen) |
71 | { | 85 | { |
72 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 86 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
73 | unsigned pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 87 | unsigned pdu = MCDI_PDU(efx); |
74 | unsigned doorbell = FR_CZ_MC_TREG_SMEM + MCDI_DOORBELL(efx); | 88 | unsigned doorbell = MCDI_DOORBELL(efx); |
75 | unsigned int i; | 89 | unsigned int i; |
76 | efx_dword_t hdr; | 90 | efx_dword_t hdr; |
77 | u32 xflags, seqno; | 91 | u32 xflags, seqno; |
@@ -92,30 +106,28 @@ static void efx_mcdi_copyin(struct efx_nic *efx, unsigned cmd, | |||
92 | MCDI_HEADER_SEQ, seqno, | 106 | MCDI_HEADER_SEQ, seqno, |
93 | MCDI_HEADER_XFLAGS, xflags); | 107 | MCDI_HEADER_XFLAGS, xflags); |
94 | 108 | ||
95 | efx_writed(efx, &hdr, pdu); | 109 | efx_mcdi_writed(efx, &hdr, pdu); |
96 | 110 | ||
97 | for (i = 0; i < inlen; i += 4) { | 111 | for (i = 0; i < inlen; i += 4) |
98 | _efx_writed(efx, *((__le32 *)(inbuf + i)), pdu + 4 + i); | 112 | efx_mcdi_writed(efx, (const efx_dword_t *)(inbuf + i), |
99 | /* use wmb() within loop to inhibit write combining */ | 113 | pdu + 4 + i); |
100 | wmb(); | ||
101 | } | ||
102 | 114 | ||
103 | /* ring the doorbell with a distinctive value */ | 115 | /* ring the doorbell with a distinctive value */ |
104 | _efx_writed(efx, (__force __le32) 0x45789abc, doorbell); | 116 | EFX_POPULATE_DWORD_1(hdr, EFX_DWORD_0, 0x45789abc); |
105 | wmb(); | 117 | efx_mcdi_writed(efx, &hdr, doorbell); |
106 | } | 118 | } |
107 | 119 | ||
108 | static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen) | 120 | static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen) |
109 | { | 121 | { |
110 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 122 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
111 | unsigned int pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 123 | unsigned int pdu = MCDI_PDU(efx); |
112 | int i; | 124 | int i; |
113 | 125 | ||
114 | BUG_ON(atomic_read(&mcdi->state) == MCDI_STATE_QUIESCENT); | 126 | BUG_ON(atomic_read(&mcdi->state) == MCDI_STATE_QUIESCENT); |
115 | BUG_ON(outlen & 3 || outlen >= 0x100); | 127 | BUG_ON(outlen & 3 || outlen >= 0x100); |
116 | 128 | ||
117 | for (i = 0; i < outlen; i += 4) | 129 | for (i = 0; i < outlen; i += 4) |
118 | *((__le32 *)(outbuf + i)) = _efx_readd(efx, pdu + 4 + i); | 130 | efx_mcdi_readd(efx, (efx_dword_t *)(outbuf + i), pdu + 4 + i); |
119 | } | 131 | } |
120 | 132 | ||
121 | static int efx_mcdi_poll(struct efx_nic *efx) | 133 | static int efx_mcdi_poll(struct efx_nic *efx) |
@@ -123,7 +135,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
123 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); | 135 | struct efx_mcdi_iface *mcdi = efx_mcdi(efx); |
124 | unsigned int time, finish; | 136 | unsigned int time, finish; |
125 | unsigned int respseq, respcmd, error; | 137 | unsigned int respseq, respcmd, error; |
126 | unsigned int pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); | 138 | unsigned int pdu = MCDI_PDU(efx); |
127 | unsigned int rc, spins; | 139 | unsigned int rc, spins; |
128 | efx_dword_t reg; | 140 | efx_dword_t reg; |
129 | 141 | ||
@@ -149,8 +161,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
149 | 161 | ||
150 | time = get_seconds(); | 162 | time = get_seconds(); |
151 | 163 | ||
152 | rmb(); | 164 | efx_mcdi_readd(efx, ®, pdu); |
153 | efx_readd(efx, ®, pdu); | ||
154 | 165 | ||
155 | /* All 1's indicates that shared memory is in reset (and is | 166 | /* All 1's indicates that shared memory is in reset (and is |
156 | * not a valid header). Wait for it to come out reset before | 167 | * not a valid header). Wait for it to come out reset before |
@@ -177,7 +188,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
177 | respseq, mcdi->seqno); | 188 | respseq, mcdi->seqno); |
178 | rc = EIO; | 189 | rc = EIO; |
179 | } else if (error) { | 190 | } else if (error) { |
180 | efx_readd(efx, ®, pdu + 4); | 191 | efx_mcdi_readd(efx, ®, pdu + 4); |
181 | switch (EFX_DWORD_FIELD(reg, EFX_DWORD_0)) { | 192 | switch (EFX_DWORD_FIELD(reg, EFX_DWORD_0)) { |
182 | #define TRANSLATE_ERROR(name) \ | 193 | #define TRANSLATE_ERROR(name) \ |
183 | case MC_CMD_ERR_ ## name: \ | 194 | case MC_CMD_ERR_ ## name: \ |
@@ -211,21 +222,21 @@ out: | |||
211 | /* Test and clear MC-rebooted flag for this port/function */ | 222 | /* Test and clear MC-rebooted flag for this port/function */ |
212 | int efx_mcdi_poll_reboot(struct efx_nic *efx) | 223 | int efx_mcdi_poll_reboot(struct efx_nic *efx) |
213 | { | 224 | { |
214 | unsigned int addr = FR_CZ_MC_TREG_SMEM + MCDI_REBOOT_FLAG(efx); | 225 | unsigned int addr = MCDI_REBOOT_FLAG(efx); |
215 | efx_dword_t reg; | 226 | efx_dword_t reg; |
216 | uint32_t value; | 227 | uint32_t value; |
217 | 228 | ||
218 | if (efx_nic_rev(efx) < EFX_REV_SIENA_A0) | 229 | if (efx_nic_rev(efx) < EFX_REV_SIENA_A0) |
219 | return false; | 230 | return false; |
220 | 231 | ||
221 | efx_readd(efx, ®, addr); | 232 | efx_mcdi_readd(efx, ®, addr); |
222 | value = EFX_DWORD_FIELD(reg, EFX_DWORD_0); | 233 | value = EFX_DWORD_FIELD(reg, EFX_DWORD_0); |
223 | 234 | ||
224 | if (value == 0) | 235 | if (value == 0) |
225 | return 0; | 236 | return 0; |
226 | 237 | ||
227 | EFX_ZERO_DWORD(reg); | 238 | EFX_ZERO_DWORD(reg); |
228 | efx_writed(efx, ®, addr); | 239 | efx_mcdi_writed(efx, ®, addr); |
229 | 240 | ||
230 | if (value == MC_STATUS_DWORD_ASSERT) | 241 | if (value == MC_STATUS_DWORD_ASSERT) |
231 | return -EINTR; | 242 | return -EINTR; |
diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c index 5ac9fa2cd3bc..f2a2b947f860 100644 --- a/drivers/net/sfc/nic.c +++ b/drivers/net/sfc/nic.c | |||
@@ -1935,6 +1935,13 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf) | |||
1935 | 1935 | ||
1936 | size = min_t(size_t, table->step, 16); | 1936 | size = min_t(size_t, table->step, 16); |
1937 | 1937 | ||
1938 | if (table->offset >= efx->type->mem_map_size) { | ||
1939 | /* No longer mapped; return dummy data */ | ||
1940 | memcpy(buf, "\xde\xc0\xad\xde", 4); | ||
1941 | buf += table->rows * size; | ||
1942 | continue; | ||
1943 | } | ||
1944 | |||
1938 | for (i = 0; i < table->rows; i++) { | 1945 | for (i = 0; i < table->rows; i++) { |
1939 | switch (table->step) { | 1946 | switch (table->step) { |
1940 | case 4: /* 32-bit register or SRAM */ | 1947 | case 4: /* 32-bit register or SRAM */ |
diff --git a/drivers/net/sfc/nic.h b/drivers/net/sfc/nic.h index 7443f99c977f..4bd1f2839dfe 100644 --- a/drivers/net/sfc/nic.h +++ b/drivers/net/sfc/nic.h | |||
@@ -143,10 +143,12 @@ static inline struct falcon_board *falcon_board(struct efx_nic *efx) | |||
143 | /** | 143 | /** |
144 | * struct siena_nic_data - Siena NIC state | 144 | * struct siena_nic_data - Siena NIC state |
145 | * @mcdi: Management-Controller-to-Driver Interface | 145 | * @mcdi: Management-Controller-to-Driver Interface |
146 | * @mcdi_smem: MCDI shared memory mapping. The mapping is always uncacheable. | ||
146 | * @wol_filter_id: Wake-on-LAN packet filter id | 147 | * @wol_filter_id: Wake-on-LAN packet filter id |
147 | */ | 148 | */ |
148 | struct siena_nic_data { | 149 | struct siena_nic_data { |
149 | struct efx_mcdi_iface mcdi; | 150 | struct efx_mcdi_iface mcdi; |
151 | void __iomem *mcdi_smem; | ||
150 | int wol_filter_id; | 152 | int wol_filter_id; |
151 | }; | 153 | }; |
152 | 154 | ||
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c index ceac1c9907f0..fb4721f780ff 100644 --- a/drivers/net/sfc/siena.c +++ b/drivers/net/sfc/siena.c | |||
@@ -220,12 +220,26 @@ static int siena_probe_nic(struct efx_nic *efx) | |||
220 | efx_reado(efx, ®, FR_AZ_CS_DEBUG); | 220 | efx_reado(efx, ®, FR_AZ_CS_DEBUG); |
221 | efx->net_dev->dev_id = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; | 221 | efx->net_dev->dev_id = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; |
222 | 222 | ||
223 | /* Initialise MCDI */ | ||
224 | nic_data->mcdi_smem = ioremap_nocache(efx->membase_phys + | ||
225 | FR_CZ_MC_TREG_SMEM, | ||
226 | FR_CZ_MC_TREG_SMEM_STEP * | ||
227 | FR_CZ_MC_TREG_SMEM_ROWS); | ||
228 | if (!nic_data->mcdi_smem) { | ||
229 | netif_err(efx, probe, efx->net_dev, | ||
230 | "could not map MCDI at %llx+%x\n", | ||
231 | (unsigned long long)efx->membase_phys + | ||
232 | FR_CZ_MC_TREG_SMEM, | ||
233 | FR_CZ_MC_TREG_SMEM_STEP * FR_CZ_MC_TREG_SMEM_ROWS); | ||
234 | rc = -ENOMEM; | ||
235 | goto fail1; | ||
236 | } | ||
223 | efx_mcdi_init(efx); | 237 | efx_mcdi_init(efx); |
224 | 238 | ||
225 | /* Recover from a failed assertion before probing */ | 239 | /* Recover from a failed assertion before probing */ |
226 | rc = efx_mcdi_handle_assertion(efx); | 240 | rc = efx_mcdi_handle_assertion(efx); |
227 | if (rc) | 241 | if (rc) |
228 | goto fail1; | 242 | goto fail2; |
229 | 243 | ||
230 | /* Let the BMC know that the driver is now in charge of link and | 244 | /* Let the BMC know that the driver is now in charge of link and |
231 | * filter settings. We must do this before we reset the NIC */ | 245 | * filter settings. We must do this before we reset the NIC */ |
@@ -280,6 +294,7 @@ fail4: | |||
280 | fail3: | 294 | fail3: |
281 | efx_mcdi_drv_attach(efx, false, NULL); | 295 | efx_mcdi_drv_attach(efx, false, NULL); |
282 | fail2: | 296 | fail2: |
297 | iounmap(nic_data->mcdi_smem); | ||
283 | fail1: | 298 | fail1: |
284 | kfree(efx->nic_data); | 299 | kfree(efx->nic_data); |
285 | return rc; | 300 | return rc; |
@@ -359,6 +374,8 @@ static int siena_init_nic(struct efx_nic *efx) | |||
359 | 374 | ||
360 | static void siena_remove_nic(struct efx_nic *efx) | 375 | static void siena_remove_nic(struct efx_nic *efx) |
361 | { | 376 | { |
377 | struct siena_nic_data *nic_data = efx->nic_data; | ||
378 | |||
362 | efx_nic_free_buffer(efx, &efx->irq_status); | 379 | efx_nic_free_buffer(efx, &efx->irq_status); |
363 | 380 | ||
364 | siena_reset_hw(efx, RESET_TYPE_ALL); | 381 | siena_reset_hw(efx, RESET_TYPE_ALL); |
@@ -368,7 +385,8 @@ static void siena_remove_nic(struct efx_nic *efx) | |||
368 | efx_mcdi_drv_attach(efx, false, NULL); | 385 | efx_mcdi_drv_attach(efx, false, NULL); |
369 | 386 | ||
370 | /* Tear down the private nic state */ | 387 | /* Tear down the private nic state */ |
371 | kfree(efx->nic_data); | 388 | iounmap(nic_data->mcdi_smem); |
389 | kfree(nic_data); | ||
372 | efx->nic_data = NULL; | 390 | efx->nic_data = NULL; |
373 | } | 391 | } |
374 | 392 | ||
@@ -606,8 +624,7 @@ const struct efx_nic_type siena_a0_nic_type = { | |||
606 | .default_mac_ops = &efx_mcdi_mac_operations, | 624 | .default_mac_ops = &efx_mcdi_mac_operations, |
607 | 625 | ||
608 | .revision = EFX_REV_SIENA_A0, | 626 | .revision = EFX_REV_SIENA_A0, |
609 | .mem_map_size = (FR_CZ_MC_TREG_SMEM + | 627 | .mem_map_size = FR_CZ_MC_TREG_SMEM, /* MC_TREG_SMEM mapped separately */ |
610 | FR_CZ_MC_TREG_SMEM_STEP * FR_CZ_MC_TREG_SMEM_ROWS), | ||
611 | .txd_ptr_tbl_base = FR_BZ_TX_DESC_PTR_TBL, | 628 | .txd_ptr_tbl_base = FR_BZ_TX_DESC_PTR_TBL, |
612 | .rxd_ptr_tbl_base = FR_BZ_RX_DESC_PTR_TBL, | 629 | .rxd_ptr_tbl_base = FR_BZ_RX_DESC_PTR_TBL, |
613 | .buf_tbl_base = FR_BZ_BUF_FULL_TBL, | 630 | .buf_tbl_base = FR_BZ_BUF_FULL_TBL, |
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c index 64303eb3a5fc..dc959fe27aa5 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c | |||
@@ -276,6 +276,7 @@ int vmxnet3_set_features(struct net_device *netdev, u32 features) | |||
276 | adapter->shared->devRead.misc.uptFeatures &= | 276 | adapter->shared->devRead.misc.uptFeatures &= |
277 | ~UPT1_F_RXCSUM; | 277 | ~UPT1_F_RXCSUM; |
278 | 278 | ||
279 | /* update harware LRO capability accordingly */ | ||
279 | if (features & NETIF_F_LRO) | 280 | if (features & NETIF_F_LRO) |
280 | adapter->shared->devRead.misc.uptFeatures |= | 281 | adapter->shared->devRead.misc.uptFeatures |= |
281 | UPT1_F_LRO; | 282 | UPT1_F_LRO; |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 45303bdbc465..17ebdf1e8b7b 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2265,6 +2265,8 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | |||
2265 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | 2265 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) |
2266 | { | 2266 | { |
2267 | struct ath_softc *sc = hw->priv; | 2267 | struct ath_softc *sc = hw->priv; |
2268 | struct ath_hw *ah = sc->sc_ah; | ||
2269 | struct ath_common *common = ath9k_hw_common(ah); | ||
2268 | int timeout = 200; /* ms */ | 2270 | int timeout = 200; /* ms */ |
2269 | int i, j; | 2271 | int i, j; |
2270 | bool drain_txq; | 2272 | bool drain_txq; |
@@ -2272,6 +2274,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | |||
2272 | mutex_lock(&sc->mutex); | 2274 | mutex_lock(&sc->mutex); |
2273 | cancel_delayed_work_sync(&sc->tx_complete_work); | 2275 | cancel_delayed_work_sync(&sc->tx_complete_work); |
2274 | 2276 | ||
2277 | if (sc->sc_flags & SC_OP_INVALID) { | ||
2278 | ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); | ||
2279 | mutex_unlock(&sc->mutex); | ||
2280 | return; | ||
2281 | } | ||
2282 | |||
2275 | if (drop) | 2283 | if (drop) |
2276 | timeout = 1; | 2284 | timeout = 1; |
2277 | 2285 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index d743373a9424..42df8321dae8 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
@@ -2151,6 +2151,13 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2151 | goto set_ch_out; | 2151 | goto set_ch_out; |
2152 | } | 2152 | } |
2153 | 2153 | ||
2154 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC && | ||
2155 | !iwl_legacy_is_channel_ibss(ch_info)) { | ||
2156 | IWL_DEBUG_MAC80211(priv, "leave - not IBSS channel\n"); | ||
2157 | ret = -EINVAL; | ||
2158 | goto set_ch_out; | ||
2159 | } | ||
2160 | |||
2154 | spin_lock_irqsave(&priv->lock, flags); | 2161 | spin_lock_irqsave(&priv->lock, flags); |
2155 | 2162 | ||
2156 | for_each_context(priv, ctx) { | 2163 | for_each_context(priv, ctx) { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h index 2d87dba2cfa3..be0106c6a2da 100644 --- a/drivers/net/wireless/iwlegacy/iwl-dev.h +++ b/drivers/net/wireless/iwlegacy/iwl-dev.h | |||
@@ -1411,6 +1411,12 @@ iwl_legacy_is_channel_passive(const struct iwl_channel_info *ch) | |||
1411 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; | 1411 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | static inline int | ||
1415 | iwl_legacy_is_channel_ibss(const struct iwl_channel_info *ch) | ||
1416 | { | ||
1417 | return (ch->flags & EEPROM_CHANNEL_IBSS) ? 1 : 0; | ||
1418 | } | ||
1419 | |||
1414 | static inline void | 1420 | static inline void |
1415 | __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page) | 1421 | __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page) |
1416 | { | 1422 | { |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 6d59b4cf8fce..84566db486d2 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1354,8 +1354,8 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1354 | cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) { | 1354 | cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) { |
1355 | lbs_deb_host( | 1355 | lbs_deb_host( |
1356 | "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); | 1356 | "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); |
1357 | list_del(&cmdnode->list); | ||
1358 | spin_lock_irqsave(&priv->driver_lock, flags); | 1357 | spin_lock_irqsave(&priv->driver_lock, flags); |
1358 | list_del(&cmdnode->list); | ||
1359 | lbs_complete_command(priv, cmdnode, 0); | 1359 | lbs_complete_command(priv, cmdnode, 0); |
1360 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1360 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
1361 | 1361 | ||
@@ -1367,8 +1367,8 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1367 | (priv->psstate == PS_STATE_PRE_SLEEP)) { | 1367 | (priv->psstate == PS_STATE_PRE_SLEEP)) { |
1368 | lbs_deb_host( | 1368 | lbs_deb_host( |
1369 | "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); | 1369 | "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); |
1370 | list_del(&cmdnode->list); | ||
1371 | spin_lock_irqsave(&priv->driver_lock, flags); | 1370 | spin_lock_irqsave(&priv->driver_lock, flags); |
1371 | list_del(&cmdnode->list); | ||
1372 | lbs_complete_command(priv, cmdnode, 0); | 1372 | lbs_complete_command(priv, cmdnode, 0); |
1373 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1373 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
1374 | priv->needtowakeup = 1; | 1374 | priv->needtowakeup = 1; |
@@ -1381,7 +1381,9 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1381 | "EXEC_NEXT_CMD: sending EXIT_PS\n"); | 1381 | "EXEC_NEXT_CMD: sending EXIT_PS\n"); |
1382 | } | 1382 | } |
1383 | } | 1383 | } |
1384 | spin_lock_irqsave(&priv->driver_lock, flags); | ||
1384 | list_del(&cmdnode->list); | 1385 | list_del(&cmdnode->list); |
1386 | spin_unlock_irqrestore(&priv->driver_lock, flags); | ||
1385 | lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n", | 1387 | lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n", |
1386 | le16_to_cpu(cmd->command)); | 1388 | le16_to_cpu(cmd->command)); |
1387 | lbs_submit_command(priv, cmdnode); | 1389 | lbs_submit_command(priv, cmdnode); |
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c index b78a38d9172a..8c7c522a056a 100644 --- a/drivers/net/zorro8390.c +++ b/drivers/net/zorro8390.c | |||
@@ -126,7 +126,7 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, | |||
126 | 126 | ||
127 | board = z->resource.start; | 127 | board = z->resource.start; |
128 | ioaddr = board+cards[i].offset; | 128 | ioaddr = board+cards[i].offset; |
129 | dev = alloc_ei_netdev(); | 129 | dev = ____alloc_ei_netdev(0); |
130 | if (!dev) | 130 | if (!dev) |
131 | return -ENOMEM; | 131 | return -ENOMEM; |
132 | if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) { | 132 | if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) { |
@@ -146,15 +146,15 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, | |||
146 | static const struct net_device_ops zorro8390_netdev_ops = { | 146 | static const struct net_device_ops zorro8390_netdev_ops = { |
147 | .ndo_open = zorro8390_open, | 147 | .ndo_open = zorro8390_open, |
148 | .ndo_stop = zorro8390_close, | 148 | .ndo_stop = zorro8390_close, |
149 | .ndo_start_xmit = ei_start_xmit, | 149 | .ndo_start_xmit = __ei_start_xmit, |
150 | .ndo_tx_timeout = ei_tx_timeout, | 150 | .ndo_tx_timeout = __ei_tx_timeout, |
151 | .ndo_get_stats = ei_get_stats, | 151 | .ndo_get_stats = __ei_get_stats, |
152 | .ndo_set_multicast_list = ei_set_multicast_list, | 152 | .ndo_set_multicast_list = __ei_set_multicast_list, |
153 | .ndo_validate_addr = eth_validate_addr, | 153 | .ndo_validate_addr = eth_validate_addr, |
154 | .ndo_set_mac_address = eth_mac_addr, | 154 | .ndo_set_mac_address = eth_mac_addr, |
155 | .ndo_change_mtu = eth_change_mtu, | 155 | .ndo_change_mtu = eth_change_mtu, |
156 | #ifdef CONFIG_NET_POLL_CONTROLLER | 156 | #ifdef CONFIG_NET_POLL_CONTROLLER |
157 | .ndo_poll_controller = ei_poll, | 157 | .ndo_poll_controller = __ei_poll, |
158 | #endif | 158 | #endif |
159 | }; | 159 | }; |
160 | 160 | ||
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 88bdd010d65d..2fa8d1341a0a 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) | |||
38 | return outer; | 38 | return outer; |
39 | } | 39 | } |
40 | 40 | ||
41 | #define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0) | 41 | static inline void INET_ECN_xmit(struct sock *sk) |
42 | #define INET_ECN_dontxmit(sk) \ | 42 | { |
43 | do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0) | 43 | inet_sk(sk)->tos |= INET_ECN_ECT_0; |
44 | if (inet6_sk(sk) != NULL) | ||
45 | inet6_sk(sk)->tclass |= INET_ECN_ECT_0; | ||
46 | } | ||
47 | |||
48 | static inline void INET_ECN_dontxmit(struct sock *sk) | ||
49 | { | ||
50 | inet_sk(sk)->tos &= ~INET_ECN_MASK; | ||
51 | if (inet6_sk(sk) != NULL) | ||
52 | inet6_sk(sk)->tclass &= ~INET_ECN_MASK; | ||
53 | } | ||
44 | 54 | ||
45 | #define IP6_ECN_flow_init(label) do { \ | 55 | #define IP6_ECN_flow_init(label) do { \ |
46 | (label) &= ~htonl(INET_ECN_MASK << 20); \ | 56 | (label) &= ~htonl(INET_ECN_MASK << 20); \ |
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h index 75b8e2968c9b..f57e7d46a453 100644 --- a/include/net/llc_pdu.h +++ b/include/net/llc_pdu.h | |||
@@ -199,7 +199,7 @@ struct llc_pdu_sn { | |||
199 | u8 ssap; | 199 | u8 ssap; |
200 | u8 ctrl_1; | 200 | u8 ctrl_1; |
201 | u8 ctrl_2; | 201 | u8 ctrl_2; |
202 | }; | 202 | } __packed; |
203 | 203 | ||
204 | static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) | 204 | static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) |
205 | { | 205 | { |
@@ -211,7 +211,7 @@ struct llc_pdu_un { | |||
211 | u8 dsap; | 211 | u8 dsap; |
212 | u8 ssap; | 212 | u8 ssap; |
213 | u8 ctrl_1; | 213 | u8 ctrl_1; |
214 | }; | 214 | } __packed; |
215 | 215 | ||
216 | static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) | 216 | static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) |
217 | { | 217 | { |
@@ -359,7 +359,7 @@ struct llc_xid_info { | |||
359 | u8 fmt_id; /* always 0x81 for LLC */ | 359 | u8 fmt_id; /* always 0x81 for LLC */ |
360 | u8 type; /* different if NULL/non-NULL LSAP */ | 360 | u8 type; /* different if NULL/non-NULL LSAP */ |
361 | u8 rw; /* sender receive window */ | 361 | u8 rw; /* sender receive window */ |
362 | }; | 362 | } __packed; |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * llc_pdu_init_as_xid_cmd - sets bytes 3, 4 & 5 of LLC header as XID | 365 | * llc_pdu_init_as_xid_cmd - sets bytes 3, 4 & 5 of LLC header as XID |
@@ -415,7 +415,7 @@ struct llc_frmr_info { | |||
415 | u8 curr_ssv; /* current send state variable val */ | 415 | u8 curr_ssv; /* current send state variable val */ |
416 | u8 curr_rsv; /* current receive state variable */ | 416 | u8 curr_rsv; /* current receive state variable */ |
417 | u8 ind_bits; /* indicator bits set with macro */ | 417 | u8 ind_bits; /* indicator bits set with macro */ |
418 | }; | 418 | } __packed; |
419 | 419 | ||
420 | extern void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type); | 420 | extern void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type); |
421 | extern void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value); | 421 | extern void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value); |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 5614907525e1..e1f5ec75e91c 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -737,7 +737,7 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb, | |||
737 | nf_bridge->mask |= BRNF_PKT_TYPE; | 737 | nf_bridge->mask |= BRNF_PKT_TYPE; |
738 | } | 738 | } |
739 | 739 | ||
740 | if (br_parse_ip_options(skb)) | 740 | if (pf == PF_INET && br_parse_ip_options(skb)) |
741 | return NF_DROP; | 741 | return NF_DROP; |
742 | 742 | ||
743 | /* The physdev module checks on this */ | 743 | /* The physdev module checks on this */ |
diff --git a/net/core/dev.c b/net/core/dev.c index 3ed09f8ecbf8..155de2094e71 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1007,7 +1007,7 @@ rollback: | |||
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | write_lock_bh(&dev_base_lock); | 1009 | write_lock_bh(&dev_base_lock); |
1010 | hlist_del(&dev->name_hlist); | 1010 | hlist_del_rcu(&dev->name_hlist); |
1011 | write_unlock_bh(&dev_base_lock); | 1011 | write_unlock_bh(&dev_base_lock); |
1012 | 1012 | ||
1013 | synchronize_rcu(); | 1013 | synchronize_rcu(); |
@@ -5196,27 +5196,27 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) | |||
5196 | /* Fix illegal checksum combinations */ | 5196 | /* Fix illegal checksum combinations */ |
5197 | if ((features & NETIF_F_HW_CSUM) && | 5197 | if ((features & NETIF_F_HW_CSUM) && |
5198 | (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { | 5198 | (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { |
5199 | netdev_info(dev, "mixed HW and IP checksum settings.\n"); | 5199 | netdev_warn(dev, "mixed HW and IP checksum settings.\n"); |
5200 | features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM); | 5200 | features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM); |
5201 | } | 5201 | } |
5202 | 5202 | ||
5203 | if ((features & NETIF_F_NO_CSUM) && | 5203 | if ((features & NETIF_F_NO_CSUM) && |
5204 | (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { | 5204 | (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { |
5205 | netdev_info(dev, "mixed no checksumming and other settings.\n"); | 5205 | netdev_warn(dev, "mixed no checksumming and other settings.\n"); |
5206 | features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM); | 5206 | features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM); |
5207 | } | 5207 | } |
5208 | 5208 | ||
5209 | /* Fix illegal SG+CSUM combinations. */ | 5209 | /* Fix illegal SG+CSUM combinations. */ |
5210 | if ((features & NETIF_F_SG) && | 5210 | if ((features & NETIF_F_SG) && |
5211 | !(features & NETIF_F_ALL_CSUM)) { | 5211 | !(features & NETIF_F_ALL_CSUM)) { |
5212 | netdev_info(dev, | 5212 | netdev_dbg(dev, |
5213 | "Dropping NETIF_F_SG since no checksum feature.\n"); | 5213 | "Dropping NETIF_F_SG since no checksum feature.\n"); |
5214 | features &= ~NETIF_F_SG; | 5214 | features &= ~NETIF_F_SG; |
5215 | } | 5215 | } |
5216 | 5216 | ||
5217 | /* TSO requires that SG is present as well. */ | 5217 | /* TSO requires that SG is present as well. */ |
5218 | if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) { | 5218 | if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) { |
5219 | netdev_info(dev, "Dropping TSO features since no SG feature.\n"); | 5219 | netdev_dbg(dev, "Dropping TSO features since no SG feature.\n"); |
5220 | features &= ~NETIF_F_ALL_TSO; | 5220 | features &= ~NETIF_F_ALL_TSO; |
5221 | } | 5221 | } |
5222 | 5222 | ||
@@ -5226,7 +5226,7 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) | |||
5226 | 5226 | ||
5227 | /* Software GSO depends on SG. */ | 5227 | /* Software GSO depends on SG. */ |
5228 | if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) { | 5228 | if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) { |
5229 | netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n"); | 5229 | netdev_dbg(dev, "Dropping NETIF_F_GSO since no SG feature.\n"); |
5230 | features &= ~NETIF_F_GSO; | 5230 | features &= ~NETIF_F_GSO; |
5231 | } | 5231 | } |
5232 | 5232 | ||
@@ -5236,13 +5236,13 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) | |||
5236 | if (!((features & NETIF_F_GEN_CSUM) || | 5236 | if (!((features & NETIF_F_GEN_CSUM) || |
5237 | (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM)) | 5237 | (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM)) |
5238 | == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { | 5238 | == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { |
5239 | netdev_info(dev, | 5239 | netdev_dbg(dev, |
5240 | "Dropping NETIF_F_UFO since no checksum offload features.\n"); | 5240 | "Dropping NETIF_F_UFO since no checksum offload features.\n"); |
5241 | features &= ~NETIF_F_UFO; | 5241 | features &= ~NETIF_F_UFO; |
5242 | } | 5242 | } |
5243 | 5243 | ||
5244 | if (!(features & NETIF_F_SG)) { | 5244 | if (!(features & NETIF_F_SG)) { |
5245 | netdev_info(dev, | 5245 | netdev_dbg(dev, |
5246 | "Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n"); | 5246 | "Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n"); |
5247 | features &= ~NETIF_F_UFO; | 5247 | features &= ~NETIF_F_UFO; |
5248 | } | 5248 | } |
@@ -5270,7 +5270,7 @@ int __netdev_update_features(struct net_device *dev) | |||
5270 | if (dev->features == features) | 5270 | if (dev->features == features) |
5271 | return 0; | 5271 | return 0; |
5272 | 5272 | ||
5273 | netdev_info(dev, "Features changed: 0x%08x -> 0x%08x\n", | 5273 | netdev_dbg(dev, "Features changed: 0x%08x -> 0x%08x\n", |
5274 | dev->features, features); | 5274 | dev->features, features); |
5275 | 5275 | ||
5276 | if (dev->netdev_ops->ndo_set_features) | 5276 | if (dev->netdev_ops->ndo_set_features) |
@@ -5462,12 +5462,6 @@ int register_netdevice(struct net_device *dev) | |||
5462 | dev->features |= NETIF_F_SOFT_FEATURES; | 5462 | dev->features |= NETIF_F_SOFT_FEATURES; |
5463 | dev->wanted_features = dev->features & dev->hw_features; | 5463 | dev->wanted_features = dev->features & dev->hw_features; |
5464 | 5464 | ||
5465 | /* Avoid warning from netdev_fix_features() for GSO without SG */ | ||
5466 | if (!(dev->wanted_features & NETIF_F_SG)) { | ||
5467 | dev->wanted_features &= ~NETIF_F_GSO; | ||
5468 | dev->features &= ~NETIF_F_GSO; | ||
5469 | } | ||
5470 | |||
5471 | /* Turn on no cache copy if HW is doing checksum */ | 5465 | /* Turn on no cache copy if HW is doing checksum */ |
5472 | dev->hw_features |= NETIF_F_NOCACHE_COPY; | 5466 | dev->hw_features |= NETIF_F_NOCACHE_COPY; |
5473 | if ((dev->features & NETIF_F_ALL_CSUM) && | 5467 | if ((dev->features & NETIF_F_ALL_CSUM) && |
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index b8c2bcfee6af..84e7304532e6 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -332,7 +332,7 @@ static const char netdev_features_strings[ETHTOOL_DEV_FEATURE_WORDS * 32][ETH_GS | |||
332 | /* NETIF_F_IP_CSUM */ "tx-checksum-ipv4", | 332 | /* NETIF_F_IP_CSUM */ "tx-checksum-ipv4", |
333 | /* NETIF_F_NO_CSUM */ "tx-checksum-unneeded", | 333 | /* NETIF_F_NO_CSUM */ "tx-checksum-unneeded", |
334 | /* NETIF_F_HW_CSUM */ "tx-checksum-ip-generic", | 334 | /* NETIF_F_HW_CSUM */ "tx-checksum-ip-generic", |
335 | /* NETIF_F_IPV6_CSUM */ "tx_checksum-ipv6", | 335 | /* NETIF_F_IPV6_CSUM */ "tx-checksum-ipv6", |
336 | /* NETIF_F_HIGHDMA */ "highdma", | 336 | /* NETIF_F_HIGHDMA */ "highdma", |
337 | /* NETIF_F_FRAGLIST */ "tx-scatter-gather-fraglist", | 337 | /* NETIF_F_FRAGLIST */ "tx-scatter-gather-fraglist", |
338 | /* NETIF_F_HW_VLAN_TX */ "tx-vlan-hw-insert", | 338 | /* NETIF_F_HW_VLAN_TX */ "tx-vlan-hw-insert", |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 6eeaaa2bbafe..64e0f7587e6d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -237,6 +237,10 @@ ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx) | |||
237 | &local->dynamic_ps_disable_work); | 237 | &local->dynamic_ps_disable_work); |
238 | } | 238 | } |
239 | 239 | ||
240 | /* Don't restart the timer if we're not disassociated */ | ||
241 | if (!ifmgd->associated) | ||
242 | return TX_CONTINUE; | ||
243 | |||
240 | mod_timer(&local->dynamic_ps_timer, jiffies + | 244 | mod_timer(&local->dynamic_ps_timer, jiffies + |
241 | msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); | 245 | msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); |
242 | 246 | ||
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c index 51f3af7c4743..059af3120be7 100644 --- a/net/netfilter/ipvs/ip_vs_app.c +++ b/net/netfilter/ipvs/ip_vs_app.c | |||
@@ -572,7 +572,7 @@ static const struct file_operations ip_vs_app_fops = { | |||
572 | .open = ip_vs_app_open, | 572 | .open = ip_vs_app_open, |
573 | .read = seq_read, | 573 | .read = seq_read, |
574 | .llseek = seq_lseek, | 574 | .llseek = seq_lseek, |
575 | .release = seq_release, | 575 | .release = seq_release_net, |
576 | }; | 576 | }; |
577 | #endif | 577 | #endif |
578 | 578 | ||
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index d3fd91bbba49..bf28ac2fc99b 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
@@ -1046,7 +1046,7 @@ static const struct file_operations ip_vs_conn_fops = { | |||
1046 | .open = ip_vs_conn_open, | 1046 | .open = ip_vs_conn_open, |
1047 | .read = seq_read, | 1047 | .read = seq_read, |
1048 | .llseek = seq_lseek, | 1048 | .llseek = seq_lseek, |
1049 | .release = seq_release, | 1049 | .release = seq_release_net, |
1050 | }; | 1050 | }; |
1051 | 1051 | ||
1052 | static const char *ip_vs_origin_name(unsigned flags) | 1052 | static const char *ip_vs_origin_name(unsigned flags) |
@@ -1114,7 +1114,7 @@ static const struct file_operations ip_vs_conn_sync_fops = { | |||
1114 | .open = ip_vs_conn_sync_open, | 1114 | .open = ip_vs_conn_sync_open, |
1115 | .read = seq_read, | 1115 | .read = seq_read, |
1116 | .llseek = seq_lseek, | 1116 | .llseek = seq_lseek, |
1117 | .release = seq_release, | 1117 | .release = seq_release_net, |
1118 | }; | 1118 | }; |
1119 | 1119 | ||
1120 | #endif | 1120 | #endif |
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 89842f06931d..699c79a55657 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -2066,7 +2066,7 @@ static const struct file_operations ip_vs_info_fops = { | |||
2066 | .open = ip_vs_info_open, | 2066 | .open = ip_vs_info_open, |
2067 | .read = seq_read, | 2067 | .read = seq_read, |
2068 | .llseek = seq_lseek, | 2068 | .llseek = seq_lseek, |
2069 | .release = seq_release_private, | 2069 | .release = seq_release_net, |
2070 | }; | 2070 | }; |
2071 | 2071 | ||
2072 | static int ip_vs_stats_show(struct seq_file *seq, void *v) | 2072 | static int ip_vs_stats_show(struct seq_file *seq, void *v) |
@@ -2106,7 +2106,7 @@ static const struct file_operations ip_vs_stats_fops = { | |||
2106 | .open = ip_vs_stats_seq_open, | 2106 | .open = ip_vs_stats_seq_open, |
2107 | .read = seq_read, | 2107 | .read = seq_read, |
2108 | .llseek = seq_lseek, | 2108 | .llseek = seq_lseek, |
2109 | .release = single_release, | 2109 | .release = single_release_net, |
2110 | }; | 2110 | }; |
2111 | 2111 | ||
2112 | static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v) | 2112 | static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v) |
@@ -2175,7 +2175,7 @@ static const struct file_operations ip_vs_stats_percpu_fops = { | |||
2175 | .open = ip_vs_stats_percpu_seq_open, | 2175 | .open = ip_vs_stats_percpu_seq_open, |
2176 | .read = seq_read, | 2176 | .read = seq_read, |
2177 | .llseek = seq_lseek, | 2177 | .llseek = seq_lseek, |
2178 | .release = single_release, | 2178 | .release = single_release_net, |
2179 | }; | 2179 | }; |
2180 | #endif | 2180 | #endif |
2181 | 2181 | ||
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 237cc1981b89..cb5a28581782 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
@@ -1419,6 +1419,7 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff, | |||
1419 | const char *dptr, *end; | 1419 | const char *dptr, *end; |
1420 | s16 diff, tdiff = 0; | 1420 | s16 diff, tdiff = 0; |
1421 | int ret = NF_ACCEPT; | 1421 | int ret = NF_ACCEPT; |
1422 | bool term; | ||
1422 | typeof(nf_nat_sip_seq_adjust_hook) nf_nat_sip_seq_adjust; | 1423 | typeof(nf_nat_sip_seq_adjust_hook) nf_nat_sip_seq_adjust; |
1423 | 1424 | ||
1424 | if (ctinfo != IP_CT_ESTABLISHED && | 1425 | if (ctinfo != IP_CT_ESTABLISHED && |
@@ -1453,14 +1454,21 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff, | |||
1453 | if (dptr + matchoff == end) | 1454 | if (dptr + matchoff == end) |
1454 | break; | 1455 | break; |
1455 | 1456 | ||
1456 | if (end + strlen("\r\n\r\n") > dptr + datalen) | 1457 | term = false; |
1457 | break; | 1458 | for (; end + strlen("\r\n\r\n") <= dptr + datalen; end++) { |
1458 | if (end[0] != '\r' || end[1] != '\n' || | 1459 | if (end[0] == '\r' && end[1] == '\n' && |
1459 | end[2] != '\r' || end[3] != '\n') | 1460 | end[2] == '\r' && end[3] == '\n') { |
1461 | term = true; | ||
1462 | break; | ||
1463 | } | ||
1464 | } | ||
1465 | if (!term) | ||
1460 | break; | 1466 | break; |
1461 | end += strlen("\r\n\r\n") + clen; | 1467 | end += strlen("\r\n\r\n") + clen; |
1462 | 1468 | ||
1463 | msglen = origlen = end - dptr; | 1469 | msglen = origlen = end - dptr; |
1470 | if (msglen > datalen) | ||
1471 | return NF_DROP; | ||
1464 | 1472 | ||
1465 | ret = process_sip_msg(skb, ct, dataoff, &dptr, &msglen); | 1473 | ret = process_sip_msg(skb, ct, dataoff, &dptr, &msglen); |
1466 | if (ret != NF_ACCEPT) | 1474 | if (ret != NF_ACCEPT) |
diff --git a/net/socket.c b/net/socket.c index ed50255143d5..2d5382d0de54 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -2232,14 +2232,16 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | |||
2232 | */ | 2232 | */ |
2233 | if (MSG_CMSG_COMPAT & flags) { | 2233 | if (MSG_CMSG_COMPAT & flags) { |
2234 | err = __sys_recvmsg(sock, (struct msghdr __user *)compat_entry, | 2234 | err = __sys_recvmsg(sock, (struct msghdr __user *)compat_entry, |
2235 | &msg_sys, flags, datagrams); | 2235 | &msg_sys, flags & ~MSG_WAITFORONE, |
2236 | datagrams); | ||
2236 | if (err < 0) | 2237 | if (err < 0) |
2237 | break; | 2238 | break; |
2238 | err = __put_user(err, &compat_entry->msg_len); | 2239 | err = __put_user(err, &compat_entry->msg_len); |
2239 | ++compat_entry; | 2240 | ++compat_entry; |
2240 | } else { | 2241 | } else { |
2241 | err = __sys_recvmsg(sock, (struct msghdr __user *)entry, | 2242 | err = __sys_recvmsg(sock, (struct msghdr __user *)entry, |
2242 | &msg_sys, flags, datagrams); | 2243 | &msg_sys, flags & ~MSG_WAITFORONE, |
2244 | datagrams); | ||
2243 | if (err < 0) | 2245 | if (err < 0) |
2244 | break; | 2246 | break; |
2245 | err = put_user(err, &entry->msg_len); | 2247 | err = put_user(err, &entry->msg_len); |