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
860e7a8c
Commit
860e7a8c
authored
Nov 02, 2017
by
David Clark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MT7697 drivers to sdef
Updated uart driver to return error if file closed vs. WARN_ON Updated mtwifi init script to kill wpa_supplicant for mt7697
parent
dad4c3ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
16 deletions
+25
-16
uart.c
linux_kernel_modules/mt7697serial/uart.c
+10
-4
mtwifi
linux_kernel_modules/mt7697wifi/scripts/mtwifi
+11
-8
mangOH_Red.sdef
mangOH_Red.sdef
+4
-4
No files found.
linux_kernel_modules/mt7697serial/uart.c
View file @
860e7a8c
...
...
@@ -217,11 +217,14 @@ size_t mt7697_uart_read(void *arg, u32 *buf, size_t len)
unsigned
long
end
=
count
;
int
err
;
WARN_ON
(
!
uart_info
->
fd_hndl
);
oldfs
=
get_fs
();
set_fs
(
get_ds
());
if
(
!
uart_info
->
fd_hndl
)
{
dev_err
(
uart_info
->
dev
,
"%s(): device closed
\n
"
,
__func__
);
goto
cleanup
;
}
dev_dbg
(
uart_info
->
dev
,
"%s(): len(%u)
\n
"
,
__func__
,
len
*
sizeof
(
u32
));
while
(
offset
<
end
)
{
err
=
kernel_read
(
uart_info
->
fd_hndl
,
offset
,
ptr
,
count
);
...
...
@@ -262,11 +265,14 @@ size_t mt7697_uart_write(void *arg, const u32 *buf, size_t len)
struct
mt7697_uart_info
*
uart_info
=
arg
;
u8
*
ptr
=
(
u8
*
)
buf
;
WARN_ON
(
!
uart_info
->
fd_hndl
);
oldfs
=
get_fs
();
set_fs
(
get_ds
());
if
(
!
uart_info
->
fd_hndl
)
{
dev_err
(
uart_info
->
dev
,
"%s(): device closed
\n
"
,
__func__
);
goto
cleanup
;
}
dev_dbg
(
uart_info
->
dev
,
"%s(): len(%u)
\n
"
,
__func__
,
len
);
while
(
pos
<
end
)
{
num_write
=
kernel_write
(
uart_info
->
fd_hndl
,
ptr
,
left
,
pos
);
...
...
linux_kernel_modules/mt7697wifi/scripts/mtwifi
View file @
860e7a8c
...
...
@@ -4,8 +4,6 @@
# MediaTek wireless 7697 specific applications start or stop here
# MediaTek WIFI IoT board is managed by SPI bus.
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/flash/wifi
mt_wifi_start
()
{
if
[
`
echo
$1
|
tr
-s
'[:upper:]'
'[:lower:]` = `echo "uart" | tr -s '
[
:upper:]
' '
[
:lower:]
`
]
;
then
echo
"Setup MT7697 UART"
;
...
...
@@ -45,10 +43,13 @@ mt_wifi_start() {
echo
"Started MT7697 WiFi
$1
core wlan
$2
"
;
}
mt_wifi_stop
()
{
echo
"Stop MT7697 WiFi core wlan
$1
"
;
kill
`
ps
-eo
pid,args
--cols
=
10000 |
awk
'/^\/sbin\/wpa_supplicant|-i\swlan$1/ && $1 != PROCINFO["pid"] { print $1 }'
`
mt_wifi_supplicant_stop
()
{
echo
"Stop MT7697 wpa_supplicant"
;
kill
`
ps
-eo
pid,args
--cols
=
10000 |
awk
'/^\/sbin\/wpa_supplicant|-D\s*wext/ && $1 != PROCINFO["pid"] { print $1 }'
`
sleep
2
}
mt_wifi_stop
()
{
ifconfig |
grep
wlan
$1
>
/dev/null
if
[
$?
-eq
0
]
;
then
ifconfig wlan
$1
down
...
...
@@ -65,10 +66,12 @@ case "$1" in
start
)
mt_wifi_start
$2
$3
;;
stop
)
stop
)
mt_wifi_supplicant_stop
mt_wifi_stop
$2
;;
restart
)
restart
)
mt_wifi_supplicant_stop
mt_wifi_stop
$2
mt_wifi_start
$2
$3
;;
...
...
mangOH_Red.sdef
View file @
860e7a8c
...
...
@@ -73,10 +73,10 @@ kernelModules:
$MANGOH_ROOT/linux_kernel_modules/iot_slot/0-iot_slot
//
Don't enable mt7697 drivers until the appropriate cfg80211 and mac80211 modules are avaialble
//
$MANGOH_ROOT/linux_kernel_modules/mt7697q/1-mt7697q
//
$MANGOH_ROOT/linux_kernel_modules/mt7697serial/1-mt7697serial
//
$MANGOH_ROOT/linux_kernel_modules/mt7697wifi/2-mt7697wifi_core
//
mt7697 drivers
$MANGOH_ROOT/linux_kernel_modules/mt7697q/1-mt7697q
$MANGOH_ROOT/linux_kernel_modules/mt7697serial/1-mt7697serial
$MANGOH_ROOT/linux_kernel_modules/mt7697wifi/2-mt7697wifi_core
// spisvc creates a spidev device which will appear as /dev/spidev0.0 once the spidev module is
// loaded.
...
...
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