BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
8cfbdb4e
Commit
8cfbdb4e
authored
Oct 04, 2017
by
David Clark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Linux side to check free space first before scheduling Tx when
writer is blocked
parent
f4b33a26
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
15 deletions
+20
-15
interrupt.c
linux_kernel_modules/mt7697q/interrupt.c
+1
-1
queue.c
linux_kernel_modules/mt7697q/queue.c
+5
-5
queue.h
linux_kernel_modules/mt7697q/queue.h
+1
-0
queue_i.h
linux_kernel_modules/mt7697q/queue_i.h
+1
-1
core.h
linux_kernel_modules/mt7697wifi/core.h
+2
-2
txrx.c
linux_kernel_modules/mt7697wifi/txrx.c
+10
-6
No files found.
linux_kernel_modules/mt7697q/interrupt.c
View file @
8cfbdb4e
...
...
@@ -66,7 +66,7 @@ int mt7697_irq_run(struct mt7697q_info *qinfo)
}
else
{
WARN_ON
(
!
qs
->
notify_tx_fcn
);
ret
=
qs
->
notify_tx_fcn
(
qs
->
priv
);
ret
=
qs
->
notify_tx_fcn
(
qs
->
priv
,
mt7697q_get_free_words
(
qs
)
);
if
(
ret
<
0
)
{
dev_err
(
qs
->
qinfo
->
dev
,
"%s(): notify_tx_fcn() failed(%d)
\n
"
,
...
...
linux_kernel_modules/mt7697q/queue.c
View file @
8cfbdb4e
...
...
@@ -52,11 +52,6 @@ static __inline size_t mt7697q_get_num_words(const struct mt7697q_spec *qs)
qs
->
data
.
rd_offset
,
qs
->
data
.
wr_offset
);
}
static
__inline
size_t
mt7697q_get_free_words
(
const
struct
mt7697q_spec
*
qs
)
{
return
mt7697q_get_capacity
(
qs
)
-
mt7697q_get_num_words
(
qs
);
}
static
int
mt7697q_wr_init
(
u8
tx_ch
,
u8
rx_ch
,
struct
mt7697q_spec
*
qs
)
{
struct
mt7697_queue_init_req
req
;
...
...
@@ -295,6 +290,11 @@ cleanup:
return
ret
;
}
__inline
size_t
mt7697q_get_free_words
(
const
struct
mt7697q_spec
*
qs
)
{
return
mt7697q_get_capacity
(
qs
)
-
mt7697q_get_num_words
(
qs
);
}
int
mt7697q_get_s2m_mbx
(
struct
mt7697q_info
*
qinfo
,
u8
*
s2m_mbox
)
{
int
ret
;
...
...
linux_kernel_modules/mt7697q/queue.h
View file @
8cfbdb4e
...
...
@@ -76,6 +76,7 @@ void mt7697_irq_delayed_work(struct work_struct*);
void
mt7697_irq_work
(
struct
work_struct
*
);
irqreturn_t
mt7697_isr
(
int
,
void
*
);
size_t
mt7697q_get_free_words
(
const
struct
mt7697q_spec
*
);
int
mt7697q_proc_data
(
struct
mt7697q_spec
*
);
int
mt7697q_get_s2m_mbx
(
struct
mt7697q_info
*
,
u8
*
);
...
...
linux_kernel_modules/mt7697q/queue_i.h
View file @
8cfbdb4e
...
...
@@ -75,7 +75,7 @@ struct mt7697_queue_reset_req {
}
__attribute__
((
packed
,
aligned
(
4
)));
typedef
int
(
*
rx_hndlr
)(
const
struct
mt7697q_rsp_hdr
*
,
void
*
);
typedef
int
(
*
notify_tx_hndlr
)(
void
*
);
typedef
int
(
*
notify_tx_hndlr
)(
void
*
,
u32
);
struct
mt7697q_if_ops
{
int
(
*
init
)(
u8
,
u8
,
void
*
,
notify_tx_hndlr
,
rx_hndlr
,
void
**
,
void
**
);
...
...
linux_kernel_modules/mt7697wifi/core.h
View file @
8cfbdb4e
...
...
@@ -80,8 +80,8 @@ enum mt7697_vif_state {
};
struct
mt7697_tx_pkt
{
struct
sk_buff
*
skb
;
struct
list_head
next
;
struct
sk_buff
*
skb
;
};
struct
mt7697_cfg80211_info
{
...
...
@@ -215,7 +215,7 @@ void mt7697_init_netdev(struct net_device*);
struct
mt7697_vif
*
mt7697_get_vif_by_idx
(
struct
mt7697_cfg80211_info
*
,
u32
);
struct
wireless_dev
*
mt7697_interface_add
(
struct
mt7697_cfg80211_info
*
,
const
char
*
,
enum
nl80211_iftype
,
u8
);
int
mt7697_notify_tx
(
void
*
);
int
mt7697_notify_tx
(
void
*
,
u32
);
void
mt7697_tx_work
(
struct
work_struct
*
);
int
mt7697_data_tx
(
struct
sk_buff
*
,
struct
net_device
*
);
int
mt7697_rx_data
(
struct
mt7697_cfg80211_info
*
,
u32
,
u32
);
...
...
linux_kernel_modules/mt7697wifi/txrx.c
View file @
8cfbdb4e
...
...
@@ -18,18 +18,22 @@
#include "common.h"
#include "core.h"
int
mt7697_notify_tx
(
void
*
priv
)
int
mt7697_notify_tx
(
void
*
priv
,
u32
free
)
{
struct
mt7697_cfg80211_info
*
cfg
=
(
struct
mt7697_cfg80211_info
*
)
priv
;
int
ret
=
0
;
spin_lock_bh
(
&
cfg
->
tx_skb_list_lock
);
if
(
!
list_empty
(
&
cfg
->
tx_skb_list
))
{
ret
=
queue_work
(
cfg
->
tx_workq
,
&
cfg
->
tx_work
);
if
(
ret
<
0
)
{
dev_err
(
cfg
->
dev
,
"%s(): queue_work() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
struct
mt7697_tx_pkt
*
tx_pkt
=
list_entry
(
&
cfg
->
tx_skb_list
,
struct
mt7697_tx_pkt
,
next
);
if
(
tx_pkt
->
skb
->
len
>=
free
)
{
ret
=
queue_work
(
cfg
->
tx_workq
,
&
cfg
->
tx_work
);
if
(
ret
<
0
)
{
dev_err
(
cfg
->
dev
,
"%s(): queue_work() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
}
}
...
...
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