Skip to content

Commit 4a390e0

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: Staging: stlc45xx: convert config_interface to bss_info_changed, fixing a build error Staging: comedi: s626: use subvendor:subdevice ids for SAA7146 board Staging: prevent rtl8192su from crashing dev_ioctl in SIOCGIWNAME Staging: prevent rtl8187se from crashing dev_ioctl() in SIOCGIWNAME Staging: rtl8192su: convert to net_device_ops Staging: serqt_usb2: declare qt_open static in serqt_usb2 Staging: serqt_usb2: fix qt_close parameters in serqt_usb2 Staging: comedi: jr3_pci.c: add required includes Staging: meilhaus: add email address to TODO Staging: rspiusb: use NULL virtual address instead of a bogus one Staging: vt6655: compile fix Staging: rt2870: Add USB ID for Sitecom WL-608
2 parents a4dc323 + f638718 commit 4a390e0

14 files changed

Lines changed: 80 additions & 79 deletions

File tree

‎drivers/staging/comedi/drivers/jr3_pci.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Devices: [JR3] PCI force sensor board (jr3_pci)
4545
#include <linux/delay.h>
4646
#include <linux/ctype.h>
4747
#include <linux/firmware.h>
48+
#include <linux/jiffies.h>
49+
#include <linux/timer.h>
4850
#include "comedi_pci.h"
4951
#include "jr3_pci.h"
5052

‎drivers/staging/comedi/drivers/s626.c‎

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,13 @@ static const struct s626_board s626_boards[] = {
111111
#define PCI_VENDOR_ID_S626 0x1131
112112
#define PCI_DEVICE_ID_S626 0x7146
113113

114+
/*
115+
* For devices with vendor:device id == 0x1131:0x7146 you must specify
116+
* also subvendor:subdevice ids, because otherwise it will conflict with
117+
* Philips SAA7146 media/dvb based cards.
118+
*/
114119
static DEFINE_PCI_DEVICE_TABLE(s626_pci_table) = {
115-
{PCI_VENDOR_ID_S626, PCI_DEVICE_ID_S626, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
116-
0},
120+
{PCI_VENDOR_ID_S626, PCI_DEVICE_ID_S626, 0x6000, 0x0272, 0, 0, 0},
117121
{0}
118122
};
119123

@@ -499,25 +503,26 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it)
499503
resource_size_t resourceStart;
500504
dma_addr_t appdma;
501505
struct comedi_subdevice *s;
502-
struct pci_dev *pdev;
506+
const struct pci_device_id *ids;
507+
struct pci_dev *pdev = NULL;
503508

504509
if (alloc_private(dev, sizeof(struct s626_private)) < 0)
505510
return -ENOMEM;
506511

507-
for (pdev = pci_get_device(PCI_VENDOR_ID_S626, PCI_DEVICE_ID_S626,
508-
NULL); pdev != NULL;
509-
pdev = pci_get_device(PCI_VENDOR_ID_S626,
510-
PCI_DEVICE_ID_S626, pdev)) {
511-
if (it->options[0] || it->options[1]) {
512-
if (pdev->bus->number == it->options[0] &&
513-
PCI_SLOT(pdev->devfn) == it->options[1]) {
512+
for (i = 0; i < (ARRAY_SIZE(s626_pci_table) - 1) && !pdev; i++) {
513+
ids = &s626_pci_table[i];
514+
do {
515+
pdev = pci_get_subsys(ids->vendor, ids->device, ids->subvendor,
516+
ids->subdevice, pdev);
517+
518+
if ((it->options[0] || it->options[1]) && pdev) {
514519
/* matches requested bus/slot */
520+
if (pdev->bus->number == it->options[0] &&
521+
PCI_SLOT(pdev->devfn) == it->options[1])
522+
break;
523+
} else
515524
break;
516-
}
517-
} else {
518-
/* no bus/slot specified */
519-
break;
520-
}
525+
} while (1);
521526
}
522527
devpriv->pdev = pdev;
523528

‎drivers/staging/meilhaus/TODO‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ TODO:
77
- possible comedi merge
88

99
Please send cleanup patches to Greg Kroah-Hartman <greg@kroah.com>
10-
and CC: David Kiliani <mail@davidkiliani.de>
10+
and CC: David Kiliani <mail@davidkiliani.de> and Meilhaus Support <support@meilhaus.de>

‎drivers/staging/rspiusb/rspiusb.c‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ static void piusb_write_bulk_callback(struct urb *urb)
444444
__func__, status);
445445

446446
pdx->pendingWrite = 0;
447-
usb_buffer_free(urb->dev, urb->transfer_buffer_length,
448-
urb->transfer_buffer, urb->transfer_dma);
447+
kfree(urb->transfer_buffer);
449448
}
450449

451450
int piusb_output(struct ioctl_struct *io, unsigned char *uBuf, int len,
@@ -457,9 +456,7 @@ int piusb_output(struct ioctl_struct *io, unsigned char *uBuf, int len,
457456

458457
urb = usb_alloc_urb(0, GFP_KERNEL);
459458
if (urb != NULL) {
460-
kbuf =
461-
usb_buffer_alloc(pdx->udev, len, GFP_KERNEL,
462-
&urb->transfer_dma);
459+
kbuf = kmalloc(len, GFP_KERNEL);
463460
if (!kbuf) {
464461
dev_err(&pdx->udev->dev, "buffer_alloc failed\n");
465462
return -ENOMEM;
@@ -470,7 +467,6 @@ int piusb_output(struct ioctl_struct *io, unsigned char *uBuf, int len,
470467
}
471468
usb_fill_bulk_urb(urb, pdx->udev, pdx->hEP[io->endpoint], kbuf,
472469
len, piusb_write_bulk_callback, pdx);
473-
urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
474470
err = usb_submit_urb(urb, GFP_KERNEL);
475471
if (err) {
476472
dev_err(&pdx->udev->dev,
@@ -641,7 +637,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
641637
numPagesRequired =
642638
((uaddr & ~PAGE_MASK) + count + ~PAGE_MASK) >> PAGE_SHIFT;
643639
dbg("Number of pages needed = %d", numPagesRequired);
644-
maplist_p = vmalloc(numPagesRequired * sizeof(struct page));
640+
maplist_p = vmalloc(numPagesRequired * sizeof(struct page *));
645641
if (!maplist_p) {
646642
dbg("Can't Allocate Memory for maplist_p");
647643
return -ENOMEM;
@@ -712,9 +708,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
712708
usb_fill_bulk_urb(pdx->PixelUrb[frameInfo][i],
713709
pdx->udev,
714710
epAddr,
715-
(dma_addr_t *) sg_dma_address(&pdx->
716-
sgl[frameInfo]
717-
[i]),
711+
NULL, // non-DMA HC? buy a better hardware
718712
sg_dma_len(&pdx->sgl[frameInfo][i]),
719713
piusb_readPIXEL_callback, (void *)pdx);
720714
pdx->PixelUrb[frameInfo][i]->transfer_dma =

‎drivers/staging/rt2870/rt2870.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
{USB_DEVICE(0x0DF6,0x002C)}, /* Sitecom */ \
9090
{USB_DEVICE(0x0DF6,0x002D)}, /* Sitecom */ \
9191
{USB_DEVICE(0x0DF6,0x0039)}, /* Sitecom */ \
92+
{USB_DEVICE(0x0DF6,0x003F)}, /* Sitecom WL-608 */ \
9293
{USB_DEVICE(0x14B2,0x3C06)}, /* Conceptronic */ \
9394
{USB_DEVICE(0x14B2,0x3C28)}, /* Conceptronic */ \
9495
{USB_DEVICE(0x2019,0xED06)}, /* Planex Communications, Inc. */ \

‎drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,19 +461,19 @@ int ieee80211_wx_get_name(struct ieee80211_device *ieee,
461461
struct iw_request_info *info,
462462
union iwreq_data *wrqu, char *extra)
463463
{
464-
strcpy(wrqu->name, "802.11");
464+
strlcpy(wrqu->name, "802.11", IFNAMSIZ);
465465
if(ieee->modulation & IEEE80211_CCK_MODULATION){
466-
strcat(wrqu->name, "b");
466+
strlcat(wrqu->name, "b", IFNAMSIZ);
467467
if(ieee->modulation & IEEE80211_OFDM_MODULATION)
468-
strcat(wrqu->name, "/g");
468+
strlcat(wrqu->name, "/g", IFNAMSIZ);
469469
}else if(ieee->modulation & IEEE80211_OFDM_MODULATION)
470-
strcat(wrqu->name, "g");
470+
strlcat(wrqu->name, "g", IFNAMSIZ);
471471

472472
if((ieee->state == IEEE80211_LINKED) ||
473473
(ieee->state == IEEE80211_LINKED_SCANNING))
474-
strcat(wrqu->name," linked");
474+
strlcat(wrqu->name," link", IFNAMSIZ);
475475
else if(ieee->state != IEEE80211_NOLINK)
476-
strcat(wrqu->name," link..");
476+
strlcat(wrqu->name," .....", IFNAMSIZ);
477477

478478

479479
return 0;

‎drivers/staging/rtl8192su/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config RTL8192SU
22
tristate "RealTek RTL8192SU Wireless LAN NIC driver"
33
depends on PCI
4-
depends on WIRELESS_EXT && COMPAT_NET_DEV_OPS
4+
depends on WIRELESS_EXT
55
default N
66
---help---

‎drivers/staging/rtl8192su/ieee80211/ieee80211_module.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
118118
#else
119119
ieee = (struct ieee80211_device *)dev->priv;
120120
#endif
121-
dev->hard_start_xmit = ieee80211_xmit;
122121

123122
memset(ieee, 0, sizeof(struct ieee80211_device)+sizeof_priv);
124123
ieee->dev = dev;

‎drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,21 +548,21 @@ int ieee80211_wx_get_name(struct ieee80211_device *ieee,
548548
struct iw_request_info *info,
549549
union iwreq_data *wrqu, char *extra)
550550
{
551-
strcpy(wrqu->name, "802.11");
551+
strlcpy(wrqu->name, "802.11", IFNAMSIZ);
552552
if(ieee->modulation & IEEE80211_CCK_MODULATION){
553-
strcat(wrqu->name, "b");
553+
strlcat(wrqu->name, "b", IFNAMSIZ);
554554
if(ieee->modulation & IEEE80211_OFDM_MODULATION)
555-
strcat(wrqu->name, "/g");
555+
strlcat(wrqu->name, "/g", IFNAMSIZ);
556556
}else if(ieee->modulation & IEEE80211_OFDM_MODULATION)
557-
strcat(wrqu->name, "g");
557+
strlcat(wrqu->name, "g", IFNAMSIZ);
558558
if (ieee->mode & (IEEE_N_24G | IEEE_N_5G))
559-
strcat(wrqu->name, "/n");
559+
strlcat(wrqu->name, "/n", IFNAMSIZ);
560560

561561
if((ieee->state == IEEE80211_LINKED) ||
562562
(ieee->state == IEEE80211_LINKED_SCANNING))
563-
strcat(wrqu->name," linked");
563+
strlcat(wrqu->name, " link", IFNAMSIZ);
564564
else if(ieee->state != IEEE80211_NOLINK)
565-
strcat(wrqu->name," link..");
565+
strlcat(wrqu->name, " .....", IFNAMSIZ);
566566

567567

568568
return 0;

‎drivers/staging/rtl8192su/r8192U_core.c‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12132,6 +12132,19 @@ static void HalUsbSetQueuePipeMapping8192SUsb(struct usb_interface *intf, struct
1213212132
}
1213312133
#endif
1213412134

12135+
static const struct net_device_ops rtl8192_netdev_ops = {
12136+
.ndo_open = rtl8192_open,
12137+
.ndo_stop = rtl8192_close,
12138+
.ndo_get_stats = rtl8192_stats,
12139+
.ndo_tx_timeout = tx_timeout,
12140+
.ndo_do_ioctl = rtl8192_ioctl,
12141+
.ndo_set_multicast_list = r8192_set_multicast,
12142+
.ndo_set_mac_address = r8192_set_mac_adr,
12143+
.ndo_validate_addr = eth_validate_addr,
12144+
.ndo_change_mtu = eth_change_mtu,
12145+
.ndo_start_xmit = ieee80211_xmit,
12146+
};
12147+
1213512148
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
1213612149
static int __devinit rtl8192_usb_probe(struct usb_interface *intf,
1213712150
const struct usb_device_id *id)
@@ -12186,15 +12199,7 @@ static void * __devinit rtl8192_usb_probe(struct usb_device *udev,
1218612199
priv->ops = &rtl8192u_ops;
1218712200
#endif
1218812201

12189-
dev->open = rtl8192_open;
12190-
dev->stop = rtl8192_close;
12191-
//dev->hard_start_xmit = rtl8192_8023_hard_start_xmit;
12192-
dev->tx_timeout = tx_timeout;
12193-
//dev->wireless_handlers = &r8192_wx_handlers_def;
12194-
dev->do_ioctl = rtl8192_ioctl;
12195-
dev->set_multicast_list = r8192_set_multicast;
12196-
dev->set_mac_address = r8192_set_mac_adr;
12197-
dev->get_stats = rtl8192_stats;
12202+
dev->netdev_ops = &rtl8192_netdev_ops;
1219812203

1219912204
//DMESG("Oops: i'm coming\n");
1220012205
#if WIRELESS_EXT >= 12

0 commit comments

Comments
 (0)