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
d977939f
Commit
d977939f
authored
Oct 08, 2004
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge intel.com:/home/lenb/bk/26-latest-ref
into intel.com:/home/lenb/src/26-latest-dev
parents
2bac69cf
cb281c89
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
128 additions
and
126 deletions
+128
-126
arch/arm/boot/compressed/head.S
arch/arm/boot/compressed/head.S
+14
-0
arch/arm/kernel/ecard.c
arch/arm/kernel/ecard.c
+23
-44
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v6.S
+3
-5
drivers/net/wireless/ray_cs.c
drivers/net/wireless/ray_cs.c
+84
-73
drivers/net/wireless/ray_cs.h
drivers/net/wireless/ray_cs.h
+3
-3
include/asm-arm/page.h
include/asm-arm/page.h
+1
-1
No files found.
arch/arm/boot/compressed/head.S
View file @
d977939f
...
...
@@ -593,6 +593,12 @@ proc_types:
b
__armv4_cache_off
b
__armv4_cache_flush
.
word
0x00070000
@
ARMv6
.
word
0x000f0000
b
__armv4_cache_on
b
__armv4_cache_off
b
__armv6_cache_flush
.
word
0
@
unrecognised
type
.
word
0
mov
pc
,
lr
...
...
@@ -652,6 +658,14 @@ cache_clean_flush:
mov
r3
,
#
16
b
call_cache_fn
__armv6_cache_flush
:
mov
r1
,
#
0
mcr
p15
,
0
,
r1
,
c7
,
c14
,
0
@
clean
+
invalidate
D
mcr
p15
,
0
,
r1
,
c7
,
c5
,
0
@
invalidate
I
+
BTB
mcr
p15
,
0
,
r1
,
c7
,
c15
,
0
@
clean
+
invalidate
unified
mcr
p15
,
0
,
r1
,
c7
,
c10
,
4
@
drain
WB
mov
pc
,
lr
__armv4_cache_flush
:
mov
r2
,
#
64
*
1024
@
default
:
32
K
dcache
size
(*
2
)
mov
r11
,
#
32
@
default
:
32
byte
line
size
...
...
arch/arm/kernel/ecard.c
View file @
d977939f
...
...
@@ -33,6 +33,7 @@
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/completion.h>
#include <linux/reboot.h>
#include <linux/mm.h>
#include <linux/slab.h>
...
...
@@ -53,18 +54,14 @@
#define HAVE_EXPMASK
#endif
enum
req
{
req_readbytes
,
req_reset
};
struct
ecard_request
{
enum
req
req
;
void
(
*
fn
)(
struct
ecard_request
*
)
;
ecard_t
*
ec
;
unsigned
int
address
;
unsigned
int
length
;
unsigned
int
use_loader
;
void
*
buffer
;
struct
completion
*
complete
;
};
struct
expcard_blacklist
{
...
...
@@ -129,15 +126,14 @@ slot_to_ecard(unsigned int slot)
#define POD_INT_ADDR(x) ((volatile unsigned char *)\
((BUS_ADDR((x)) - IO_BASE) + IO_START))
static
inline
void
ecard_task_reset
(
struct
ecard_request
*
req
)
static
void
ecard_task_reset
(
struct
ecard_request
*
req
)
{
struct
expansion_card
*
ec
=
req
->
ec
;
if
(
ec
->
loader
)
ecard_loader_reset
(
POD_INT_ADDR
(
ec
->
podaddr
),
ec
->
loader
);
}
static
void
ecard_task_readbytes
(
struct
ecard_request
*
req
)
static
void
ecard_task_readbytes
(
struct
ecard_request
*
req
)
{
unsigned
char
*
buf
=
(
unsigned
char
*
)
req
->
buffer
;
volatile
unsigned
char
*
base_addr
=
...
...
@@ -206,26 +202,9 @@ ecard_task_readbytes(struct ecard_request *req)
}
static
void
ecard_do_request
(
struct
ecard_request
*
req
)
{
switch
(
req
->
req
)
{
case
req_readbytes
:
ecard_task_readbytes
(
req
);
break
;
case
req_reset
:
ecard_task_reset
(
req
);
break
;
}
}
#include <linux/completion.h>
static
pid_t
ecard_pid
;
static
wait_queue_head_t
ecard_wait
;
static
DECLARE_WAIT_QUEUE_HEAD
(
ecard_wait
);
static
struct
ecard_request
*
ecard_req
;
static
DECLARE_MUTEX
(
ecard_sem
);
static
DECLARE_COMPLETION
(
ecard_completion
);
/*
* Set up the expansion card daemon's page tables.
...
...
@@ -299,9 +278,10 @@ ecard_task(void * unused)
wait_event_interruptible
(
ecard_wait
,
ecard_req
!=
NULL
);
req
=
xchg
(
&
ecard_req
,
NULL
);
if
(
req
!=
NULL
)
ecard_do_request
(
req
);
complete
(
&
ecard_completion
);
if
(
req
!=
NULL
)
{
req
->
fn
(
req
);
complete
(
req
->
complete
);
}
}
}
...
...
@@ -311,17 +291,11 @@ ecard_task(void * unused)
* FIXME: The test here is not sufficient to detect if the
* kcardd is running.
*/
static
void
ecard_call
(
struct
ecard_request
*
req
)
static
void
ecard_call
(
struct
ecard_request
*
req
)
{
/*
* Make sure we have a context that is able to sleep.
*/
if
(
current
==
&
init_task
||
in_interrupt
())
BUG
();
DECLARE_COMPLETION
(
completion
);
if
(
ecard_pid
<=
0
)
ecard_pid
=
kernel_thread
(
ecard_task
,
NULL
,
CLONE_KERNEL
);
req
->
complete
=
&
completion
;
down
(
&
ecard_sem
);
ecard_req
=
req
;
...
...
@@ -330,7 +304,7 @@ ecard_call(struct ecard_request *req)
/*
* Now wait for kecardd to run.
*/
wait_for_completion
(
&
ecard_
completion
);
wait_for_completion
(
&
completion
);
up
(
&
ecard_sem
);
}
...
...
@@ -341,7 +315,7 @@ ecard_readbytes(void *addr, ecard_t *ec, int off, int len, int useld)
{
struct
ecard_request
req
;
req
.
req
=
req
_readbytes
;
req
.
fn
=
ecard_task
_readbytes
;
req
.
ec
=
ec
;
req
.
address
=
off
;
req
.
length
=
len
;
...
...
@@ -1061,9 +1035,14 @@ ecard_probe(int slot, card_type_t type)
*/
static
int
__init
ecard_init
(
void
)
{
int
slot
,
irqhw
;
int
slot
,
irqhw
,
ret
;
init_waitqueue_head
(
&
ecard_wait
);
ret
=
kernel_thread
(
ecard_task
,
NULL
,
CLONE_KERNEL
);
if
(
ret
<
0
)
{
printk
(
KERN_ERR
"Ecard: unable to create kernel thread: %d
\n
"
,
ret
);
return
ret
;
}
printk
(
"Probing expansion cards
\n
"
);
...
...
@@ -1146,7 +1125,7 @@ static void ecard_drv_shutdown(struct device *dev)
if
(
drv
->
shutdown
)
drv
->
shutdown
(
ec
);
ecard_release
(
ec
);
req
.
req
=
req
_reset
;
req
.
fn
=
ecard_task
_reset
;
req
.
ec
=
ec
;
ecard_call
(
&
req
);
}
...
...
arch/arm/mm/proc-v6.S
View file @
d977939f
...
...
@@ -189,12 +189,10 @@ cpu_v6_name:
*
-
cache
type
register
is
implemented
*/
__v6_setup
:
mrc
p15
,
0
,
r10
,
c0
,
c0
,
1
@
read
cache
type
register
tst
r10
,
#
1
<<
24
@
Harvard
cache
?
mov
r10
,
#
0
mcr
ne
p15
,
0
,
r10
,
c7
,
c14
,
0
@
clean
+
invalidate
D
cache
mcr
ne
p15
,
0
,
r10
,
c7
,
c5
,
0
@
invalidate
I
cache
mcr
eq
p15
,
0
,
r10
,
c7
,
c15
,
0
@
clean
+
invalidate
cache
mcr
p15
,
0
,
r10
,
c7
,
c14
,
0
@
clean
+
invalidate
D
cache
mcr
p15
,
0
,
r10
,
c7
,
c5
,
0
@
invalidate
I
cache
mcr
p15
,
0
,
r10
,
c7
,
c15
,
0
@
clean
+
invalidate
cache
mcr
p15
,
0
,
r10
,
c7
,
c10
,
4
@
drain
write
buffer
mcr
p15
,
0
,
r10
,
c8
,
c7
,
0
@
invalidate
I
+
D
TLBs
mcr
p15
,
0
,
r10
,
c2
,
c0
,
2
@
TTB
control
register
...
...
drivers/net/wireless/ray_cs.c
View file @
d977939f
...
...
@@ -54,7 +54,6 @@
#include <pcmcia/ds.h>
#include <pcmcia/mem_op.h>
#ifdef CONFIG_NET_PCMCIA_RADIO
#include <linux/wireless.h>
#include <asm/io.h>
...
...
@@ -68,7 +67,6 @@
typedef
struct
iw_statistics
iw_stats
;
typedef
struct
iw_quality
iw_qual
;
typedef
u_char
mac_addr
[
ETH_ALEN
];
/* Hardware address */
#endif
/* CONFIG_NET_PCMCIA_RADIO */
#include "rayctl.h"
#include "ray_cs.h"
...
...
@@ -112,9 +110,9 @@ static int ray_open(struct net_device *dev);
static
int
ray_dev_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
);
static
void
set_multicast_list
(
struct
net_device
*
dev
);
static
void
ray_update_multi_list
(
struct
net_device
*
dev
,
int
all
);
static
int
translate_frame
(
ray_dev_t
*
local
,
struct
tx_msg
*
ptx
,
static
int
translate_frame
(
ray_dev_t
*
local
,
struct
tx_msg
__iomem
*
ptx
,
unsigned
char
*
data
,
int
len
);
static
void
ray_build_header
(
ray_dev_t
*
local
,
struct
tx_msg
*
ptx
,
UCHAR
msg_type
,
static
void
ray_build_header
(
ray_dev_t
*
local
,
struct
tx_msg
__iomem
*
ptx
,
UCHAR
msg_type
,
unsigned
char
*
data
);
static
void
untranslate
(
ray_dev_t
*
local
,
struct
sk_buff
*
skb
,
int
len
);
#if WIRELESS_EXT > 7
/* If wireless extension exist in the kernel */
...
...
@@ -140,14 +138,14 @@ static void verify_dl_startup(u_long);
/* Prototypes for interrpt time functions **********************************/
static
irqreturn_t
ray_interrupt
(
int
reg
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
void
clear_interrupt
(
ray_dev_t
*
local
);
static
void
rx_deauthenticate
(
ray_dev_t
*
local
,
struct
rcs
*
prcs
,
static
void
rx_deauthenticate
(
ray_dev_t
*
local
,
struct
rcs
__iomem
*
prcs
,
unsigned
int
pkt_addr
,
int
rx_len
);
static
int
copy_from_rx_buff
(
ray_dev_t
*
local
,
UCHAR
*
dest
,
int
pkt_addr
,
int
len
);
static
void
ray_rx
(
struct
net_device
*
dev
,
ray_dev_t
*
local
,
struct
rcs
*
prcs
);
static
void
release_frag_chain
(
ray_dev_t
*
local
,
struct
rcs
*
prcs
);
static
void
rx_authenticate
(
ray_dev_t
*
local
,
struct
rcs
*
prcs
,
static
void
ray_rx
(
struct
net_device
*
dev
,
ray_dev_t
*
local
,
struct
rcs
__iomem
*
prcs
);
static
void
release_frag_chain
(
ray_dev_t
*
local
,
struct
rcs
__iomem
*
prcs
);
static
void
rx_authenticate
(
ray_dev_t
*
local
,
struct
rcs
__iomem
*
prcs
,
unsigned
int
pkt_addr
,
int
rx_len
);
static
void
rx_data
(
struct
net_device
*
dev
,
struct
rcs
*
prcs
,
unsigned
int
pkt_addr
,
static
void
rx_data
(
struct
net_device
*
dev
,
struct
rcs
__iomem
*
prcs
,
unsigned
int
pkt_addr
,
int
rx_len
);
static
void
associate
(
ray_dev_t
*
local
);
...
...
@@ -540,7 +538,7 @@ static void ray_config(dev_link_t *link)
CS_CHECK
(
RequestWindow
,
pcmcia_request_window
(
&
link
->
handle
,
&
req
,
&
link
->
win
));
mem
.
CardOffset
=
0x0000
;
mem
.
Page
=
0
;
CS_CHECK
(
MapMemPage
,
pcmcia_map_mem_page
(
link
->
win
,
&
mem
));
local
->
sram
=
(
UCHAR
*
)(
ioremap
(
req
.
Base
,
req
.
Size
)
);
local
->
sram
=
ioremap
(
req
.
Base
,
req
.
Size
);
/*** Set up 16k window for shared memory (receive buffer) ***************/
req
.
Attributes
=
WIN_DATA_WIDTH_8
|
WIN_MEMORY_TYPE_CM
|
WIN_ENABLE
|
WIN_USE_WAIT
;
...
...
@@ -550,7 +548,7 @@ static void ray_config(dev_link_t *link)
CS_CHECK
(
RequestWindow
,
pcmcia_request_window
(
&
link
->
handle
,
&
req
,
&
local
->
rmem_handle
));
mem
.
CardOffset
=
0x8000
;
mem
.
Page
=
0
;
CS_CHECK
(
MapMemPage
,
pcmcia_map_mem_page
(
local
->
rmem_handle
,
&
mem
));
local
->
rmem
=
(
UCHAR
*
)(
ioremap
(
req
.
Base
,
req
.
Size
)
);
local
->
rmem
=
ioremap
(
req
.
Base
,
req
.
Size
);
/*** Set up window for attribute memory ***********************************/
req
.
Attributes
=
WIN_DATA_WIDTH_8
|
WIN_MEMORY_TYPE_AM
|
WIN_ENABLE
|
WIN_USE_WAIT
;
...
...
@@ -560,7 +558,7 @@ static void ray_config(dev_link_t *link)
CS_CHECK
(
RequestWindow
,
pcmcia_request_window
(
&
link
->
handle
,
&
req
,
&
local
->
amem_handle
));
mem
.
CardOffset
=
0x0000
;
mem
.
Page
=
0
;
CS_CHECK
(
MapMemPage
,
pcmcia_map_mem_page
(
local
->
amem_handle
,
&
mem
));
local
->
amem
=
(
UCHAR
*
)(
ioremap
(
req
.
Base
,
req
.
Size
)
);
local
->
amem
=
ioremap
(
req
.
Base
,
req
.
Size
);
DEBUG
(
3
,
"ray_config sram=%p
\n
"
,
local
->
sram
);
DEBUG
(
3
,
"ray_config rmem=%p
\n
"
,
local
->
rmem
);
...
...
@@ -593,12 +591,30 @@ static void ray_config(dev_link_t *link)
ray_release
(
link
);
}
/* ray_config */
static
inline
struct
ccs
__iomem
*
ccs_base
(
ray_dev_t
*
dev
)
{
return
dev
->
sram
+
CCS_BASE
;
}
static
inline
struct
rcs
__iomem
*
rcs_base
(
ray_dev_t
*
dev
)
{
/*
* This looks nonsensical, since there is a separate
* RCS_BASE. But the difference between a "struct rcs"
* and a "struct ccs" ends up being in the _index_ off
* the base, so the base pointer is the same for both
* ccs/rcs.
*/
return
dev
->
sram
+
CCS_BASE
;
}
/*===========================================================================*/
static
int
ray_init
(
struct
net_device
*
dev
)
{
int
i
;
UCHAR
*
p
;
struct
ccs
*
pccs
;
struct
ccs
__iomem
*
pccs
;
ray_dev_t
*
local
=
(
ray_dev_t
*
)
dev
->
priv
;
dev_link_t
*
link
=
local
->
finder
;
DEBUG
(
1
,
"ray_init(0x%p)
\n
"
,
dev
);
...
...
@@ -632,7 +648,7 @@ static int ray_init(struct net_device *dev)
local
->
tib_length
=
local
->
startup_res
.
tib_length
;
DEBUG
(
2
,
"ray_init tib_length = 0x%02x
\n
"
,
local
->
tib_length
);
/* Initialize CCS's to buffer free state */
pccs
=
(
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
);
pccs
=
ccs_base
(
local
);
for
(
i
=
0
;
i
<
NUMBER_OF_CCS
;
i
++
)
{
writeb
(
CCS_BUFFER_FREE
,
&
(
pccs
++
)
->
buffer_status
);
}
...
...
@@ -661,7 +677,7 @@ static int dl_startup_params(struct net_device *dev)
{
int
ccsindex
;
ray_dev_t
*
local
=
(
ray_dev_t
*
)
dev
->
priv
;
struct
ccs
*
pccs
;
struct
ccs
__iomem
*
pccs
;
dev_link_t
*
link
=
local
->
finder
;
DEBUG
(
1
,
"dl_startup_params entered
\n
"
);
...
...
@@ -682,7 +698,7 @@ static int dl_startup_params(struct net_device *dev)
/* Fill in the CCS fields for the ECF */
if
((
ccsindex
=
get_free_ccs
(
local
))
<
0
)
return
-
1
;
local
->
dl_param_ccs
=
ccsindex
;
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
ccsindex
;
pccs
=
ccs_base
(
local
)
+
ccsindex
;
writeb
(
CCS_DOWNLOAD_STARTUP_PARAMS
,
&
pccs
->
cmd
);
DEBUG
(
2
,
"dl_startup_params start ccsindex = %d
\n
"
,
local
->
dl_param_ccs
);
/* Interrupt the firmware to process the command */
...
...
@@ -767,7 +783,7 @@ static void init_startup_params(ray_dev_t *local)
static
void
verify_dl_startup
(
u_long
data
)
{
ray_dev_t
*
local
=
(
ray_dev_t
*
)
data
;
struct
ccs
*
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
local
->
dl_param_ccs
;
struct
ccs
__iomem
*
pccs
=
ccs_base
(
local
)
+
local
->
dl_param_ccs
;
UCHAR
status
;
dev_link_t
*
link
=
local
->
finder
;
...
...
@@ -807,7 +823,7 @@ static void verify_dl_startup(u_long data)
static
void
start_net
(
u_long
data
)
{
ray_dev_t
*
local
=
(
ray_dev_t
*
)
data
;
struct
ccs
*
pccs
;
struct
ccs
__iomem
*
pccs
;
int
ccsindex
;
dev_link_t
*
link
=
local
->
finder
;
if
(
!
(
link
->
state
&
DEV_PRESENT
))
{
...
...
@@ -816,7 +832,7 @@ static void start_net(u_long data)
}
/* Fill in the CCS fields for the ECF */
if
((
ccsindex
=
get_free_ccs
(
local
))
<
0
)
return
;
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
ccsindex
;
pccs
=
ccs_base
(
local
)
+
ccsindex
;
writeb
(
CCS_START_NETWORK
,
&
pccs
->
cmd
);
writeb
(
0
,
&
pccs
->
var
.
start_network
.
update_param
);
/* Interrupt the firmware to process the command */
...
...
@@ -834,7 +850,7 @@ static void join_net(u_long data)
{
ray_dev_t
*
local
=
(
ray_dev_t
*
)
data
;
struct
ccs
*
pccs
;
struct
ccs
__iomem
*
pccs
;
int
ccsindex
;
dev_link_t
*
link
=
local
->
finder
;
...
...
@@ -844,7 +860,7 @@ static void join_net(u_long data)
}
/* Fill in the CCS fields for the ECF */
if
((
ccsindex
=
get_free_ccs
(
local
))
<
0
)
return
;
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
ccsindex
;
pccs
=
ccs_base
(
local
)
+
ccsindex
;
writeb
(
CCS_JOIN_NETWORK
,
&
pccs
->
cmd
);
writeb
(
0
,
&
pccs
->
var
.
join_network
.
update_param
);
writeb
(
0
,
&
pccs
->
var
.
join_network
.
net_initiated
);
...
...
@@ -1049,10 +1065,10 @@ static int ray_hw_xmit(unsigned char* data, int len, struct net_device* dev,
UCHAR
msg_type
)
{
ray_dev_t
*
local
=
(
ray_dev_t
*
)
dev
->
priv
;
struct
ccs
*
pccs
;
struct
ccs
__iomem
*
pccs
;
int
ccsindex
;
int
offset
;
struct
tx_msg
*
ptx
;
/* Address of xmit buffer in PC space */
struct
tx_msg
__iomem
*
ptx
;
/* Address of xmit buffer in PC space */
short
int
addr
;
/* Address of xmit buffer in card space */
DEBUG
(
3
,
"ray_hw_xmit(data=%p, len=%d, dev=%p)
\n
"
,
data
,
len
,
dev
);
...
...
@@ -1079,7 +1095,7 @@ static int ray_hw_xmit(unsigned char* data, int len, struct net_device* dev,
local
->
stats
.
tx_packets
++
;
}
ptx
=
(
struct
tx_msg
*
)(
local
->
sram
+
addr
)
;
ptx
=
local
->
sram
+
addr
;
ray_build_header
(
local
,
ptx
,
msg_type
,
data
);
if
(
translate
)
{
...
...
@@ -1092,7 +1108,7 @@ static int ray_hw_xmit(unsigned char* data, int len, struct net_device* dev,
}
/* fill in the CCS */
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
ccsindex
;
pccs
=
ccs_base
(
local
)
+
ccsindex
;
len
+=
TX_HEADER_LENGTH
+
offset
;
writeb
(
CCS_TX_REQUEST
,
&
pccs
->
cmd
);
writeb
(
addr
>>
8
,
&
pccs
->
var
.
tx_request
.
tx_data_ptr
[
0
]);
...
...
@@ -1119,21 +1135,21 @@ static int ray_hw_xmit(unsigned char* data, int len, struct net_device* dev,
return
XMIT_OK
;
}
/* end ray_hw_xmit */
/*===========================================================================*/
static
int
translate_frame
(
ray_dev_t
*
local
,
struct
tx_msg
*
ptx
,
unsigned
char
*
data
,
static
int
translate_frame
(
ray_dev_t
*
local
,
struct
tx_msg
__iomem
*
ptx
,
unsigned
char
*
data
,
int
len
)
{
unsigned
short
int
proto
=
((
struct
ethhdr
*
)
data
)
->
h_proto
;
if
(
ntohs
(
proto
)
>=
1536
)
{
/* DIX II ethernet frame */
DEBUG
(
3
,
"ray_cs translate_frame DIX II
\n
"
);
/* Copy LLC header to card buffer */
memcpy_toio
(
(
UCHAR
*
)
&
ptx
->
var
,
eth2_llc
,
sizeof
(
eth2_llc
));
memcpy_toio
(
((
UCHAR
*
)
&
ptx
->
var
)
+
sizeof
(
eth2_llc
),
(
UCHAR
*
)
&
proto
,
2
);
memcpy_toio
(
&
ptx
->
var
,
eth2_llc
,
sizeof
(
eth2_llc
));
memcpy_toio
(
((
void
__iomem
*
)
&
ptx
->
var
)
+
sizeof
(
eth2_llc
),
(
UCHAR
*
)
&
proto
,
2
);
if
((
proto
==
0xf380
)
||
(
proto
==
0x3781
))
{
/* This is the selective translation table, only 2 entries */
writeb
(
0xf8
,
(
UCHAR
*
)
&
((
struct
snaphdr_t
*
)
ptx
->
var
)
->
org
[
3
]);
writeb
(
0xf8
,
&
((
struct
snaphdr_t
__iomem
*
)
ptx
->
var
)
->
org
[
3
]);
}
/* Copy body of ethernet packet without ethernet header */
memcpy_toio
((
UCHAR
*
)
&
ptx
->
var
+
sizeof
(
struct
snaphdr_t
),
\
memcpy_toio
((
void
__iomem
*
)
&
ptx
->
var
+
sizeof
(
struct
snaphdr_t
),
\
data
+
ETH_HLEN
,
len
-
ETH_HLEN
);
return
(
int
)
sizeof
(
struct
snaphdr_t
)
-
ETH_HLEN
;
}
...
...
@@ -1141,16 +1157,16 @@ static int translate_frame(ray_dev_t *local, struct tx_msg *ptx, unsigned char *
DEBUG
(
3
,
"ray_cs translate_frame 802
\n
"
);
if
(
proto
==
0xffff
)
{
/* evil netware IPX 802.3 without LLC */
DEBUG
(
3
,
"ray_cs translate_frame evil IPX
\n
"
);
memcpy_toio
(
(
UCHAR
*
)
&
ptx
->
var
,
data
+
ETH_HLEN
,
len
-
ETH_HLEN
);
memcpy_toio
(
&
ptx
->
var
,
data
+
ETH_HLEN
,
len
-
ETH_HLEN
);
return
0
-
ETH_HLEN
;
}
memcpy_toio
(
(
UCHAR
*
)
&
ptx
->
var
,
data
+
ETH_HLEN
,
len
-
ETH_HLEN
);
memcpy_toio
(
&
ptx
->
var
,
data
+
ETH_HLEN
,
len
-
ETH_HLEN
);
return
0
-
ETH_HLEN
;
}
/* TBD do other frame types */
}
/* end translate_frame */
/*===========================================================================*/
static
void
ray_build_header
(
ray_dev_t
*
local
,
struct
tx_msg
*
ptx
,
UCHAR
msg_type
,
static
void
ray_build_header
(
ray_dev_t
*
local
,
struct
tx_msg
__iomem
*
ptx
,
UCHAR
msg_type
,
unsigned
char
*
data
)
{
writeb
(
PROTOCOL_VER
|
msg_type
,
&
ptx
->
mac
.
frame_ctl_1
);
...
...
@@ -1633,7 +1649,7 @@ static iw_stats * ray_get_wireless_stats(struct net_device * dev)
{
ray_dev_t
*
local
=
(
ray_dev_t
*
)
dev
->
priv
;
dev_link_t
*
link
=
local
->
finder
;
struct
status
*
p
=
(
struct
status
*
)(
local
->
sram
+
STATUS_BASE
)
;
struct
status
__iomem
*
p
=
local
->
sram
+
STATUS_BASE
;
if
(
local
==
(
ray_dev_t
*
)
NULL
)
return
(
iw_stats
*
)
NULL
;
...
...
@@ -1755,7 +1771,7 @@ static int interrupt_ecf(ray_dev_t *local, int ccs)
static
int
get_free_tx_ccs
(
ray_dev_t
*
local
)
{
int
i
;
struct
ccs
*
pccs
=
(
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
);
struct
ccs
__iomem
*
pccs
=
ccs_base
(
local
);
dev_link_t
*
link
=
local
->
finder
;
if
(
!
(
link
->
state
&
DEV_PRESENT
))
{
...
...
@@ -1786,7 +1802,7 @@ static int get_free_tx_ccs(ray_dev_t *local)
static
int
get_free_ccs
(
ray_dev_t
*
local
)
{
int
i
;
struct
ccs
*
pccs
=
(
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
);
struct
ccs
__iomem
*
pccs
=
ccs_base
(
local
);
dev_link_t
*
link
=
local
->
finder
;
if
(
!
(
link
->
state
&
DEV_PRESENT
))
{
...
...
@@ -1863,7 +1879,7 @@ static struct net_device_stats *ray_get_stats(struct net_device *dev)
{
ray_dev_t
*
local
=
(
ray_dev_t
*
)
dev
->
priv
;
dev_link_t
*
link
=
local
->
finder
;
struct
status
*
p
=
(
struct
status
*
)(
local
->
sram
+
STATUS_BASE
)
;
struct
status
__iomem
*
p
=
local
->
sram
+
STATUS_BASE
;
if
(
!
(
link
->
state
&
DEV_PRESENT
))
{
DEBUG
(
2
,
"ray_cs net_device_stats - device not present
\n
"
);
return
&
local
->
stats
;
...
...
@@ -1895,7 +1911,7 @@ static void ray_update_parm(struct net_device *dev, UCHAR objid, UCHAR *value, i
dev_link_t
*
link
=
local
->
finder
;
int
ccsindex
;
int
i
;
struct
ccs
*
pccs
;
struct
ccs
__iomem
*
pccs
;
if
(
!
(
link
->
state
&
DEV_PRESENT
))
{
DEBUG
(
2
,
"ray_update_parm - device not present
\n
"
);
...
...
@@ -1907,7 +1923,7 @@ static void ray_update_parm(struct net_device *dev, UCHAR objid, UCHAR *value, i
DEBUG
(
0
,
"ray_update_parm - No free ccs
\n
"
);
return
;
}
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
ccsindex
;
pccs
=
ccs_base
(
local
)
+
ccsindex
;
writeb
(
CCS_UPDATE_PARAMS
,
&
pccs
->
cmd
);
writeb
(
objid
,
&
pccs
->
var
.
update_param
.
object_id
);
writeb
(
1
,
&
pccs
->
var
.
update_param
.
number_objects
);
...
...
@@ -1926,11 +1942,11 @@ static void ray_update_multi_list(struct net_device *dev, int all)
{
struct
dev_mc_list
*
dmi
,
**
dmip
;
int
ccsindex
;
struct
ccs
*
pccs
;
struct
ccs
__iomem
*
pccs
;
int
i
=
0
;
ray_dev_t
*
local
=
(
ray_dev_t
*
)
dev
->
priv
;
dev_link_t
*
link
=
local
->
finder
;
UCHAR
*
p
=
local
->
sram
+
HOST_TO_ECF_BASE
;
void
__iomem
*
p
=
local
->
sram
+
HOST_TO_ECF_BASE
;
if
(
!
(
link
->
state
&
DEV_PRESENT
))
{
DEBUG
(
2
,
"ray_update_multi_list - device not present
\n
"
);
...
...
@@ -1943,7 +1959,7 @@ static void ray_update_multi_list(struct net_device *dev, int all)
DEBUG
(
1
,
"ray_update_multi - No free ccs
\n
"
);
return
;
}
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
ccsindex
;
pccs
=
ccs_base
(
local
)
+
ccsindex
;
writeb
(
CCS_UPDATE_MULTICAST_LIST
,
&
pccs
->
cmd
);
if
(
all
)
{
...
...
@@ -2011,8 +2027,8 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs)
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
dev_link_t
*
link
;
ray_dev_t
*
local
;
struct
ccs
*
pccs
;
struct
rcs
*
prcs
;
struct
ccs
__iomem
*
pccs
;
struct
rcs
__iomem
*
prcs
;
UCHAR
rcsindex
;
UCHAR
tmp
;
UCHAR
cmd
;
...
...
@@ -2029,7 +2045,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs)
DEBUG
(
2
,
"ray_cs interrupt from device not present or suspended.
\n
"
);
return
IRQ_NONE
;
}
rcsindex
=
readb
(
&
((
struct
scb
*
)(
local
->
sram
))
->
rcs_index
);
rcsindex
=
readb
(
&
((
struct
scb
__iomem
*
)(
local
->
sram
))
->
rcs_index
);
if
(
rcsindex
>=
(
NUMBER_OF_CCS
+
NUMBER_OF_RCS
))
{
...
...
@@ -2039,7 +2055,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs)
}
if
(
rcsindex
<
NUMBER_OF_CCS
)
/* If it's a returned CCS */
{
pccs
=
((
struct
ccs
*
)
(
local
->
sram
+
CCS_BASE
)
)
+
rcsindex
;
pccs
=
ccs_base
(
local
)
+
rcsindex
;
cmd
=
readb
(
&
pccs
->
cmd
);
status
=
readb
(
&
pccs
->
buffer_status
);
switch
(
cmd
)
...
...
@@ -2153,7 +2169,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs)
}
else
/* It's an RCS */
{
prcs
=
((
struct
rcs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
rcsindex
;
prcs
=
rcs_base
(
local
)
+
rcsindex
;
switch
(
readb
(
&
prcs
->
interrupt_id
))
{
...
...
@@ -2194,11 +2210,11 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs)
return
IRQ_HANDLED
;
}
/* ray_interrupt */
/*===========================================================================*/
static
void
ray_rx
(
struct
net_device
*
dev
,
ray_dev_t
*
local
,
struct
rcs
*
prcs
)
static
void
ray_rx
(
struct
net_device
*
dev
,
ray_dev_t
*
local
,
struct
rcs
__iomem
*
prcs
)
{
int
rx_len
;
unsigned
int
pkt_addr
;
UCHAR
*
pmsg
;
void
__iomem
*
pmsg
;
DEBUG
(
4
,
"ray_rx process rx packet
\n
"
);
/* Calculate address of packet within Rx buffer */
...
...
@@ -2248,11 +2264,11 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local, struct rcs *prcs)
}
/* end ray_rx */
/*===========================================================================*/
static
void
rx_data
(
struct
net_device
*
dev
,
struct
rcs
*
prcs
,
unsigned
int
pkt_addr
,
static
void
rx_data
(
struct
net_device
*
dev
,
struct
rcs
__iomem
*
prcs
,
unsigned
int
pkt_addr
,
int
rx_len
)
{
struct
sk_buff
*
skb
=
NULL
;
struct
rcs
*
prcslink
=
prcs
;
struct
rcs
__iomem
*
prcslink
=
prcs
;
ray_dev_t
*
local
=
dev
->
priv
;
UCHAR
*
rx_ptr
;
int
total_len
;
...
...
@@ -2294,7 +2310,7 @@ static void rx_data(struct net_device *dev, struct rcs *prcs, unsigned int pkt_a
+
readb
(
&
prcslink
->
var
.
rx_packet
.
rx_data_length
[
1
]);
if
(
readb
(
&
prcslink
->
var
.
rx_packet
.
next_frag_rcs_index
)
==
0xFF
||
tmp
<
0
)
break
;
prcslink
=
((
struct
rcs
*
)(
local
->
sram
+
CCS_BASE
)
)
prcslink
=
rcs_base
(
local
)
+
readb
(
&
prcslink
->
link_field
);
}
while
(
1
);
...
...
@@ -2355,7 +2371,7 @@ static void rx_data(struct net_device *dev, struct rcs *prcs, unsigned int pkt_a
prcslink
=
prcs
;
DEBUG
(
1
,
"ray_cs rx_data in fragment loop
\n
"
);
do
{
prcslink
=
((
struct
rcs
*
)(
local
->
sram
+
CCS_BASE
)
)
prcslink
=
rcs_base
(
local
)
+
readb
(
&
prcslink
->
var
.
rx_packet
.
next_frag_rcs_index
);
rx_len
=
((
readb
(
&
prcslink
->
var
.
rx_packet
.
rx_data_length
[
0
])
<<
8
)
+
readb
(
&
prcslink
->
var
.
rx_packet
.
rx_data_length
[
1
]))
...
...
@@ -2529,9 +2545,9 @@ static int copy_from_rx_buff(ray_dev_t *local, UCHAR *dest, int pkt_addr, int le
return
length
;
}
/*===========================================================================*/
static
void
release_frag_chain
(
ray_dev_t
*
local
,
struct
rcs
*
prcs
)
static
void
release_frag_chain
(
ray_dev_t
*
local
,
struct
rcs
__iomem
*
prcs
)
{
struct
rcs
*
prcslink
=
prcs
;
struct
rcs
__iomem
*
prcslink
=
prcs
;
int
tmp
=
17
;
unsigned
rcsindex
=
readb
(
&
prcs
->
var
.
rx_packet
.
next_frag_rcs_index
);
...
...
@@ -2541,7 +2557,7 @@ static void release_frag_chain(ray_dev_t *local, struct rcs* prcs)
DEBUG
(
1
,
"ray_cs interrupt bad rcsindex = 0x%x
\n
"
,
rcsindex
);
break
;
}
prcslink
=
((
struct
rcs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
rcsindex
;
prcslink
=
rcs_base
(
local
)
+
rcsindex
;
rcsindex
=
readb
(
&
prcslink
->
var
.
rx_packet
.
next_frag_rcs_index
);
}
writeb
(
CCS_BUFFER_FREE
,
&
prcslink
->
buffer_status
);
...
...
@@ -2569,7 +2585,7 @@ static void authenticate(ray_dev_t *local)
local
->
authentication_state
=
AWAITING_RESPONSE
;
}
/* end authenticate */
/*===========================================================================*/
static
void
rx_authenticate
(
ray_dev_t
*
local
,
struct
rcs
*
prcs
,
static
void
rx_authenticate
(
ray_dev_t
*
local
,
struct
rcs
__iomem
*
prcs
,
unsigned
int
pkt_addr
,
int
rx_len
)
{
UCHAR
buff
[
256
];
...
...
@@ -2614,7 +2630,7 @@ static void rx_authenticate(ray_dev_t *local, struct rcs *prcs,
/*===========================================================================*/
static
void
associate
(
ray_dev_t
*
local
)
{
struct
ccs
*
pccs
;
struct
ccs
__iomem
*
pccs
;
dev_link_t
*
link
=
local
->
finder
;
struct
net_device
*
dev
=
link
->
priv
;
int
ccsindex
;
...
...
@@ -2630,7 +2646,7 @@ static void associate(ray_dev_t *local)
return
;
}
DEBUG
(
1
,
"ray_cs Starting association with access point
\n
"
);
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
ccsindex
;
pccs
=
ccs_base
(
local
)
+
ccsindex
;
/* fill in the CCS */
writeb
(
CCS_START_ASSOCIATION
,
&
pccs
->
cmd
);
/* Interrupt the firmware to process the command */
...
...
@@ -2650,7 +2666,7 @@ static void associate(ray_dev_t *local)
}
/* end associate */
/*===========================================================================*/
static
void
rx_deauthenticate
(
ray_dev_t
*
local
,
struct
rcs
*
prcs
,
static
void
rx_deauthenticate
(
ray_dev_t
*
local
,
struct
rcs
__iomem
*
prcs
,
unsigned
int
pkt_addr
,
int
rx_len
)
{
/* UCHAR buff[256];
...
...
@@ -2798,8 +2814,8 @@ static int ray_cs_proc_read(char *buf, char **start, off_t offset, int len)
static
int
build_auth_frame
(
ray_dev_t
*
local
,
UCHAR
*
dest
,
int
auth_type
)
{
int
addr
;
struct
ccs
*
pccs
;
struct
tx_msg
*
ptx
;
struct
ccs
__iomem
*
pccs
;
struct
tx_msg
__iomem
*
ptx
;
int
ccsindex
;
/* If no tx buffers available, return */
...
...
@@ -2809,7 +2825,7 @@ static int build_auth_frame(ray_dev_t *local, UCHAR *dest, int auth_type)
return
-
1
;
}
pccs
=
((
struct
ccs
*
)(
local
->
sram
+
CCS_BASE
)
)
+
ccsindex
;
pccs
=
ccs_base
(
local
)
+
ccsindex
;
/* Address in card space */
addr
=
TX_BUF_BASE
+
(
ccsindex
<<
11
);
...
...
@@ -2821,7 +2837,7 @@ static int build_auth_frame(ray_dev_t *local, UCHAR *dest, int auth_type)
writeb
(
TX_AUTHENTICATE_LENGTH_LSB
,
pccs
->
var
.
tx_request
.
tx_data_length
+
1
);
writeb
(
0
,
&
pccs
->
var
.
tx_request
.
pow_sav_mode
);
ptx
=
(
struct
tx_msg
*
)(
local
->
sram
+
addr
)
;
ptx
=
local
->
sram
+
addr
;
/* fill in the mac header */
writeb
(
PROTOCOL_VER
|
AUTHENTIC_TYPE
,
&
ptx
->
mac
.
frame_ctl_1
);
writeb
(
0
,
&
ptx
->
mac
.
frame_ctl_2
);
...
...
@@ -2931,15 +2947,6 @@ static void __exit exit_ray_cs(void)
{
DEBUG
(
0
,
"ray_cs: cleanup_module
\n
"
);
#ifdef CONFIG_PROC_FS
remove_proc_entry
(
"ray_cs"
,
proc_root_driver
);
#endif
pcmcia_unregister_driver
(
&
ray_driver
);
while
(
dev_list
!=
NULL
)
ray_detach
(
dev_list
);
#ifdef CONFIG_PROC_FS
remove_proc_entry
(
"driver/ray_cs/ray_cs"
,
NULL
);
remove_proc_entry
(
"driver/ray_cs/essid"
,
NULL
);
...
...
@@ -2947,6 +2954,10 @@ static void __exit exit_ray_cs(void)
remove_proc_entry
(
"driver/ray_cs/translate"
,
NULL
);
remove_proc_entry
(
"driver/ray_cs"
,
NULL
);
#endif
pcmcia_unregister_driver
(
&
ray_driver
);
while
(
dev_list
!=
NULL
)
ray_detach
(
dev_list
);
}
/* exit_ray_cs */
module_init
(
init_ray_cs
);
...
...
drivers/net/wireless/ray_cs.h
View file @
d977939f
...
...
@@ -28,9 +28,9 @@ typedef struct ray_dev_t {
dev_node_t
node
;
window_handle_t
amem_handle
;
/* handle to window for attribute memory */
window_handle_t
rmem_handle
;
/* handle to window for rx buffer on card */
UCHAR
*
sram
;
/* pointer to beginning of shared RAM */
UCHAR
*
amem
;
/* pointer to attribute mem window */
UCHAR
*
rmem
;
/* pointer to receive buffer window */
void
__iomem
*
sram
;
/* pointer to beginning of shared RAM */
void
__iomem
*
amem
;
/* pointer to attribute mem window */
void
__iomem
*
rmem
;
/* pointer to receive buffer window */
dev_link_t
*
finder
;
/* pointer back to dev_link_t for card */
struct
timer_list
timer
;
long
tx_ccs_lock
;
...
...
include/asm-arm/page.h
View file @
d977939f
...
...
@@ -133,7 +133,7 @@ extern void __cpu_copy_user_page(void *to, const void *from,
} while (0)
#define clear_page(page) memzero((void *)(page), PAGE_SIZE)
extern
void
copy_page
(
void
*
to
,
void
*
from
);
extern
void
copy_page
(
void
*
to
,
const
void
*
from
);
#undef STRICT_MM_TYPECHECKS
...
...
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