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
nexedi
linux
Commits
bdb1fba3
Commit
bdb1fba3
authored
Jul 16, 2003
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o wl3501: keep it simple, support only ARPHRD_ETHER packets
parent
47cd2e39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
47 deletions
+19
-47
drivers/net/wireless/wl3501.h
drivers/net/wireless/wl3501.h
+0
-1
drivers/net/wireless/wl3501_cs.c
drivers/net/wireless/wl3501_cs.c
+19
-46
No files found.
drivers/net/wireless/wl3501.h
View file @
bdb1fba3
...
...
@@ -514,7 +514,6 @@ struct wl3501_card {
u16
esbq_confirm
;
u8
essid
[
WL3501_ESSID_MAX_LEN
];
unsigned
char
bssid
[
ETH_ALEN
];
int
ether_type
;
int
net_type
;
u8
keep_essid
[
WL3501_ESSID_MAX_LEN
];
unsigned
char
nick
[
32
];
...
...
drivers/net/wireless/wl3501_cs.c
View file @
bdb1fba3
...
...
@@ -642,42 +642,20 @@ static u16 wl3501_receive(struct wl3501_card *this, u8 *bf, u16 size)
size
-=
12
;
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
2
,
&
next_addr
,
sizeof
(
next_addr
));
if
(
this
->
ether_type
==
ARPHRD_ETHER
)
{
if
(
size
>
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
))
{
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
sizeof
(
struct
wl3501_rx_hdr
),
data
,
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
));
size
-=
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
);
data
+=
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
);
}
else
{
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
sizeof
(
struct
wl3501_rx_hdr
),
data
,
size
);
size
=
0
;
}
if
(
size
>
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
))
{
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
sizeof
(
struct
wl3501_rx_hdr
),
data
,
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
));
size
-=
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
);
data
+=
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
);
}
else
{
size
-=
2
;
*
data
=
(
size
>>
8
)
&
0xff
;
*
(
data
+
1
)
=
size
&
0xff
;
data
+=
2
;
if
(
size
>
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
)
+
6
)
{
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
offset_addr4
,
data
,
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
)
+
6
);
size
-=
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
)
+
6
;
data
+=
WL3501_BLKSZ
-
sizeof
(
struct
wl3501_rx_hdr
)
+
6
;
}
else
{
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
offset_addr4
,
data
,
size
);
size
=
0
;
}
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
sizeof
(
struct
wl3501_rx_hdr
),
data
,
size
);
size
=
0
;
}
while
(
size
>
0
)
{
if
(
size
>
WL3501_BLKSZ
-
5
)
{
...
...
@@ -860,17 +838,12 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
sig
.
data
+
offsetof
(
struct
wl3501_rx_hdr
,
addr4
),
&
addr4
,
sizeof
(
addr4
));
if
(
addr4
[
0
]
==
0xAA
&&
addr4
[
1
]
==
0xAA
&&
addr4
[
2
]
==
0x03
&&
addr4
[
4
]
==
0x00
)
{
pkt_len
=
sig
.
size
+
12
-
24
-
4
-
6
;
this
->
ether_type
=
ARPHRD_ETHER
;
}
else
if
(
addr4
[
0
]
==
0xE0
&&
addr4
[
1
]
==
0xE0
)
{
pkt_len
=
sig
.
size
+
12
-
24
-
4
+
2
;
this
->
ether_type
=
ARPHRD_IEEE80211
;
/* FIXME */
}
else
{
pkt_len
=
sig
.
size
+
12
-
24
-
4
+
2
;
this
->
ether_type
=
ARPHRD_IEEE80211
;
/* FIXME */
if
(
!
(
addr4
[
0
]
==
0xAA
&&
addr4
[
1
]
==
0xAA
&&
addr4
[
2
]
==
0x03
&&
addr4
[
4
]
==
0x00
))
{
printk
(
KERN_INFO
"Insupported packet type!
\n
"
);
return
;
}
pkt_len
=
sig
.
size
+
12
-
24
-
4
-
6
;
skb
=
dev_alloc_skb
(
pkt_len
+
5
);
...
...
@@ -1578,7 +1551,7 @@ static int wl3501_get_wap(struct net_device *dev, struct iw_request_info *info,
{
struct
wl3501_card
*
this
=
(
struct
wl3501_card
*
)
dev
->
priv
;
wrqu
->
ap_addr
.
sa_family
=
this
->
ether_type
;
wrqu
->
ap_addr
.
sa_family
=
ARPHRD_ETHER
;
memcpy
(
wrqu
->
ap_addr
.
sa_data
,
this
->
bssid
,
ETH_ALEN
);
return
0
;
}
...
...
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