Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c9fb442e
Commit
c9fb442e
authored
Feb 12, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/jgarzik/irda-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
342f5580
c085b996
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
312 additions
and
179 deletions
+312
-179
include/net/irda/irda_device.h
include/net/irda/irda_device.h
+24
-3
include/net/irda/wrapper.h
include/net/irda/wrapper.h
+0
-2
net/irda/ircomm/ircomm_param.c
net/irda/ircomm/ircomm_param.c
+3
-1
net/irda/ircomm/ircomm_tty.c
net/irda/ircomm/ircomm_tty.c
+2
-1
net/irda/irlap_event.c
net/irda/irlap_event.c
+5
-5
net/irda/irsyms.c
net/irda/irsyms.c
+1
-0
net/irda/wrapper.c
net/irda/wrapper.c
+277
-167
No files found.
include/net/irda/irda_device.h
View file @
c9fb442e
...
...
@@ -173,13 +173,34 @@ typedef struct {
__u8
*
head
;
/* start of buffer */
__u8
*
data
;
/* start of data in buffer */
__u8
*
tail
;
/* end of data in buffer */
int
len
;
/* length of data */
int
truesize
;
/* total size of buffer */
int
len
;
/*
current
length of data */
int
truesize
;
/* total
allocated
size of buffer */
__u16
fcs
;
struct
sk_buff
*
skb
;
/* ZeroCopy Rx in async_unwrap_char() */
}
iobuff_t
;
/* Maximum SIR frame (skb) that we expect to receive *unwrapped*.
* Max LAP MTU (I field) is 2048 bytes max (IrLAP 1.1, chapt 6.6.5, p40).
* Max LAP header is 2 bytes (for now).
* Max CRC is 2 bytes at SIR, 4 bytes at FIR.
* Need 1 byte for skb_reserve() to align IP header for IrLAN.
* Add a few extra bytes just to be safe (buffer is power of two anyway)
* Jean II */
#define IRDA_SKB_MAX_MTU 2064
/* Maximum SIR frame that we expect to send, wrapped (i.e. with XBOFS
* and escaped characters on top of above). */
#define IRDA_SIR_MAX_FRAME 4269
/* The SIR unwrapper async_unwrap_char() will use a Rx-copy-break mechanism
* when using the optional ZeroCopy Rx, where only small frames are memcpy
* to a smaller skb to save memory. This is the thresold under which copy
* will happen (and over which it won't happen).
* Some FIR drivers may use this #define as well...
* This is the same value as various Ethernet drivers. - Jean II */
#define IRDA_RX_COPY_THRESHOLD 256
/* Function prototypes */
int
irda_device_init
(
void
);
void
irda_device_cleanup
(
void
);
...
...
include/net/irda/wrapper.h
View file @
c9fb442e
...
...
@@ -52,8 +52,6 @@ enum {
/* Proto definitions */
int
async_wrap_skb
(
struct
sk_buff
*
skb
,
__u8
*
tx_buff
,
int
buffsize
);
void
async_bump
(
struct
net_device
*
dev
,
struct
net_device_stats
*
stats
,
__u8
*
buf
,
int
len
);
void
async_unwrap_char
(
struct
net_device
*
dev
,
struct
net_device_stats
*
stats
,
iobuff_t
*
buf
,
__u8
byte
);
...
...
net/irda/ircomm/ircomm_param.c
View file @
c9fb442e
...
...
@@ -442,7 +442,9 @@ static int ircomm_param_dte(void *instance, irda_param_t *param, int get)
param
->
pv
.
i
=
self
->
settings
.
dte
;
else
{
dte
=
(
__u8
)
param
->
pv
.
i
;
self
->
settings
.
dce
=
0
;
if
(
dte
&
IRCOMM_DELTA_DTR
)
self
->
settings
.
dce
|=
(
IRCOMM_DELTA_DSR
|
IRCOMM_DELTA_RI
|
...
...
net/irda/ircomm/ircomm_tty.c
View file @
c9fb442e
...
...
@@ -490,7 +490,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
if
(
line
<
0x10
)
{
self
->
service_type
=
IRCOMM_3_WIRE
|
IRCOMM_9_WIRE
;
self
->
settings
.
service_type
=
IRCOMM_9_WIRE
;
/* 9 wire as default */
self
->
settings
.
dce
=
IRCOMM_CTS
|
IRCOMM_CD
;
/* Default line settings */
/* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */
self
->
settings
.
dce
=
IRCOMM_CTS
|
IRCOMM_CD
|
IRCOMM_DSR
|
IRCOMM_RI
;
/* Default line settings */
IRDA_DEBUG
(
2
,
"%s(), IrCOMM device
\n
"
,
__FUNCTION__
);
}
else
{
IRDA_DEBUG
(
2
,
"%s(), IrLPT device
\n
"
,
__FUNCTION__
);
...
...
net/irda/irlap_event.c
View file @
c9fb442e
...
...
@@ -1870,7 +1870,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
irlap_update_nr_received
(
self
,
info
->
nr
);
irlap_wait_min_turn_around
(
self
,
&
self
->
qos_tx
);
irlap_send_rr_frame
(
self
,
CMD
_FRAME
);
irlap_send_rr_frame
(
self
,
RSP
_FRAME
);
irlap_start_wd_timer
(
self
,
self
->
wd_timeout
);
}
...
...
@@ -2035,18 +2035,18 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
irlap_update_nr_received
(
self
,
info
->
nr
);
if
(
self
->
remote_busy
)
{
irlap_wait_min_turn_around
(
self
,
&
self
->
qos_tx
);
irlap_send_rr_frame
(
self
,
CMD
_FRAME
);
irlap_send_rr_frame
(
self
,
RSP
_FRAME
);
}
else
irlap_resend_rejected_frames
(
self
,
CMD
_FRAME
);
irlap_resend_rejected_frames
(
self
,
RSP
_FRAME
);
irlap_start_wd_timer
(
self
,
self
->
wd_timeout
);
break
;
case
RECV_SREJ_CMD
:
irlap_update_nr_received
(
self
,
info
->
nr
);
if
(
self
->
remote_busy
)
{
irlap_wait_min_turn_around
(
self
,
&
self
->
qos_tx
);
irlap_send_rr_frame
(
self
,
CMD
_FRAME
);
irlap_send_rr_frame
(
self
,
RSP
_FRAME
);
}
else
irlap_resend_rejected_frame
(
self
,
CMD
_FRAME
);
irlap_resend_rejected_frame
(
self
,
RSP
_FRAME
);
irlap_start_wd_timer
(
self
,
self
->
wd_timeout
);
break
;
case
WD_TIMER_EXPIRED
:
...
...
net/irda/irsyms.c
View file @
c9fb442e
...
...
@@ -165,6 +165,7 @@ EXPORT_SYMBOL(irda_task_delete);
EXPORT_SYMBOL
(
async_wrap_skb
);
EXPORT_SYMBOL
(
async_unwrap_char
);
EXPORT_SYMBOL
(
irda_calc_crc16
);
EXPORT_SYMBOL
(
irda_crc16_table
);
EXPORT_SYMBOL
(
irda_start_timer
);
EXPORT_SYMBOL
(
setup_dma
);
EXPORT_SYMBOL
(
infrared_mode
);
...
...
net/irda/wrapper.c
View file @
c9fb442e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment