Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
0b310f36
Commit
0b310f36
authored
Jan 31, 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
359b8800
2f633db5
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
947 additions
and
553 deletions
+947
-553
drivers/net/wireless/Kconfig
drivers/net/wireless/Kconfig
+5
-2
drivers/net/wireless/airo.c
drivers/net/wireless/airo.c
+276
-55
drivers/net/wireless/ipw2100.c
drivers/net/wireless/ipw2100.c
+37
-11
drivers/net/wireless/ipw2100.h
drivers/net/wireless/ipw2100.h
+4
-2
drivers/net/wireless/ipw2200.c
drivers/net/wireless/ipw2200.c
+452
-424
drivers/net/wireless/ipw2200.h
drivers/net/wireless/ipw2200.h
+36
-28
drivers/net/wireless/netwave_cs.c
drivers/net/wireless/netwave_cs.c
+0
-2
drivers/net/wireless/wavelan.p.h
drivers/net/wireless/wavelan.p.h
+1
-5
drivers/net/wireless/wavelan_cs.p.h
drivers/net/wireless/wavelan_cs.p.h
+1
-8
include/net/ieee80211.h
include/net/ieee80211.h
+8
-0
net/Kconfig
net/Kconfig
+3
-0
net/core/Makefile
net/core/Makefile
+1
-1
net/core/dev.c
net/core/dev.c
+4
-6
net/ieee80211/ieee80211_rx.c
net/ieee80211/ieee80211_rx.c
+27
-3
net/ieee80211/ieee80211_wx.c
net/ieee80211/ieee80211_wx.c
+89
-0
net/socket.c
net/socket.c
+3
-6
No files found.
drivers/net/wireless/Kconfig
View file @
0b310f36
...
...
@@ -6,7 +6,8 @@ menu "Wireless LAN (non-hamradio)"
depends on NETDEVICES
config NET_RADIO
bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions"
bool "Wireless LAN drivers (non-hamradio)"
select WIRELESS_EXT
---help---
Support for wireless LANs and everything having to do with radio,
but not with amateur radio or FM broadcasting.
...
...
@@ -239,7 +240,8 @@ config IPW2200_DEBUG
config AIRO
tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards"
depends on NET_RADIO && ISA_DMA_API && CRYPTO && (PCI || BROKEN)
depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN)
select CRYPTO
---help---
This is the standard Linux driver to support Cisco/Aironet ISA and
PCI 802.11 wireless cards.
...
...
@@ -387,6 +389,7 @@ config PCMCIA_SPECTRUM
config AIRO_CS
tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards"
depends on NET_RADIO && PCMCIA && (BROKEN || !M32R)
select CRYPTO
---help---
This is the standard Linux driver to support Cisco/Aironet PCMCIA
802.11 wireless cards. This driver is the same as the Aironet
...
...
drivers/net/wireless/airo.c
View file @
0b310f36
This diff is collapsed.
Click to expand it.
drivers/net/wireless/ipw2100.c
View file @
0b310f36
...
...
@@ -167,7 +167,7 @@ that only one external action is invoked at a time.
#include "ipw2100.h"
#define IPW2100_VERSION "
1.1.3
"
#define IPW2100_VERSION "
git-1.1.4
"
#define DRV_NAME "ipw2100"
#define DRV_VERSION IPW2100_VERSION
...
...
@@ -1672,6 +1672,18 @@ static int ipw2100_start_scan(struct ipw2100_priv *priv)
return
err
;
}
static
const
struct
ieee80211_geo
ipw_geos
[]
=
{
{
/* Restricted */
"---"
,
.
bg_channels
=
14
,
.
bg
=
{{
2412
,
1
},
{
2417
,
2
},
{
2422
,
3
},
{
2427
,
4
},
{
2432
,
5
},
{
2437
,
6
},
{
2442
,
7
},
{
2447
,
8
},
{
2452
,
9
},
{
2457
,
10
},
{
2462
,
11
},
{
2467
,
12
},
{
2472
,
13
},
{
2484
,
14
}},
},
};
static
int
ipw2100_up
(
struct
ipw2100_priv
*
priv
,
int
deferred
)
{
unsigned
long
flags
;
...
...
@@ -1727,6 +1739,13 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
goto
exit
;
}
/* Initialize the geo */
if
(
ieee80211_set_geo
(
priv
->
ieee
,
&
ipw_geos
[
0
]))
{
printk
(
KERN_WARNING
DRV_NAME
"Could not set geo
\n
"
);
return
0
;
}
priv
->
ieee
->
freq_band
=
IEEE80211_24GHZ_BAND
;
lock
=
LOCK_NONE
;
if
(
ipw2100_set_ordinal
(
priv
,
IPW_ORD_PERS_DB_LOCK
,
&
lock
,
&
ord_len
))
{
printk
(
KERN_ERR
DRV_NAME
...
...
@@ -3750,7 +3769,7 @@ static ssize_t store_memory(struct device *d, struct device_attribute *attr,
struct
net_device
*
dev
=
priv
->
net_dev
;
const
char
*
p
=
buf
;
(
void
)
dev
;
/* kill unused-var warning for debug-only code */
(
void
)
dev
;
/* kill unused-var warning for debug-only code */
if
(
count
<
1
)
return
count
;
...
...
@@ -4070,7 +4089,7 @@ static ssize_t store_scan_age(struct device *d, struct device_attribute *attr,
unsigned
long
val
;
char
*
p
=
buffer
;
(
void
)
dev
;
/* kill unused-var warning for debug-only code */
(
void
)
dev
;
/* kill unused-var warning for debug-only code */
IPW_DEBUG_INFO
(
"enter
\n
"
);
...
...
@@ -5107,12 +5126,13 @@ static int ipw2100_set_tx_power(struct ipw2100_priv *priv, u32 tx_power)
.
host_command_length
=
4
};
int
err
=
0
;
u32
tmp
=
tx_power
;
if
(
tx_power
!=
IPW_TX_POWER_DEFAULT
)
t
x_power
=
(
tx_power
-
IPW_TX_POWER_MIN_DBM
)
*
16
/
(
IPW_TX_POWER_MAX_DBM
-
IPW_TX_POWER_MIN_DBM
);
t
mp
=
(
tx_power
-
IPW_TX_POWER_MIN_DBM
)
*
16
/
(
IPW_TX_POWER_MAX_DBM
-
IPW_TX_POWER_MIN_DBM
);
cmd
.
host_command_parameters
[
0
]
=
t
x_power
;
cmd
.
host_command_parameters
[
0
]
=
t
mp
;
if
(
priv
->
ieee
->
iw_mode
==
IW_MODE_ADHOC
)
err
=
ipw2100_hw_send_command
(
priv
,
&
cmd
);
...
...
@@ -5365,9 +5385,12 @@ static int ipw2100_configure_security(struct ipw2100_priv *priv, int batch_mode)
SEC_LEVEL_0
,
0
,
1
);
}
else
{
auth_mode
=
IPW_AUTH_OPEN
;
if
((
priv
->
ieee
->
sec
.
flags
&
SEC_AUTH_MODE
)
&&
(
priv
->
ieee
->
sec
.
auth_mode
==
WLAN_AUTH_SHARED_KEY
))
auth_mode
=
IPW_AUTH_SHARED
;
if
(
priv
->
ieee
->
sec
.
flags
&
SEC_AUTH_MODE
)
{
if
(
priv
->
ieee
->
sec
.
auth_mode
==
WLAN_AUTH_SHARED_KEY
)
auth_mode
=
IPW_AUTH_SHARED
;
else
if
(
priv
->
ieee
->
sec
.
auth_mode
==
WLAN_AUTH_LEAP
)
auth_mode
=
IPW_AUTH_LEAP_CISCO_ID
;
}
sec_level
=
SEC_LEVEL_0
;
if
(
priv
->
ieee
->
sec
.
flags
&
SEC_LEVEL
)
...
...
@@ -5760,6 +5783,9 @@ static int ipw2100_wpa_set_auth_algs(struct ipw2100_priv *priv, int value)
}
else
if
(
value
&
IW_AUTH_ALG_OPEN_SYSTEM
)
{
sec
.
auth_mode
=
WLAN_AUTH_OPEN
;
ieee
->
open_wep
=
1
;
}
else
if
(
value
&
IW_AUTH_ALG_LEAP
)
{
sec
.
auth_mode
=
WLAN_AUTH_LEAP
;
ieee
->
open_wep
=
1
;
}
else
return
-
EINVAL
;
...
...
@@ -5771,8 +5797,8 @@ static int ipw2100_wpa_set_auth_algs(struct ipw2100_priv *priv, int value)
return
ret
;
}
void
ipw2100_wpa_assoc_frame
(
struct
ipw2100_priv
*
priv
,
char
*
wpa_ie
,
int
wpa_ie_len
)
static
void
ipw2100_wpa_assoc_frame
(
struct
ipw2100_priv
*
priv
,
char
*
wpa_ie
,
int
wpa_ie_len
)
{
struct
ipw2100_wpa_assoc_frame
frame
;
...
...
drivers/net/wireless/ipw2100.h
View file @
0b310f36
...
...
@@ -392,8 +392,10 @@ struct ipw2100_notification {
#define IPW_WEP104_CIPHER (1<<5)
#define IPW_CKIP_CIPHER (1<<6)
#define IPW_AUTH_OPEN 0
#define IPW_AUTH_SHARED 1
#define IPW_AUTH_OPEN 0
#define IPW_AUTH_SHARED 1
#define IPW_AUTH_LEAP 2
#define IPW_AUTH_LEAP_CISCO_ID 0x80
struct
statistic
{
int
value
;
...
...
drivers/net/wireless/ipw2200.c
View file @
0b310f36
This diff is collapsed.
Click to expand it.
drivers/net/wireless/ipw2200.h
View file @
0b310f36
...
...
@@ -33,6 +33,7 @@
#include <linux/moduleparam.h>
#include <linux/config.h>
#include <linux/init.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
...
...
@@ -46,6 +47,7 @@
#include <linux/firmware.h>
#include <linux/wireless.h>
#include <linux/dma-mapping.h>
#include <linux/jiffies.h>
#include <asm/io.h>
#include <net/ieee80211.h>
...
...
@@ -852,7 +854,7 @@ struct ipw_scan_request_ext {
u16
dwell_time
[
IPW_SCAN_TYPES
];
}
__attribute__
((
packed
));
extern
inline
u8
ipw_get_scan_type
(
struct
ipw_scan_request_ext
*
scan
,
u8
index
)
static
inline
u8
ipw_get_scan_type
(
struct
ipw_scan_request_ext
*
scan
,
u8
index
)
{
if
(
index
%
2
)
return
scan
->
scan_type
[
index
/
2
]
&
0x0F
;
...
...
@@ -860,7 +862,7 @@ extern inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index)
return
(
scan
->
scan_type
[
index
/
2
]
&
0xF0
)
>>
4
;
}
extern
inline
void
ipw_set_scan_type
(
struct
ipw_scan_request_ext
*
scan
,
static
inline
void
ipw_set_scan_type
(
struct
ipw_scan_request_ext
*
scan
,
u8
index
,
u8
scan_type
)
{
if
(
index
%
2
)
...
...
@@ -1120,7 +1122,7 @@ struct ipw_priv {
struct
ieee80211_device
*
ieee
;
spinlock_t
lock
;
struct
semaphore
sem
;
struct
mutex
mutex
;
/* basic pci-network driver stuff */
struct
pci_dev
*
pci_dev
;
...
...
@@ -1406,13 +1408,6 @@ do { if (ipw_debug_level & (level)) \
* Register bit definitions
*/
/* Dino control registers bits */
#define DINO_ENABLE_SYSTEM 0x80
#define DINO_ENABLE_CS 0x40
#define DINO_RXFIFO_DATA 0x01
#define DINO_CONTROL_REG 0x00200000
#define IPW_INTA_RW 0x00000008
#define IPW_INTA_MASK_R 0x0000000C
#define IPW_INDIRECT_ADDR 0x00000010
...
...
@@ -1459,6 +1454,11 @@ do { if (ipw_debug_level & (level)) \
#define IPW_DOMAIN_0_END 0x1000
#define CLX_MEM_BAR_SIZE 0x1000
/* Dino/baseband control registers bits */
#define DINO_ENABLE_SYSTEM 0x80
/* 1 = baseband processor on, 0 = reset */
#define DINO_ENABLE_CS 0x40
/* 1 = enable ucode load */
#define DINO_RXFIFO_DATA 0x01
/* 1 = data available */
#define IPW_BASEBAND_CONTROL_STATUS 0X00200000
#define IPW_BASEBAND_TX_FIFO_WRITE 0X00200004
#define IPW_BASEBAND_RX_FIFO_READ 0X00200004
...
...
@@ -1567,13 +1567,18 @@ do { if (ipw_debug_level & (level)) \
#define EEPROM_BSS_CHANNELS_BG (GET_EEPROM_ADDR(0x2c,LSB))
/* 2 bytes */
#define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB))
/* 2 bytes */
/* NIC type as found in the one byte EEPROM_NIC_TYPE
offset
*/
/* NIC type as found in the one byte EEPROM_NIC_TYPE
offset
*/
#define EEPROM_NIC_TYPE_0 0
#define EEPROM_NIC_TYPE_1 1
#define EEPROM_NIC_TYPE_2 2
#define EEPROM_NIC_TYPE_3 3
#define EEPROM_NIC_TYPE_4 4
/* Bluetooth Coexistence capabilities as found in EEPROM_SKU_CAPABILITY */
#define EEPROM_SKU_CAP_BT_CHANNEL_SIG 0x01
/* we can tell BT our channel # */
#define EEPROM_SKU_CAP_BT_PRIORITY 0x02
/* BT can take priority over us */
#define EEPROM_SKU_CAP_BT_OOB 0x04
/* we can signal BT out-of-band */
#define FW_MEM_REG_LOWER_BOUND 0x00300000
#define FW_MEM_REG_EEPROM_ACCESS (FW_MEM_REG_LOWER_BOUND + 0x40)
#define IPW_EVENT_REG (FW_MEM_REG_LOWER_BOUND + 0x04)
...
...
@@ -1658,9 +1663,10 @@ enum {
IPW_FW_ERROR_FATAL_ERROR
};
#define AUTH_OPEN 0
#define AUTH_SHARED_KEY 1
#define AUTH_IGNORE 3
#define AUTH_OPEN 0
#define AUTH_SHARED_KEY 1
#define AUTH_LEAP 2
#define AUTH_IGNORE 3
#define HC_ASSOCIATE 0
#define HC_REASSOCIATE 1
...
...
@@ -1860,7 +1866,7 @@ struct host_cmd {
u8
cmd
;
u8
len
;
u16
reserved
;
u32
param
[
TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH
]
;
u32
*
param
;
}
__attribute__
((
packed
));
struct
ipw_cmd_log
{
...
...
@@ -1869,21 +1875,23 @@ struct ipw_cmd_log {
struct
host_cmd
cmd
;
};
#define CFG_BT_COEXISTENCE_MIN 0x00
#define CFG_BT_COEXISTENCE_DEFER 0x02
#define CFG_BT_COEXISTENCE_KILL 0x04
#define CFG_BT_COEXISTENCE_WME_OVER_BT 0x08
#define CFG_BT_COEXISTENCE_OOB 0x10
#define CFG_BT_COEXISTENCE_MAX 0xFF
#define CFG_BT_COEXISTENCE_DEF 0x80
/* read Bt from EEPROM */
#define CFG_CTS_TO_ITSELF_ENABLED_MIN 0x0
#define CFG_CTS_TO_ITSELF_ENABLED_MAX 0x1
/* SysConfig command parameters ... */
/* bt_coexistence param */
#define CFG_BT_COEXISTENCE_SIGNAL_CHNL 0x01
/* tell BT our chnl # */
#define CFG_BT_COEXISTENCE_DEFER 0x02
/* defer our Tx if BT traffic */
#define CFG_BT_COEXISTENCE_KILL 0x04
/* kill our Tx if BT traffic */
#define CFG_BT_COEXISTENCE_WME_OVER_BT 0x08
/* multimedia extensions */
#define CFG_BT_COEXISTENCE_OOB 0x10
/* signal BT via out-of-band */
/* clear-to-send to self param */
#define CFG_CTS_TO_ITSELF_ENABLED_MIN 0x00
#define CFG_CTS_TO_ITSELF_ENABLED_MAX 0x01
#define CFG_CTS_TO_ITSELF_ENABLED_DEF CFG_CTS_TO_ITSELF_ENABLED_MIN
#define CFG_SYS_ANTENNA_BOTH 0x000
#define CFG_SYS_ANTENNA_A 0x001
#define CFG_SYS_ANTENNA_B 0x003
/* Antenna diversity param (h/w can select best antenna, based on signal) */
#define CFG_SYS_ANTENNA_BOTH 0x00
/* NIC selects best antenna */
#define CFG_SYS_ANTENNA_A 0x01
/* force antenna A */
#define CFG_SYS_ANTENNA_B 0x03
/* force antenna B */
/*
* The definitions below were lifted off the ipw2100 driver, which only
...
...
drivers/net/wireless/netwave_cs.c
View file @
0b310f36
...
...
@@ -55,10 +55,8 @@
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/bitops.h>
#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h>
#include <net/iw_handler.h>
#endif
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
...
...
drivers/net/wireless/wavelan.p.h
View file @
0b310f36
...
...
@@ -98,11 +98,7 @@
* characteristics of the hardware. Applications such as mobile IP may
* take advantage of it.
*
* You will need to enable the CONFIG_NET_RADIO define in the kernel
* configuration to enable the wireless extensions (this is the one
* giving access to the radio network device choice).
*
* It might also be a good idea as well to fetch the wireless tools to
* It might be a good idea as well to fetch the wireless tools to
* configure the device and play a bit.
*/
...
...
drivers/net/wireless/wavelan_cs.p.h
View file @
0b310f36
...
...
@@ -99,11 +99,7 @@
* caracteristics of the hardware in a standard way and support for
* applications for taking advantage of it (like Mobile IP).
*
* You will need to enable the CONFIG_NET_RADIO define in the kernel
* configuration to enable the wireless extensions (this is the one
* giving access to the radio network device choice).
*
* It might also be a good idea as well to fetch the wireless tools to
* It might be a good idea as well to fetch the wireless tools to
* configure the device and play a bit.
*/
...
...
@@ -440,11 +436,8 @@
#include <linux/ioport.h>
#include <linux/fcntl.h>
#include <linux/ethtool.h>
#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h>
/* Wireless extensions */
#include <net/iw_handler.h>
/* New driver API */
#endif
/* Pcmcia headers that we need */
#include <pcmcia/cs_types.h>
...
...
include/net/ieee80211.h
View file @
0b310f36
...
...
@@ -1285,6 +1285,14 @@ extern int ieee80211_wx_set_encodeext(struct ieee80211_device *ieee,
extern
int
ieee80211_wx_get_encodeext
(
struct
ieee80211_device
*
ieee
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
);
extern
int
ieee80211_wx_set_auth
(
struct
net_device
*
dev
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
);
extern
int
ieee80211_wx_get_auth
(
struct
net_device
*
dev
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
);
static
inline
void
ieee80211_increment_scans
(
struct
ieee80211_device
*
ieee
)
{
...
...
net/Kconfig
View file @
0b310f36
...
...
@@ -217,6 +217,9 @@ source "net/irda/Kconfig"
source "net/bluetooth/Kconfig"
source "net/ieee80211/Kconfig"
config WIRELESS_EXT
bool
endif # if NET
endmenu # Networking
net/core/Makefile
View file @
0b310f36
...
...
@@ -14,5 +14,5 @@ obj-$(CONFIG_XFRM) += flow.o
obj-$(CONFIG_SYSFS)
+=
net-sysfs.o
obj-$(CONFIG_NET_DIVERT)
+=
dv.o
obj-$(CONFIG_NET_PKTGEN)
+=
pktgen.o
obj-$(CONFIG_
NET_RADIO
)
+=
wireless.o
obj-$(CONFIG_
WIRELESS_EXT
)
+=
wireless.o
obj-$(CONFIG_NETPOLL)
+=
netpoll.o
net/core/dev.c
View file @
0b310f36
...
...
@@ -110,10 +110,8 @@
#include <linux/netpoll.h>
#include <linux/rcupdate.h>
#include <linux/delay.h>
#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h>
/* Note : will define WIRELESS_EXT */
#include <linux/wireless.h>
#include <net/iw_handler.h>
#endif
/* CONFIG_NET_RADIO */
#include <asm/current.h>
/*
...
...
@@ -2028,7 +2026,7 @@ static struct file_operations softnet_seq_fops = {
.
release
=
seq_release
,
};
#ifdef WIRELESS_EXT
#ifdef
CONFIG_
WIRELESS_EXT
extern
int
wireless_proc_init
(
void
);
#else
#define wireless_proc_init() 0
...
...
@@ -2581,7 +2579,7 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
ret
=
-
EFAULT
;
return
ret
;
}
#ifdef WIRELESS_EXT
#ifdef
CONFIG_
WIRELESS_EXT
/* Take care of Wireless Extensions */
if
(
cmd
>=
SIOCIWFIRST
&&
cmd
<=
SIOCIWLAST
)
{
/* If command is `set a parameter', or
...
...
@@ -2602,7 +2600,7 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
ret
=
-
EFAULT
;
return
ret
;
}
#endif
/* WIRELESS_EXT */
#endif
/*
CONFIG_
WIRELESS_EXT */
return
-
EINVAL
;
}
}
...
...
net/ieee80211/ieee80211_rx.c
View file @
0b310f36
...
...
@@ -369,8 +369,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
/* Put this code here so that we avoid duplicating it in all
* Rx paths. - Jean II */
#ifdef CONFIG_WIRELESS_EXT
#ifdef IW_WIRELESS_SPY
/* defined in iw_handler.h */
#ifdef CONFIG_NET_RADIO
/* If spy monitoring on */
if
(
ieee
->
spy_data
.
spy_number
>
0
)
{
struct
iw_quality
wstats
;
...
...
@@ -397,8 +397,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
/* Update spy records */
wireless_spy_update
(
ieee
->
dev
,
hdr
->
addr2
,
&
wstats
);
}
#endif
/* CONFIG_NET_RADIO */
#endif
/* IW_WIRELESS_SPY */
#endif
/* CONFIG_WIRELESS_EXT */
#ifdef NOT_YET
hostap_update_rx_stats
(
local
->
ap
,
hdr
,
rx_stats
);
...
...
@@ -574,7 +574,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
/* skb: hdr + (possibly fragmented) plaintext payload */
// PR: FIXME: hostap has additional conditions in the "if" below:
// ieee->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) &&
if
((
frag
!=
0
||
(
fc
&
IEEE80211_FCTL_MOREFRAGS
)
))
{
if
((
frag
!=
0
)
||
(
fc
&
IEEE80211_FCTL_MOREFRAGS
))
{
int
flen
;
struct
sk_buff
*
frag_skb
=
ieee80211_frag_cache_get
(
ieee
,
hdr
);
IEEE80211_DEBUG_FRAG
(
"Rx Fragment received (%u)
\n
"
,
frag
);
...
...
@@ -1607,6 +1607,30 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
header
,
stats
);
break
;
case
IEEE80211_STYPE_REASSOC_REQ
:
IEEE80211_DEBUG_MGMT
(
"received reassoc (%d)
\n
"
,
WLAN_FC_GET_STYPE
(
le16_to_cpu
(
header
->
frame_ctl
)));
IEEE80211_WARNING
(
"%s: IEEE80211_REASSOC_REQ received
\n
"
,
ieee
->
dev
->
name
);
if
(
ieee
->
handle_reassoc_request
!=
NULL
)
ieee
->
handle_reassoc_request
(
ieee
->
dev
,
(
struct
ieee80211_reassoc_request
*
)
header
);
break
;
case
IEEE80211_STYPE_ASSOC_REQ
:
IEEE80211_DEBUG_MGMT
(
"received assoc (%d)
\n
"
,
WLAN_FC_GET_STYPE
(
le16_to_cpu
(
header
->
frame_ctl
)));
IEEE80211_WARNING
(
"%s: IEEE80211_ASSOC_REQ received
\n
"
,
ieee
->
dev
->
name
);
if
(
ieee
->
handle_assoc_request
!=
NULL
)
ieee
->
handle_assoc_request
(
ieee
->
dev
);
break
;
case
IEEE80211_STYPE_DEAUTH
:
IEEE80211_DEBUG_MGMT
(
"DEAUTH
\n
"
);
if
(
ieee
->
handle_deauth
!=
NULL
)
...
...
net/ieee80211/ieee80211_wx.c
View file @
0b310f36
...
...
@@ -761,9 +761,98 @@ int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee,
return
0
;
}
int
ieee80211_wx_set_auth
(
struct
net_device
*
dev
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
)
{
struct
ieee80211_device
*
ieee
=
netdev_priv
(
dev
);
unsigned
long
flags
;
int
err
=
0
;
spin_lock_irqsave
(
&
ieee
->
lock
,
flags
);
switch
(
wrqu
->
param
.
flags
&
IW_AUTH_INDEX
)
{
case
IW_AUTH_WPA_VERSION
:
case
IW_AUTH_CIPHER_PAIRWISE
:
case
IW_AUTH_CIPHER_GROUP
:
case
IW_AUTH_KEY_MGMT
:
/*
* Host AP driver does not use these parameters and allows
* wpa_supplicant to control them internally.
*/
break
;
case
IW_AUTH_TKIP_COUNTERMEASURES
:
break
;
/* FIXME */
case
IW_AUTH_DROP_UNENCRYPTED
:
ieee
->
drop_unencrypted
=
!!
wrqu
->
param
.
value
;
break
;
case
IW_AUTH_80211_AUTH_ALG
:
break
;
/* FIXME */
case
IW_AUTH_WPA_ENABLED
:
ieee
->
privacy_invoked
=
ieee
->
wpa_enabled
=
!!
wrqu
->
param
.
value
;
break
;
case
IW_AUTH_RX_UNENCRYPTED_EAPOL
:
ieee
->
ieee802_1x
=
!!
wrqu
->
param
.
value
;
break
;
case
IW_AUTH_PRIVACY_INVOKED
:
ieee
->
privacy_invoked
=
!!
wrqu
->
param
.
value
;
break
;
default:
err
=
-
EOPNOTSUPP
;
break
;
}
spin_unlock_irqrestore
(
&
ieee
->
lock
,
flags
);
return
err
;
}
int
ieee80211_wx_get_auth
(
struct
net_device
*
dev
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
)
{
struct
ieee80211_device
*
ieee
=
netdev_priv
(
dev
);
unsigned
long
flags
;
int
err
=
0
;
spin_lock_irqsave
(
&
ieee
->
lock
,
flags
);
switch
(
wrqu
->
param
.
flags
&
IW_AUTH_INDEX
)
{
case
IW_AUTH_WPA_VERSION
:
case
IW_AUTH_CIPHER_PAIRWISE
:
case
IW_AUTH_CIPHER_GROUP
:
case
IW_AUTH_KEY_MGMT
:
case
IW_AUTH_TKIP_COUNTERMEASURES
:
/* FIXME */
case
IW_AUTH_80211_AUTH_ALG
:
/* FIXME */
/*
* Host AP driver does not use these parameters and allows
* wpa_supplicant to control them internally.
*/
err
=
-
EOPNOTSUPP
;
break
;
case
IW_AUTH_DROP_UNENCRYPTED
:
wrqu
->
param
.
value
=
ieee
->
drop_unencrypted
;
break
;
case
IW_AUTH_WPA_ENABLED
:
wrqu
->
param
.
value
=
ieee
->
wpa_enabled
;
break
;
case
IW_AUTH_RX_UNENCRYPTED_EAPOL
:
wrqu
->
param
.
value
=
ieee
->
ieee802_1x
;
break
;
default:
err
=
-
EOPNOTSUPP
;
break
;
}
spin_unlock_irqrestore
(
&
ieee
->
lock
,
flags
);
return
err
;
}
EXPORT_SYMBOL
(
ieee80211_wx_set_encodeext
);
EXPORT_SYMBOL
(
ieee80211_wx_get_encodeext
);
EXPORT_SYMBOL
(
ieee80211_wx_get_scan
);
EXPORT_SYMBOL
(
ieee80211_wx_set_encode
);
EXPORT_SYMBOL
(
ieee80211_wx_get_encode
);
EXPORT_SYMBOL_GPL
(
ieee80211_wx_set_auth
);
EXPORT_SYMBOL_GPL
(
ieee80211_wx_get_auth
);
net/socket.c
View file @
0b310f36
...
...
@@ -84,10 +84,7 @@
#include <linux/compat.h>
#include <linux/kmod.h>
#include <linux/audit.h>
#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h>
/* Note : will define WIRELESS_EXT */
#endif
/* CONFIG_NET_RADIO */
#include <linux/wireless.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
...
...
@@ -840,11 +837,11 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
if
(
cmd
>=
SIOCDEVPRIVATE
&&
cmd
<=
(
SIOCDEVPRIVATE
+
15
))
{
err
=
dev_ioctl
(
cmd
,
argp
);
}
else
#ifdef WIRELESS_EXT
#ifdef
CONFIG_
WIRELESS_EXT
if
(
cmd
>=
SIOCIWFIRST
&&
cmd
<=
SIOCIWLAST
)
{
err
=
dev_ioctl
(
cmd
,
argp
);
}
else
#endif
/* WIRELESS_EXT */
#endif
/*
CONFIG_
WIRELESS_EXT */
switch
(
cmd
)
{
case
FIOSETOWN
:
case
SIOCSPGRP
:
...
...
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