diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-05 15:26:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-05 15:26:57 -0400 |
commit | d14f5b810b49c7dbd1a01be1c6d3641d46090080 (patch) | |
tree | b201a1cf14c455b919ecb7d4a6631134d5815703 | |
parent | b2a8b4b81966094703088a7bc76a313af841924d (diff) | |
parent | 738faca34335cd1d5d87fa7c58703139c7fa15bd (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
ipv6: Don't pass invalid dst_entry pointer to dst_release().
mlx4: fix kfree on error path in new_steering_entry()
tcp: len check is unnecessarily devastating, change to WARN_ON
sctp: malloc enough room for asconf-ack chunk
sctp: fix auth_hmacs field's length of struct sctp_cookie
net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM
usbnet: use eth%d name for known ethernet devices
starfire: clean up dma_addr_t size test
iwlegacy: fix bugs in change_interface
carl9170: Fix tx aggregation problems with some clients
iwl3945: disable hw scan by default
wireless: rt2x00: rt2800usb.c add and identify ids
iwl3945: do not deprecate software scan
mac80211: fix aggregation frame release during timeout
cfg80211: fix BSS double-unlinking (continued)
cfg80211:: fix possible NULL pointer dereference
mac80211: fix possible NULL pointer dereference
mac80211: fix NULL pointer dereference in ieee80211_key_alloc()
ath9k: fix a chip wakeup related crash in ath9k_start
mac80211: fix a crash in minstrel_ht in HT mode with no supported MCS rates
...
36 files changed, 138 insertions, 60 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 866811428e20..762a5109c68a 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -71,6 +71,9 @@ static struct usb_device_id btusb_table[] = { | |||
71 | /* Apple MacBookAir3,1, MacBookAir3,2 */ | 71 | /* Apple MacBookAir3,1, MacBookAir3,2 */ |
72 | { USB_DEVICE(0x05ac, 0x821b) }, | 72 | { USB_DEVICE(0x05ac, 0x821b) }, |
73 | 73 | ||
74 | /* Apple MacBookPro8,2 */ | ||
75 | { USB_DEVICE(0x05ac, 0x821a) }, | ||
76 | |||
74 | /* AVM BlueFRITZ! USB v2.0 */ | 77 | /* AVM BlueFRITZ! USB v2.0 */ |
75 | { USB_DEVICE(0x057c, 0x3800) }, | 78 | { USB_DEVICE(0x057c, 0x3800) }, |
76 | 79 | ||
@@ -690,7 +693,8 @@ static int btusb_send_frame(struct sk_buff *skb) | |||
690 | break; | 693 | break; |
691 | 694 | ||
692 | case HCI_ACLDATA_PKT: | 695 | case HCI_ACLDATA_PKT: |
693 | if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1) | 696 | if (!data->bulk_tx_ep || (hdev->conn_hash.acl_num < 1 && |
697 | hdev->conn_hash.le_num < 1)) | ||
694 | return -ENODEV; | 698 | return -ENODEV; |
695 | 699 | ||
696 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 700 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c index 37150b2f6425..c6d336aed2d9 100644 --- a/drivers/net/mlx4/mcg.c +++ b/drivers/net/mlx4/mcg.c | |||
@@ -111,7 +111,7 @@ static int new_steering_entry(struct mlx4_dev *dev, u8 vep_num, u8 port, | |||
111 | u32 members_count; | 111 | u32 members_count; |
112 | struct mlx4_steer_index *new_entry; | 112 | struct mlx4_steer_index *new_entry; |
113 | struct mlx4_promisc_qp *pqp; | 113 | struct mlx4_promisc_qp *pqp; |
114 | struct mlx4_promisc_qp *dqp; | 114 | struct mlx4_promisc_qp *dqp = NULL; |
115 | u32 prot; | 115 | u32 prot; |
116 | int err; | 116 | int err; |
117 | u8 pf_num; | 117 | u8 pf_num; |
@@ -184,7 +184,7 @@ out_mailbox: | |||
184 | out_alloc: | 184 | out_alloc: |
185 | if (dqp) { | 185 | if (dqp) { |
186 | list_del(&dqp->list); | 186 | list_del(&dqp->list); |
187 | kfree(&dqp); | 187 | kfree(dqp); |
188 | } | 188 | } |
189 | list_del(&new_entry->list); | 189 | list_del(&new_entry->list); |
190 | kfree(new_entry); | 190 | kfree(new_entry); |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index a4f2bd52e546..36045f3b0327 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -144,11 +144,7 @@ static int full_duplex[MAX_UNITS] = {0, }; | |||
144 | /* Time in jiffies before concluding the transmitter is hung. */ | 144 | /* Time in jiffies before concluding the transmitter is hung. */ |
145 | #define TX_TIMEOUT (2 * HZ) | 145 | #define TX_TIMEOUT (2 * HZ) |
146 | 146 | ||
147 | /* | 147 | #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT |
148 | * This SUCKS. | ||
149 | * We need a much better method to determine if dma_addr_t is 64-bit. | ||
150 | */ | ||
151 | #if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || (defined(CONFIG_MIPS) && ((defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || defined(CONFIG_64BIT))) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT)) | ||
152 | /* 64-bit dma_addr_t */ | 148 | /* 64-bit dma_addr_t */ |
153 | #define ADDR_64BITS /* This chip uses 64 bit addresses. */ | 149 | #define ADDR_64BITS /* This chip uses 64 bit addresses. */ |
154 | #define netdrv_addr_t __le64 | 150 | #define netdrv_addr_t __le64 |
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index 5f3b97668e63..8f128541656d 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
@@ -340,7 +340,7 @@ next: | |||
340 | 340 | ||
341 | static const struct driver_info eem_info = { | 341 | static const struct driver_info eem_info = { |
342 | .description = "CDC EEM Device", | 342 | .description = "CDC EEM Device", |
343 | .flags = FLAG_ETHER, | 343 | .flags = FLAG_ETHER | FLAG_POINTTOPOINT, |
344 | .bind = eem_bind, | 344 | .bind = eem_bind, |
345 | .rx_fixup = eem_rx_fixup, | 345 | .rx_fixup = eem_rx_fixup, |
346 | .tx_fixup = eem_tx_fixup, | 346 | .tx_fixup = eem_tx_fixup, |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 51c259b69278..341f7056a800 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -452,7 +452,7 @@ static int cdc_manage_power(struct usbnet *dev, int on) | |||
452 | 452 | ||
453 | static const struct driver_info cdc_info = { | 453 | static const struct driver_info cdc_info = { |
454 | .description = "CDC Ethernet Device", | 454 | .description = "CDC Ethernet Device", |
455 | .flags = FLAG_ETHER, | 455 | .flags = FLAG_ETHER | FLAG_POINTTOPOINT, |
456 | // .check_connect = cdc_check_connect, | 456 | // .check_connect = cdc_check_connect, |
457 | .bind = usbnet_cdc_bind, | 457 | .bind = usbnet_cdc_bind, |
458 | .unbind = usbnet_cdc_unbind, | 458 | .unbind = usbnet_cdc_unbind, |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 7113168473cf..967371f04454 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -1237,7 +1237,7 @@ static int cdc_ncm_manage_power(struct usbnet *dev, int status) | |||
1237 | 1237 | ||
1238 | static const struct driver_info cdc_ncm_info = { | 1238 | static const struct driver_info cdc_ncm_info = { |
1239 | .description = "CDC NCM", | 1239 | .description = "CDC NCM", |
1240 | .flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET, | 1240 | .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET, |
1241 | .bind = cdc_ncm_bind, | 1241 | .bind = cdc_ncm_bind, |
1242 | .unbind = cdc_ncm_unbind, | 1242 | .unbind = cdc_ncm_unbind, |
1243 | .check_connect = cdc_ncm_check_connect, | 1243 | .check_connect = cdc_ncm_check_connect, |
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c index ca39ace0b0eb..fc5f13d47ad9 100644 --- a/drivers/net/usb/cdc_subset.c +++ b/drivers/net/usb/cdc_subset.c | |||
@@ -89,6 +89,7 @@ static int always_connected (struct usbnet *dev) | |||
89 | 89 | ||
90 | static const struct driver_info ali_m5632_info = { | 90 | static const struct driver_info ali_m5632_info = { |
91 | .description = "ALi M5632", | 91 | .description = "ALi M5632", |
92 | .flags = FLAG_POINTTOPOINT, | ||
92 | }; | 93 | }; |
93 | 94 | ||
94 | #endif | 95 | #endif |
@@ -110,6 +111,7 @@ static const struct driver_info ali_m5632_info = { | |||
110 | 111 | ||
111 | static const struct driver_info an2720_info = { | 112 | static const struct driver_info an2720_info = { |
112 | .description = "AnchorChips/Cypress 2720", | 113 | .description = "AnchorChips/Cypress 2720", |
114 | .flags = FLAG_POINTTOPOINT, | ||
113 | // no reset available! | 115 | // no reset available! |
114 | // no check_connect available! | 116 | // no check_connect available! |
115 | 117 | ||
@@ -132,6 +134,7 @@ static const struct driver_info an2720_info = { | |||
132 | 134 | ||
133 | static const struct driver_info belkin_info = { | 135 | static const struct driver_info belkin_info = { |
134 | .description = "Belkin, eTEK, or compatible", | 136 | .description = "Belkin, eTEK, or compatible", |
137 | .flags = FLAG_POINTTOPOINT, | ||
135 | }; | 138 | }; |
136 | 139 | ||
137 | #endif /* CONFIG_USB_BELKIN */ | 140 | #endif /* CONFIG_USB_BELKIN */ |
@@ -157,6 +160,7 @@ static const struct driver_info belkin_info = { | |||
157 | static const struct driver_info epson2888_info = { | 160 | static const struct driver_info epson2888_info = { |
158 | .description = "Epson USB Device", | 161 | .description = "Epson USB Device", |
159 | .check_connect = always_connected, | 162 | .check_connect = always_connected, |
163 | .flags = FLAG_POINTTOPOINT, | ||
160 | 164 | ||
161 | .in = 4, .out = 3, | 165 | .in = 4, .out = 3, |
162 | }; | 166 | }; |
@@ -173,6 +177,7 @@ static const struct driver_info epson2888_info = { | |||
173 | #define HAVE_HARDWARE | 177 | #define HAVE_HARDWARE |
174 | static const struct driver_info kc2190_info = { | 178 | static const struct driver_info kc2190_info = { |
175 | .description = "KC Technology KC-190", | 179 | .description = "KC Technology KC-190", |
180 | .flags = FLAG_POINTTOPOINT, | ||
176 | }; | 181 | }; |
177 | #endif /* CONFIG_USB_KC2190 */ | 182 | #endif /* CONFIG_USB_KC2190 */ |
178 | 183 | ||
@@ -200,16 +205,19 @@ static const struct driver_info kc2190_info = { | |||
200 | static const struct driver_info linuxdev_info = { | 205 | static const struct driver_info linuxdev_info = { |
201 | .description = "Linux Device", | 206 | .description = "Linux Device", |
202 | .check_connect = always_connected, | 207 | .check_connect = always_connected, |
208 | .flags = FLAG_POINTTOPOINT, | ||
203 | }; | 209 | }; |
204 | 210 | ||
205 | static const struct driver_info yopy_info = { | 211 | static const struct driver_info yopy_info = { |
206 | .description = "Yopy", | 212 | .description = "Yopy", |
207 | .check_connect = always_connected, | 213 | .check_connect = always_connected, |
214 | .flags = FLAG_POINTTOPOINT, | ||
208 | }; | 215 | }; |
209 | 216 | ||
210 | static const struct driver_info blob_info = { | 217 | static const struct driver_info blob_info = { |
211 | .description = "Boot Loader OBject", | 218 | .description = "Boot Loader OBject", |
212 | .check_connect = always_connected, | 219 | .check_connect = always_connected, |
220 | .flags = FLAG_POINTTOPOINT, | ||
213 | }; | 221 | }; |
214 | 222 | ||
215 | #endif /* CONFIG_USB_ARMLINUX */ | 223 | #endif /* CONFIG_USB_ARMLINUX */ |
diff --git a/drivers/net/usb/gl620a.c b/drivers/net/usb/gl620a.c index dcd57c37ef73..c4cfd1dea881 100644 --- a/drivers/net/usb/gl620a.c +++ b/drivers/net/usb/gl620a.c | |||
@@ -193,7 +193,7 @@ static int genelink_bind(struct usbnet *dev, struct usb_interface *intf) | |||
193 | 193 | ||
194 | static const struct driver_info genelink_info = { | 194 | static const struct driver_info genelink_info = { |
195 | .description = "Genesys GeneLink", | 195 | .description = "Genesys GeneLink", |
196 | .flags = FLAG_FRAMING_GL | FLAG_NO_SETINT, | 196 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_GL | FLAG_NO_SETINT, |
197 | .bind = genelink_bind, | 197 | .bind = genelink_bind, |
198 | .rx_fixup = genelink_rx_fixup, | 198 | .rx_fixup = genelink_rx_fixup, |
199 | .tx_fixup = genelink_tx_fixup, | 199 | .tx_fixup = genelink_tx_fixup, |
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c index ba72a7281cb0..01db4602a39e 100644 --- a/drivers/net/usb/net1080.c +++ b/drivers/net/usb/net1080.c | |||
@@ -560,7 +560,7 @@ static int net1080_bind(struct usbnet *dev, struct usb_interface *intf) | |||
560 | 560 | ||
561 | static const struct driver_info net1080_info = { | 561 | static const struct driver_info net1080_info = { |
562 | .description = "NetChip TurboCONNECT", | 562 | .description = "NetChip TurboCONNECT", |
563 | .flags = FLAG_FRAMING_NC, | 563 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_NC, |
564 | .bind = net1080_bind, | 564 | .bind = net1080_bind, |
565 | .reset = net1080_reset, | 565 | .reset = net1080_reset, |
566 | .check_connect = net1080_check_connect, | 566 | .check_connect = net1080_check_connect, |
diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c index 08ad269f6b4e..823c53751307 100644 --- a/drivers/net/usb/plusb.c +++ b/drivers/net/usb/plusb.c | |||
@@ -96,7 +96,7 @@ static int pl_reset(struct usbnet *dev) | |||
96 | 96 | ||
97 | static const struct driver_info prolific_info = { | 97 | static const struct driver_info prolific_info = { |
98 | .description = "Prolific PL-2301/PL-2302", | 98 | .description = "Prolific PL-2301/PL-2302", |
99 | .flags = FLAG_NO_SETINT, | 99 | .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT, |
100 | /* some PL-2302 versions seem to fail usb_set_interface() */ | 100 | /* some PL-2302 versions seem to fail usb_set_interface() */ |
101 | .reset = pl_reset, | 101 | .reset = pl_reset, |
102 | }; | 102 | }; |
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index dd8a4adf48ca..5994a25c56ac 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -573,7 +573,7 @@ EXPORT_SYMBOL_GPL(rndis_tx_fixup); | |||
573 | 573 | ||
574 | static const struct driver_info rndis_info = { | 574 | static const struct driver_info rndis_info = { |
575 | .description = "RNDIS device", | 575 | .description = "RNDIS device", |
576 | .flags = FLAG_ETHER | FLAG_FRAMING_RN | FLAG_NO_SETINT, | 576 | .flags = FLAG_ETHER | FLAG_POINTTOPOINT | FLAG_FRAMING_RN | FLAG_NO_SETINT, |
577 | .bind = rndis_bind, | 577 | .bind = rndis_bind, |
578 | .unbind = rndis_unbind, | 578 | .unbind = rndis_unbind, |
579 | .status = rndis_status, | 579 | .status = rndis_status, |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index cf58b7682565..069c1cf0fdf7 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1380,7 +1380,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1380 | // else "eth%d" when there's reasonable doubt. userspace | 1380 | // else "eth%d" when there's reasonable doubt. userspace |
1381 | // can rename the link if it knows better. | 1381 | // can rename the link if it knows better. |
1382 | if ((dev->driver_info->flags & FLAG_ETHER) != 0 && | 1382 | if ((dev->driver_info->flags & FLAG_ETHER) != 0 && |
1383 | (net->dev_addr [0] & 0x02) == 0) | 1383 | ((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 || |
1384 | (net->dev_addr [0] & 0x02) == 0)) | ||
1384 | strcpy (net->name, "eth%d"); | 1385 | strcpy (net->name, "eth%d"); |
1385 | /* WLAN devices should always be named "wlan%d" */ | 1386 | /* WLAN devices should always be named "wlan%d" */ |
1386 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) | 1387 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) |
diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c index 3eb0b167b5b4..241756e0e86f 100644 --- a/drivers/net/usb/zaurus.c +++ b/drivers/net/usb/zaurus.c | |||
@@ -102,7 +102,7 @@ static int always_connected (struct usbnet *dev) | |||
102 | 102 | ||
103 | static const struct driver_info zaurus_sl5x00_info = { | 103 | static const struct driver_info zaurus_sl5x00_info = { |
104 | .description = "Sharp Zaurus SL-5x00", | 104 | .description = "Sharp Zaurus SL-5x00", |
105 | .flags = FLAG_FRAMING_Z, | 105 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, |
106 | .check_connect = always_connected, | 106 | .check_connect = always_connected, |
107 | .bind = zaurus_bind, | 107 | .bind = zaurus_bind, |
108 | .unbind = usbnet_cdc_unbind, | 108 | .unbind = usbnet_cdc_unbind, |
@@ -112,7 +112,7 @@ static const struct driver_info zaurus_sl5x00_info = { | |||
112 | 112 | ||
113 | static const struct driver_info zaurus_pxa_info = { | 113 | static const struct driver_info zaurus_pxa_info = { |
114 | .description = "Sharp Zaurus, PXA-2xx based", | 114 | .description = "Sharp Zaurus, PXA-2xx based", |
115 | .flags = FLAG_FRAMING_Z, | 115 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, |
116 | .check_connect = always_connected, | 116 | .check_connect = always_connected, |
117 | .bind = zaurus_bind, | 117 | .bind = zaurus_bind, |
118 | .unbind = usbnet_cdc_unbind, | 118 | .unbind = usbnet_cdc_unbind, |
@@ -122,7 +122,7 @@ static const struct driver_info zaurus_pxa_info = { | |||
122 | 122 | ||
123 | static const struct driver_info olympus_mxl_info = { | 123 | static const struct driver_info olympus_mxl_info = { |
124 | .description = "Olympus R1000", | 124 | .description = "Olympus R1000", |
125 | .flags = FLAG_FRAMING_Z, | 125 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, |
126 | .check_connect = always_connected, | 126 | .check_connect = always_connected, |
127 | .bind = zaurus_bind, | 127 | .bind = zaurus_bind, |
128 | .unbind = usbnet_cdc_unbind, | 128 | .unbind = usbnet_cdc_unbind, |
@@ -258,7 +258,7 @@ bad_desc: | |||
258 | 258 | ||
259 | static const struct driver_info bogus_mdlm_info = { | 259 | static const struct driver_info bogus_mdlm_info = { |
260 | .description = "pseudo-MDLM (BLAN) device", | 260 | .description = "pseudo-MDLM (BLAN) device", |
261 | .flags = FLAG_FRAMING_Z, | 261 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, |
262 | .check_connect = always_connected, | 262 | .check_connect = always_connected, |
263 | .tx_fixup = zaurus_tx_fixup, | 263 | .tx_fixup = zaurus_tx_fixup, |
264 | .bind = blan_mdlm_bind, | 264 | .bind = blan_mdlm_bind, |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 524825720a09..dddb85de622d 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1048,6 +1048,8 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1048 | "Starting driver with initial channel: %d MHz\n", | 1048 | "Starting driver with initial channel: %d MHz\n", |
1049 | curchan->center_freq); | 1049 | curchan->center_freq); |
1050 | 1050 | ||
1051 | ath9k_ps_wakeup(sc); | ||
1052 | |||
1051 | mutex_lock(&sc->mutex); | 1053 | mutex_lock(&sc->mutex); |
1052 | 1054 | ||
1053 | /* setup initial channel */ | 1055 | /* setup initial channel */ |
@@ -1143,6 +1145,8 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1143 | mutex_unlock: | 1145 | mutex_unlock: |
1144 | mutex_unlock(&sc->mutex); | 1146 | mutex_unlock(&sc->mutex); |
1145 | 1147 | ||
1148 | ath9k_ps_restore(sc); | ||
1149 | |||
1146 | return r; | 1150 | return r; |
1147 | } | 1151 | } |
1148 | 1152 | ||
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h index c6a5fae634a0..9cad061cc1d2 100644 --- a/drivers/net/wireless/ath/carl9170/carl9170.h +++ b/drivers/net/wireless/ath/carl9170/carl9170.h | |||
@@ -443,6 +443,7 @@ struct carl9170_ba_stats { | |||
443 | u8 ampdu_len; | 443 | u8 ampdu_len; |
444 | u8 ampdu_ack_len; | 444 | u8 ampdu_ack_len; |
445 | bool clear; | 445 | bool clear; |
446 | bool req; | ||
446 | }; | 447 | }; |
447 | 448 | ||
448 | struct carl9170_sta_info { | 449 | struct carl9170_sta_info { |
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index ede3d7e5a048..89fe60accf85 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c | |||
@@ -1355,6 +1355,7 @@ static int carl9170_op_ampdu_action(struct ieee80211_hw *hw, | |||
1355 | tid_info = rcu_dereference(sta_info->agg[tid]); | 1355 | tid_info = rcu_dereference(sta_info->agg[tid]); |
1356 | 1356 | ||
1357 | sta_info->stats[tid].clear = true; | 1357 | sta_info->stats[tid].clear = true; |
1358 | sta_info->stats[tid].req = false; | ||
1358 | 1359 | ||
1359 | if (tid_info) { | 1360 | if (tid_info) { |
1360 | bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE); | 1361 | bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE); |
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index 0ef70b6fc512..cb70ed7ec5cc 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c | |||
@@ -383,6 +383,7 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar, | |||
383 | 383 | ||
384 | if (sta_info->stats[tid].clear) { | 384 | if (sta_info->stats[tid].clear) { |
385 | sta_info->stats[tid].clear = false; | 385 | sta_info->stats[tid].clear = false; |
386 | sta_info->stats[tid].req = false; | ||
386 | sta_info->stats[tid].ampdu_len = 0; | 387 | sta_info->stats[tid].ampdu_len = 0; |
387 | sta_info->stats[tid].ampdu_ack_len = 0; | 388 | sta_info->stats[tid].ampdu_ack_len = 0; |
388 | } | 389 | } |
@@ -391,10 +392,16 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar, | |||
391 | if (txinfo->status.rates[0].count == 1) | 392 | if (txinfo->status.rates[0].count == 1) |
392 | sta_info->stats[tid].ampdu_ack_len++; | 393 | sta_info->stats[tid].ampdu_ack_len++; |
393 | 394 | ||
395 | if (!(txinfo->flags & IEEE80211_TX_STAT_ACK)) | ||
396 | sta_info->stats[tid].req = true; | ||
397 | |||
394 | if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) { | 398 | if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) { |
395 | super->s.rix = sta_info->stats[tid].ampdu_len; | 399 | super->s.rix = sta_info->stats[tid].ampdu_len; |
396 | super->s.cnt = sta_info->stats[tid].ampdu_ack_len; | 400 | super->s.cnt = sta_info->stats[tid].ampdu_ack_len; |
397 | txinfo->flags |= IEEE80211_TX_STAT_AMPDU; | 401 | txinfo->flags |= IEEE80211_TX_STAT_AMPDU; |
402 | if (sta_info->stats[tid].req) | ||
403 | txinfo->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; | ||
404 | |||
398 | sta_info->stats[tid].clear = true; | 405 | sta_info->stats[tid].clear = true; |
399 | } | 406 | } |
400 | spin_unlock_bh(&tid_info->lock); | 407 | spin_unlock_bh(&tid_info->lock); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index d418b647be80..a209a0e76bf0 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
@@ -1805,6 +1805,15 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw, | |||
1805 | 1805 | ||
1806 | mutex_lock(&priv->mutex); | 1806 | mutex_lock(&priv->mutex); |
1807 | 1807 | ||
1808 | if (!ctx->vif || !iwl_legacy_is_ready_rf(priv)) { | ||
1809 | /* | ||
1810 | * Huh? But wait ... this can maybe happen when | ||
1811 | * we're in the middle of a firmware restart! | ||
1812 | */ | ||
1813 | err = -EBUSY; | ||
1814 | goto out; | ||
1815 | } | ||
1816 | |||
1808 | interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; | 1817 | interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; |
1809 | 1818 | ||
1810 | if (!(interface_modes & BIT(newtype))) { | 1819 | if (!(interface_modes & BIT(newtype))) { |
@@ -1832,6 +1841,7 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw, | |||
1832 | /* success */ | 1841 | /* success */ |
1833 | iwl_legacy_teardown_interface(priv, vif, true); | 1842 | iwl_legacy_teardown_interface(priv, vif, true); |
1834 | vif->type = newtype; | 1843 | vif->type = newtype; |
1844 | vif->p2p = newp2p; | ||
1835 | err = iwl_legacy_setup_interface(priv, ctx); | 1845 | err = iwl_legacy_setup_interface(priv, ctx); |
1836 | WARN_ON(err); | 1846 | WARN_ON(err); |
1837 | /* | 1847 | /* |
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c index ab87e1b73529..28eb3d885ba1 100644 --- a/drivers/net/wireless/iwlegacy/iwl3945-base.c +++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c | |||
@@ -93,6 +93,7 @@ MODULE_LICENSE("GPL"); | |||
93 | struct iwl_mod_params iwl3945_mod_params = { | 93 | struct iwl_mod_params iwl3945_mod_params = { |
94 | .sw_crypto = 1, | 94 | .sw_crypto = 1, |
95 | .restart_fw = 1, | 95 | .restart_fw = 1, |
96 | .disable_hw_scan = 1, | ||
96 | /* the rest are 0 by default */ | 97 | /* the rest are 0 by default */ |
97 | }; | 98 | }; |
98 | 99 | ||
@@ -3960,8 +3961,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
3960 | * "the hard way", rather than using device's scan. | 3961 | * "the hard way", rather than using device's scan. |
3961 | */ | 3962 | */ |
3962 | if (iwl3945_mod_params.disable_hw_scan) { | 3963 | if (iwl3945_mod_params.disable_hw_scan) { |
3963 | dev_printk(KERN_DEBUG, &(pdev->dev), | 3964 | IWL_DEBUG_INFO(priv, "Disabling hw_scan\n"); |
3964 | "sw scan support is deprecated\n"); | ||
3965 | iwl3945_hw_ops.hw_scan = NULL; | 3965 | iwl3945_hw_ops.hw_scan = NULL; |
3966 | } | 3966 | } |
3967 | 3967 | ||
@@ -4280,8 +4280,7 @@ MODULE_PARM_DESC(swcrypto, | |||
4280 | "using software crypto (default 1 [software])"); | 4280 | "using software crypto (default 1 [software])"); |
4281 | module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, | 4281 | module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, |
4282 | int, S_IRUGO); | 4282 | int, S_IRUGO); |
4283 | MODULE_PARM_DESC(disable_hw_scan, | 4283 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)"); |
4284 | "disable hardware scanning (default 0) (deprecated)"); | ||
4285 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG | 4284 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG |
4286 | module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR); | 4285 | module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR); |
4287 | MODULE_PARM_DESC(debug, "debug output mask"); | 4286 | MODULE_PARM_DESC(debug, "debug output mask"); |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 4e368657a83c..37509d019910 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -730,8 +730,12 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
730 | { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, | 730 | { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, |
731 | { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 731 | { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
732 | { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 732 | { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
733 | { USB_DEVICE(0x050d, 0x825b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
734 | { USB_DEVICE(0x050d, 0x935a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
735 | { USB_DEVICE(0x050d, 0x935b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
733 | /* Buffalo */ | 736 | /* Buffalo */ |
734 | { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, | 737 | { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, |
738 | { USB_DEVICE(0x0411, 0x016f), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
735 | /* Conceptronic */ | 739 | /* Conceptronic */ |
736 | { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, | 740 | { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, |
737 | { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, | 741 | { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, |
@@ -818,6 +822,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
818 | /* Pegatron */ | 822 | /* Pegatron */ |
819 | { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 823 | { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
820 | { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, | 824 | { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, |
825 | { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
821 | /* Philips */ | 826 | /* Philips */ |
822 | { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 827 | { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, |
823 | /* Planex */ | 828 | /* Planex */ |
@@ -899,6 +904,8 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
899 | { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | 904 | { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, |
900 | /* Sitecom */ | 905 | /* Sitecom */ |
901 | { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, | 906 | { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, |
907 | /* Toshiba */ | ||
908 | { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
902 | /* Zinwell */ | 909 | /* Zinwell */ |
903 | { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, | 910 | { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, |
904 | #endif | 911 | #endif |
@@ -961,7 +968,6 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
961 | { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, | 968 | { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, |
962 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, | 969 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, |
963 | { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, | 970 | { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, |
964 | { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
965 | /* Planex */ | 971 | /* Planex */ |
966 | { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) }, | 972 | { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) }, |
967 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, | 973 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, |
@@ -975,8 +981,6 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
975 | /* Sweex */ | 981 | /* Sweex */ |
976 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, | 982 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, |
977 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, | 983 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, |
978 | /* Toshiba */ | ||
979 | { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
980 | /* Zyxel */ | 984 | /* Zyxel */ |
981 | { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 985 | { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
982 | #endif | 986 | #endif |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5eeb2cd3631c..0249fe7e3872 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2598,8 +2598,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev, | |||
2598 | 2598 | ||
2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | 2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) |
2600 | { | 2600 | { |
2601 | if (dev->hw_features & NETIF_F_RXCSUM) | 2601 | if (dev->features & NETIF_F_RXCSUM) |
2602 | return !!(dev->features & NETIF_F_RXCSUM); | 2602 | return 1; |
2603 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) | 2603 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) |
2604 | return 0; | 2604 | return 0; |
2605 | return dev->ethtool_ops->get_rx_csum(dev); | 2605 | return dev->ethtool_ops->get_rx_csum(dev); |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 201f2228f731..3c7329b8ea0e 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -97,6 +97,8 @@ struct driver_info { | |||
97 | 97 | ||
98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | 98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ |
99 | 99 | ||
100 | #define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ | ||
101 | |||
100 | /* | 102 | /* |
101 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. | 103 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. |
102 | * Affects statistic (counters) and short packet handling. | 104 | * Affects statistic (counters) and short packet handling. |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index ec6acf2f1c0b..2c0d309c7381 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -84,6 +84,8 @@ enum { | |||
84 | HCI_SERVICE_CACHE, | 84 | HCI_SERVICE_CACHE, |
85 | HCI_LINK_KEYS, | 85 | HCI_LINK_KEYS, |
86 | HCI_DEBUG_KEYS, | 86 | HCI_DEBUG_KEYS, |
87 | |||
88 | HCI_RESET, | ||
87 | }; | 89 | }; |
88 | 90 | ||
89 | /* HCI ioctl defines */ | 91 | /* HCI ioctl defines */ |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index cc9185ca8fd1..0f6e60a9c308 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -422,7 +422,7 @@ struct sctp_cookie { | |||
422 | __u32 adaptation_ind; | 422 | __u32 adaptation_ind; |
423 | 423 | ||
424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; | 424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; |
425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2]; | 425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2]; |
426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; | 426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; |
427 | 427 | ||
428 | /* This is a shim for my peer's INIT packet, followed by | 428 | /* This is a shim for my peer's INIT packet, followed by |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index b372fb8bcdcf..2216620ff296 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -186,6 +186,7 @@ static void hci_reset_req(struct hci_dev *hdev, unsigned long opt) | |||
186 | BT_DBG("%s %ld", hdev->name, opt); | 186 | BT_DBG("%s %ld", hdev->name, opt); |
187 | 187 | ||
188 | /* Reset device */ | 188 | /* Reset device */ |
189 | set_bit(HCI_RESET, &hdev->flags); | ||
189 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); | 190 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); |
190 | } | 191 | } |
191 | 192 | ||
@@ -213,8 +214,10 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) | |||
213 | /* Mandatory initialization */ | 214 | /* Mandatory initialization */ |
214 | 215 | ||
215 | /* Reset */ | 216 | /* Reset */ |
216 | if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) | 217 | if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) { |
218 | set_bit(HCI_RESET, &hdev->flags); | ||
217 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); | 219 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); |
220 | } | ||
218 | 221 | ||
219 | /* Read Local Supported Features */ | 222 | /* Read Local Supported Features */ |
220 | hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); | 223 | hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); |
@@ -584,6 +587,9 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
584 | hci_req_cancel(hdev, ENODEV); | 587 | hci_req_cancel(hdev, ENODEV); |
585 | hci_req_lock(hdev); | 588 | hci_req_lock(hdev); |
586 | 589 | ||
590 | /* Stop timer, it might be running */ | ||
591 | del_timer_sync(&hdev->cmd_timer); | ||
592 | |||
587 | if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { | 593 | if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { |
588 | hci_req_unlock(hdev); | 594 | hci_req_unlock(hdev); |
589 | return 0; | 595 | return 0; |
@@ -623,7 +629,6 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
623 | 629 | ||
624 | /* Drop last sent command */ | 630 | /* Drop last sent command */ |
625 | if (hdev->sent_cmd) { | 631 | if (hdev->sent_cmd) { |
626 | del_timer_sync(&hdev->cmd_timer); | ||
627 | kfree_skb(hdev->sent_cmd); | 632 | kfree_skb(hdev->sent_cmd); |
628 | hdev->sent_cmd = NULL; | 633 | hdev->sent_cmd = NULL; |
629 | } | 634 | } |
@@ -1074,6 +1079,7 @@ static void hci_cmd_timer(unsigned long arg) | |||
1074 | 1079 | ||
1075 | BT_ERR("%s command tx timeout", hdev->name); | 1080 | BT_ERR("%s command tx timeout", hdev->name); |
1076 | atomic_set(&hdev->cmd_cnt, 1); | 1081 | atomic_set(&hdev->cmd_cnt, 1); |
1082 | clear_bit(HCI_RESET, &hdev->flags); | ||
1077 | tasklet_schedule(&hdev->cmd_task); | 1083 | tasklet_schedule(&hdev->cmd_task); |
1078 | } | 1084 | } |
1079 | 1085 | ||
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 3fbfa50c2bff..cebe7588469f 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -183,6 +183,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb) | |||
183 | 183 | ||
184 | BT_DBG("%s status 0x%x", hdev->name, status); | 184 | BT_DBG("%s status 0x%x", hdev->name, status); |
185 | 185 | ||
186 | clear_bit(HCI_RESET, &hdev->flags); | ||
187 | |||
186 | hci_req_complete(hdev, HCI_OP_RESET, status); | 188 | hci_req_complete(hdev, HCI_OP_RESET, status); |
187 | } | 189 | } |
188 | 190 | ||
@@ -1847,7 +1849,7 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
1847 | if (ev->opcode != HCI_OP_NOP) | 1849 | if (ev->opcode != HCI_OP_NOP) |
1848 | del_timer(&hdev->cmd_timer); | 1850 | del_timer(&hdev->cmd_timer); |
1849 | 1851 | ||
1850 | if (ev->ncmd) { | 1852 | if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) { |
1851 | atomic_set(&hdev->cmd_cnt, 1); | 1853 | atomic_set(&hdev->cmd_cnt, 1); |
1852 | if (!skb_queue_empty(&hdev->cmd_q)) | 1854 | if (!skb_queue_empty(&hdev->cmd_q)) |
1853 | tasklet_schedule(&hdev->cmd_task); | 1855 | tasklet_schedule(&hdev->cmd_task); |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index c9f9cecca527..ca27f3a41536 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1116,7 +1116,9 @@ int l2cap_ertm_send(struct sock *sk) | |||
1116 | bt_cb(skb)->tx_seq = pi->next_tx_seq; | 1116 | bt_cb(skb)->tx_seq = pi->next_tx_seq; |
1117 | pi->next_tx_seq = (pi->next_tx_seq + 1) % 64; | 1117 | pi->next_tx_seq = (pi->next_tx_seq + 1) % 64; |
1118 | 1118 | ||
1119 | pi->unacked_frames++; | 1119 | if (bt_cb(skb)->retries == 1) |
1120 | pi->unacked_frames++; | ||
1121 | |||
1120 | pi->frames_sent++; | 1122 | pi->frames_sent++; |
1121 | 1123 | ||
1122 | if (skb_queue_is_last(TX_QUEUE(sk), skb)) | 1124 | if (skb_queue_is_last(TX_QUEUE(sk), skb)) |
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index fc85e7ae33c7..f77308e63e58 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -923,8 +923,9 @@ void __l2cap_sock_close(struct sock *sk, int reason) | |||
923 | rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO); | 923 | rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO); |
924 | l2cap_send_cmd(conn, l2cap_pi(sk)->ident, | 924 | l2cap_send_cmd(conn, l2cap_pi(sk)->ident, |
925 | L2CAP_CONN_RSP, sizeof(rsp), &rsp); | 925 | L2CAP_CONN_RSP, sizeof(rsp), &rsp); |
926 | } else | 926 | } |
927 | l2cap_chan_del(sk, reason); | 927 | |
928 | l2cap_chan_del(sk, reason); | ||
928 | break; | 929 | break; |
929 | 930 | ||
930 | case BT_CONNECT: | 931 | case BT_CONNECT: |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 0054c74e27b7..4476d8e3c0f2 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -1230,6 +1230,8 @@ static int user_confirm_reply(struct sock *sk, u16 index, unsigned char *data, | |||
1230 | if (!hdev) | 1230 | if (!hdev) |
1231 | return cmd_status(sk, index, mgmt_op, ENODEV); | 1231 | return cmd_status(sk, index, mgmt_op, ENODEV); |
1232 | 1232 | ||
1233 | hci_dev_lock_bh(hdev); | ||
1234 | |||
1233 | if (!test_bit(HCI_UP, &hdev->flags)) { | 1235 | if (!test_bit(HCI_UP, &hdev->flags)) { |
1234 | err = cmd_status(sk, index, mgmt_op, ENETDOWN); | 1236 | err = cmd_status(sk, index, mgmt_op, ENETDOWN); |
1235 | goto failed; | 1237 | goto failed; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index dfa5beb0c1c8..8b0d0167e44a 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1003,7 +1003,8 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, | |||
1003 | int nlen; | 1003 | int nlen; |
1004 | u8 flags; | 1004 | u8 flags; |
1005 | 1005 | ||
1006 | BUG_ON(len > skb->len); | 1006 | if (WARN_ON(len > skb->len)) |
1007 | return -EINVAL; | ||
1007 | 1008 | ||
1008 | nsize = skb_headlen(skb) - len; | 1009 | nsize = skb_headlen(skb) - len; |
1009 | if (nsize < 0) | 1010 | if (nsize < 0) |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 2b0c186862c8..56fa12538d45 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -503,6 +503,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req, | |||
503 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); | 503 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); |
504 | if (IS_ERR(dst)) { | 504 | if (IS_ERR(dst)) { |
505 | err = PTR_ERR(dst); | 505 | err = PTR_ERR(dst); |
506 | dst = NULL; | ||
506 | goto done; | 507 | goto done; |
507 | } | 508 | } |
508 | skb = tcp_make_synack(sk, dst, req, rvp); | 509 | skb = tcp_make_synack(sk, dst, req, rvp); |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 8c02469b7176..af3c56482c80 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -342,7 +342,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
342 | if (IS_ERR(key->u.ccmp.tfm)) { | 342 | if (IS_ERR(key->u.ccmp.tfm)) { |
343 | err = PTR_ERR(key->u.ccmp.tfm); | 343 | err = PTR_ERR(key->u.ccmp.tfm); |
344 | kfree(key); | 344 | kfree(key); |
345 | key = ERR_PTR(err); | 345 | return ERR_PTR(err); |
346 | } | 346 | } |
347 | break; | 347 | break; |
348 | case WLAN_CIPHER_SUITE_AES_CMAC: | 348 | case WLAN_CIPHER_SUITE_AES_CMAC: |
@@ -360,7 +360,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
360 | if (IS_ERR(key->u.aes_cmac.tfm)) { | 360 | if (IS_ERR(key->u.aes_cmac.tfm)) { |
361 | err = PTR_ERR(key->u.aes_cmac.tfm); | 361 | err = PTR_ERR(key->u.aes_cmac.tfm); |
362 | kfree(key); | 362 | kfree(key); |
363 | key = ERR_PTR(err); | 363 | return ERR_PTR(err); |
364 | } | 364 | } |
365 | break; | 365 | break; |
366 | } | 366 | } |
@@ -400,11 +400,12 @@ int ieee80211_key_link(struct ieee80211_key *key, | |||
400 | { | 400 | { |
401 | struct ieee80211_key *old_key; | 401 | struct ieee80211_key *old_key; |
402 | int idx, ret; | 402 | int idx, ret; |
403 | bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; | 403 | bool pairwise; |
404 | 404 | ||
405 | BUG_ON(!sdata); | 405 | BUG_ON(!sdata); |
406 | BUG_ON(!key); | 406 | BUG_ON(!key); |
407 | 407 | ||
408 | pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; | ||
408 | idx = key->conf.keyidx; | 409 | idx = key->conf.keyidx; |
409 | key->local = sdata->local; | 410 | key->local = sdata->local; |
410 | key->sdata = sdata; | 411 | key->sdata = sdata; |
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 8212a8bebf06..dbdebeda097f 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
@@ -659,18 +659,14 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, | |||
659 | struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; | 659 | struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; |
660 | struct ieee80211_local *local = hw_to_local(mp->hw); | 660 | struct ieee80211_local *local = hw_to_local(mp->hw); |
661 | u16 sta_cap = sta->ht_cap.cap; | 661 | u16 sta_cap = sta->ht_cap.cap; |
662 | int n_supported = 0; | ||
662 | int ack_dur; | 663 | int ack_dur; |
663 | int stbc; | 664 | int stbc; |
664 | int i; | 665 | int i; |
665 | 666 | ||
666 | /* fall back to the old minstrel for legacy stations */ | 667 | /* fall back to the old minstrel for legacy stations */ |
667 | if (!sta->ht_cap.ht_supported) { | 668 | if (!sta->ht_cap.ht_supported) |
668 | msp->is_ht = false; | 669 | goto use_legacy; |
669 | memset(&msp->legacy, 0, sizeof(msp->legacy)); | ||
670 | msp->legacy.r = msp->ratelist; | ||
671 | msp->legacy.sample_table = msp->sample_table; | ||
672 | return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy); | ||
673 | } | ||
674 | 670 | ||
675 | BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) != | 671 | BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) != |
676 | MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS); | 672 | MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS); |
@@ -725,7 +721,22 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, | |||
725 | 721 | ||
726 | mi->groups[i].supported = | 722 | mi->groups[i].supported = |
727 | mcs->rx_mask[minstrel_mcs_groups[i].streams - 1]; | 723 | mcs->rx_mask[minstrel_mcs_groups[i].streams - 1]; |
724 | |||
725 | if (mi->groups[i].supported) | ||
726 | n_supported++; | ||
728 | } | 727 | } |
728 | |||
729 | if (!n_supported) | ||
730 | goto use_legacy; | ||
731 | |||
732 | return; | ||
733 | |||
734 | use_legacy: | ||
735 | msp->is_ht = false; | ||
736 | memset(&msp->legacy, 0, sizeof(msp->legacy)); | ||
737 | msp->legacy.r = msp->ratelist; | ||
738 | msp->legacy.sample_table = msp->sample_table; | ||
739 | return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy); | ||
729 | } | 740 | } |
730 | 741 | ||
731 | static void | 742 | static void |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5c1930ba8ebe..aa5cc37b4921 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -612,7 +612,8 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw, | |||
612 | skipped++; | 612 | skipped++; |
613 | continue; | 613 | continue; |
614 | } | 614 | } |
615 | if (!time_after(jiffies, tid_agg_rx->reorder_time[j] + | 615 | if (skipped && |
616 | !time_after(jiffies, tid_agg_rx->reorder_time[j] + | ||
616 | HT_RX_REORDER_BUF_TIMEOUT)) | 617 | HT_RX_REORDER_BUF_TIMEOUT)) |
617 | goto set_release_timer; | 618 | goto set_release_timer; |
618 | 619 | ||
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index de98665db524..b3434cc7d0cf 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -3106,10 +3106,10 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, | |||
3106 | 3106 | ||
3107 | /* create an ASCONF_ACK chunk. | 3107 | /* create an ASCONF_ACK chunk. |
3108 | * Based on the definitions of parameters, we know that the size of | 3108 | * Based on the definitions of parameters, we know that the size of |
3109 | * ASCONF_ACK parameters are less than or equal to the twice of ASCONF | 3109 | * ASCONF_ACK parameters are less than or equal to the fourfold of ASCONF |
3110 | * parameters. | 3110 | * parameters. |
3111 | */ | 3111 | */ |
3112 | asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 2); | 3112 | asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 4); |
3113 | if (!asconf_ack) | 3113 | if (!asconf_ack) |
3114 | goto done; | 3114 | goto done; |
3115 | 3115 | ||
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index ea427f418f64..fbf6f33ae4d0 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -124,6 +124,15 @@ void cfg80211_bss_age(struct cfg80211_registered_device *dev, | |||
124 | } | 124 | } |
125 | 125 | ||
126 | /* must hold dev->bss_lock! */ | 126 | /* must hold dev->bss_lock! */ |
127 | static void __cfg80211_unlink_bss(struct cfg80211_registered_device *dev, | ||
128 | struct cfg80211_internal_bss *bss) | ||
129 | { | ||
130 | list_del_init(&bss->list); | ||
131 | rb_erase(&bss->rbn, &dev->bss_tree); | ||
132 | kref_put(&bss->ref, bss_release); | ||
133 | } | ||
134 | |||
135 | /* must hold dev->bss_lock! */ | ||
127 | void cfg80211_bss_expire(struct cfg80211_registered_device *dev) | 136 | void cfg80211_bss_expire(struct cfg80211_registered_device *dev) |
128 | { | 137 | { |
129 | struct cfg80211_internal_bss *bss, *tmp; | 138 | struct cfg80211_internal_bss *bss, *tmp; |
@@ -134,9 +143,7 @@ void cfg80211_bss_expire(struct cfg80211_registered_device *dev) | |||
134 | continue; | 143 | continue; |
135 | if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) | 144 | if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) |
136 | continue; | 145 | continue; |
137 | list_del(&bss->list); | 146 | __cfg80211_unlink_bss(dev, bss); |
138 | rb_erase(&bss->rbn, &dev->bss_tree); | ||
139 | kref_put(&bss->ref, bss_release); | ||
140 | expired = true; | 147 | expired = true; |
141 | } | 148 | } |
142 | 149 | ||
@@ -585,16 +592,23 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
585 | struct cfg80211_internal_bss *res; | 592 | struct cfg80211_internal_bss *res; |
586 | size_t ielen = len - offsetof(struct ieee80211_mgmt, | 593 | size_t ielen = len - offsetof(struct ieee80211_mgmt, |
587 | u.probe_resp.variable); | 594 | u.probe_resp.variable); |
588 | size_t privsz = wiphy->bss_priv_size; | 595 | size_t privsz; |
596 | |||
597 | if (WARN_ON(!mgmt)) | ||
598 | return NULL; | ||
599 | |||
600 | if (WARN_ON(!wiphy)) | ||
601 | return NULL; | ||
589 | 602 | ||
590 | if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && | 603 | if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && |
591 | (signal < 0 || signal > 100))) | 604 | (signal < 0 || signal > 100))) |
592 | return NULL; | 605 | return NULL; |
593 | 606 | ||
594 | if (WARN_ON(!mgmt || !wiphy || | 607 | if (WARN_ON(len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) |
595 | len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) | ||
596 | return NULL; | 608 | return NULL; |
597 | 609 | ||
610 | privsz = wiphy->bss_priv_size; | ||
611 | |||
598 | res = kzalloc(sizeof(*res) + privsz + ielen, gfp); | 612 | res = kzalloc(sizeof(*res) + privsz + ielen, gfp); |
599 | if (!res) | 613 | if (!res) |
600 | return NULL; | 614 | return NULL; |
@@ -662,11 +676,8 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) | |||
662 | 676 | ||
663 | spin_lock_bh(&dev->bss_lock); | 677 | spin_lock_bh(&dev->bss_lock); |
664 | if (!list_empty(&bss->list)) { | 678 | if (!list_empty(&bss->list)) { |
665 | list_del_init(&bss->list); | 679 | __cfg80211_unlink_bss(dev, bss); |
666 | dev->bss_generation++; | 680 | dev->bss_generation++; |
667 | rb_erase(&bss->rbn, &dev->bss_tree); | ||
668 | |||
669 | kref_put(&bss->ref, bss_release); | ||
670 | } | 681 | } |
671 | spin_unlock_bh(&dev->bss_lock); | 682 | spin_unlock_bh(&dev->bss_lock); |
672 | } | 683 | } |