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
ec70f8a6
Commit
ec70f8a6
authored
Jun 30, 2003
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o wl3501: kill one magic number, introducing WL3501_ESSID_MAX_LEN
parent
cf3c4d88
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
drivers/net/wireless/wl3501.h
drivers/net/wireless/wl3501.h
+10
-8
drivers/net/wireless/wl3501_cs.c
drivers/net/wireless/wl3501_cs.c
+12
-7
No files found.
drivers/net/wireless/wl3501.h
View file @
ec70f8a6
...
...
@@ -100,6 +100,8 @@ enum wl3501_status {
#define WL3501_FREQ_DOMAIN_FRANCE 0x32
/* Channel 10 to 13 */
#define WL3501_FREQ_DOMAIN_MKK 0x40
/* Channel 14 */
#define WL3501_ESSID_MAX_LEN (IW_ESSID_MAX_SIZE + 2)
struct
wl3501_tx_hdr
{
u16
tx_cnt
;
unsigned
char
sync
[
16
];
...
...
@@ -146,7 +148,7 @@ struct wl3501_start_req {
u16
dtim_period
;
u16
probe_delay
;
u16
cap_info
;
unsigned
char
ssid
[
34
];
unsigned
char
ssid
[
WL3501_ESSID_MAX_LEN
];
unsigned
char
bss_basic_rate_set
[
10
];
unsigned
char
operational_rate_set
[
10
];
unsigned
char
cf_pset
[
8
];
...
...
@@ -219,7 +221,7 @@ struct wl3501_join_req {
u16
cap_info
;
unsigned
char
bss_type
;
unsigned
char
bssid
[
ETH_ALEN
];
unsigned
char
ssid
[
34
];
unsigned
char
ssid
[
WL3501_ESSID_MAX_LEN
];
unsigned
char
phy_pset
[
3
];
unsigned
char
cf_pset
[
8
];
unsigned
char
ibss_pset
[
4
];
...
...
@@ -242,7 +244,7 @@ struct wl3501_scan_req {
u16
max_chan_time
;
unsigned
char
chan_list
[
14
];
unsigned
char
bssid
[
ETH_ALEN
];
unsigned
char
ssid
[
34
];
unsigned
char
ssid
[
WL3501_ESSID_MAX_LEN
];
enum
wl3501_scan_type
scan_type
;
};
...
...
@@ -258,7 +260,7 @@ struct wl3501_scan_confirm {
u16
cap_info
;
unsigned
char
bss_type
;
unsigned
char
bssid
[
ETH_ALEN
];
unsigned
char
ssid
[
34
];
unsigned
char
ssid
[
WL3501_ESSID_MAX_LEN
];
unsigned
char
phy_pset
[
3
];
unsigned
char
cf_pset
[
8
];
unsigned
char
ibss_pset
[
4
];
...
...
@@ -422,11 +424,11 @@ struct wl3501_card {
u16
esbq_confirm_end
;
u16
esbq_confirm
;
u8
llc_type
;
u8
essid
[
34
];
u8
essid
[
WL3501_ESSID_MAX_LEN
];
struct
wl3501_mac_addr
bssid
;
int
ether_type
;
int
net_type
;
u8
keep_essid
[
34
];
u8
keep_essid
[
WL3501_ESSID_MAX_LEN
];
unsigned
char
nick
[
32
];
u8
chan
;
u8
def_chan
;
...
...
@@ -465,8 +467,8 @@ struct wl3501_ioctl_parm {
u8
def_chan
;
u8
chan
;
enum
wl3501_net_type
net_type
;
u8
essid
[
34
];
u8
keep_essid
[
34
];
u8
essid
[
WL3501_ESSID_MAX_LEN
];
u8
keep_essid
[
WL3501_ESSID_MAX_LEN
];
u8
version
[
2
];
u8
freq_domain
;
};
...
...
drivers/net/wireless/wl3501_cs.c
View file @
ec70f8a6
...
...
@@ -739,8 +739,9 @@ static int wl3501_mgmt_start(struct wl3501_card *this)
signal
.
next_blk
=
0
;
signal
.
sig_id
=
WL3501_SIG_START_REQ
;
memcpy
((
char
*
)
signal
.
ssid
,
(
char
*
)
this
->
essid
,
34
);
memcpy
((
char
*
)
this
->
keep_essid
,
(
char
*
)
this
->
essid
,
34
);
memcpy
((
char
*
)
signal
.
ssid
,
(
char
*
)
this
->
essid
,
WL3501_ESSID_MAX_LEN
);
memcpy
((
char
*
)
this
->
keep_essid
,
(
char
*
)
this
->
essid
,
WL3501_ESSID_MAX_LEN
);
signal
.
bss_type
=
this
->
net_type
=
IW_MODE_INFRA
?
WL3501_NET_TYPE_INFRA
:
WL3501_NET_TYPE_INFRA
;
signal
.
beacon_period
=
400
;
...
...
@@ -1097,7 +1098,8 @@ static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr)
ETH_ALEN
);
this
->
chan
=
this
->
bss_set
[
i
].
phy_pset
[
2
];
memcpy
((
char
*
)
this
->
keep_essid
,
(
char
*
)
this
->
bss_set
[
i
].
ssid
,
34
);
(
char
*
)
this
->
bss_set
[
i
].
ssid
,
WL3501_ESSID_MAX_LEN
);
wl3501_mgmt_auth
(
this
);
}
}
else
{
...
...
@@ -1106,7 +1108,8 @@ static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr)
(
char
*
)
&
(
this
->
bss_set
[
i
].
bssid
),
ETH_ALEN
);
this
->
chan
=
this
->
bss_set
[
i
].
phy_pset
[
2
];
memcpy
((
char
*
)
this
->
keep_essid
,
(
char
*
)
this
->
bss_set
[
i
].
ssid
,
34
);
(
char
*
)
this
->
bss_set
[
i
].
ssid
,
WL3501_ESSID_MAX_LEN
);
wl3501_online
(
dev
);
}
}
else
{
...
...
@@ -1759,8 +1762,9 @@ static int wl3501_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
parm.version[1] = this->version[1];
parm.freq_domain = this->freq_domain;
memcpy((char *)&(parm.keep_essid[0]),
(char *)&(this->keep_essid[0]), 34);
memcpy((char *)&(parm.essid[0]), (char *)&(this->essid[0]), 34);
(char *)&(this->keep_essid[0]), WL3501_ESSID_MAX_LEN);
memcpy((char *)&(parm.essid[0]), (char *)&(this->essid[0]),
WL3501_ESSID_MAX_LEN);
spin_unlock_irqrestore(&this->lock, flags);
blk->len = sizeof(parm);
rc = -EFAULT;
...
...
@@ -1778,7 +1782,8 @@ static int wl3501_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
spin_lock_irqsave(&this->lock, flags);
this->def_chan = parm.def_chan;
this->net_type = parm.net_type;
memcpy((char *)&(this->essid[0]), (char *)&(parm.essid[0]), 34);
memcpy((char *)&(this->essid[0]), (char *)&(parm.essid[0]),
WL3501_ESSID_MAX_LEN);
rc = wl3501_reset(dev);
spin_unlock_irqrestore(&this->lock, flags);
break;
...
...
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