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
9b7c8489
Commit
9b7c8489
authored
Mar 23, 2006
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'upstream' of
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
parents
eff4b1fe
4edac92f
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1264 additions
and
301 deletions
+1264
-301
drivers/net/wireless/Kconfig
drivers/net/wireless/Kconfig
+9
-0
drivers/net/wireless/airo.c
drivers/net/wireless/airo.c
+294
-161
drivers/net/wireless/hostap/hostap_ap.c
drivers/net/wireless/hostap/hostap_ap.c
+1
-1
drivers/net/wireless/hostap/hostap_cs.c
drivers/net/wireless/hostap/hostap_cs.c
+0
-2
drivers/net/wireless/hostap/hostap_hw.c
drivers/net/wireless/hostap/hostap_hw.c
+4
-4
drivers/net/wireless/hostap/hostap_ioctl.c
drivers/net/wireless/hostap/hostap_ioctl.c
+0
-4
drivers/net/wireless/hostap/hostap_pci.c
drivers/net/wireless/hostap/hostap_pci.c
+3
-1
drivers/net/wireless/hostap/hostap_plx.c
drivers/net/wireless/hostap/hostap_plx.c
+7
-6
include/linux/wireless.h
include/linux/wireless.h
+7
-3
include/net/iw_handler.h
include/net/iw_handler.h
+11
-1
net/core/rtnetlink.c
net/core/rtnetlink.c
+97
-1
net/core/wireless.c
net/core/wireless.c
+823
-88
net/ieee80211/softmac/ieee80211softmac_assoc.c
net/ieee80211/softmac/ieee80211softmac_assoc.c
+1
-8
net/ieee80211/softmac/ieee80211softmac_auth.c
net/ieee80211/softmac/ieee80211softmac_auth.c
+0
-12
net/ieee80211/softmac/ieee80211softmac_priv.h
net/ieee80211/softmac/ieee80211softmac_priv.h
+0
-9
net/ieee80211/softmac/ieee80211softmac_scan.c
net/ieee80211/softmac/ieee80211softmac_scan.c
+7
-0
No files found.
drivers/net/wireless/Kconfig
View file @
9b7c8489
...
...
@@ -25,6 +25,15 @@ config NET_RADIO
the tools from
<http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
config NET_WIRELESS_RTNETLINK
bool "Wireless Extension API over RtNetlink"
---help---
Support the Wireless Extension API over the RtNetlink socket
in addition to the traditional ioctl interface (selected above).
For now, few tools use this facility, but it might grow in the
future. The only downside is that it adds 4.5 kB to your kernel.
# Note : the cards are obsolete (can't buy them anymore), but the drivers
# are not, as people are still using them...
comment "Obsolete Wireless cards support (pre-802.11)"
...
...
drivers/net/wireless/airo.c
View file @
9b7c8489
This diff is collapsed.
Click to expand it.
drivers/net/wireless/hostap/hostap_ap.c
View file @
9b7c8489
...
...
@@ -3141,7 +3141,7 @@ int hostap_add_sta(struct ap_data *ap, u8 *sta_addr)
if
(
ret
==
1
)
{
sta
=
ap_add_sta
(
ap
,
sta_addr
);
if
(
!
sta
)
ret
=
-
1
;
ret
urn
-
1
;
sta
->
flags
=
WLAN_STA_AUTH
|
WLAN_STA_ASSOC
;
sta
->
ap
=
1
;
memset
(
sta
->
supported_rates
,
0
,
sizeof
(
sta
->
supported_rates
));
...
...
drivers/net/wireless/hostap/hostap_cs.c
View file @
9b7c8489
...
...
@@ -585,8 +585,6 @@ static int prism2_config(dev_link_t *link)
parse
=
kmalloc
(
sizeof
(
cisparse_t
),
GFP_KERNEL
);
hw_priv
=
kmalloc
(
sizeof
(
*
hw_priv
),
GFP_KERNEL
);
if
(
parse
==
NULL
||
hw_priv
==
NULL
)
{
kfree
(
parse
);
kfree
(
hw_priv
);
ret
=
-
ENOMEM
;
goto
failed
;
}
...
...
drivers/net/wireless/hostap/hostap_hw.c
View file @
9b7c8489
...
...
@@ -928,15 +928,15 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, void *buf, int len)
res
=
hfa384x_cmd
(
dev
,
HFA384X_CMDCODE_ACCESS_WRITE
,
rid
,
NULL
,
NULL
);
up
(
&
local
->
rid_bap_sem
);
if
(
res
)
{
printk
(
KERN_DEBUG
"%s: hfa384x_set_rid: CMDCODE_ACCESS_WRITE "
"failed (res=%d, rid=%04x, len=%d)
\n
"
,
dev
->
name
,
res
,
rid
,
len
);
return
res
;
}
if
(
res
==
-
ETIMEDOUT
)
prism2_hw_reset
(
dev
);
if
(
res
==
-
ETIMEDOUT
)
prism2_hw_reset
(
dev
);
}
return
res
;
}
...
...
drivers/net/wireless/hostap/hostap_ioctl.c
View file @
9b7c8489
...
...
@@ -3358,10 +3358,6 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev,
if
(
ext
->
ext_flags
&
IW_ENCODE_EXT_SET_TX_KEY
)
{
if
(
!
sta_ptr
)
local
->
tx_keyidx
=
i
;
else
if
(
i
)
{
ret
=
-
EINVAL
;
goto
done
;
}
}
...
...
drivers/net/wireless/hostap/hostap_pci.c
View file @
9b7c8489
...
...
@@ -307,7 +307,7 @@ static int prism2_pci_probe(struct pci_dev *pdev,
memset
(
hw_priv
,
0
,
sizeof
(
*
hw_priv
));
if
(
pci_enable_device
(
pdev
))
return
-
EIO
;
goto
err_out_free
;
phymem
=
pci_resource_start
(
pdev
,
0
);
...
...
@@ -368,6 +368,8 @@ static int prism2_pci_probe(struct pci_dev *pdev,
err_out_disable:
pci_disable_device
(
pdev
);
prism2_free_local_data
(
dev
);
err_out_free:
kfree
(
hw_priv
);
return
-
ENODEV
;
...
...
drivers/net/wireless/hostap/hostap_plx.c
View file @
9b7c8489
...
...
@@ -368,7 +368,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
switch
(
cis
[
pos
])
{
case
CISTPL_CONFIG
:
if
(
cis
[
pos
+
1
]
<
1
)
if
(
cis
[
pos
+
1
]
<
2
)
goto
cis_error
;
rmsz
=
(
cis
[
pos
+
2
]
&
0x3c
)
>>
2
;
rasz
=
cis
[
pos
+
2
]
&
0x03
;
...
...
@@ -390,7 +390,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
break
;
case
CISTPL_MANFID
:
if
(
cis
[
pos
+
1
]
<
4
)
if
(
cis
[
pos
+
1
]
<
5
)
goto
cis_error
;
manfid1
=
cis
[
pos
+
2
]
+
(
cis
[
pos
+
3
]
<<
8
);
manfid2
=
cis
[
pos
+
4
]
+
(
cis
[
pos
+
5
]
<<
8
);
...
...
@@ -452,7 +452,7 @@ static int prism2_plx_probe(struct pci_dev *pdev,
memset
(
hw_priv
,
0
,
sizeof
(
*
hw_priv
));
if
(
pci_enable_device
(
pdev
))
return
-
EIO
;
goto
err_out_free
;
/* National Datacomm NCP130 based on TMD7160, not PLX9052. */
tmd7160
=
(
pdev
->
vendor
==
0x15e8
)
&&
(
pdev
->
device
==
0x0131
);
...
...
@@ -567,9 +567,6 @@ static int prism2_plx_probe(struct pci_dev *pdev,
return
hostap_hw_ready
(
dev
);
fail:
prism2_free_local_data
(
dev
);
kfree
(
hw_priv
);
if
(
irq_registered
&&
dev
)
free_irq
(
dev
->
irq
,
dev
);
...
...
@@ -577,6 +574,10 @@ static int prism2_plx_probe(struct pci_dev *pdev,
iounmap
(
attr_mem
);
pci_disable_device
(
pdev
);
prism2_free_local_data
(
dev
);
err_out_free:
kfree
(
hw_priv
);
return
-
ENODEV
;
}
...
...
include/linux/wireless.h
View file @
9b7c8489
/*
* This file define a set of standard wireless extensions
*
* Version :
19 18.3.05
* Version :
20 17.2.06
*
* Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
* Copyright (c) 1997-200
5
Jean Tourrilhes, All Rights Reserved.
* Copyright (c) 1997-200
6
Jean Tourrilhes, All Rights Reserved.
*/
#ifndef _LINUX_WIRELESS_H
...
...
@@ -80,7 +80,7 @@
* (there is some stuff that will be added in the future...)
* I just plan to increment with each new version.
*/
#define WIRELESS_EXT
19
#define WIRELESS_EXT
20
/*
* Changes :
...
...
@@ -204,6 +204,10 @@
* - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros
* - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM
* - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros
*
* V19 to V20
* ----------
* - RtNetlink requests support (SET/GET)
*/
/**************************** CONSTANTS ****************************/
...
...
include/net/iw_handler.h
View file @
9b7c8489
...
...
@@ -4,7 +4,7 @@
* Version : 7 18.3.05
*
* Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
* Copyright (c) 2001-200
5
Jean Tourrilhes, All Rights Reserved.
* Copyright (c) 2001-200
6
Jean Tourrilhes, All Rights Reserved.
*/
#ifndef _IW_HANDLER_H
...
...
@@ -436,6 +436,16 @@ extern int dev_get_wireless_info(char * buffer, char **start, off_t offset,
/* Handle IOCTLs, called in net/core/dev.c */
extern
int
wireless_process_ioctl
(
struct
ifreq
*
ifr
,
unsigned
int
cmd
);
/* Handle RtNetlink requests, called in net/core/rtnetlink.c */
extern
int
wireless_rtnetlink_set
(
struct
net_device
*
dev
,
char
*
data
,
int
len
);
extern
int
wireless_rtnetlink_get
(
struct
net_device
*
dev
,
char
*
data
,
int
len
,
char
**
p_buf
,
int
*
p_len
);
/* Second : functions that may be called by driver modules */
/* Send a single event to user space */
...
...
net/core/rtnetlink.c
View file @
9b7c8489
...
...
@@ -51,6 +51,10 @@
#include <net/sock.h>
#include <net/pkt_sched.h>
#include <net/netlink.h>
#ifdef CONFIG_NET_WIRELESS_RTNETLINK
#include <linux/wireless.h>
#include <net/iw_handler.h>
#endif
/* CONFIG_NET_WIRELESS_RTNETLINK */
static
DEFINE_MUTEX
(
rtnl_mutex
);
...
...
@@ -467,6 +471,17 @@ static int do_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
goto
out
;
}
#ifdef CONFIG_NET_WIRELESS_RTNETLINK
if
(
ida
[
IFLA_WIRELESS
-
1
])
{
/* Call Wireless Extensions.
* Various stuff checked in there... */
err
=
wireless_rtnetlink_set
(
dev
,
RTA_DATA
(
ida
[
IFLA_WIRELESS
-
1
]),
ida
[
IFLA_WIRELESS
-
1
]
->
rta_len
);
if
(
err
)
goto
out
;
}
#endif
/* CONFIG_NET_WIRELESS_RTNETLINK */
err
=
0
;
out:
...
...
@@ -477,6 +492,83 @@ static int do_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
return
err
;
}
#ifdef CONFIG_NET_WIRELESS_RTNETLINK
static
int
do_getlink
(
struct
sk_buff
*
in_skb
,
struct
nlmsghdr
*
in_nlh
,
void
*
arg
)
{
struct
ifinfomsg
*
ifm
=
NLMSG_DATA
(
in_nlh
);
struct
rtattr
**
ida
=
arg
;
struct
net_device
*
dev
;
struct
ifinfomsg
*
r
;
struct
nlmsghdr
*
nlh
;
int
err
=
-
ENOBUFS
;
struct
sk_buff
*
skb
;
unsigned
char
*
b
;
char
*
iw_buf
=
NULL
;
int
iw_buf_len
=
0
;
if
(
ifm
->
ifi_index
>=
0
)
dev
=
dev_get_by_index
(
ifm
->
ifi_index
);
else
return
-
EINVAL
;
if
(
!
dev
)
return
-
ENODEV
;
#ifdef CONFIG_NET_WIRELESS_RTNETLINK
if
(
ida
[
IFLA_WIRELESS
-
1
])
{
/* Call Wireless Extensions. We need to know the size before
* we can alloc. Various stuff checked in there... */
err
=
wireless_rtnetlink_get
(
dev
,
RTA_DATA
(
ida
[
IFLA_WIRELESS
-
1
]),
ida
[
IFLA_WIRELESS
-
1
]
->
rta_len
,
&
iw_buf
,
&
iw_buf_len
);
if
(
err
)
goto
out
;
}
#endif
/* CONFIG_NET_WIRELESS_RTNETLINK */
/* Create a skb big enough to include all the data.
* Some requests are way bigger than 4k... Jean II */
skb
=
alloc_skb
((
NLMSG_LENGTH
(
sizeof
(
*
r
)))
+
(
RTA_SPACE
(
iw_buf_len
)),
GFP_KERNEL
);
if
(
!
skb
)
goto
out
;
b
=
skb
->
tail
;
/* Put in the message the usual good stuff */
nlh
=
NLMSG_PUT
(
skb
,
NETLINK_CB
(
in_skb
).
pid
,
in_nlh
->
nlmsg_seq
,
RTM_NEWLINK
,
sizeof
(
*
r
));
r
=
NLMSG_DATA
(
nlh
);
r
->
ifi_family
=
AF_UNSPEC
;
r
->
__ifi_pad
=
0
;
r
->
ifi_type
=
dev
->
type
;
r
->
ifi_index
=
dev
->
ifindex
;
r
->
ifi_flags
=
dev
->
flags
;
r
->
ifi_change
=
0
;
/* Put the wireless payload if it exist */
if
(
iw_buf
!=
NULL
)
RTA_PUT
(
skb
,
IFLA_WIRELESS
,
iw_buf_len
,
iw_buf
+
IW_EV_POINT_OFF
);
nlh
->
nlmsg_len
=
skb
->
tail
-
b
;
/* Needed ? */
NETLINK_CB
(
skb
).
dst_pid
=
NETLINK_CB
(
in_skb
).
pid
;
err
=
netlink_unicast
(
rtnl
,
skb
,
NETLINK_CB
(
in_skb
).
pid
,
MSG_DONTWAIT
);
if
(
err
>
0
)
err
=
0
;
out:
if
(
iw_buf
!=
NULL
)
kfree
(
iw_buf
);
dev_put
(
dev
);
return
err
;
rtattr_failure:
nlmsg_failure:
kfree_skb
(
skb
);
goto
out
;
}
#endif
/* CONFIG_NET_WIRELESS_RTNETLINK */
static
int
rtnetlink_dump_all
(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
cb
)
{
int
idx
;
...
...
@@ -642,7 +734,11 @@ static void rtnetlink_rcv(struct sock *sk, int len)
static
struct
rtnetlink_link
link_rtnetlink_table
[
RTM_NR_MSGTYPES
]
=
{
[
RTM_GETLINK
-
RTM_BASE
]
=
{
.
dumpit
=
rtnetlink_dump_ifinfo
},
[
RTM_GETLINK
-
RTM_BASE
]
=
{
#ifdef CONFIG_NET_WIRELESS_RTNETLINK
.
doit
=
do_getlink
,
#endif
/* CONFIG_NET_WIRELESS_RTNETLINK */
.
dumpit
=
rtnetlink_dump_ifinfo
},
[
RTM_SETLINK
-
RTM_BASE
]
=
{
.
doit
=
do_setlink
},
[
RTM_GETADDR
-
RTM_BASE
]
=
{
.
dumpit
=
rtnetlink_dump_all
},
[
RTM_GETROUTE
-
RTM_BASE
]
=
{
.
dumpit
=
rtnetlink_dump_all
},
...
...
net/core/wireless.c
View file @
9b7c8489
This diff is collapsed.
Click to expand it.
net/ieee80211/softmac/ieee80211softmac_assoc.c
View file @
9b7c8489
...
...
@@ -38,7 +38,7 @@ static void
ieee80211softmac_assoc
(
struct
ieee80211softmac_device
*
mac
,
struct
ieee80211softmac_network
*
net
)
{
unsigned
long
flags
;
function_enter
();
/* Switch to correct channel for this network */
mac
->
set_channel
(
mac
->
dev
,
net
->
channel
);
...
...
@@ -64,8 +64,6 @@ ieee80211softmac_assoc_timeout(void *d)
struct
ieee80211softmac_device
*
mac
=
(
struct
ieee80211softmac_device
*
)
d
;
unsigned
long
flags
;
function_enter
();
spin_lock_irqsave
(
&
mac
->
lock
,
flags
);
/* we might race against ieee80211softmac_handle_assoc_response,
* so make sure only one of us does something */
...
...
@@ -89,7 +87,6 @@ ieee80211softmac_disassoc(struct ieee80211softmac_device *mac, u16 reason)
{
unsigned
long
flags
;
struct
ieee80211softmac_network
*
found
;
function_enter
();
if
(
mac
->
associnfo
.
bssvalid
&&
mac
->
associated
)
{
found
=
ieee80211softmac_get_network_by_bssid
(
mac
,
mac
->
associnfo
.
bssid
);
...
...
@@ -173,8 +170,6 @@ ieee80211softmac_assoc_work(void *d)
struct
ieee80211_network
*
net
=
NULL
,
*
best
=
NULL
;
unsigned
long
flags
;
function_enter
();
/* meh */
if
(
mac
->
associated
)
ieee80211softmac_disassoc
(
mac
,
WLAN_REASON_DISASSOC_STA_HAS_LEFT
);
...
...
@@ -391,8 +386,6 @@ ieee80211softmac_handle_reassoc_req(struct net_device * dev,
struct
ieee80211softmac_device
*
mac
=
ieee80211_priv
(
dev
);
struct
ieee80211softmac_network
*
network
;
function_enter
();
network
=
ieee80211softmac_get_network_by_bssid
(
mac
,
resp
->
header
.
addr3
);
if
(
!
network
)
{
dprintkl
(
KERN_INFO
PFX
"reassoc request from unknown network
\n
"
);
...
...
net/ieee80211/softmac/ieee80211softmac_auth.c
View file @
9b7c8489
...
...
@@ -36,8 +36,6 @@ ieee80211softmac_auth_req(struct ieee80211softmac_device *mac,
struct
ieee80211softmac_auth_queue_item
*
auth
;
unsigned
long
flags
;
function_enter
();
if
(
net
->
authenticating
)
return
0
;
...
...
@@ -78,8 +76,6 @@ ieee80211softmac_auth_queue(void *data)
struct
ieee80211softmac_network
*
net
;
unsigned
long
flags
;
function_enter
();
auth
=
(
struct
ieee80211softmac_auth_queue_item
*
)
data
;
net
=
auth
->
net
;
mac
=
auth
->
mac
;
...
...
@@ -128,8 +124,6 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth)
unsigned
long
flags
;
u8
*
data
;
function_enter
();
/* Find correct auth queue item */
spin_lock_irqsave
(
&
mac
->
lock
,
flags
);
list_for_each
(
list_ptr
,
&
mac
->
auth_queue
)
{
...
...
@@ -277,8 +271,6 @@ ieee80211softmac_deauth_from_net(struct ieee80211softmac_device *mac,
struct
list_head
*
list_ptr
;
unsigned
long
flags
;
function_enter
();
/* Lock and reset status flags */
spin_lock_irqsave
(
&
mac
->
lock
,
flags
);
net
->
authenticating
=
0
;
...
...
@@ -320,8 +312,6 @@ ieee80211softmac_deauth_req(struct ieee80211softmac_device *mac,
{
int
ret
;
function_enter
();
/* Make sure the network is authenticated */
if
(
!
net
->
authenticated
)
{
...
...
@@ -348,8 +338,6 @@ ieee80211softmac_deauth_resp(struct net_device *dev, struct ieee80211_deauth *de
struct
ieee80211softmac_network
*
net
=
NULL
;
struct
ieee80211softmac_device
*
mac
=
ieee80211_priv
(
dev
);
function_enter
();
if
(
!
deauth
)
{
dprintk
(
"deauth without deauth packet. eek!
\n
"
);
return
0
;
...
...
net/ieee80211/softmac/ieee80211softmac_priv.h
View file @
9b7c8489
...
...
@@ -75,15 +75,6 @@
# define dprintk(f, x...) do {
/* nothing */
} while (0)
#endif
#ifdef function_enter
# undef function_enter
#endif
#ifdef CONFIG_IEEE80211_SOFTMAC_DEBUG
# define function_enter() do { printk(KERN_DEBUG PFX "%s:%d:%s()\n", __FILE__, __LINE__, __FUNCTION__); } while (0)
#else
# define function_enter() do {
/* nothing */
} while (0)
#endif
/* private definitions and prototypes */
/*** prototypes from _scan.c */
...
...
net/ieee80211/softmac/ieee80211softmac_scan.c
View file @
9b7c8489
...
...
@@ -232,6 +232,13 @@ void ieee80211softmac_scan_finished(struct ieee80211softmac_device *sm)
sm
->
scanning
=
0
;
spin_unlock_irqrestore
(
&
sm
->
lock
,
flags
);
if
(
sm
->
associnfo
.
bssvalid
)
{
struct
ieee80211softmac_network
*
net
;
net
=
ieee80211softmac_get_network_by_bssid
(
sm
,
sm
->
associnfo
.
bssid
);
if
(
net
)
sm
->
set_channel
(
sm
->
dev
,
net
->
channel
);
}
ieee80211softmac_call_events
(
sm
,
IEEE80211SOFTMAC_EVENT_SCAN_FINISHED
,
NULL
);
}
EXPORT_SYMBOL_GPL
(
ieee80211softmac_scan_finished
);
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