diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/Kconfig | 3 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_main.c | 6 | ||||
-rw-r--r-- | drivers/net/can/Kconfig | 4 | ||||
-rw-r--r-- | drivers/net/cxgb3/sge.c | 4 | ||||
-rw-r--r-- | drivers/net/ppp_deflate.c | 5 | ||||
-rw-r--r-- | drivers/net/r8169.c | 2 | ||||
-rw-r--r-- | drivers/net/rionet.c | 28 | ||||
-rw-r--r-- | drivers/net/usb/kalmia.c | 42 | ||||
-rw-r--r-- | drivers/net/usb/zaurus.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 20 |
11 files changed, 84 insertions, 53 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 19f04a34783a..93359fab240e 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -3416,7 +3416,8 @@ config NETCONSOLE | |||
3416 | 3416 | ||
3417 | config NETCONSOLE_DYNAMIC | 3417 | config NETCONSOLE_DYNAMIC |
3418 | bool "Dynamic reconfiguration of logging targets" | 3418 | bool "Dynamic reconfiguration of logging targets" |
3419 | depends on NETCONSOLE && SYSFS && CONFIGFS_FS | 3419 | depends on NETCONSOLE && SYSFS && CONFIGFS_FS && \ |
3420 | !(NETCONSOLE=y && CONFIGFS_FS=m) | ||
3420 | help | 3421 | help |
3421 | This option enables the ability to dynamically reconfigure target | 3422 | This option enables the ability to dynamically reconfigure target |
3422 | parameters (interface, IP addresses, port numbers, MAC addresses) | 3423 | parameters (interface, IP addresses, port numbers, MAC addresses) |
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 4b70311a11ef..74be989f51c5 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/zlib.h> | 49 | #include <linux/zlib.h> |
50 | #include <linux/io.h> | 50 | #include <linux/io.h> |
51 | #include <linux/stringify.h> | 51 | #include <linux/stringify.h> |
52 | #include <linux/vmalloc.h> | ||
52 | 53 | ||
53 | #define BNX2X_MAIN | 54 | #define BNX2X_MAIN |
54 | #include "bnx2x.h" | 55 | #include "bnx2x.h" |
@@ -4537,8 +4538,7 @@ static int bnx2x_gunzip_init(struct bnx2x *bp) | |||
4537 | if (bp->strm == NULL) | 4538 | if (bp->strm == NULL) |
4538 | goto gunzip_nomem2; | 4539 | goto gunzip_nomem2; |
4539 | 4540 | ||
4540 | bp->strm->workspace = kmalloc(zlib_inflate_workspacesize(), | 4541 | bp->strm->workspace = vmalloc(zlib_inflate_workspacesize()); |
4541 | GFP_KERNEL); | ||
4542 | if (bp->strm->workspace == NULL) | 4542 | if (bp->strm->workspace == NULL) |
4543 | goto gunzip_nomem3; | 4543 | goto gunzip_nomem3; |
4544 | 4544 | ||
@@ -4562,7 +4562,7 @@ gunzip_nomem1: | |||
4562 | static void bnx2x_gunzip_end(struct bnx2x *bp) | 4562 | static void bnx2x_gunzip_end(struct bnx2x *bp) |
4563 | { | 4563 | { |
4564 | if (bp->strm) { | 4564 | if (bp->strm) { |
4565 | kfree(bp->strm->workspace); | 4565 | vfree(bp->strm->workspace); |
4566 | kfree(bp->strm); | 4566 | kfree(bp->strm); |
4567 | bp->strm = NULL; | 4567 | bp->strm = NULL; |
4568 | } | 4568 | } |
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig index 1d699e3df547..754df5ef1729 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig | |||
@@ -36,7 +36,7 @@ config CAN_SLCAN | |||
36 | config CAN_DEV | 36 | config CAN_DEV |
37 | tristate "Platform CAN drivers with Netlink support" | 37 | tristate "Platform CAN drivers with Netlink support" |
38 | depends on CAN | 38 | depends on CAN |
39 | default Y | 39 | default y |
40 | ---help--- | 40 | ---help--- |
41 | Enables the common framework for platform CAN drivers with Netlink | 41 | Enables the common framework for platform CAN drivers with Netlink |
42 | support. This is the standard library for CAN drivers. | 42 | support. This is the standard library for CAN drivers. |
@@ -45,7 +45,7 @@ config CAN_DEV | |||
45 | config CAN_CALC_BITTIMING | 45 | config CAN_CALC_BITTIMING |
46 | bool "CAN bit-timing calculation" | 46 | bool "CAN bit-timing calculation" |
47 | depends on CAN_DEV | 47 | depends on CAN_DEV |
48 | default Y | 48 | default y |
49 | ---help--- | 49 | ---help--- |
50 | If enabled, CAN bit-timing parameters will be calculated for the | 50 | If enabled, CAN bit-timing parameters will be calculated for the |
51 | bit-rate specified via Netlink argument "bitrate" when the device | 51 | bit-rate specified via Netlink argument "bitrate" when the device |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 3f562ba2f0c9..76bf5892b962 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -2026,7 +2026,7 @@ static void rx_eth(struct adapter *adap, struct sge_rspq *rq, | |||
2026 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 2026 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
2027 | } else | 2027 | } else |
2028 | skb_checksum_none_assert(skb); | 2028 | skb_checksum_none_assert(skb); |
2029 | skb_record_rx_queue(skb, qs - &adap->sge.qs[0]); | 2029 | skb_record_rx_queue(skb, qs - &adap->sge.qs[pi->first_qset]); |
2030 | 2030 | ||
2031 | if (unlikely(p->vlan_valid)) { | 2031 | if (unlikely(p->vlan_valid)) { |
2032 | struct vlan_group *grp = pi->vlan_grp; | 2032 | struct vlan_group *grp = pi->vlan_grp; |
@@ -2145,7 +2145,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs, | |||
2145 | if (!complete) | 2145 | if (!complete) |
2146 | return; | 2146 | return; |
2147 | 2147 | ||
2148 | skb_record_rx_queue(skb, qs - &adap->sge.qs[0]); | 2148 | skb_record_rx_queue(skb, qs - &adap->sge.qs[pi->first_qset]); |
2149 | 2149 | ||
2150 | if (unlikely(cpl->vlan_valid)) { | 2150 | if (unlikely(cpl->vlan_valid)) { |
2151 | struct vlan_group *grp = pi->vlan_grp; | 2151 | struct vlan_group *grp = pi->vlan_grp; |
diff --git a/drivers/net/ppp_deflate.c b/drivers/net/ppp_deflate.c index 31e9407a0739..1dbdf82a6dfd 100644 --- a/drivers/net/ppp_deflate.c +++ b/drivers/net/ppp_deflate.c | |||
@@ -305,7 +305,7 @@ static void z_decomp_free(void *arg) | |||
305 | 305 | ||
306 | if (state) { | 306 | if (state) { |
307 | zlib_inflateEnd(&state->strm); | 307 | zlib_inflateEnd(&state->strm); |
308 | kfree(state->strm.workspace); | 308 | vfree(state->strm.workspace); |
309 | kfree(state); | 309 | kfree(state); |
310 | } | 310 | } |
311 | } | 311 | } |
@@ -345,8 +345,7 @@ static void *z_decomp_alloc(unsigned char *options, int opt_len) | |||
345 | 345 | ||
346 | state->w_size = w_size; | 346 | state->w_size = w_size; |
347 | state->strm.next_out = NULL; | 347 | state->strm.next_out = NULL; |
348 | state->strm.workspace = kmalloc(zlib_inflate_workspacesize(), | 348 | state->strm.workspace = vmalloc(zlib_inflate_workspacesize()); |
349 | GFP_KERNEL|__GFP_REPEAT); | ||
350 | if (state->strm.workspace == NULL) | 349 | if (state->strm.workspace == NULL) |
351 | goto out_free; | 350 | goto out_free; |
352 | 351 | ||
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 05d81780d1fd..5990621fb5cd 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -742,7 +742,7 @@ static void rtl8168_oob_notify(struct rtl8169_private *tp, u8 cmd) | |||
742 | msleep(2); | 742 | msleep(2); |
743 | for (i = 0; i < 5; i++) { | 743 | for (i = 0; i < 5; i++) { |
744 | udelay(100); | 744 | udelay(100); |
745 | if (!(RTL_R32(ERIDR) & ERIAR_FLAG)) | 745 | if (!(RTL_R32(ERIAR) & ERIAR_FLAG)) |
746 | break; | 746 | break; |
747 | } | 747 | } |
748 | 748 | ||
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index 77c5092a6a40..5d3436d47edd 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c | |||
@@ -378,7 +378,7 @@ static int rionet_close(struct net_device *ndev) | |||
378 | 378 | ||
379 | static void rionet_remove(struct rio_dev *rdev) | 379 | static void rionet_remove(struct rio_dev *rdev) |
380 | { | 380 | { |
381 | struct net_device *ndev = NULL; | 381 | struct net_device *ndev = rio_get_drvdata(rdev); |
382 | struct rionet_peer *peer, *tmp; | 382 | struct rionet_peer *peer, *tmp; |
383 | 383 | ||
384 | free_pages((unsigned long)rionet_active, rdev->net->hport->sys_size ? | 384 | free_pages((unsigned long)rionet_active, rdev->net->hport->sys_size ? |
@@ -433,22 +433,12 @@ static const struct net_device_ops rionet_netdev_ops = { | |||
433 | .ndo_set_mac_address = eth_mac_addr, | 433 | .ndo_set_mac_address = eth_mac_addr, |
434 | }; | 434 | }; |
435 | 435 | ||
436 | static int rionet_setup_netdev(struct rio_mport *mport) | 436 | static int rionet_setup_netdev(struct rio_mport *mport, struct net_device *ndev) |
437 | { | 437 | { |
438 | int rc = 0; | 438 | int rc = 0; |
439 | struct net_device *ndev = NULL; | ||
440 | struct rionet_private *rnet; | 439 | struct rionet_private *rnet; |
441 | u16 device_id; | 440 | u16 device_id; |
442 | 441 | ||
443 | /* Allocate our net_device structure */ | ||
444 | ndev = alloc_etherdev(sizeof(struct rionet_private)); | ||
445 | if (ndev == NULL) { | ||
446 | printk(KERN_INFO "%s: could not allocate ethernet device.\n", | ||
447 | DRV_NAME); | ||
448 | rc = -ENOMEM; | ||
449 | goto out; | ||
450 | } | ||
451 | |||
452 | rionet_active = (struct rio_dev **)__get_free_pages(GFP_KERNEL, | 442 | rionet_active = (struct rio_dev **)__get_free_pages(GFP_KERNEL, |
453 | mport->sys_size ? __fls(sizeof(void *)) + 4 : 0); | 443 | mport->sys_size ? __fls(sizeof(void *)) + 4 : 0); |
454 | if (!rionet_active) { | 444 | if (!rionet_active) { |
@@ -504,11 +494,21 @@ static int rionet_probe(struct rio_dev *rdev, const struct rio_device_id *id) | |||
504 | int rc = -ENODEV; | 494 | int rc = -ENODEV; |
505 | u32 lpef, lsrc_ops, ldst_ops; | 495 | u32 lpef, lsrc_ops, ldst_ops; |
506 | struct rionet_peer *peer; | 496 | struct rionet_peer *peer; |
497 | struct net_device *ndev = NULL; | ||
507 | 498 | ||
508 | /* If local device is not rionet capable, give up quickly */ | 499 | /* If local device is not rionet capable, give up quickly */ |
509 | if (!rionet_capable) | 500 | if (!rionet_capable) |
510 | goto out; | 501 | goto out; |
511 | 502 | ||
503 | /* Allocate our net_device structure */ | ||
504 | ndev = alloc_etherdev(sizeof(struct rionet_private)); | ||
505 | if (ndev == NULL) { | ||
506 | printk(KERN_INFO "%s: could not allocate ethernet device.\n", | ||
507 | DRV_NAME); | ||
508 | rc = -ENOMEM; | ||
509 | goto out; | ||
510 | } | ||
511 | |||
512 | /* | 512 | /* |
513 | * First time through, make sure local device is rionet | 513 | * First time through, make sure local device is rionet |
514 | * capable, setup netdev, and set flags so this is skipped | 514 | * capable, setup netdev, and set flags so this is skipped |
@@ -529,7 +529,7 @@ static int rionet_probe(struct rio_dev *rdev, const struct rio_device_id *id) | |||
529 | goto out; | 529 | goto out; |
530 | } | 530 | } |
531 | 531 | ||
532 | rc = rionet_setup_netdev(rdev->net->hport); | 532 | rc = rionet_setup_netdev(rdev->net->hport, ndev); |
533 | rionet_check = 1; | 533 | rionet_check = 1; |
534 | } | 534 | } |
535 | 535 | ||
@@ -546,6 +546,8 @@ static int rionet_probe(struct rio_dev *rdev, const struct rio_device_id *id) | |||
546 | list_add_tail(&peer->node, &rionet_peers); | 546 | list_add_tail(&peer->node, &rionet_peers); |
547 | } | 547 | } |
548 | 548 | ||
549 | rio_set_drvdata(rdev, ndev); | ||
550 | |||
549 | out: | 551 | out: |
550 | return rc; | 552 | return rc; |
551 | } | 553 | } |
diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c index d965fb1e013e..a9b6c63d54e4 100644 --- a/drivers/net/usb/kalmia.c +++ b/drivers/net/usb/kalmia.c | |||
@@ -100,34 +100,42 @@ kalmia_send_init_packet(struct usbnet *dev, u8 *init_msg, u8 init_msg_len, | |||
100 | static int | 100 | static int |
101 | kalmia_init_and_get_ethernet_addr(struct usbnet *dev, u8 *ethernet_addr) | 101 | kalmia_init_and_get_ethernet_addr(struct usbnet *dev, u8 *ethernet_addr) |
102 | { | 102 | { |
103 | char init_msg_1[] = | 103 | const static char init_msg_1[] = |
104 | { 0x57, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, | 104 | { 0x57, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, |
105 | 0x00, 0x00 }; | 105 | 0x00, 0x00 }; |
106 | char init_msg_2[] = | 106 | const static char init_msg_2[] = |
107 | { 0x57, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf4, | 107 | { 0x57, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf4, |
108 | 0x00, 0x00 }; | 108 | 0x00, 0x00 }; |
109 | char receive_buf[28]; | 109 | const static int buflen = 28; |
110 | char *usb_buf; | ||
110 | int status; | 111 | int status; |
111 | 112 | ||
112 | status = kalmia_send_init_packet(dev, init_msg_1, sizeof(init_msg_1) | 113 | usb_buf = kmalloc(buflen, GFP_DMA | GFP_KERNEL); |
113 | / sizeof(init_msg_1[0]), receive_buf, 24); | 114 | if (!usb_buf) |
115 | return -ENOMEM; | ||
116 | |||
117 | memcpy(usb_buf, init_msg_1, 12); | ||
118 | status = kalmia_send_init_packet(dev, usb_buf, sizeof(init_msg_1) | ||
119 | / sizeof(init_msg_1[0]), usb_buf, 24); | ||
114 | if (status != 0) | 120 | if (status != 0) |
115 | return status; | 121 | return status; |
116 | 122 | ||
117 | status = kalmia_send_init_packet(dev, init_msg_2, sizeof(init_msg_2) | 123 | memcpy(usb_buf, init_msg_2, 12); |
118 | / sizeof(init_msg_2[0]), receive_buf, 28); | 124 | status = kalmia_send_init_packet(dev, usb_buf, sizeof(init_msg_2) |
125 | / sizeof(init_msg_2[0]), usb_buf, 28); | ||
119 | if (status != 0) | 126 | if (status != 0) |
120 | return status; | 127 | return status; |
121 | 128 | ||
122 | memcpy(ethernet_addr, receive_buf + 10, ETH_ALEN); | 129 | memcpy(ethernet_addr, usb_buf + 10, ETH_ALEN); |
123 | 130 | ||
131 | kfree(usb_buf); | ||
124 | return status; | 132 | return status; |
125 | } | 133 | } |
126 | 134 | ||
127 | static int | 135 | static int |
128 | kalmia_bind(struct usbnet *dev, struct usb_interface *intf) | 136 | kalmia_bind(struct usbnet *dev, struct usb_interface *intf) |
129 | { | 137 | { |
130 | u8 status; | 138 | int status; |
131 | u8 ethernet_addr[ETH_ALEN]; | 139 | u8 ethernet_addr[ETH_ALEN]; |
132 | 140 | ||
133 | /* Don't bind to AT command interface */ | 141 | /* Don't bind to AT command interface */ |
@@ -190,7 +198,8 @@ kalmia_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) | |||
190 | dev_kfree_skb_any(skb); | 198 | dev_kfree_skb_any(skb); |
191 | skb = skb2; | 199 | skb = skb2; |
192 | 200 | ||
193 | done: header_start = skb_push(skb, KALMIA_HEADER_LENGTH); | 201 | done: |
202 | header_start = skb_push(skb, KALMIA_HEADER_LENGTH); | ||
194 | ether_type_1 = header_start[KALMIA_HEADER_LENGTH + 12]; | 203 | ether_type_1 = header_start[KALMIA_HEADER_LENGTH + 12]; |
195 | ether_type_2 = header_start[KALMIA_HEADER_LENGTH + 13]; | 204 | ether_type_2 = header_start[KALMIA_HEADER_LENGTH + 13]; |
196 | 205 | ||
@@ -201,9 +210,8 @@ kalmia_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) | |||
201 | header_start[0] = 0x57; | 210 | header_start[0] = 0x57; |
202 | header_start[1] = 0x44; | 211 | header_start[1] = 0x44; |
203 | content_len = skb->len - KALMIA_HEADER_LENGTH; | 212 | content_len = skb->len - KALMIA_HEADER_LENGTH; |
204 | header_start[2] = (content_len & 0xff); /* low byte */ | ||
205 | header_start[3] = (content_len >> 8); /* high byte */ | ||
206 | 213 | ||
214 | put_unaligned_le16(content_len, &header_start[2]); | ||
207 | header_start[4] = ether_type_1; | 215 | header_start[4] = ether_type_1; |
208 | header_start[5] = ether_type_2; | 216 | header_start[5] = ether_type_2; |
209 | 217 | ||
@@ -231,13 +239,13 @@ kalmia_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
231 | * Our task here is to strip off framing, leaving skb with one | 239 | * Our task here is to strip off framing, leaving skb with one |
232 | * data frame for the usbnet framework code to process. | 240 | * data frame for the usbnet framework code to process. |
233 | */ | 241 | */ |
234 | const u8 HEADER_END_OF_USB_PACKET[] = | 242 | const static u8 HEADER_END_OF_USB_PACKET[] = |
235 | { 0x57, 0x5a, 0x00, 0x00, 0x08, 0x00 }; | 243 | { 0x57, 0x5a, 0x00, 0x00, 0x08, 0x00 }; |
236 | const u8 EXPECTED_UNKNOWN_HEADER_1[] = | 244 | const static u8 EXPECTED_UNKNOWN_HEADER_1[] = |
237 | { 0x57, 0x43, 0x1e, 0x00, 0x15, 0x02 }; | 245 | { 0x57, 0x43, 0x1e, 0x00, 0x15, 0x02 }; |
238 | const u8 EXPECTED_UNKNOWN_HEADER_2[] = | 246 | const static u8 EXPECTED_UNKNOWN_HEADER_2[] = |
239 | { 0x57, 0x50, 0x0e, 0x00, 0x00, 0x00 }; | 247 | { 0x57, 0x50, 0x0e, 0x00, 0x00, 0x00 }; |
240 | u8 i = 0; | 248 | int i = 0; |
241 | 249 | ||
242 | /* incomplete header? */ | 250 | /* incomplete header? */ |
243 | if (skb->len < KALMIA_HEADER_LENGTH) | 251 | if (skb->len < KALMIA_HEADER_LENGTH) |
@@ -285,7 +293,7 @@ kalmia_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
285 | 293 | ||
286 | /* subtract start header and end header */ | 294 | /* subtract start header and end header */ |
287 | usb_packet_length = skb->len - (2 * KALMIA_HEADER_LENGTH); | 295 | usb_packet_length = skb->len - (2 * KALMIA_HEADER_LENGTH); |
288 | ether_packet_length = header_start[2] + (header_start[3] << 8); | 296 | ether_packet_length = get_unaligned_le16(&header_start[2]); |
289 | skb_pull(skb, KALMIA_HEADER_LENGTH); | 297 | skb_pull(skb, KALMIA_HEADER_LENGTH); |
290 | 298 | ||
291 | /* Some small packets misses end marker */ | 299 | /* Some small packets misses end marker */ |
diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c index 241756e0e86f..1a2234c20514 100644 --- a/drivers/net/usb/zaurus.c +++ b/drivers/net/usb/zaurus.c | |||
@@ -331,17 +331,7 @@ static const struct usb_device_id products [] = { | |||
331 | ZAURUS_MASTER_INTERFACE, | 331 | ZAURUS_MASTER_INTERFACE, |
332 | .driver_info = ZAURUS_PXA_INFO, | 332 | .driver_info = ZAURUS_PXA_INFO, |
333 | }, | 333 | }, |
334 | |||
335 | |||
336 | /* At least some of the newest PXA units have very different lies about | ||
337 | * their standards support: they claim to be cell phones offering | ||
338 | * direct access to their radios! (No, they don't conform to CDC MDLM.) | ||
339 | */ | ||
340 | { | 334 | { |
341 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, | ||
342 | USB_CDC_PROTO_NONE), | ||
343 | .driver_info = (unsigned long) &bogus_mdlm_info, | ||
344 | }, { | ||
345 | /* Motorola MOTOMAGX phones */ | 335 | /* Motorola MOTOMAGX phones */ |
346 | USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6425, USB_CLASS_COMM, | 336 | USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6425, USB_CLASS_COMM, |
347 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 337 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 9f8ccae93317..254b64ba4bf6 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1624,6 +1624,16 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, | |||
1624 | pci_read_config_byte(pdev, 0x8, &revisionid); | 1624 | pci_read_config_byte(pdev, 0x8, &revisionid); |
1625 | pci_read_config_word(pdev, 0x3C, &irqline); | 1625 | pci_read_config_word(pdev, 0x3C, &irqline); |
1626 | 1626 | ||
1627 | /* PCI ID 0x10ec:0x8192 occurs for both RTL8192E, which uses | ||
1628 | * r8192e_pci, and RTL8192SE, which uses this driver. If the | ||
1629 | * revision ID is RTL_PCI_REVISION_ID_8192PCIE (0x01), then | ||
1630 | * the correct driver is r8192e_pci, thus this routine should | ||
1631 | * return false. | ||
1632 | */ | ||
1633 | if (deviceid == RTL_PCI_8192SE_DID && | ||
1634 | revisionid == RTL_PCI_REVISION_ID_8192PCIE) | ||
1635 | return false; | ||
1636 | |||
1627 | if (deviceid == RTL_PCI_8192_DID || | 1637 | if (deviceid == RTL_PCI_8192_DID || |
1628 | deviceid == RTL_PCI_0044_DID || | 1638 | deviceid == RTL_PCI_0044_DID || |
1629 | deviceid == RTL_PCI_0047_DID || | 1639 | deviceid == RTL_PCI_0047_DID || |
@@ -1856,7 +1866,8 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, | |||
1856 | pci_write_config_byte(pdev, 0x04, 0x07); | 1866 | pci_write_config_byte(pdev, 0x04, 0x07); |
1857 | 1867 | ||
1858 | /* find adapter */ | 1868 | /* find adapter */ |
1859 | _rtl_pci_find_adapter(pdev, hw); | 1869 | if (!_rtl_pci_find_adapter(pdev, hw)) |
1870 | goto fail3; | ||
1860 | 1871 | ||
1861 | /* Init IO handler */ | 1872 | /* Init IO handler */ |
1862 | _rtl_pci_io_handler_init(&pdev->dev, hw); | 1873 | _rtl_pci_io_handler_init(&pdev->dev, hw); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c index bee7c1480f63..092e342c19df 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | |||
@@ -53,6 +53,8 @@ MODULE_FIRMWARE("rtlwifi/rtl8192cufw.bin"); | |||
53 | static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) | 53 | static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) |
54 | { | 54 | { |
55 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 55 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
56 | const struct firmware *firmware; | ||
57 | int err; | ||
56 | 58 | ||
57 | rtlpriv->dm.dm_initialgain_enable = 1; | 59 | rtlpriv->dm.dm_initialgain_enable = 1; |
58 | rtlpriv->dm.dm_flag = 0; | 60 | rtlpriv->dm.dm_flag = 0; |
@@ -64,6 +66,24 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) | |||
64 | ("Can't alloc buffer for fw.\n")); | 66 | ("Can't alloc buffer for fw.\n")); |
65 | return 1; | 67 | return 1; |
66 | } | 68 | } |
69 | /* request fw */ | ||
70 | err = request_firmware(&firmware, rtlpriv->cfg->fw_name, | ||
71 | rtlpriv->io.dev); | ||
72 | if (err) { | ||
73 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | ||
74 | ("Failed to request firmware!\n")); | ||
75 | return 1; | ||
76 | } | ||
77 | if (firmware->size > 0x4000) { | ||
78 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | ||
79 | ("Firmware is too big!\n")); | ||
80 | release_firmware(firmware); | ||
81 | return 1; | ||
82 | } | ||
83 | memcpy(rtlpriv->rtlhal.pfirmware, firmware->data, firmware->size); | ||
84 | rtlpriv->rtlhal.fwsize = firmware->size; | ||
85 | release_firmware(firmware); | ||
86 | |||
67 | return 0; | 87 | return 0; |
68 | } | 88 | } |
69 | 89 | ||