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
fe89aafd
Commit
fe89aafd
authored
Feb 24, 2004
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge redhat.com:/spare/repo/netdev-2.6/janitor
into redhat.com:/spare/repo/net-drivers-2.5
parents
5ef7ab1c
a49286ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
22 deletions
+22
-22
drivers/net/ne.c
drivers/net/ne.c
+4
-2
drivers/net/tokenring/ibmtr.c
drivers/net/tokenring/ibmtr.c
+11
-13
drivers/net/wireless/strip.c
drivers/net/wireless/strip.c
+7
-7
No files found.
drivers/net/ne.c
View file @
fe89aafd
...
...
@@ -165,7 +165,9 @@ static void ne_block_output(struct net_device *dev, const int count,
static
int
__init
do_ne_probe
(
struct
net_device
*
dev
)
{
unsigned
int
base_addr
=
dev
->
base_addr
;
int
irq
=
dev
->
irq
;
#ifndef MODULE
int
orig_irq
=
dev
->
irq
;
#endif
SET_MODULE_OWNER
(
dev
);
...
...
@@ -183,7 +185,7 @@ static int __init do_ne_probe(struct net_device *dev)
/* Last resort. The semi-risky ISA auto-probe. */
for
(
base_addr
=
0
;
netcard_portlist
[
base_addr
]
!=
0
;
base_addr
++
)
{
int
ioaddr
=
netcard_portlist
[
base_addr
];
dev
->
irq
=
irq
;
dev
->
irq
=
orig_
irq
;
if
(
ne_probe1
(
dev
,
ioaddr
)
==
0
)
return
0
;
}
...
...
drivers/net/tokenring/ibmtr.c
View file @
fe89aafd
...
...
@@ -136,8 +136,6 @@ in the event that chatty debug messages are desired - jjs 12/30/98 */
#define DPRINTK(format, args...) printk("%s: " format, dev->name , ## args)
#define DPRINTD(format, args...) DummyCall("%s: " format, dev->name , ## args)
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
/* version and credits */
#ifndef PCMCIA
...
...
@@ -730,47 +728,47 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
*/
if
(
!
ti
->
page_mask
)
{
ti
->
avail_shared_ram
=
MIN
(
ti
->
mapped_ram_size
,
ti
->
avail_shared_ram
);
min
(
ti
->
mapped_ram_size
,
ti
->
avail_shared_ram
);
}
switch
(
ti
->
avail_shared_ram
)
{
case
16
:
/* 8KB shared RAM */
ti
->
dhb_size4mb
=
MIN
(
ti
->
dhb_size4mb
,
2048
);
ti
->
dhb_size4mb
=
min
(
ti
->
dhb_size4mb
,
(
unsigned
short
)
2048
);
ti
->
rbuf_len4
=
1032
;
ti
->
rbuf_cnt4
=
2
;
ti
->
dhb_size16mb
=
MIN
(
ti
->
dhb_size16mb
,
2048
);
ti
->
dhb_size16mb
=
min
(
ti
->
dhb_size16mb
,
(
unsigned
short
)
2048
);
ti
->
rbuf_len16
=
1032
;
ti
->
rbuf_cnt16
=
2
;
break
;
case
32
:
/* 16KB shared RAM */
ti
->
dhb_size4mb
=
MIN
(
ti
->
dhb_size4mb
,
4464
);
ti
->
dhb_size4mb
=
min
(
ti
->
dhb_size4mb
,
(
unsigned
short
)
4464
);
ti
->
rbuf_len4
=
1032
;
ti
->
rbuf_cnt4
=
4
;
ti
->
dhb_size16mb
=
MIN
(
ti
->
dhb_size16mb
,
4096
);
ti
->
dhb_size16mb
=
min
(
ti
->
dhb_size16mb
,
(
unsigned
short
)
4096
);
ti
->
rbuf_len16
=
1032
;
/*1024 usable */
ti
->
rbuf_cnt16
=
4
;
break
;
case
64
:
/* 32KB shared RAM */
ti
->
dhb_size4mb
=
MIN
(
ti
->
dhb_size4mb
,
4464
);
ti
->
dhb_size4mb
=
min
(
ti
->
dhb_size4mb
,
(
unsigned
short
)
4464
);
ti
->
rbuf_len4
=
1032
;
ti
->
rbuf_cnt4
=
6
;
ti
->
dhb_size16mb
=
MIN
(
ti
->
dhb_size16mb
,
10240
);
ti
->
dhb_size16mb
=
min
(
ti
->
dhb_size16mb
,
(
unsigned
short
)
10240
);
ti
->
rbuf_len16
=
1032
;
ti
->
rbuf_cnt16
=
6
;
break
;
case
127
:
/* 63.5KB shared RAM */
ti
->
dhb_size4mb
=
MIN
(
ti
->
dhb_size4mb
,
4464
);
ti
->
dhb_size4mb
=
min
(
ti
->
dhb_size4mb
,
(
unsigned
short
)
4464
);
ti
->
rbuf_len4
=
1032
;
ti
->
rbuf_cnt4
=
6
;
ti
->
dhb_size16mb
=
MIN
(
ti
->
dhb_size16mb
,
16384
);
ti
->
dhb_size16mb
=
min
(
ti
->
dhb_size16mb
,
(
unsigned
short
)
16384
);
ti
->
rbuf_len16
=
1032
;
ti
->
rbuf_cnt16
=
16
;
break
;
case
128
:
/* 64KB shared RAM */
ti
->
dhb_size4mb
=
MIN
(
ti
->
dhb_size4mb
,
4464
);
ti
->
dhb_size4mb
=
min
(
ti
->
dhb_size4mb
,
(
unsigned
short
)
4464
);
ti
->
rbuf_len4
=
1032
;
ti
->
rbuf_cnt4
=
6
;
ti
->
dhb_size16mb
=
MIN
(
ti
->
dhb_size16mb
,
17960
);
ti
->
dhb_size16mb
=
min
(
ti
->
dhb_size16mb
,
(
unsigned
short
)
17960
);
ti
->
rbuf_len16
=
1032
;
ti
->
rbuf_cnt16
=
16
;
break
;
...
...
drivers/net/wireless/strip.c
View file @
fe89aafd
...
...
@@ -82,6 +82,7 @@ static const char StripVersion[] = "1.3A-STUART.CHESHIRE";
/* Header files */
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <asm/system.h>
...
...
@@ -454,10 +455,7 @@ static spinlock_t strip_lock = SPIN_LOCK_UNLOCKED;
#define READDEC(X) ((X)>='0' && (X)<='9' ? (X)-'0' : 0)
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
#define ELEMENTS_OF(X) (sizeof(X) / sizeof((X)[0]))
#define ARRAY_END(X) (&((X)[ELEMENTS_OF(X)]))
#define ARRAY_END(X) (&((X)[ARRAY_SIZE(X)]))
#define JIFFIE_TO_SEC(X) ((X) / HZ)
...
...
@@ -847,7 +845,7 @@ static __u8 *radio_address_to_string(const MetricomAddress * addr,
static
int
allocate_buffers
(
struct
strip
*
strip_info
,
int
mtu
)
{
struct
net_device
*
dev
=
strip_info
->
dev
;
int
sx_size
=
MAX
(
STRIP_ENCAP_SIZE
(
MAX_RECV_MTU
),
4096
);
int
sx_size
=
max_t
(
int
,
STRIP_ENCAP_SIZE
(
MAX_RECV_MTU
),
4096
);
int
tx_size
=
STRIP_ENCAP_SIZE
(
mtu
)
+
MaxCommandStringLength
;
__u8
*
r
=
kmalloc
(
MAX_RECV_MTU
,
GFP_ATOMIC
);
__u8
*
s
=
kmalloc
(
sx_size
,
GFP_ATOMIC
);
...
...
@@ -953,6 +951,7 @@ static void strip_unlock(struct strip *strip_info)
* ascii representation of the number plus 9 charactes for the " seconds"
* and the null character.
*/
#ifdef CONFIG_PROC_FS
static
char
*
time_delta
(
char
buffer
[],
long
time
)
{
time
-=
jiffies
;
...
...
@@ -1173,6 +1172,7 @@ static struct file_operations strip_seq_fops = {
.
llseek
=
seq_lseek
,
.
release
=
seq_release
,
};
#endif
...
...
@@ -1465,7 +1465,7 @@ static void strip_send(struct strip *strip_info, struct sk_buff *skb)
/* Cycle to next periodic command? */
if
(
strip_info
->
firmware_level
>=
StructuredMessages
)
if
(
++
strip_info
->
next_command
>=
ELEMENTS_OF
(
CommandString
))
ARRAY_SIZE
(
CommandString
))
strip_info
->
next_command
=
0
;
#ifdef EXT_COUNTERS
strip_info
->
tx_ebytes
+=
ts
.
length
;
...
...
@@ -1709,7 +1709,7 @@ static void get_radio_version(struct strip *strip_info, __u8 * ptr, __u8 * end)
p
++
;
len
=
value_end
-
value_begin
;
len
=
MIN
(
len
,
sizeof
(
FirmwareVersion
)
-
1
);
len
=
min_t
(
int
,
len
,
sizeof
(
FirmwareVersion
)
-
1
);
if
(
strip_info
->
firmware_version
.
c
[
0
]
==
0
)
printk
(
KERN_INFO
"%s: Radio Firmware: %.*s
\n
"
,
strip_info
->
dev
->
name
,
len
,
value_begin
);
...
...
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