author | Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com> |
Thu, 04 Mar 2010 11:58:36 +0000 | |
branch | RCL_3 |
changeset 6 | e7dfaa7b0b8d |
permissions | -rw-r--r-- |
6
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
2 |
// All rights reserved. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
4 |
// under the terms of "Eclipse Public License v1.0" |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
7 |
// |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
10 |
// |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
11 |
// Contributors: |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
12 |
// |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
13 |
// Description: |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
14 |
// |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
15 |
// |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
16 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
17 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
18 |
@file |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
19 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
20 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
21 |
#include <nifman.h> |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
22 |
#include <nifvar.h> |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
23 |
#include <nifutl.h> |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
24 |
#include <es_mbuf.h> |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
25 |
#include "PKTDRV.H" |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
26 |
#include "ETHINTER.H" |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
27 |
#include "Cardctl.h" |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
28 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
29 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
30 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
31 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
32 |
#ifdef __DebugCardLo__ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
33 |
// TCP packet tracing debug |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
34 |
const TUint8 ETHER2_TYPE_IP_MSB = 0x08; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
35 |
const TUint8 ETHER2_TYPE_IP_LSB = 0x00; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
36 |
const TUint8 IP_TYPE_TCP = 0x06; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
37 |
static inline TBool IsTcp(TDesC8 &aFrame) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
38 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
39 |
return (aFrame[12] == ETHER2_TYPE_IP_MSB && aFrame[13] == ETHER2_TYPE_IP_LSB && aFrame[23] == IP_TYPE_TCP); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
40 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
41 |
static TInt GetTcpSeqNumber(TDesC8 &aFrame) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
42 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
43 |
TInt seqNum = 0; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
44 |
if (IsTcp(aFrame)) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
45 |
seqNum = aFrame[38] << 24 | aFrame[39] << 16 | aFrame[40] << 8| aFrame[41]; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
46 |
return seqNum; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
47 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
48 |
static TInt GetTcpAckNumber(TDesC8 &aFrame) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
49 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
50 |
TInt ackNum = 0; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
51 |
if (IsTcp(aFrame)) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
52 |
ackNum = aFrame[42] << 24 | aFrame[43] << 16 | aFrame[44] << 8| aFrame[45]; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
53 |
return ackNum; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
54 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
55 |
#endif |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
56 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
57 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
58 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
59 |
Send active object class |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
60 |
When CIOBuffer's are passed to SendL() the class takes ownership and is |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
61 |
therefore resposible for freeing them in the RunL() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
62 |
@internalComponent |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
63 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
64 |
const TInt KTxQueueThreshold = 40; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
65 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
66 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
67 |
Constructor. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
68 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
69 |
CPcCardSender::CPcCardSender() : CActive(EPriorityStandard) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
70 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
71 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
72 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
73 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
74 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
75 |
Destructor. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
76 |
Could be buffers on the transmit queue, free them as this class should be sole owner. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
77 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
78 |
CPcCardSender::~CPcCardSender() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
79 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
80 |
EmptyQueue(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
81 |
Cancel(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
82 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
83 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
84 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
85 |
Standard CActive construction. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
86 |
@param aParent Pointer to the parent CPcCardControlEngine class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
87 |
@return A pointer to CPcCardSender object. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
88 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
89 |
CPcCardSender* CPcCardSender::NewL(CPcCardControlEngine* aParent) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
90 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
91 |
CPcCardSender *sd=new (ELeave) CPcCardSender; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
92 |
CleanupStack::PushL(sd); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
93 |
sd->InitL(aParent); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
94 |
CActiveScheduler::Add(sd); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
95 |
CleanupStack::Pop(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
96 |
return sd; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
97 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
98 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
99 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
100 |
Add the newly created object to an object container. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
101 |
@param aParent Pointer to the parent CPcCardControlEngine class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
102 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
103 |
void CPcCardSender::InitL(CPcCardControlEngine* aParent) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
104 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
105 |
iParent=aParent; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
106 |
iTxQueue.SetOffset(CIOBuffer::LinkOffset()); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
107 |
iQueueLength = 0; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
108 |
iStopSending = EFalse; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
109 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
110 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
111 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
112 |
Protocol inspects return |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
113 |
It blocks sending if it receives a return <= 0 |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
114 |
This value should be propogated up through the stack |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
115 |
@internalComponent |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
116 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
117 |
const TInt KStopSending = 0; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
118 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
119 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
120 |
Protocol inspects return to indicate Keep sending the data. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
121 |
@internalComponent |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
122 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
123 |
const TInt KContinueSending = 1; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
124 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
125 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
126 |
Writes the data to buffer. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
127 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
128 |
@param aBuffer The data to be send. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
129 |
@return 0 Tells the higher layer to stop sending the data. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
130 |
1 Tells higher layer that it can continue sending more data. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
131 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
132 |
TInt CPcCardSender::Send(CIOBuffer *aBuffer) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
133 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
134 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
135 |
// Check to see if we need to start transmission |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
136 |
// Pseudo interrupt queue |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
137 |
TBool startTx = iTxQueue.IsEmpty(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
138 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
139 |
iTxQueue.AddLast(*aBuffer); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
140 |
iQueueLength++; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
141 |
if(startTx) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
142 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
143 |
// Transmitter was idle start next transmit |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
144 |
iParent->iCard.Write(iStatus,aBuffer->Ptr()); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
145 |
SetActive(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
146 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
147 |
else |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
148 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
149 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
150 |
// The stack could saturate us with data |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
151 |
// Tell the stack to send no more |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
152 |
// We will unblock the stack when the queue size drops below |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
153 |
// the the threshold |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
154 |
if(iQueueLength >= KTxQueueThreshold) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
155 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
156 |
iStopSending = ETrue; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
157 |
return KStopSending; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
158 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
159 |
else |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
160 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
161 |
return KContinueSending; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
162 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
163 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
164 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
165 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
166 |
Free all queued buffers. Should be safe as this class owns them |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
167 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
168 |
void CPcCardSender::EmptyQueue() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
169 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
170 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
171 |
while(!iTxQueue.IsEmpty()) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
172 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
173 |
CIOBuffer* buf = iTxQueue.First(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
174 |
iTxQueue.Remove(*buf); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
175 |
delete buf; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
176 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
177 |
iQueueLength = 0; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
178 |
iStopSending = EFalse; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
179 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
180 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
181 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
182 |
Write completion from the LDD. Pseudo transmit interrupt handler |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
183 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
184 |
void CPcCardSender::RunL() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
185 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
186 |
// Check for error, all we can do is free the buffers |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
187 |
if(iStatus.Int()!=KErrNone) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
188 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
189 |
EmptyQueue(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
190 |
return; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
191 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
192 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
193 |
if(!iTxQueue.IsEmpty()) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
194 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
195 |
// Head of the queue has been transmitted |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
196 |
// Remove it and free it |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
197 |
CIOBuffer* buf = iTxQueue.First(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
198 |
iTxQueue.Remove(*buf); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
199 |
iQueueLength--; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
200 |
delete buf; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
201 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
202 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
203 |
// Check to see if there are still buffers queued. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
204 |
// Start next transmit if there are |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
205 |
TBool startTx; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
206 |
(iTxQueue.IsEmpty()) ? (startTx = EFalse) : (startTx = ETrue); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
207 |
if(startTx) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
208 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
209 |
buf = iTxQueue.First(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
210 |
iParent->iCard.Write(iStatus,buf->Ptr()); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
211 |
SetActive(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
212 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
213 |
else |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
214 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
215 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
216 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
217 |
// Resume sending if the protocol was previously blocked |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
218 |
if(iStopSending && iQueueLength < KTxQueueThreshold) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
219 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
220 |
iStopSending = EFalse; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
221 |
iParent->ResumeSending(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
222 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
223 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
224 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
225 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
226 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
227 |
cancellation of an outstanding request. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
228 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
229 |
void CPcCardSender::DoCancel() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
230 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
231 |
iParent->iCard.WriteCancel(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
232 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
233 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
234 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
235 |
Read active object class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
236 |
Read kept permanently on the LDD |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
237 |
Read completion is notified immediately up through the stack |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
238 |
with the one receive buffer therefore no Q. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
239 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
240 |
CPcCardReceiver::CPcCardReceiver() : CActive(EPriorityMore) , iRecvBufPtr(NULL,0) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
241 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
242 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
243 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
244 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
245 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
246 |
Constructor. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
247 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
248 |
CPcCardReceiver::~CPcCardReceiver() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
249 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
250 |
Cancel(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
251 |
// One buffer only |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
252 |
delete iRecvBuffer; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
253 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
254 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
255 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
256 |
Standard CActive construction. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
257 |
@param aParent Pointer to the parent CPcCardControlEngine class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
258 |
@return A pointer to CPcCardReceiver object. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
259 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
260 |
CPcCardReceiver* CPcCardReceiver::NewL(CPcCardControlEngine* aParent) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
261 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
262 |
CPcCardReceiver *rv=new (ELeave) CPcCardReceiver; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
263 |
CleanupStack::PushL(rv); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
264 |
rv->InitL(aParent); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
265 |
CActiveScheduler::Add(rv); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
266 |
CleanupStack::Pop(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
267 |
return rv; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
268 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
269 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
270 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
271 |
Allocate the one and only read buffer. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
272 |
@param aParent Pointer to the parent CPcCardControlEngine class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
273 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
274 |
void CPcCardReceiver::InitL(CPcCardControlEngine* aParent) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
275 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
276 |
iParent=aParent; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
277 |
iRecvBufLength=KEtherBufSize; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
278 |
iRecvBuffer=HBufC8::NewMaxL(iRecvBufLength); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
279 |
TPtr8 temp=iRecvBuffer->Des(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
280 |
iRecvBufPtr.Set(temp); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
281 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
282 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
283 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
284 |
Pass the receive buffer to the Card. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
285 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
286 |
void CPcCardReceiver::QueueRead() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
287 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
288 |
iRecvBufPtr.SetMax(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
289 |
iParent->iCard.Read(iStatus,iRecvBufPtr); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
290 |
SetActive(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
291 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
292 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
293 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
294 |
Pseudo read interrupt handler. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
295 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
296 |
void CPcCardReceiver::RunL() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
297 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
298 |
if (iParent->CardOpen()) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
299 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
300 |
if (iStatus.Int()!=KErrNone) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
301 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
302 |
QueueRead(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
303 |
return; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
304 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
305 |
// Pass the buffer up the stack |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
306 |
// and queue the next read, safe to reuse the buffer. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
307 |
if(iRecvBufPtr.Length()) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
308 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
309 |
iParent->ProcessReceivedPacket(iRecvBufPtr); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
310 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
311 |
QueueRead(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
312 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
313 |
else |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
314 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
315 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
316 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
317 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
318 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
319 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
320 |
Cancellation of an outstanding request. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
321 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
322 |
void CPcCardReceiver::DoCancel() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
323 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
324 |
iParent->iCard.ReadCancel(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
325 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
326 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
327 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
328 |
Constructor. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
329 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
330 |
CPcCardEventHandler::CPcCardEventHandler() : CActive(EPriorityStandard) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
331 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
332 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
333 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
334 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
335 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
336 |
Destructor. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
337 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
338 |
CPcCardEventHandler::~CPcCardEventHandler() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
339 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
340 |
Cancel(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
341 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
342 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
343 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
344 |
Allocate the one and only read buffer. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
345 |
@param aParent Pointer to the parent CPcCardControlEngine class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
346 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
347 |
void CPcCardEventHandler::InitL(CPcCardControlEngine* aParent) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
348 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
349 |
iParent = aParent; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
350 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
351 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
352 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
353 |
Standard CActive construction |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
354 |
@param aParent Pointer to the parent CPcCardControlEngine class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
355 |
@return A pointer to the CPcCardEventHandler object. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
356 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
357 |
CPcCardEventHandler* CPcCardEventHandler::NewL(CPcCardControlEngine* aParent) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
358 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
359 |
CPcCardEventHandler *p=new (ELeave) CPcCardEventHandler; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
360 |
CleanupStack::PushL(p); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
361 |
p->InitL(aParent); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
362 |
CActiveScheduler::Add(p); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
363 |
CleanupStack::Pop(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
364 |
return p; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
365 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
366 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
367 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
368 |
Handles an active object’s request completion event. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
369 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
370 |
void CPcCardEventHandler::RunL() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
371 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
372 |
// TODO Parse code in iStatus for type of event |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
373 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
374 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
375 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
376 |
Cancellation of an outstanding request. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
377 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
378 |
void CPcCardEventHandler::DoCancel() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
379 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
380 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
381 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
382 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
383 |
Gets the Event generated by the device drivers. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
384 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
385 |
void CPcCardEventHandler::GetEvent() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
386 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
387 |
// Tell the device driver we want ALL Events |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
388 |
iEventBuffer.SetLength(1); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
389 |
iEventBuffer[0] = 0xFF; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
390 |
SetActive(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
391 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
392 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
393 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
394 |
Constructor. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
395 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
396 |
CPcCardIOCTL::CPcCardIOCTL() : CActive(EPriorityStandard) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
397 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
398 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
399 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
400 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
401 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
402 |
Destructor. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
403 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
404 |
CPcCardIOCTL::~CPcCardIOCTL() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
405 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
406 |
Cancel(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
407 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
408 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
409 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
410 |
Add the newly created object to an object container. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
411 |
@param aParent Pointer to the parent CPcCardControlEngine class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
412 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
413 |
void CPcCardIOCTL::InitL(CPcCardControlEngine* aParent) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
414 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
415 |
iParent = aParent; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
416 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
417 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
418 |
TInt CPcCardIOCTL::Ioctl(const TUint8 aIOCTLCode) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
419 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
420 |
if(IsActive()) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
421 |
return KErrNotReady; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
422 |
iIOCTLBuffer.SetLength(1); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
423 |
iIOCTLBuffer[0] = aIOCTLCode; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
424 |
iCurrentIOCTL = aIOCTLCode; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
425 |
SetActive(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
426 |
return KErrNone; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
427 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
428 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
429 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
430 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
431 |
Standard CActive construction. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
432 |
@param aParent Pointer to the parent CPcCardControlEngine class. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
433 |
@return A pointer to CPcCardIOCTL object. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
434 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
435 |
CPcCardIOCTL* CPcCardIOCTL::NewL(CPcCardControlEngine* aParent) |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
436 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
437 |
CPcCardIOCTL *p=new (ELeave) CPcCardIOCTL; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
438 |
CleanupStack::PushL(p); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
439 |
p->InitL(aParent); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
440 |
CActiveScheduler::Add(p); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
441 |
CleanupStack::Pop(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
442 |
return p; |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
443 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
444 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
445 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
446 |
Handles an active object’s request completion event. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
447 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
448 |
void CPcCardIOCTL::RunL() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
449 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
450 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
451 |
iParent->iReceiver->QueueRead(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
452 |
iParent->LinkLayerUp(); |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
453 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
454 |
} |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
455 |
|
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
456 |
/** |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
457 |
Cancellation of an outstanding request. |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
458 |
*/ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
459 |
void CPcCardIOCTL::DoCancel() |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
460 |
{ |
e7dfaa7b0b8d
Fix for Bug 69 - provide missing source for EtherPkt.drv
Deepak Kumar-Gupta <deepak.kumar-gupta@nokia.com>
parents:
diff
changeset
|
461 |
} |