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: rspiusb: Fix buffer overflow staging: add dependencies on PCI for drivers that require it Staging: rtl8192su: fix build error Staging: rt2870: Revert d44ca7 Removal of kernel_thread() API Staging: rt2870: Add USB ID for Linksys, Planex Communications, Belkin
This commit is contained in:
commit
710ad849ae
|
@ -1,5 +1,6 @@
|
|||
config B3DFG
|
||||
tristate "Brontes 3d Frame Framegrabber"
|
||||
depends on PCI
|
||||
default n
|
||||
---help---
|
||||
This driver provides support for the Brontes 3d Framegrabber
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
config HECI
|
||||
tristate "Intel Management Engine Interface (MEI) Support"
|
||||
depends on PCI
|
||||
---help---
|
||||
The Intel Management Engine Interface (Intel MEI) driver allows
|
||||
applications to access the Active Management Technology
|
||||
|
|
|
@ -716,6 +716,8 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
|
|||
pdx->PixelUrb[frameInfo][i]->transfer_flags =
|
||||
URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT;
|
||||
}
|
||||
if (i == 0)
|
||||
return -EINVAL;
|
||||
/* only interrupt when last URB completes */
|
||||
pdx->PixelUrb[frameInfo][--i]->transfer_flags &= ~URB_NO_INTERRUPT;
|
||||
pdx->pendedPixelUrbs[frameInfo] =
|
||||
|
|
|
@ -43,9 +43,6 @@
|
|||
#include "rtmp_type.h"
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#if !defined(RT2860) && !defined(RT30xx)
|
||||
#include <linux/kthread.h>
|
||||
#endif
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -166,9 +163,7 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_
|
|||
|
||||
#ifndef RT30xx
|
||||
typedef struct pid * THREAD_PID;
|
||||
#ifdef RT2860
|
||||
#define THREAD_PID_INIT_VALUE NULL
|
||||
#endif
|
||||
#define GET_PID(_v) find_get_pid(_v)
|
||||
#define GET_PID_NUMBER(_v) pid_nr(_v)
|
||||
#define CHECK_PID_LEGALITY(_pid) if (pid_nr(_pid) >= 0)
|
||||
|
@ -188,12 +183,12 @@ struct os_cookie {
|
|||
dma_addr_t pAd_pa;
|
||||
#endif
|
||||
#ifdef RT2870
|
||||
struct usb_device *pUsb_Dev;
|
||||
struct usb_device *pUsb_Dev;
|
||||
|
||||
#ifndef RT30xx
|
||||
struct task_struct *MLMEThr_task;
|
||||
struct task_struct *RTUSBCmdThr_task;
|
||||
struct task_struct *TimerQThr_task;
|
||||
THREAD_PID MLMEThr_pid;
|
||||
THREAD_PID RTUSBCmdThr_pid;
|
||||
THREAD_PID TimerQThr_pid;
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
struct pid *MLMEThr_pid;
|
||||
|
|
|
@ -235,7 +235,7 @@ INT MlmeThread(
|
|||
DBGPRINT(RT_DEBUG_TRACE,( "<---%s\n",__func__));
|
||||
|
||||
#ifndef RT30xx
|
||||
pObj->MLMEThr_task = NULL;
|
||||
pObj->MLMEThr_pid = THREAD_PID_INIT_VALUE;
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->MLMEThr_pid = NULL;
|
||||
|
@ -348,7 +348,7 @@ INT RTUSBCmdThread(
|
|||
DBGPRINT(RT_DEBUG_TRACE,( "<---RTUSBCmdThread\n"));
|
||||
|
||||
#ifndef RT30xx
|
||||
pObj->RTUSBCmdThr_task = NULL;
|
||||
pObj->RTUSBCmdThr_pid = THREAD_PID_INIT_VALUE;
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->RTUSBCmdThr_pid = NULL;
|
||||
|
@ -447,7 +447,7 @@ INT TimerQThread(
|
|||
DBGPRINT(RT_DEBUG_TRACE,( "<---%s\n",__func__));
|
||||
|
||||
#ifndef RT30xx
|
||||
pObj->TimerQThr_task = NULL;
|
||||
pObj->TimerQThr_pid = THREAD_PID_INIT_VALUE;
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->TimerQThr_pid = NULL;
|
||||
|
@ -883,46 +883,69 @@ VOID RT28xxThreadTerminate(
|
|||
|
||||
// Terminate Threads
|
||||
#ifndef RT30xx
|
||||
BUG_ON(pObj->TimerQThr_task == NULL);
|
||||
CHECK_PID_LEGALITY(task_pid(pObj->TimerQThr_task))
|
||||
CHECK_PID_LEGALITY(pObj->TimerQThr_pid)
|
||||
{
|
||||
POS_COOKIE pObj = (POS_COOKIE)pAd->OS_Cookie;
|
||||
|
||||
printk(KERN_DEBUG "Terminate the TimerQThr pid=%d!\n",
|
||||
pid_nr(task_pid(pObj->TimerQThr_task)));
|
||||
printk("Terminate the TimerQThr_pid=%d!\n", GET_PID_NUMBER(pObj->TimerQThr_pid));
|
||||
mb();
|
||||
pAd->TimerFunc_kill = 1;
|
||||
mb();
|
||||
kthread_stop(pObj->TimerQThr_task);
|
||||
pObj->TimerQThr_task = NULL;
|
||||
ret = KILL_THREAD_PID(pObj->TimerQThr_pid, SIGTERM, 1);
|
||||
if (ret)
|
||||
{
|
||||
printk(KERN_WARNING "%s: unable to stop TimerQThread, pid=%d, ret=%d!\n",
|
||||
pAd->net_dev->name, GET_PID_NUMBER(pObj->TimerQThr_pid), ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
wait_for_completion(&pAd->TimerQComplete);
|
||||
pObj->TimerQThr_pid = THREAD_PID_INIT_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
BUG_ON(pObj->MLMEThr_task == NULL);
|
||||
CHECK_PID_LEGALITY(task_pid(pObj->MLMEThr_task))
|
||||
CHECK_PID_LEGALITY(pObj->MLMEThr_pid)
|
||||
{
|
||||
printk(KERN_DEBUG "Terminate the MLMEThr pid=%d!\n",
|
||||
pid_nr(task_pid(pObj->MLMEThr_task)));
|
||||
printk("Terminate the MLMEThr_pid=%d!\n", GET_PID_NUMBER(pObj->MLMEThr_pid));
|
||||
mb();
|
||||
pAd->mlme_kill = 1;
|
||||
//RT28XX_MLME_HANDLER(pAd);
|
||||
mb();
|
||||
kthread_stop(pObj->MLMEThr_task);
|
||||
pObj->MLMEThr_task = NULL;
|
||||
ret = KILL_THREAD_PID(pObj->MLMEThr_pid, SIGTERM, 1);
|
||||
if (ret)
|
||||
{
|
||||
printk (KERN_WARNING "%s: unable to Mlme thread, pid=%d, ret=%d!\n",
|
||||
pAd->net_dev->name, GET_PID_NUMBER(pObj->MLMEThr_pid), ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
//wait_for_completion (&pAd->notify);
|
||||
wait_for_completion (&pAd->mlmeComplete);
|
||||
pObj->MLMEThr_pid = THREAD_PID_INIT_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
BUG_ON(pObj->RTUSBCmdThr_task == NULL);
|
||||
CHECK_PID_LEGALITY(task_pid(pObj->RTUSBCmdThr_task))
|
||||
CHECK_PID_LEGALITY(pObj->RTUSBCmdThr_pid)
|
||||
{
|
||||
printk(KERN_DEBUG "Terminate the RTUSBCmdThr pid=%d!\n",
|
||||
pid_nr(task_pid(pObj->RTUSBCmdThr_task)));
|
||||
printk("Terminate the RTUSBCmdThr_pid=%d!\n", GET_PID_NUMBER(pObj->RTUSBCmdThr_pid));
|
||||
mb();
|
||||
NdisAcquireSpinLock(&pAd->CmdQLock);
|
||||
pAd->CmdQ.CmdQState = RT2870_THREAD_STOPED;
|
||||
NdisReleaseSpinLock(&pAd->CmdQLock);
|
||||
mb();
|
||||
//RTUSBCMDUp(pAd);
|
||||
kthread_stop(pObj->RTUSBCmdThr_task);
|
||||
pObj->RTUSBCmdThr_task = NULL;
|
||||
ret = KILL_THREAD_PID(pObj->RTUSBCmdThr_pid, SIGTERM, 1);
|
||||
if (ret)
|
||||
{
|
||||
printk(KERN_WARNING "%s: unable to RTUSBCmd thread, pid=%d, ret=%d!\n",
|
||||
pAd->net_dev->name, GET_PID_NUMBER(pObj->RTUSBCmdThr_pid), ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
//wait_for_completion (&pAd->notify);
|
||||
wait_for_completion (&pAd->CmdQComplete);
|
||||
pObj->RTUSBCmdThr_pid = THREAD_PID_INIT_VALUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
|
@ -1045,7 +1068,7 @@ BOOLEAN RT28XXChipsetCheck(
|
|||
dev_p->descriptor.idProduct == rtusb_usb_id[i].idProduct)
|
||||
{
|
||||
#ifndef RT30xx
|
||||
printk(KERN_DEBUG "rt2870: idVendor = 0x%x, idProduct = 0x%x\n",
|
||||
printk("rt2870: idVendor = 0x%x, idProduct = 0x%x\n",
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
printk("rt2870: idVendor = 0x%x, idProduct = 0x%x\n",
|
||||
|
|
|
@ -700,8 +700,8 @@ NDIS_STATUS AdapterBlockAllocateMemory(
|
|||
usb_dev = pObj->pUsb_Dev;
|
||||
|
||||
#ifndef RT30xx
|
||||
pObj->MLMEThr_task = NULL;
|
||||
pObj->RTUSBCmdThr_task = NULL;
|
||||
pObj->MLMEThr_pid = THREAD_PID_INIT_VALUE;
|
||||
pObj->RTUSBCmdThr_pid = THREAD_PID_INIT_VALUE;
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->MLMEThr_pid = NULL;
|
||||
|
@ -743,7 +743,7 @@ NDIS_STATUS CreateThreads(
|
|||
PRTMP_ADAPTER pAd = net_dev->ml_priv;
|
||||
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
|
||||
#ifndef RT30xx
|
||||
struct task_struct *tsk;
|
||||
pid_t pid_number = -1;
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pid_t pid_number;
|
||||
|
@ -762,10 +762,10 @@ NDIS_STATUS CreateThreads(
|
|||
|
||||
// Creat MLME Thread
|
||||
#ifndef RT30xx
|
||||
pObj->MLMEThr_task = NULL;
|
||||
tsk = kthread_run(MlmeThread, pAd, "%s", pAd->net_dev->name);
|
||||
|
||||
if (IS_ERR(tsk)) {
|
||||
pObj->MLMEThr_pid= THREAD_PID_INIT_VALUE;
|
||||
pid_number = kernel_thread(MlmeThread, pAd, CLONE_VM);
|
||||
if (pid_number < 0)
|
||||
{
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->MLMEThr_pid = NULL;
|
||||
|
@ -778,7 +778,7 @@ NDIS_STATUS CreateThreads(
|
|||
}
|
||||
|
||||
#ifndef RT30xx
|
||||
pObj->MLMEThr_task = tsk;
|
||||
pObj->MLMEThr_pid = GET_PID(pid_number);
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->MLMEThr_pid = find_get_pid(pid_number);
|
||||
|
@ -788,10 +788,9 @@ NDIS_STATUS CreateThreads(
|
|||
|
||||
// Creat Command Thread
|
||||
#ifndef RT30xx
|
||||
pObj->RTUSBCmdThr_task = NULL;
|
||||
tsk = kthread_run(RTUSBCmdThread, pAd, "%s", pAd->net_dev->name);
|
||||
|
||||
if (IS_ERR(tsk) < 0)
|
||||
pObj->RTUSBCmdThr_pid= THREAD_PID_INIT_VALUE;
|
||||
pid_number = kernel_thread(RTUSBCmdThread, pAd, CLONE_VM);
|
||||
if (pid_number < 0)
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->RTUSBCmdThr_pid = NULL;
|
||||
|
@ -804,7 +803,7 @@ NDIS_STATUS CreateThreads(
|
|||
}
|
||||
|
||||
#ifndef RT30xx
|
||||
pObj->RTUSBCmdThr_task = tsk;
|
||||
pObj->RTUSBCmdThr_pid = GET_PID(pid_number);
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->RTUSBCmdThr_pid = find_get_pid(pid_number);
|
||||
|
@ -812,9 +811,9 @@ NDIS_STATUS CreateThreads(
|
|||
wait_for_completion(&(pAd->CmdQComplete));
|
||||
|
||||
#ifndef RT30xx
|
||||
pObj->TimerQThr_task = NULL;
|
||||
tsk = kthread_run(TimerQThread, pAd, "%s", pAd->net_dev->name);
|
||||
if (IS_ERR(tsk) < 0)
|
||||
pObj->TimerQThr_pid= THREAD_PID_INIT_VALUE;
|
||||
pid_number = kernel_thread(TimerQThread, pAd, CLONE_VM);
|
||||
if (pid_number < 0)
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->TimerQThr_pid = NULL;
|
||||
|
@ -826,7 +825,7 @@ NDIS_STATUS CreateThreads(
|
|||
return NDIS_STATUS_FAILURE;
|
||||
}
|
||||
#ifndef RT30xx
|
||||
pObj->TimerQThr_task = tsk;
|
||||
pObj->TimerQThr_pid = GET_PID(pid_number);
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
pObj->TimerQThr_pid = find_get_pid(pid_number);
|
||||
|
|
|
@ -984,8 +984,7 @@ NDIS_STATUS RTUSBEnqueueCmdFromNdis(
|
|||
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
|
||||
|
||||
#ifndef RT30xx
|
||||
BUG_ON(pObj->RTUSBCmdThr_task == NULL);
|
||||
CHECK_PID_LEGALITY(task_pid(pObj->RTUSBCmdThr_task))
|
||||
CHECK_PID_LEGALITY(pObj->RTUSBCmdThr_pid)
|
||||
#endif
|
||||
#ifdef RT30xx
|
||||
if (pObj->RTUSBCmdThr_pid < 0)
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
{ \
|
||||
{USB_DEVICE(0x148F,0x2770)}, /* Ralink */ \
|
||||
{USB_DEVICE(0x1737,0x0071)}, /* Linksys WUSB600N */ \
|
||||
{USB_DEVICE(0x1737,0x0070)}, /* Linksys */ \
|
||||
{USB_DEVICE(0x148F,0x2870)}, /* Ralink */ \
|
||||
{USB_DEVICE(0x148F,0x3070)}, /* Ralink */ \
|
||||
{USB_DEVICE(0x0B05,0x1731)}, /* Asus */ \
|
||||
|
@ -93,12 +94,14 @@
|
|||
{USB_DEVICE(0x14B2,0x3C06)}, /* Conceptronic */ \
|
||||
{USB_DEVICE(0x14B2,0x3C28)}, /* Conceptronic */ \
|
||||
{USB_DEVICE(0x2019,0xED06)}, /* Planex Communications, Inc. */ \
|
||||
{USB_DEVICE(0x2019,0xED14)}, /* Planex Communications, Inc. */ \
|
||||
{USB_DEVICE(0x2019,0xAB25)}, /* Planex Communications, Inc. RT3070 */ \
|
||||
{USB_DEVICE(0x07D1,0x3C09)}, /* D-Link */ \
|
||||
{USB_DEVICE(0x07D1,0x3C11)}, /* D-Link */ \
|
||||
{USB_DEVICE(0x14B2,0x3C07)}, /* AL */ \
|
||||
{USB_DEVICE(0x14B2,0x3C12)}, /* AL */ \
|
||||
{USB_DEVICE(0x050D,0x8053)}, /* Belkin */ \
|
||||
{USB_DEVICE(0x050D,0x815C)}, /* Belkin */ \
|
||||
{USB_DEVICE(0x14B2,0x3C23)}, /* Airlink */ \
|
||||
{USB_DEVICE(0x14B2,0x3C27)}, /* Airlink */ \
|
||||
{USB_DEVICE(0x07AA,0x002F)}, /* Corega */ \
|
||||
|
@ -587,16 +590,14 @@ VOID RTUSBBulkRxComplete(purbb_t pUrb, struct pt_regs *pt_regs);
|
|||
#define RTUSBMlmeUp(pAd) \
|
||||
{ \
|
||||
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; \
|
||||
BUG_ON(pObj->MLMEThr_task == NULL); \
|
||||
CHECK_PID_LEGALITY(task_pid(pObj->MLMEThr_task)) \
|
||||
CHECK_PID_LEGALITY(pObj->MLMEThr_pid) \
|
||||
up(&(pAd->mlme_semaphore)); \
|
||||
}
|
||||
|
||||
#define RTUSBCMDUp(pAd) \
|
||||
{ \
|
||||
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; \
|
||||
BUG_ON(pObj->RTUSBCmdThr_task == NULL); \
|
||||
CHECK_PID_LEGALITY(task_pid(pObj->RTUSBCmdThr_task)) \
|
||||
CHECK_PID_LEGALITY(pObj->RTUSBCmdThr_pid) \
|
||||
up(&(pAd->RTUSBCmd_semaphore)); \
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -2645,7 +2645,7 @@ extern int ieee80211_encrypt_fragment(
|
|||
struct sk_buff *frag,
|
||||
int hdr_len);
|
||||
|
||||
extern int ieee80211_xmit(struct sk_buff *skb,
|
||||
extern int rtl8192_ieee80211_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
extern void ieee80211_txb_free(struct ieee80211_txb *);
|
||||
|
||||
|
|
|
@ -2645,7 +2645,7 @@ extern int ieee80211_encrypt_fragment(
|
|||
struct sk_buff *frag,
|
||||
int hdr_len);
|
||||
|
||||
extern int ieee80211_xmit(struct sk_buff *skb,
|
||||
extern int rtl8192_ieee80211_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
extern void ieee80211_txb_free(struct ieee80211_txb *);
|
||||
|
||||
|
|
|
@ -618,7 +618,7 @@ void ieee80211_query_seqnum(struct ieee80211_device*ieee, struct sk_buff* skb, u
|
|||
}
|
||||
}
|
||||
|
||||
int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
int rtl8192_ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
|
||||
struct ieee80211_device *ieee = netdev_priv(dev);
|
||||
|
@ -943,5 +943,6 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return 1;
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(rtl8192_ieee80211_xmit);
|
||||
|
||||
EXPORT_SYMBOL(ieee80211_txb_free);
|
||||
|
|
|
@ -12142,7 +12142,7 @@ static const struct net_device_ops rtl8192_netdev_ops = {
|
|||
.ndo_set_mac_address = r8192_set_mac_adr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_start_xmit = ieee80211_xmit,
|
||||
.ndo_start_xmit = rtl8192_ieee80211_xmit,
|
||||
};
|
||||
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
|
||||
|
|
Loading…
Reference in New Issue