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
3100cdd8
Commit
3100cdd8
authored
Jun 13, 2013
by
John W. Linville
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-linville' of
git://github.com/kvalo/ath6kl
parents
fca97d76
37291fc6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
29 deletions
+41
-29
drivers/net/wireless/ath/ath6kl/debug.c
drivers/net/wireless/ath/ath6kl/debug.c
+1
-7
drivers/net/wireless/ath/ath6kl/init.c
drivers/net/wireless/ath/ath6kl/init.c
+7
-7
drivers/net/wireless/ath/ath6kl/sdio.c
drivers/net/wireless/ath/ath6kl/sdio.c
+6
-6
drivers/net/wireless/ath/ath6kl/usb.c
drivers/net/wireless/ath/ath6kl/usb.c
+27
-9
No files found.
drivers/net/wireless/ath/ath6kl/debug.c
View file @
3100cdd8
...
@@ -1240,20 +1240,14 @@ static ssize_t ath6kl_force_roam_write(struct file *file,
...
@@ -1240,20 +1240,14 @@ static ssize_t ath6kl_force_roam_write(struct file *file,
char
buf
[
20
];
char
buf
[
20
];
size_t
len
;
size_t
len
;
u8
bssid
[
ETH_ALEN
];
u8
bssid
[
ETH_ALEN
];
int
i
;
int
addr
[
ETH_ALEN
];
len
=
min
(
count
,
sizeof
(
buf
)
-
1
);
len
=
min
(
count
,
sizeof
(
buf
)
-
1
);
if
(
copy_from_user
(
buf
,
user_buf
,
len
))
if
(
copy_from_user
(
buf
,
user_buf
,
len
))
return
-
EFAULT
;
return
-
EFAULT
;
buf
[
len
]
=
'\0'
;
buf
[
len
]
=
'\0'
;
if
(
sscanf
(
buf
,
"%02x:%02x:%02x:%02x:%02x:%02x"
,
if
(
!
mac_pton
(
buf
,
bssid
))
&
addr
[
0
],
&
addr
[
1
],
&
addr
[
2
],
&
addr
[
3
],
&
addr
[
4
],
&
addr
[
5
])
!=
ETH_ALEN
)
return
-
EINVAL
;
return
-
EINVAL
;
for
(
i
=
0
;
i
<
ETH_ALEN
;
i
++
)
bssid
[
i
]
=
addr
[
i
];
ret
=
ath6kl_wmi_force_roam_cmd
(
ar
->
wmi
,
bssid
);
ret
=
ath6kl_wmi_force_roam_cmd
(
ar
->
wmi
,
bssid
);
if
(
ret
)
if
(
ret
)
...
...
drivers/net/wireless/ath/ath6kl/init.c
View file @
3100cdd8
...
@@ -1696,10 +1696,16 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
...
@@ -1696,10 +1696,16 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
test_bit
(
WMI_READY
,
test_bit
(
WMI_READY
,
&
ar
->
flag
),
&
ar
->
flag
),
WMI_TIMEOUT
);
WMI_TIMEOUT
);
if
(
timeleft
<=
0
)
{
clear_bit
(
WMI_READY
,
&
ar
->
flag
);
ath6kl_err
(
"wmi is not ready or wait was interrupted: %ld
\n
"
,
timeleft
);
ret
=
-
EIO
;
goto
err_htc_stop
;
}
ath6kl_dbg
(
ATH6KL_DBG_BOOT
,
"firmware booted
\n
"
);
ath6kl_dbg
(
ATH6KL_DBG_BOOT
,
"firmware booted
\n
"
);
if
(
test_and_clear_bit
(
FIRST_BOOT
,
&
ar
->
flag
))
{
if
(
test_and_clear_bit
(
FIRST_BOOT
,
&
ar
->
flag
))
{
ath6kl_info
(
"%s %s fw %s api %d%s
\n
"
,
ath6kl_info
(
"%s %s fw %s api %d%s
\n
"
,
ar
->
hw
.
name
,
ar
->
hw
.
name
,
...
@@ -1718,12 +1724,6 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
...
@@ -1718,12 +1724,6 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
goto
err_htc_stop
;
goto
err_htc_stop
;
}
}
if
(
!
timeleft
||
signal_pending
(
current
))
{
ath6kl_err
(
"wmi is not ready or wait was interrupted
\n
"
);
ret
=
-
EIO
;
goto
err_htc_stop
;
}
ath6kl_dbg
(
ATH6KL_DBG_TRC
,
"%s: wmi is ready
\n
"
,
__func__
);
ath6kl_dbg
(
ATH6KL_DBG_TRC
,
"%s: wmi is ready
\n
"
,
__func__
);
/* communicate the wmi protocol verision to the target */
/* communicate the wmi protocol verision to the target */
...
...
drivers/net/wireless/ath/ath6kl/sdio.c
View file @
3100cdd8
...
@@ -345,17 +345,17 @@ static int ath6kl_sdio_alloc_prep_scat_req(struct ath6kl_sdio *ar_sdio,
...
@@ -345,17 +345,17 @@ static int ath6kl_sdio_alloc_prep_scat_req(struct ath6kl_sdio *ar_sdio,
{
{
struct
hif_scatter_req
*
s_req
;
struct
hif_scatter_req
*
s_req
;
struct
bus_request
*
bus_req
;
struct
bus_request
*
bus_req
;
int
i
,
scat_req_sz
,
scat_list_sz
,
s
g_sz
,
buf_sz
;
int
i
,
scat_req_sz
,
scat_list_sz
,
s
ize
;
u8
*
virt_buf
;
u8
*
virt_buf
;
scat_list_sz
=
(
n_scat_entry
-
1
)
*
sizeof
(
struct
hif_scatter_item
);
scat_list_sz
=
(
n_scat_entry
-
1
)
*
sizeof
(
struct
hif_scatter_item
);
scat_req_sz
=
sizeof
(
*
s_req
)
+
scat_list_sz
;
scat_req_sz
=
sizeof
(
*
s_req
)
+
scat_list_sz
;
if
(
!
virt_scat
)
if
(
!
virt_scat
)
s
g_sz
=
sizeof
(
struct
scatterlist
)
*
n_scat_entry
;
s
ize
=
sizeof
(
struct
scatterlist
)
*
n_scat_entry
;
else
else
buf_sz
=
2
*
L1_CACHE_BYTES
+
size
=
2
*
L1_CACHE_BYTES
+
ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER
;
ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER
;
for
(
i
=
0
;
i
<
n_scat_req
;
i
++
)
{
for
(
i
=
0
;
i
<
n_scat_req
;
i
++
)
{
/* allocate the scatter request */
/* allocate the scatter request */
...
@@ -364,7 +364,7 @@ static int ath6kl_sdio_alloc_prep_scat_req(struct ath6kl_sdio *ar_sdio,
...
@@ -364,7 +364,7 @@ static int ath6kl_sdio_alloc_prep_scat_req(struct ath6kl_sdio *ar_sdio,
return
-
ENOMEM
;
return
-
ENOMEM
;
if
(
virt_scat
)
{
if
(
virt_scat
)
{
virt_buf
=
kzalloc
(
buf_sz
,
GFP_KERNEL
);
virt_buf
=
kzalloc
(
size
,
GFP_KERNEL
);
if
(
!
virt_buf
)
{
if
(
!
virt_buf
)
{
kfree
(
s_req
);
kfree
(
s_req
);
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -374,7 +374,7 @@ static int ath6kl_sdio_alloc_prep_scat_req(struct ath6kl_sdio *ar_sdio,
...
@@ -374,7 +374,7 @@ static int ath6kl_sdio_alloc_prep_scat_req(struct ath6kl_sdio *ar_sdio,
(
u8
*
)
L1_CACHE_ALIGN
((
unsigned
long
)
virt_buf
);
(
u8
*
)
L1_CACHE_ALIGN
((
unsigned
long
)
virt_buf
);
}
else
{
}
else
{
/* allocate sglist */
/* allocate sglist */
s_req
->
sgentries
=
kzalloc
(
s
g_sz
,
GFP_KERNEL
);
s_req
->
sgentries
=
kzalloc
(
s
ize
,
GFP_KERNEL
);
if
(
!
s_req
->
sgentries
)
{
if
(
!
s_req
->
sgentries
)
{
kfree
(
s_req
);
kfree
(
s_req
);
...
...
drivers/net/wireless/ath/ath6kl/usb.c
View file @
3100cdd8
...
@@ -1061,6 +1061,22 @@ static void ath6kl_usb_cleanup_scatter(struct ath6kl *ar)
...
@@ -1061,6 +1061,22 @@ static void ath6kl_usb_cleanup_scatter(struct ath6kl *ar)
return
;
return
;
}
}
static
int
ath6kl_usb_suspend
(
struct
ath6kl
*
ar
,
struct
cfg80211_wowlan
*
wow
)
{
/*
* cfg80211 suspend/WOW currently not supported for USB.
*/
return
0
;
}
static
int
ath6kl_usb_resume
(
struct
ath6kl
*
ar
)
{
/*
* cfg80211 resume currently not supported for USB.
*/
return
0
;
}
static
const
struct
ath6kl_hif_ops
ath6kl_usb_ops
=
{
static
const
struct
ath6kl_hif_ops
ath6kl_usb_ops
=
{
.
diag_read32
=
ath6kl_usb_diag_read32
,
.
diag_read32
=
ath6kl_usb_diag_read32
,
.
diag_write32
=
ath6kl_usb_diag_write32
,
.
diag_write32
=
ath6kl_usb_diag_write32
,
...
@@ -1074,6 +1090,8 @@ static const struct ath6kl_hif_ops ath6kl_usb_ops = {
...
@@ -1074,6 +1090,8 @@ static const struct ath6kl_hif_ops ath6kl_usb_ops = {
.
pipe_map_service
=
ath6kl_usb_map_service_pipe
,
.
pipe_map_service
=
ath6kl_usb_map_service_pipe
,
.
pipe_get_free_queue_number
=
ath6kl_usb_get_free_queue_number
,
.
pipe_get_free_queue_number
=
ath6kl_usb_get_free_queue_number
,
.
cleanup_scatter
=
ath6kl_usb_cleanup_scatter
,
.
cleanup_scatter
=
ath6kl_usb_cleanup_scatter
,
.
suspend
=
ath6kl_usb_suspend
,
.
resume
=
ath6kl_usb_resume
,
};
};
/* ath6kl usb driver registered functions */
/* ath6kl usb driver registered functions */
...
@@ -1152,7 +1170,7 @@ static void ath6kl_usb_remove(struct usb_interface *interface)
...
@@ -1152,7 +1170,7 @@ static void ath6kl_usb_remove(struct usb_interface *interface)
#ifdef CONFIG_PM
#ifdef CONFIG_PM
static
int
ath6kl_usb_suspend
(
struct
usb_interface
*
interface
,
static
int
ath6kl_usb_
pm_
suspend
(
struct
usb_interface
*
interface
,
pm_message_t
message
)
pm_message_t
message
)
{
{
struct
ath6kl_usb
*
device
;
struct
ath6kl_usb
*
device
;
...
@@ -1162,7 +1180,7 @@ static int ath6kl_usb_suspend(struct usb_interface *interface,
...
@@ -1162,7 +1180,7 @@ static int ath6kl_usb_suspend(struct usb_interface *interface,
return
0
;
return
0
;
}
}
static
int
ath6kl_usb_resume
(
struct
usb_interface
*
interface
)
static
int
ath6kl_usb_
pm_
resume
(
struct
usb_interface
*
interface
)
{
{
struct
ath6kl_usb
*
device
;
struct
ath6kl_usb
*
device
;
device
=
usb_get_intfdata
(
interface
);
device
=
usb_get_intfdata
(
interface
);
...
@@ -1175,7 +1193,7 @@ static int ath6kl_usb_resume(struct usb_interface *interface)
...
@@ -1175,7 +1193,7 @@ static int ath6kl_usb_resume(struct usb_interface *interface)
return
0
;
return
0
;
}
}
static
int
ath6kl_usb_reset_resume
(
struct
usb_interface
*
intf
)
static
int
ath6kl_usb_
pm_
reset_resume
(
struct
usb_interface
*
intf
)
{
{
if
(
usb_get_intfdata
(
intf
))
if
(
usb_get_intfdata
(
intf
))
ath6kl_usb_remove
(
intf
);
ath6kl_usb_remove
(
intf
);
...
@@ -1184,9 +1202,9 @@ static int ath6kl_usb_reset_resume(struct usb_interface *intf)
...
@@ -1184,9 +1202,9 @@ static int ath6kl_usb_reset_resume(struct usb_interface *intf)
#else
#else
#define ath6kl_usb_suspend NULL
#define ath6kl_usb_
pm_
suspend NULL
#define ath6kl_usb_resume NULL
#define ath6kl_usb_
pm_
resume NULL
#define ath6kl_usb_reset_resume NULL
#define ath6kl_usb_
pm_
reset_resume NULL
#endif
#endif
...
@@ -1201,9 +1219,9 @@ MODULE_DEVICE_TABLE(usb, ath6kl_usb_ids);
...
@@ -1201,9 +1219,9 @@ MODULE_DEVICE_TABLE(usb, ath6kl_usb_ids);
static
struct
usb_driver
ath6kl_usb_driver
=
{
static
struct
usb_driver
ath6kl_usb_driver
=
{
.
name
=
"ath6kl_usb"
,
.
name
=
"ath6kl_usb"
,
.
probe
=
ath6kl_usb_probe
,
.
probe
=
ath6kl_usb_probe
,
.
suspend
=
ath6kl_usb_suspend
,
.
suspend
=
ath6kl_usb_
pm_
suspend
,
.
resume
=
ath6kl_usb_resume
,
.
resume
=
ath6kl_usb_
pm_
resume
,
.
reset_resume
=
ath6kl_usb_reset_resume
,
.
reset_resume
=
ath6kl_usb_
pm_
reset_resume
,
.
disconnect
=
ath6kl_usb_remove
,
.
disconnect
=
ath6kl_usb_remove
,
.
id_table
=
ath6kl_usb_ids
,
.
id_table
=
ath6kl_usb_ids
,
.
supports_autosuspend
=
true
,
.
supports_autosuspend
=
true
,
...
...
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