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
08ed5ef6
Commit
08ed5ef6
authored
Jan 10, 2004
by
Alexander Viro
Committed by
Stephen Hemminger
Jan 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[wireless airo] switched to sane allocation.
parent
c8416949
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
drivers/net/wireless/airo.c
drivers/net/wireless/airo.c
+11
-16
No files found.
drivers/net/wireless/airo.c
View file @
08ed5ef6
...
...
@@ -2105,10 +2105,8 @@ int wll_header_parse(struct sk_buff *skb, unsigned char *haddr)
return
ETH_ALEN
;
}
static
void
wifi_setup
(
struct
net_device
*
dev
,
struct
net_device
*
ethdev
)
static
void
wifi_setup
(
struct
net_device
*
dev
)
{
struct
airo_info
*
ai
=
ethdev
->
priv
;
dev
->
priv
=
ai
;
dev
->
hard_header
=
0
;
dev
->
rebuild_header
=
0
;
dev
->
hard_header_cache
=
0
;
...
...
@@ -2128,14 +2126,11 @@ static void wifi_setup(struct net_device *dev, struct net_device *ethdev)
dev
->
change_mtu
=
&
airo_change_mtu
;
dev
->
open
=
&
airo_open
;
dev
->
stop
=
&
airo_close
;
dev
->
irq
=
ethdev
->
irq
;
dev
->
base_addr
=
ethdev
->
base_addr
;
dev
->
type
=
ARPHRD_IEEE80211
;
dev
->
hard_header_len
=
ETH_HLEN
;
dev
->
mtu
=
2312
;
dev
->
addr_len
=
ETH_ALEN
;
memcpy
(
dev
->
dev_addr
,
ethdev
->
dev_addr
,
dev
->
addr_len
);
dev
->
tx_queue_len
=
100
;
memset
(
dev
->
broadcast
,
0xFF
,
ETH_ALEN
);
...
...
@@ -2147,17 +2142,17 @@ static struct net_device *init_wifidev(struct airo_info *ai,
struct
net_device
*
ethdev
)
{
int
err
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
kmalloc
(
sizeof
*
dev
,
GFP_KERNEL
);
if
(
!
dev
)
return
0
;
memset
(
dev
,
0
,
sizeof
(
*
dev
))
;
strcpy
(
dev
->
name
,
"wifi%d"
)
;
dev
->
priv
=
ai
;
wifi_setup
(
dev
,
ethdev
);
struct
net_device
*
dev
=
alloc_netdev
(
0
,
"wifi%d"
,
wifi_setup
);
if
(
!
dev
)
return
NULL
;
dev
->
priv
=
ethdev
->
priv
;
dev
->
irq
=
ethdev
->
irq
;
dev
->
base_addr
=
ethdev
->
base_addr
;
memcpy
(
dev
->
dev_addr
,
ethdev
->
dev_addr
,
dev
->
addr_len
);
err
=
register_netdev
(
dev
);
if
(
err
<
0
)
{
kfree
(
dev
);
return
0
;
free_netdev
(
dev
);
return
NULL
;
}
return
dev
;
}
...
...
@@ -2273,7 +2268,7 @@ struct net_device *init_airo_card( unsigned short irq, int port, int is_pcmcia )
kill_proc
(
ai
->
thr_pid
,
SIGTERM
,
1
);
wait_for_completion
(
&
ai
->
thr_exited
);
err_out_free:
kfree
(
dev
);
free_netdev
(
dev
);
return
NULL
;
}
...
...
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