// Trying to use burst write function if use new hardware
UrbSize = sizeof(struct wb35_reg_queue) + DataSize + sizeof(struct usb_ctrlrequest);
- OS_MEMORY_ALLOC( (void* *)®_queue, UrbSize );
+ reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
urb = usb_alloc_urb(0, GFP_ATOMIC);
if( urb && reg_queue ) {
reg_queue->DIRECT = 2;// burst write register
// update the register by send urb request------------------------------------
UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
- OS_MEMORY_ALLOC( (void* *)®_queue, UrbSize );
+ reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (urb && reg_queue) {
reg_queue->DIRECT = 1;// burst write register
// update the register by send urb request------------------------------------
UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
- OS_MEMORY_ALLOC((void* *) ®_queue, UrbSize );
+ reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (urb && reg_queue) {
reg_queue->DIRECT = 1;// burst write register
// update the variable by send Urb to read register ------------------------------------
UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
- OS_MEMORY_ALLOC( (void* *)®_queue, UrbSize );
+ reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
urb = usb_alloc_urb(0, GFP_ATOMIC);
if( urb && reg_queue )
{
//============================================================================
#include "os_common.h"
-u32
-WBLINUX_MemoryAlloc(void* *VirtualAddress, u32 Length)
-{
- *VirtualAddress = kzalloc( Length, GFP_ATOMIC ); //GFP_KERNEL is not suitable
-
- if (*VirtualAddress == NULL)
- return 0;
- return 1;
-}
-
s32
EncapAtomicInc(struct wb35_adapter * adapter, void* pAtomic)
{
//
// wblinux_f.h
//
-u32 WBLINUX_MemoryAlloc( void* *VirtualAddress, u32 Length );
s32 EncapAtomicInc( struct wb35_adapter *adapter, void* pAtomic );
s32 EncapAtomicDec( struct wb35_adapter *adapter, void* pAtomic );
void WBLinux_ReceivePacket( struct wb35_adapter *adapter, PRXLAYER1 pRxLayer1 );