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
7765fae1
Commit
7765fae1
authored
Jul 15, 2003
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o wl3501: remove llc_type stuff, not used
parent
5c44f4ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
127 deletions
+74
-127
drivers/net/wireless/wl3501.h
drivers/net/wireless/wl3501.h
+0
-1
drivers/net/wireless/wl3501_cs.c
drivers/net/wireless/wl3501_cs.c
+74
-126
No files found.
drivers/net/wireless/wl3501.h
View file @
7765fae1
...
...
@@ -512,7 +512,6 @@ struct wl3501_card {
u16
esbq_confirm_start
;
u16
esbq_confirm_end
;
u16
esbq_confirm
;
u8
llc_type
;
u8
essid
[
WL3501_ESSID_MAX_LEN
];
unsigned
char
bssid
[
ETH_ALEN
];
int
ether_type
;
...
...
drivers/net/wireless/wl3501_cs.c
View file @
7765fae1
...
...
@@ -383,58 +383,32 @@ static int wl3501_send_pkt(struct wl3501_card *this, u8 *data, u16 len)
sig
.
next_blk
=
0
;
sig
.
sig_id
=
WL3501_SIG_MD_REQ
;
sig
.
data
=
bf
;
if
(
this
->
llc_type
==
1
)
{
if
(((
*
pdata
)
*
256
+
(
*
(
pdata
+
1
)))
>
1500
)
{
unsigned
char
addr4
[
ETH_ALEN
]
=
{
[
0
]
=
0xAA
,
[
1
]
=
0xAA
,
[
2
]
=
0x03
,
[
4
]
=
0x00
,
};
wl3501_set_to_wla
(
this
,
bf
+
2
+
offsetof
(
struct
wl3501_tx_hdr
,
addr4
),
addr4
,
sizeof
(
addr4
));
sig
.
size
=
pktlen
+
24
+
4
+
6
;
if
(
pktlen
>
(
254
-
sizeof
(
struct
wl3501_tx_hdr
)))
{
tmplen
=
254
-
sizeof
(
struct
wl3501_tx_hdr
);
pktlen
-=
tmplen
;
}
else
{
tmplen
=
pktlen
;
pktlen
=
0
;
}
wl3501_set_to_wla
(
this
,
bf
+
2
+
sizeof
(
struct
wl3501_tx_hdr
),
pdata
,
tmplen
);
pdata
+=
tmplen
;
wl3501_get_from_wla
(
this
,
bf
,
&
next
,
sizeof
(
next
));
bf
=
next
;
if
(((
*
pdata
)
*
256
+
(
*
(
pdata
+
1
)))
>
1500
)
{
unsigned
char
addr4
[
ETH_ALEN
]
=
{
[
0
]
=
0xAA
,
[
1
]
=
0xAA
,
[
2
]
=
0x03
,
[
4
]
=
0x00
,
};
wl3501_set_to_wla
(
this
,
bf
+
2
+
offsetof
(
struct
wl3501_tx_hdr
,
addr4
),
addr4
,
sizeof
(
addr4
));
sig
.
size
=
pktlen
+
24
+
4
+
6
;
if
(
pktlen
>
(
254
-
sizeof
(
struct
wl3501_tx_hdr
)))
{
tmplen
=
254
-
sizeof
(
struct
wl3501_tx_hdr
);
pktlen
-=
tmplen
;
}
else
{
sig
.
size
=
pktlen
+
24
+
4
-
2
;
pdata
+=
2
;
pktlen
-=
2
;
if
(
pktlen
>
(
254
-
sizeof
(
struct
wl3501_tx_hdr
)
+
6
))
{
tmplen
=
254
-
sizeof
(
struct
wl3501_tx_hdr
)
+
6
;
pktlen
-=
tmplen
;
}
else
{
tmplen
=
pktlen
;
pktlen
=
0
;
}
wl3501_set_to_wla
(
this
,
bf
+
2
+
offsetof
(
struct
wl3501_tx_hdr
,
addr4
),
pdata
,
tmplen
);
pdata
+=
tmplen
;
wl3501_get_from_wla
(
this
,
bf
,
&
next
,
sizeof
(
next
));
bf
=
next
;
tmplen
=
pktlen
;
pktlen
=
0
;
}
wl3501_set_to_wla
(
this
,
bf
+
2
+
sizeof
(
struct
wl3501_tx_hdr
),
pdata
,
tmplen
);
pdata
+=
tmplen
;
wl3501_get_from_wla
(
this
,
bf
,
&
next
,
sizeof
(
next
));
bf
=
next
;
}
else
{
pktlen
+=
1
2
;
sig
.
size
=
pktlen
+
24
+
4
;
p
data
-=
1
2
;
sig
.
size
=
pktlen
+
24
+
4
-
2
;
pdata
+=
2
;
p
ktlen
-=
2
;
if
(
pktlen
>
(
254
-
sizeof
(
struct
wl3501_tx_hdr
)
+
6
))
{
tmplen
=
254
-
sizeof
(
struct
wl3501_tx_hdr
)
+
6
;
pktlen
-=
tmplen
;
...
...
@@ -707,62 +681,41 @@ 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
->
llc_type
==
1
)
{
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
(
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
{
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
;
}
}
else
{
if
(
size
>
WL3501_BLKSZ
-
offset_addr4
)
{
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
sizeof
(
struct
wl3501_rx_hdr
)
+
6
,
data
,
WL3501_BLKSZ
-
offset_addr4
);
size
-=
WL3501_BLKSZ
-
offset_addr4
;
data
+=
WL3501_BLKSZ
-
offset_addr4
;
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
+
sizeof
(
struct
wl3501_rx_hdr
)
+
6
,
wl3501_get_from_wla
(
this
,
this
->
start_seg
+
offset_addr4
,
data
,
size
);
size
=
0
;
}
...
...
@@ -956,7 +909,7 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
{
struct
wl3501_md_ind
sig
;
struct
sk_buff
*
skb
;
unsigned
char
rssi
;
unsigned
char
rssi
,
addr4
[
ETH_ALEN
]
;
u16
pkt_len
;
wl3501_get_from_wla
(
this
,
addr
,
&
sig
,
sizeof
(
sig
));
...
...
@@ -966,26 +919,21 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
&
rssi
,
sizeof
(
rssi
));
this
->
rssi
=
rssi
<=
63
?
(
rssi
*
100
)
/
64
:
255
;
if
(
this
->
llc_type
==
1
)
{
unsigned
char
addr4
[
ETH_ALEN
];
wl3501_get_from_wla
(
this
,
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 */
}
}
else
pkt_len
=
sig
.
size
-
24
-
4
;
wl3501_get_from_wla
(
this
,
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 */
}
skb
=
dev_alloc_skb
(
pkt_len
+
5
);
...
...
@@ -995,8 +943,7 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
this
->
stats
.
rx_dropped
++
;
}
else
{
skb
->
dev
=
dev
;
skb_reserve
(
skb
,
2
);
/* IP headers on 16 bytes
boundaries */
skb_reserve
(
skb
,
2
);
/* IP headers on 16 bytes boundaries */
eth_copy_and_sum
(
skb
,
(
unsigned
char
*
)
&
sig
.
daddr
,
12
,
0
);
wl3501_receive
(
this
,
skb
->
data
,
pkt_len
);
skb_put
(
skb
,
pkt_len
);
...
...
@@ -2127,9 +2074,10 @@ static void wl3501_config(dev_link_t *link)
printk
(
"%c%02x"
,
i
?
':'
:
' '
,
dev
->
dev_addr
[
i
]);
}
printk
(
"
\n
"
);
/* initialize card parameter - added by jss */
/*
* Initialize card parameters - added by jss
*/
this
->
net_type
=
IW_MODE_INFRA
;
this
->
llc_type
=
1
;
this
->
bss_cnt
=
0
;
this
->
join_sta_bss
=
0
;
this
->
adhoc_times
=
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