Commit 83a27326 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: vt6655: remove PRIVATE_OBJ ifdefs

Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b8bc58c5
...@@ -41,12 +41,6 @@ ...@@ -41,12 +41,6 @@
#if !defined(__TETHER_H__) #if !defined(__TETHER_H__)
#include "tether.h" #include "tether.h"
#endif #endif
// #ifdef PRIVATE_OBJ
//#if !defined(__DEVICE_MODULE_H)
//#include "device_module.h"
//#endif
/*--------------------- Export Definitions -------------------------*/ /*--------------------- Export Definitions -------------------------*/
...@@ -237,9 +231,6 @@ ...@@ -237,9 +231,6 @@
typedef struct tagDEVICE_RD_INFO { typedef struct tagDEVICE_RD_INFO {
struct sk_buff* skb; struct sk_buff* skb;
#ifdef PRIVATE_OBJ
ref_sk_buff ref_skb;
#endif
dma_addr_t skb_dma; dma_addr_t skb_dma;
dma_addr_t curr_desc; dma_addr_t curr_desc;
} DEVICE_RD_INFO, *PDEVICE_RD_INFO; } DEVICE_RD_INFO, *PDEVICE_RD_INFO;
......
...@@ -137,11 +137,6 @@ ...@@ -137,11 +137,6 @@
//#define TASK_LET //#define TASK_LET
//PLICE_DEBUG<- //PLICE_DEBUG<-
// #ifdef PRIVATE_OBJ
//#if !defined(__DEVICE_MODULE_H)
//#include "device_module.h"
//#endif
/*--------------------- Export Definitions -------------------------*/ /*--------------------- Export Definitions -------------------------*/
...@@ -203,93 +198,9 @@ ...@@ -203,93 +198,9 @@
// BUILD OBJ mode // BUILD OBJ mode
#ifdef PRIVATE_OBJ
#undef dev_kfree_skb
#undef dev_kfree_skb_irq
#undef dev_alloc_skb
#undef kfree
#undef del_timer
#undef init_timer
#undef add_timer
#undef kmalloc
#undef netif_stop_queue
#undef netif_start_queue
#undef netif_wake_queue
#undef netif_queue_stopped
#undef netif_rx
#undef netif_running
#undef udelay
#undef mdelay
#undef eth_type_trans
#undef skb_put
#undef HZ
#undef RUN_AT
#undef pci_alloc_consistent
#undef pci_free_consistent
#undef register_netdevice
#undef register_netdev
#undef unregister_netdevice
#undef unregister_netdev
#undef skb_queue_head_init
#undef skb_queue_tail
#undef skb_queue_empty
#undef free_irq
#undef copy_from_user
#undef copy_to_user
#undef spin_lock_init
#undef pci_map_single
#undef pci_unmap_single
// redefine kernel dependent fucntion
#define dev_kfree_skb ref_dev_kfree_skb
#define dev_kfree_skb_irq ref_dev_kfree_skb_irq
#define dev_alloc_skb ref_dev_alloc_skb
#define kfree ref_kfree
#define del_timer ref_del_timer
#define init_timer ref_init_timer
#define add_timer ref_add_timer
#define kmalloc ref_kmalloc
#define netif_stop_queue ref_netif_stop_queue
#define netif_start_queue ref_netif_start_queue
#define netif_wake_queue ref_netif_wake_queue
#define netif_queue_stopped ref_netif_queue_stopped
#define netif_rx ref_netif_rx
#define netif_running ref_netif_running
#define udelay ref_udelay
#define mdelay ref_mdelay
#define get_jiffies() ref_get_jiffies()
#define RUN_AT(x) (get_jiffies()+(x))
#define HZ ref_HZ_tick()
#define eth_type_trans ref_eth_type_trans
#define skb_put ref_skb_put
#define skb_queue_head_init ref_skb_queue_head_init
#define skb_queue_tail ref_skb_queue_tail
#define skb_queue_empty ref_skb_queue_empty
#define pci_alloc_consistent ref_pci_alloc_consistent
#define pci_free_consistent ref_pci_free_consistent
#define register_netdevice ref_register_netdevice
#define register_netdev ref_register_netdev
#define unregister_netdevice ref_unregister_netdevice
#define unregister_netdev ref_unregister_netdev
#define free_irq ref_free_irq
#define copy_from_user ref_copy_from_user
#define copy_to_user ref_copy_to_user
#define spin_lock_init ref_spin_lock_init
#define pci_map_single ref_pci_map_single
#define pci_unmap_single ref_pci_unmap_single
#endif
#ifdef PRIVATE_OBJ
#undef printk
#define DEVICE_PRT(l, p, args...) {if (l<=msglevel) do {} while (0);}
//#define DEVICE_PRT(l, p, args...) {if (l<=msglevel) printk( p ,##args);}
#else
#define DEVICE_PRT(l, p, args...) {if (l<=msglevel) printk( p ,##args);} #define DEVICE_PRT(l, p, args...) {if (l<=msglevel) printk( p ,##args);}
#endif
#define AVAIL_TD(p,q) ((p)->sOpts.nTxDescs[(q)]-((p)->iTDUsed[(q)])) #define AVAIL_TD(p,q) ((p)->sOpts.nTxDescs[(q)]-((p)->iTDUsed[(q)]))
...@@ -452,9 +363,6 @@ typedef struct tagSDeFragControlBlock ...@@ -452,9 +363,6 @@ typedef struct tagSDeFragControlBlock
BYTE abyAddr2[U_ETHER_ADDR_LEN]; BYTE abyAddr2[U_ETHER_ADDR_LEN];
UINT uLifetime; UINT uLifetime;
struct sk_buff* skb; struct sk_buff* skb;
#ifdef PRIVATE_OBJ
ref_sk_buff ref_skb;
#endif
PBYTE pbyRxBuffer; PBYTE pbyRxBuffer;
UINT cbFrameLength; UINT cbFrameLength;
BOOL bInUse; BOOL bInUse;
......
This diff is collapsed.
...@@ -143,17 +143,6 @@ static BOOL s_bAPModeRxCtl( ...@@ -143,17 +143,6 @@ static BOOL s_bAPModeRxCtl(
IN INT iSANodeIndex IN INT iSANodeIndex
); );
#ifdef PRIVATE_OBJ
static BOOL s_bAPModeRxData (
IN PSDevice pDevice,
IN ref_sk_buff* skb,
IN UINT FrameSize,
IN UINT cbHeaderOffset,
IN INT iSANodeIndex,
IN INT iDANodeIndex
);
#else
static BOOL s_bAPModeRxData ( static BOOL s_bAPModeRxData (
IN PSDevice pDevice, IN PSDevice pDevice,
...@@ -163,7 +152,6 @@ static BOOL s_bAPModeRxData ( ...@@ -163,7 +152,6 @@ static BOOL s_bAPModeRxData (
IN INT iSANodeIndex, IN INT iSANodeIndex,
IN INT iDANodeIndex IN INT iDANodeIndex
); );
#endif
static BOOL s_bHandleRxEncryption( static BOOL s_bHandleRxEncryption(
...@@ -395,11 +383,7 @@ device_receive_frame ( ...@@ -395,11 +383,7 @@ device_receive_frame (
//printk("device_receive_frame:pCurrRD is %x,pRDInfo is %x\n",pCurrRD,pCurrRD->pRDInfo); //printk("device_receive_frame:pCurrRD is %x,pRDInfo is %x\n",pCurrRD,pCurrRD->pRDInfo);
#endif #endif
struct net_device_stats* pStats=&pDevice->stats; struct net_device_stats* pStats=&pDevice->stats;
#ifdef PRIVATE_OBJ
ref_sk_buff* skb;
#else
struct sk_buff* skb; struct sk_buff* skb;
#endif
PSMgmtObject pMgmt = pDevice->pMgmt; PSMgmtObject pMgmt = pDevice->pMgmt;
PSRxMgmtPacket pRxPacket = &(pDevice->pMgmt->sRxPacket); PSRxMgmtPacket pRxPacket = &(pDevice->pMgmt->sRxPacket);
PS802_11Header p802_11Header; PS802_11Header p802_11Header;
...@@ -435,12 +419,8 @@ device_receive_frame ( ...@@ -435,12 +419,8 @@ device_receive_frame (
BOOL bRxeapol_key = FALSE; BOOL bRxeapol_key = FALSE;
// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- device_receive_frame---\n"); // DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- device_receive_frame---\n");
#ifdef PRIVATE_OBJ
skb = &(pRDInfo->ref_skb);
#else
skb = pRDInfo->skb; skb = pRDInfo->skb;
#endif
//PLICE_DEBUG-> //PLICE_DEBUG->
...@@ -541,11 +521,7 @@ device_receive_frame ( ...@@ -541,11 +521,7 @@ device_receive_frame (
p802_11Header = (PS802_11Header) (pbyFrame); p802_11Header = (PS802_11Header) (pbyFrame);
// get SA NodeIndex // get SA NodeIndex
if (BSSDBbIsSTAInNodeDB(pMgmt, (PBYTE)(p802_11Header->abyAddr2), &iSANodeIndex)) { if (BSSDBbIsSTAInNodeDB(pMgmt, (PBYTE)(p802_11Header->abyAddr2), &iSANodeIndex)) {
#ifdef PRIVATE_OBJ
pMgmt->sNodeDBTable[iSANodeIndex].ulLastRxJiffer = get_jiffies();
#else
pMgmt->sNodeDBTable[iSANodeIndex].ulLastRxJiffer = jiffies; pMgmt->sNodeDBTable[iSANodeIndex].ulLastRxJiffer = jiffies;
#endif
pMgmt->sNodeDBTable[iSANodeIndex].uInActiveCount = 0; pMgmt->sNodeDBTable[iSANodeIndex].uInActiveCount = 0;
} }
} }
...@@ -639,11 +615,7 @@ device_receive_frame ( ...@@ -639,11 +615,7 @@ device_receive_frame (
pDevice->s802_11Counter.ReceivedFragmentCount++; pDevice->s802_11Counter.ReceivedFragmentCount++;
if (bDeFragRx) { if (bDeFragRx) {
// defrag complete // defrag complete
#ifdef PRIVATE_OBJ
skb = &(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].ref_skb);
#else
skb = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb; skb = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb;
#endif
FrameSize = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength; FrameSize = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength;
} }
...@@ -705,16 +677,6 @@ device_receive_frame ( ...@@ -705,16 +677,6 @@ device_receive_frame (
// hostap Deamon handle 802.11 management // hostap Deamon handle 802.11 management
if (pDevice->bEnableHostapd) { if (pDevice->bEnableHostapd) {
skb->dev = pDevice->apdev; skb->dev = pDevice->apdev;
#ifdef PRIVATE_OBJ
ref_skb_add_offset(skb->skb, 4);
ref_skb_set_dev(pDevice->apdev, skb->skb);
skb_put(skb->skb, FrameSize);
skb->mac_header = skb->data;
*(skb->pkt_type) = PACKET_OTHERHOST;
*(skb->protocol) = htons(ETH_P_802_2);
memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb->skb);
#else
skb->data += 4; skb->data += 4;
skb->tail += 4; skb->tail += 4;
skb_put(skb, FrameSize); skb_put(skb, FrameSize);
...@@ -723,7 +685,6 @@ device_receive_frame ( ...@@ -723,7 +685,6 @@ device_receive_frame (
skb->protocol = htons(ETH_P_802_2); skb->protocol = htons(ETH_P_802_2);
memset(skb->cb, 0, sizeof(skb->cb)); memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb); netif_rx(skb);
#endif
return TRUE; return TRUE;
} }
} }
...@@ -846,16 +807,6 @@ device_receive_frame ( ...@@ -846,16 +807,6 @@ device_receive_frame (
memcpy(&abyMacHdr[0], (skb->data + 4), 24); memcpy(&abyMacHdr[0], (skb->data + 4), 24);
memcpy((skb->data + 4 + cbIVOffset), &abyMacHdr[0], 24); memcpy((skb->data + 4 + cbIVOffset), &abyMacHdr[0], 24);
} }
#ifdef PRIVATE_OBJ
ref_skb_add_offset(skb->skb, (cbIVOffset + 4));
ref_skb_set_dev(pDevice->apdev, skb->skb);
skb_put(skb->skb, FrameSize);
skb->mac_header = skb->data;
*(skb->pkt_type) = PACKET_OTHERHOST;
*(skb->protocol) = htons(ETH_P_802_2);
memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb->skb);
#else
skb->data += (cbIVOffset + 4); skb->data += (cbIVOffset + 4);
skb->tail += (cbIVOffset + 4); skb->tail += (cbIVOffset + 4);
skb_put(skb, FrameSize); skb_put(skb, FrameSize);
...@@ -865,7 +816,6 @@ device_receive_frame ( ...@@ -865,7 +816,6 @@ device_receive_frame (
skb->protocol = htons(ETH_P_802_2); skb->protocol = htons(ETH_P_802_2);
memset(skb->cb, 0, sizeof(skb->cb)); memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb); netif_rx(skb);
#endif
return TRUE; return TRUE;
} }
...@@ -1081,29 +1031,17 @@ device_receive_frame ( ...@@ -1081,29 +1031,17 @@ device_receive_frame (
} }
#ifdef PRIVATE_OBJ
ref_skb_add_offset(skb->skb, cbHeaderOffset);
skb_put(skb->skb, FrameSize);
*(skb->protocol)=eth_type_trans(skb->skb, skb->dev);
#else
skb->data += cbHeaderOffset; skb->data += cbHeaderOffset;
skb->tail += cbHeaderOffset; skb->tail += cbHeaderOffset;
skb_put(skb, FrameSize); skb_put(skb, FrameSize);
skb->protocol=eth_type_trans(skb, skb->dev); skb->protocol=eth_type_trans(skb, skb->dev);
#endif
//drop frame not met IEEE 802.3 //drop frame not met IEEE 802.3
/* /*
if (pDevice->flags & DEVICE_FLAGS_VAL_PKT_LEN) { if (pDevice->flags & DEVICE_FLAGS_VAL_PKT_LEN) {
#ifdef PRIVATE_OBJ
if ((*(skb->protocol)==htons(ETH_P_802_3)) &&
(*(skb->len)!=htons(skb->mac.ethernet->h_proto))) {
#else
if ((skb->protocol==htons(ETH_P_802_3)) && if ((skb->protocol==htons(ETH_P_802_3)) &&
(skb->len!=htons(skb->mac.ethernet->h_proto))) { (skb->len!=htons(skb->mac.ethernet->h_proto))) {
#endif
pStats->rx_length_errors++; pStats->rx_length_errors++;
pStats->rx_dropped++; pStats->rx_dropped++;
if (bDeFragRx) { if (bDeFragRx) {
...@@ -1117,17 +1055,10 @@ device_receive_frame ( ...@@ -1117,17 +1055,10 @@ device_receive_frame (
} }
*/ */
#ifdef PRIVATE_OBJ
*(skb->ip_summed)=CHECKSUM_NONE;
pStats->rx_bytes +=*(skb->len);
pStats->rx_packets++;
netif_rx(skb->skb);
#else
skb->ip_summed=CHECKSUM_NONE; skb->ip_summed=CHECKSUM_NONE;
pStats->rx_bytes +=skb->len; pStats->rx_bytes +=skb->len;
pStats->rx_packets++; pStats->rx_packets++;
netif_rx(skb); netif_rx(skb);
#endif
if (bDeFragRx) { if (bDeFragRx) {
if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
...@@ -1541,18 +1472,6 @@ static BOOL s_bHostWepRxEncryption ( ...@@ -1541,18 +1472,6 @@ static BOOL s_bHostWepRxEncryption (
#ifdef PRIVATE_OBJ
static BOOL s_bAPModeRxData (
IN PSDevice pDevice,
IN ref_sk_buff* skb,
IN UINT FrameSize,
IN UINT cbHeaderOffset,
IN INT iSANodeIndex,
IN INT iDANodeIndex
)
#else
static BOOL s_bAPModeRxData ( static BOOL s_bAPModeRxData (
IN PSDevice pDevice, IN PSDevice pDevice,
...@@ -1562,20 +1481,13 @@ static BOOL s_bAPModeRxData ( ...@@ -1562,20 +1481,13 @@ static BOOL s_bAPModeRxData (
IN INT iSANodeIndex, IN INT iSANodeIndex,
IN INT iDANodeIndex IN INT iDANodeIndex
) )
#endif
{ {
PSMgmtObject pMgmt = pDevice->pMgmt; PSMgmtObject pMgmt = pDevice->pMgmt;
BOOL bRelayAndForward = FALSE; BOOL bRelayAndForward = FALSE;
BOOL bRelayOnly = FALSE; BOOL bRelayOnly = FALSE;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
WORD wAID; WORD wAID;
#ifdef PRIVATE_OBJ
struct sk_buff* tmp_skb;
ref_sk_buff s_ref_skb;
ref_sk_buff* skbcpy = &s_ref_skb;
#else
struct sk_buff* skbcpy = NULL; struct sk_buff* skbcpy = NULL;
#endif
...@@ -1585,28 +1497,16 @@ static BOOL s_bAPModeRxData ( ...@@ -1585,28 +1497,16 @@ static BOOL s_bAPModeRxData (
if(IS_MULTICAST_ADDRESS((PBYTE)(skb->data+cbHeaderOffset))) { if(IS_MULTICAST_ADDRESS((PBYTE)(skb->data+cbHeaderOffset))) {
if (pMgmt->sNodeDBTable[0].bPSEnable) { if (pMgmt->sNodeDBTable[0].bPSEnable) {
#ifdef PRIVATE_OBJ
tmp_skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
skbcpy = &s_ref_skb;
ref_skb_remap(pDevice->dev, skbcpy, tmp_skb);
#else
skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz); skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz);
#endif
// if any node in PS mode, buffer packet until DTIM. // if any node in PS mode, buffer packet until DTIM.
if (skbcpy == NULL) { if (skbcpy == NULL) {
DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n"); DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n");
} }
else { else {
skbcpy->dev = pDevice->dev; skbcpy->dev = pDevice->dev;
#ifdef PRIVATE_OBJ
*(skbcpy->len) = FrameSize;
memcpy(skbcpy->data, skb->data+cbHeaderOffset, FrameSize);
skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skbcpy->skb);
#else
skbcpy->len = FrameSize; skbcpy->len = FrameSize;
memcpy(skbcpy->data, skb->data+cbHeaderOffset, FrameSize); memcpy(skbcpy->data, skb->data+cbHeaderOffset, FrameSize);
skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skbcpy); skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skbcpy);
#endif
pMgmt->sNodeDBTable[0].wEnQueueCnt++; pMgmt->sNodeDBTable[0].wEnQueueCnt++;
// set tx map // set tx map
pMgmt->abyPSTxMap[0] |= byMask[0]; pMgmt->abyPSTxMap[0] |= byMask[0];
...@@ -1623,16 +1523,10 @@ static BOOL s_bAPModeRxData ( ...@@ -1623,16 +1523,10 @@ static BOOL s_bAPModeRxData (
if (pMgmt->sNodeDBTable[iDANodeIndex].bPSEnable) { if (pMgmt->sNodeDBTable[iDANodeIndex].bPSEnable) {
// queue this skb until next PS tx, and then release. // queue this skb until next PS tx, and then release.
#ifdef PRIVATE_OBJ
ref_skb_add_offset(skb->skb, cbHeaderOffset);
skb_put(skb->skb, FrameSize);
skb_queue_tail(&pMgmt->sNodeDBTable[iDANodeIndex].sTxPSQueue, skb->skb);
#else
skb->data += cbHeaderOffset; skb->data += cbHeaderOffset;
skb->tail += cbHeaderOffset; skb->tail += cbHeaderOffset;
skb_put(skb, FrameSize); skb_put(skb, FrameSize);
skb_queue_tail(&pMgmt->sNodeDBTable[iDANodeIndex].sTxPSQueue, skb); skb_queue_tail(&pMgmt->sNodeDBTable[iDANodeIndex].sTxPSQueue, skb);
#endif
pMgmt->sNodeDBTable[iDANodeIndex].wEnQueueCnt++; pMgmt->sNodeDBTable[iDANodeIndex].wEnQueueCnt++;
wAID = pMgmt->sNodeDBTable[iDANodeIndex].wAID; wAID = pMgmt->sNodeDBTable[iDANodeIndex].wAID;
pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7]; pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7];
......
...@@ -106,25 +106,6 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) ...@@ -106,25 +106,6 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
#ifdef PRIVATE_OBJ
pDevice->apdev = ref_init_apdev(dev);
if (pDevice->apdev == NULL)
return -ENOMEM;
if (rtnl_locked)
ret = register_netdevice(pDevice->apdev);
else
ret = register_netdev(pDevice->apdev);
if (ret) {
DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdevice(AP) failed!\n",
dev->name);
return -1;
}
DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Registered netdevice %s for AP management\n",
dev->name, pDevice->apdev->name);
#else
pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL); pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL);
if (pDevice->apdev == NULL) if (pDevice->apdev == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -160,7 +141,6 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) ...@@ -160,7 +141,6 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
dev->name, pDevice->apdev->name); dev->name, pDevice->apdev->name);
KeyvInitTable(&pDevice->sKey, pDevice->PortOffset); KeyvInitTable(&pDevice->sKey, pDevice->PortOffset);
#endif
return 0; return 0;
} }
...@@ -308,11 +288,7 @@ static int hostap_add_sta(PSDevice pDevice, ...@@ -308,11 +288,7 @@ static int hostap_add_sta(PSDevice pDevice,
WLAN_GET_CAP_INFO_SHORTPREAMBLE(pMgmt->sNodeDBTable[uNodeIndex].wCapInfo); WLAN_GET_CAP_INFO_SHORTPREAMBLE(pMgmt->sNodeDBTable[uNodeIndex].wCapInfo);
pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)param->u.add_sta.aid; pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)param->u.add_sta.aid;
#ifdef PRIVATE_OBJ
pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = get_jiffies();
#else
pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies; pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies;
#endif
DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Add STA AID= %d \n", pMgmt->sNodeDBTable[uNodeIndex].wAID); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Add STA AID= %d \n", pMgmt->sNodeDBTable[uNodeIndex].wAID);
DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n", DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n",
param->sta_addr[0], param->sta_addr[0],
...@@ -349,13 +325,8 @@ static int hostap_get_info_sta(PSDevice pDevice, ...@@ -349,13 +325,8 @@ static int hostap_get_info_sta(PSDevice pDevice,
UINT uNodeIndex; UINT uNodeIndex;
if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) { if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) {
#ifdef PRIVATE_OBJ
param->u.get_info_sta.inactive_sec =
(get_jiffies() - pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer) / HZ;
#else
param->u.get_info_sta.inactive_sec = param->u.get_info_sta.inactive_sec =
(jiffies - pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer) / HZ; (jiffies - pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer) / HZ;
#endif
//param->u.get_info_sta.txexc = pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts; //param->u.get_info_sta.txexc = pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts;
} }
else { else {
......
...@@ -66,11 +66,7 @@ ...@@ -66,11 +66,7 @@
#ifndef IRQ_RETVAL #ifndef IRQ_RETVAL
typedef void irqreturn_t; typedef void irqreturn_t;
#ifdef PRIVATE_OBJ
#define IRQ_RETVAL(x) (int)x
#else
#define IRQ_RETVAL(x) #define IRQ_RETVAL(x)
#endif
#endif #endif
......
...@@ -212,11 +212,7 @@ UINT uHeaderSize; ...@@ -212,11 +212,7 @@ UINT uHeaderSize;
} }
} }
// reserve 4 byte to match MAC RX Buffer // reserve 4 byte to match MAC RX Buffer
#ifdef PRIVATE_OBJ
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (PBYTE) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].ref_skb.data + 4);
#else
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (PBYTE) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4); pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (PBYTE) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4);
#endif
memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, pMACHeader, cbFrameLength); memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, pMACHeader, cbFrameLength);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength = cbFrameLength; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength = cbFrameLength;
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment