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
4271ac69
Commit
4271ac69
authored
Jan 26, 2018
by
David Clark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates after configuring MT7697 to not auto connect
parent
fe6b233f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
229 deletions
+28
-229
cfg80211.c
linux_kernel_modules/mt7697wifi/cfg80211.c
+10
-58
core.h
linux_kernel_modules/mt7697wifi/core.h
+0
-1
ioctl.c
linux_kernel_modules/mt7697wifi/ioctl.c
+13
-3
main.c
linux_kernel_modules/mt7697wifi/main.c
+0
-22
wifi_api.h
linux_kernel_modules/mt7697wifi/wifi_api.h
+0
-5
wmi.c
linux_kernel_modules/mt7697wifi/wmi.c
+5
-122
wmi.h
linux_kernel_modules/mt7697wifi/wmi.h
+0
-18
No files found.
linux_kernel_modules/mt7697wifi/cfg80211.c
View file @
4271ac69
...
@@ -1014,29 +1014,26 @@ int mt7697_cfg80211_stop(struct mt7697_vif *vif)
...
@@ -1014,29 +1014,26 @@ int mt7697_cfg80211_stop(struct mt7697_vif *vif)
mt7697_tx_stop
(
vif
->
cfg
);
mt7697_tx_stop
(
vif
->
cfg
);
if
((
vif
->
cfg
->
wifi_cfg
.
opmode
==
MT7697_WIFI_MODE_STA_ONLY
)
&&
if
(
vif
->
wdev
.
iftype
==
NL80211_IFTYPE_STATION
)
{
(
vif
->
cfg
->
radio_state
==
MT7697_RADIO_STATE_ON
))
{
ret
=
mt7697_wr_disconnect_req
(
vif
->
cfg
,
NULL
);
ret
=
mt7697_wr_set_radio_state_req
(
vif
->
cfg
,
MT7697_RADIO_STATE_OFF
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
dev_err
(
vif
->
cfg
->
dev
,
dev_err
(
vif
->
cfg
->
dev
,
"%s(): mt7697_wr_
set_radio_state
_req() failed(%d)
\n
"
,
"%s(): mt7697_wr_
disconnect
_req() failed(%d)
\n
"
,
__func__
,
ret
);
__func__
,
ret
);
goto
cleanup
;
goto
cleanup
;
}
}
vif
->
cfg
->
radio_state
=
MT7697_RADIO_STATE_OFF
;
}
if
(
vif
->
wdev
.
iftype
==
NL80211_IFTYPE_STATION
)
{
switch
(
vif
->
sme_state
)
{
switch
(
vif
->
sme_state
)
{
case
SME_DISCONNECTED
:
case
SME_DISCONNECTED
:
break
;
break
;
case
SME_CONNECTING
:
case
SME_CONNECTING
:
cfg80211_connect_result
(
vif
->
ndev
,
vif
->
bssid
,
NULL
,
0
,
cfg80211_connect_result
(
vif
->
ndev
,
vif
->
bssid
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
WLAN_STATUS_UNSPECIFIED_FAILURE
,
WLAN_STATUS_UNSPECIFIED_FAILURE
,
GFP_KERNEL
);
GFP_KERNEL
);
break
;
break
;
case
SME_CONNECTED
:
case
SME_CONNECTED
:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,44)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,44)
cfg80211_disconnected
(
vif
->
ndev
,
0
,
NULL
,
0
,
cfg80211_disconnected
(
vif
->
ndev
,
0
,
NULL
,
0
,
...
@@ -1087,50 +1084,8 @@ int mt7697_cfg80211_stop(struct mt7697_vif *vif)
...
@@ -1087,50 +1084,8 @@ int mt7697_cfg80211_stop(struct mt7697_vif *vif)
}
}
memset
(
vif
->
ssid
,
0
,
IEEE80211_MAX_SSID_LEN
);
memset
(
vif
->
ssid
,
0
,
IEEE80211_MAX_SSID_LEN
);
ret
=
mt7697_wr_set_ssid_req
(
vif
->
cfg
,
IEEE80211_MAX_SSID_LEN
,
vif
->
ssid
);
if
(
ret
<
0
)
{
dev_err
(
vif
->
cfg
->
dev
,
"%s(): mt7697_wr_set_ssid_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
memset
(
vif
->
req_bssid
,
0
,
ETH_ALEN
);
memset
(
vif
->
req_bssid
,
0
,
ETH_ALEN
);
ret
=
mt7697_wr_set_bssid_req
(
vif
->
cfg
,
vif
->
req_bssid
);
if
(
ret
<
0
)
{
dev_err
(
vif
->
cfg
->
dev
,
"%s(): mt7697_wr_set_channel_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
memset
(
vif
->
pmk
,
0
,
MT7697_WIFI_LENGTH_PMK
);
memset
(
vif
->
pmk
,
0
,
MT7697_WIFI_LENGTH_PMK
);
ret
=
mt7697_wr_set_pmk_req
(
vif
->
cfg
,
vif
->
pmk
);
if
(
ret
<
0
)
{
dev_err
(
vif
->
cfg
->
dev
,
"%s(): mt7697_wr_set_pmk_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
ret
=
mt7697_wr_reload_settings_req
(
vif
->
cfg
,
vif
->
fw_vif_idx
);
if
(
ret
<
0
)
{
dev_err
(
vif
->
cfg
->
dev
,
"%s(): mt7697_wr_reload_settings_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
if
(
vif
->
cfg
->
radio_state
==
MT7697_RADIO_STATE_ON
)
{
ret
=
mt7697_wr_set_radio_state_req
(
vif
->
cfg
,
MT7697_RADIO_STATE_OFF
);
if
(
ret
<
0
)
{
dev_err
(
vif
->
cfg
->
dev
,
"%s(): mt7697_wr_set_radio_state_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
vif
->
cfg
->
radio_state
=
MT7697_RADIO_STATE_OFF
;
}
/* Stop netdev queues, needed during recovery */
/* Stop netdev queues, needed during recovery */
netif_stop_queue
(
vif
->
ndev
);
netif_stop_queue
(
vif
->
ndev
);
...
@@ -1428,7 +1383,12 @@ int mt7697_cfg80211_connect_event(struct mt7697_vif *vif, const u8* bssid,
...
@@ -1428,7 +1383,12 @@ int mt7697_cfg80211_connect_event(struct mt7697_vif *vif, const u8* bssid,
set_bit
(
CONNECTED
,
&
vif
->
flags
);
set_bit
(
CONNECTED
,
&
vif
->
flags
);
clear_bit
(
CONNECT_PEND
,
&
vif
->
flags
);
clear_bit
(
CONNECT_PEND
,
&
vif
->
flags
);
dev_dbg
(
cfg
->
dev
,
"%s(): vif flags(0x%08lx)
\n
"
,
__func__
,
vif
->
flags
);
dev_dbg
(
cfg
->
dev
,
"%s(): vif flags(0x%08lx)
\n
"
,
__func__
,
vif
->
flags
);
if
(
bssid
)
{
print_hex_dump
(
KERN_DEBUG
,
DRVNAME
" BSSID "
,
DUMP_PREFIX_OFFSET
,
16
,
1
,
bssid
,
ETH_ALEN
,
0
);
}
if
((
channel
>
0
)
&&
(
channel
<=
MT7697_CH_MAX_2G_CHANNEL
))
if
((
channel
>
0
)
&&
(
channel
<=
MT7697_CH_MAX_2G_CHANNEL
))
band
=
wiphy
->
bands
[
IEEE80211_BAND_2GHZ
];
band
=
wiphy
->
bands
[
IEEE80211_BAND_2GHZ
];
...
@@ -1519,14 +1479,6 @@ int mt7697_cfg80211_get_params(struct mt7697_cfg80211_info *cfg)
...
@@ -1519,14 +1479,6 @@ int mt7697_cfg80211_get_params(struct mt7697_cfg80211_info *cfg)
goto
failed
;
goto
failed
;
}
}
err
=
mt7697_wr_get_radio_state_req
(
cfg
);
if
(
err
<
0
)
{
dev_err
(
cfg
->
dev
,
"%s(): mt7697_wr_get_radio_state_req() failed(%d)
\n
"
,
__func__
,
err
);
goto
failed
;
}
err
=
mt7697_wr_get_wireless_mode_req
(
cfg
);
err
=
mt7697_wr_get_wireless_mode_req
(
cfg
);
if
(
err
<
0
)
{
if
(
err
<
0
)
{
dev_err
(
cfg
->
dev
,
dev_err
(
cfg
->
dev
,
...
...
linux_kernel_modules/mt7697wifi/core.h
View file @
4271ac69
...
@@ -112,7 +112,6 @@ struct mt7697_cfg80211_info {
...
@@ -112,7 +112,6 @@ struct mt7697_cfg80211_info {
u8
probe_data
[
LEN32_ALIGNED
(
IEEE80211_MAX_DATA_LEN
)];
u8
probe_data
[
LEN32_ALIGNED
(
IEEE80211_MAX_DATA_LEN
)];
enum
mt7697_port_type
port_type
;
enum
mt7697_port_type
port_type
;
enum
mt7697_radio_state
radio_state
;
enum
mt7697_wifi_phy_mode_t
wireless_mode
;
enum
mt7697_wifi_phy_mode_t
wireless_mode
;
enum
mt7697_wifi_phy_mode_t
hw_wireless_mode
;
enum
mt7697_wifi_phy_mode_t
hw_wireless_mode
;
struct
mac_address
mac_addr
;
struct
mac_address
mac_addr
;
...
...
linux_kernel_modules/mt7697wifi/ioctl.c
View file @
4271ac69
...
@@ -341,6 +341,7 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
...
@@ -341,6 +341,7 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
vif
->
ssid_len
>
0
)
{
if
(
cfg
->
wifi_cfg
.
opmode
==
MT7697_WIFI_MODE_STA_ONLY
)
{
if
(
cfg
->
wifi_cfg
.
opmode
==
MT7697_WIFI_MODE_STA_ONLY
)
{
ret
=
mt7697_wr_set_bssid_req
(
cfg
,
vif
->
req_bssid
);
ret
=
mt7697_wr_set_bssid_req
(
cfg
,
vif
->
req_bssid
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
@@ -370,7 +371,7 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
...
@@ -370,7 +371,7 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
goto
cleanup
;
goto
cleanup
;
}
}
}
}
else
if
(
vif
->
ssid_len
>
0
)
{
else
{
ret
=
mt7697_wr_set_security_mode_req
(
cfg
,
ret
=
mt7697_wr_set_security_mode_req
(
cfg
,
MT7697_WIFI_AUTH_MODE_OPEN
,
MT7697_WIFI_AUTH_MODE_OPEN
,
MT7697_WIFI_ENCRYPT_TYPE_ENCRYPT_DISABLED
);
MT7697_WIFI_ENCRYPT_TYPE_ENCRYPT_DISABLED
);
...
@@ -382,13 +383,13 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
...
@@ -382,13 +383,13 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
}
}
}
}
if
(
len
>
0
)
{
if
(
test_bit
(
CONNECTED
,
&
vif
->
flags
))
{
if
(
test_bit
(
CONNECTED
,
&
vif
->
flags
))
{
dev_dbg
(
cfg
->
dev
,
"%s(): already connected
\n
"
,
dev_dbg
(
cfg
->
dev
,
"%s(): already connected
\n
"
,
__func__
);
__func__
);
goto
cleanup
;
goto
cleanup
;
}
}
set_bit
(
CONNECT_PEND
,
&
vif
->
flags
);
vif
->
sme_state
=
SME_CONNECTING
;
vif
->
sme_state
=
SME_CONNECTING
;
if
(
test_bit
(
DESTROY_IN_PROGRESS
,
&
cfg
->
flag
))
{
if
(
test_bit
(
DESTROY_IN_PROGRESS
,
&
cfg
->
flag
))
{
...
@@ -406,6 +407,16 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
...
@@ -406,6 +407,16 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
goto
cleanup
;
goto
cleanup
;
}
}
}
}
else
if
((
cfg
->
wifi_cfg
.
opmode
==
MT7697_WIFI_MODE_STA_ONLY
)
&&
test_bit
(
CONNECTED
,
&
vif
->
flags
))
{
ret
=
mt7697_wr_disconnect_req
(
vif
->
cfg
,
NULL
);
if
(
ret
<
0
)
{
dev_err
(
vif
->
cfg
->
dev
,
"%s(): mt7697_wr_disconnect_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
}
cleanup:
cleanup:
return
ret
;
return
ret
;
...
@@ -541,7 +552,6 @@ static int mt7697_wext_siwencodeext(struct net_device *ndev,
...
@@ -541,7 +552,6 @@ static int mt7697_wext_siwencodeext(struct net_device *ndev,
if
(
ext
->
alg
==
IW_ENCODE_ALG_PMK
)
{
if
(
ext
->
alg
==
IW_ENCODE_ALG_PMK
)
{
print_hex_dump
(
KERN_DEBUG
,
DRVNAME
" PMK "
,
print_hex_dump
(
KERN_DEBUG
,
DRVNAME
" PMK "
,
DUMP_PREFIX_OFFSET
,
16
,
1
,
ext
->
key
,
ext
->
key_len
,
0
);
DUMP_PREFIX_OFFSET
,
16
,
1
,
ext
->
key
,
ext
->
key_len
,
0
);
memcpy
(
vif
->
pmk
,
ext
->
key
,
ext
->
key_len
);
memcpy
(
vif
->
pmk
,
ext
->
key
,
ext
->
key_len
);
}
}
...
...
linux_kernel_modules/mt7697wifi/main.c
View file @
4271ac69
...
@@ -66,19 +66,6 @@ static int mt7697_open(struct net_device *ndev)
...
@@ -66,19 +66,6 @@ static int mt7697_open(struct net_device *ndev)
cfg
->
rxq_hdl
=
cfg
->
txq_hdl
;
cfg
->
rxq_hdl
=
cfg
->
txq_hdl
;
}
}
if
((
cfg
->
wifi_cfg
.
opmode
==
MT7697_WIFI_MODE_STA_ONLY
)
&&
(
cfg
->
radio_state
==
MT7697_RADIO_STATE_OFF
))
{
ret
=
mt7697_wr_set_radio_state_req
(
cfg
,
MT7697_RADIO_STATE_ON
);
if
(
ret
<
0
)
{
dev_err
(
cfg
->
dev
,
"%s(): mt7697_wr_set_radio_state_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
cfg
->
radio_state
=
MT7697_RADIO_STATE_ON
;
}
set_bit
(
WLAN_ENABLED
,
&
vif
->
flags
);
set_bit
(
WLAN_ENABLED
,
&
vif
->
flags
);
if
(
test_bit
(
CONNECTED
,
&
vif
->
flags
))
{
if
(
test_bit
(
CONNECTED
,
&
vif
->
flags
))
{
...
@@ -181,15 +168,6 @@ static void mt7697_init_hw_start(struct work_struct *work)
...
@@ -181,15 +168,6 @@ static void mt7697_init_hw_start(struct work_struct *work)
cfg
->
rxq_hdl
=
cfg
->
txq_hdl
;
cfg
->
rxq_hdl
=
cfg
->
txq_hdl
;
}
}
cfg
->
radio_state
=
MT7697_RADIO_STATE_OFF
;
err
=
mt7697_wr_set_radio_state_req
(
cfg
,
MT7697_RADIO_STATE_OFF
);
if
(
err
<
0
)
{
dev_err
(
cfg
->
dev
,
"%s(): mt7697_wr_set_radio_state_req() failed(%d)
\n
"
,
__func__
,
err
);
goto
failed
;
}
err
=
mt7697_wr_cfg_req
(
cfg
);
err
=
mt7697_wr_cfg_req
(
cfg
);
if
(
err
<
0
)
{
if
(
err
<
0
)
{
dev_err
(
cfg
->
dev
,
"%s(): mt7697_wr_cfg_req() failed(%d)
\n
"
,
dev_err
(
cfg
->
dev
,
"%s(): mt7697_wr_cfg_req() failed(%d)
\n
"
,
...
...
linux_kernel_modules/mt7697wifi/wifi_api.h
View file @
4271ac69
...
@@ -70,11 +70,6 @@ enum mt7697_port_type {
...
@@ -70,11 +70,6 @@ enum mt7697_port_type {
MT7697_PORT_AP
,
MT7697_PORT_AP
,
};
};
enum
mt7697_radio_state
{
MT7697_RADIO_STATE_OFF
=
0
,
MT7697_RADIO_STATE_ON
,
};
enum
mt7697_scan_mode
{
enum
mt7697_scan_mode
{
MT7697_WIFI_SCAN_MODE_FULL
=
0
,
MT7697_WIFI_SCAN_MODE_FULL
=
0
,
MT7697_WIFI_SCAN_MODE_PARTIAL
,
MT7697_WIFI_SCAN_MODE_PARTIAL
,
...
...
linux_kernel_modules/mt7697wifi/wmi.c
View file @
4271ac69
...
@@ -268,41 +268,6 @@ cleanup:
...
@@ -268,41 +268,6 @@ cleanup:
return
ret
;
return
ret
;
}
}
static
int
mt7697_proc_get_radio_state
(
const
struct
mt7697_rsp_hdr
*
rsp
,
struct
mt7697_cfg80211_info
*
cfg
)
{
u32
state
;
int
ret
;
dev_dbg
(
cfg
->
dev
,
"%s(): --> GET RADIO STATE RSP
\n
"
,
__func__
);
if
(
rsp
->
cmd
.
len
-
sizeof
(
struct
mt7697_rsp_hdr
)
!=
sizeof
(
u32
))
{
dev_err
(
cfg
->
dev
,
"%s(): invalid get radio state rsp len(%u != %u)
\n
"
,
__func__
,
rsp
->
cmd
.
len
-
sizeof
(
struct
mt7697_rsp_hdr
),
sizeof
(
u32
));
ret
=
-
EINVAL
;
goto
cleanup
;
}
ret
=
cfg
->
hif_ops
->
read
(
cfg
->
rxq_hdl
,
(
u32
*
)
&
state
,
LEN_TO_WORD
(
sizeof
(
u32
)));
if
(
ret
!=
LEN_TO_WORD
(
sizeof
(
u32
)))
{
dev_err
(
cfg
->
dev
,
"%s(): read() failed(%d != %d)
\n
"
,
__func__
,
ret
,
LEN_TO_WORD
(
sizeof
(
u32
)));
ret
=
(
ret
<
0
)
?
ret
:-
EIO
;
goto
cleanup
;
}
cfg
->
radio_state
=
state
;
dev_dbg
(
cfg
->
dev
,
"%s(): radio state(%u)
\n
"
,
__func__
,
cfg
->
radio_state
);
ret
=
0
;
cleanup:
return
ret
;
}
static
int
mt7697_proc_get_listen_interval
(
const
struct
mt7697_rsp_hdr
*
rsp
,
static
int
mt7697_proc_get_listen_interval
(
const
struct
mt7697_rsp_hdr
*
rsp
,
struct
mt7697_cfg80211_info
*
cfg
)
struct
mt7697_cfg80211_info
*
cfg
)
{
{
...
@@ -623,6 +588,7 @@ static int mt7697_proc_connect_ind(const struct mt7697_rsp_hdr* rsp,
...
@@ -623,6 +588,7 @@ static int mt7697_proc_connect_ind(const struct mt7697_rsp_hdr* rsp,
}
}
dev_dbg
(
cfg
->
dev
,
"%s(): vif(%u)
\n
"
,
__func__
,
vif
->
fw_vif_idx
);
dev_dbg
(
cfg
->
dev
,
"%s(): vif(%u)
\n
"
,
__func__
,
vif
->
fw_vif_idx
);
if
(
test_bit
(
CONNECT_PEND
,
&
vif
->
flags
))
{
ret
=
mt7697_cfg80211_connect_event
(
vif
,
bssid
,
channel
);
ret
=
mt7697_cfg80211_connect_event
(
vif
,
bssid
,
channel
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
dev_err
(
cfg
->
dev
,
dev_err
(
cfg
->
dev
,
...
@@ -631,6 +597,7 @@ static int mt7697_proc_connect_ind(const struct mt7697_rsp_hdr* rsp,
...
@@ -631,6 +597,7 @@ static int mt7697_proc_connect_ind(const struct mt7697_rsp_hdr* rsp,
goto
cleanup
;
goto
cleanup
;
}
}
}
}
}
else
{
else
{
struct
station_info
sinfo
=
{
0
};
struct
station_info
sinfo
=
{
0
};
...
@@ -669,7 +636,6 @@ cleanup:
...
@@ -669,7 +636,6 @@ cleanup:
static
int
mt7697_proc_disconnect_ind
(
struct
mt7697_cfg80211_info
*
cfg
)
static
int
mt7697_proc_disconnect_ind
(
struct
mt7697_cfg80211_info
*
cfg
)
{
{
u8
bssid
[
LEN32_ALIGNED
(
ETH_ALEN
)];
u8
bssid
[
LEN32_ALIGNED
(
ETH_ALEN
)];
u8
ssid
[
LEN32_ALIGNED
(
IEEE80211_MAX_SSID_LEN
)]
=
{
0
};
struct
mt7697_vif
*
vif
;
struct
mt7697_vif
*
vif
;
u32
if_idx
;
u32
if_idx
;
u16
proto_reason
=
0
;
u16
proto_reason
=
0
;
...
@@ -714,8 +680,8 @@ static int mt7697_proc_disconnect_ind(struct mt7697_cfg80211_info *cfg)
...
@@ -714,8 +680,8 @@ static int mt7697_proc_disconnect_ind(struct mt7697_cfg80211_info *cfg)
}
}
dev_dbg
(
cfg
->
dev
,
"%s(): vif(%u)
\n
"
,
__func__
,
vif
->
fw_vif_idx
);
dev_dbg
(
cfg
->
dev
,
"%s(): vif(%u)
\n
"
,
__func__
,
vif
->
fw_vif_idx
);
if
(
vif
->
sme_state
==
SME_CONNECTING
)
{
ret
=
mt7697_wr_disconnect_req
(
vif
->
cfg
,
vif
->
bssid
);
ret
=
mt7697_wr_disconnect_req
(
vif
->
cfg
,
NULL
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
dev_err
(
vif
->
cfg
->
dev
,
dev_err
(
vif
->
cfg
->
dev
,
"%s(): mt7697_wr_disconnect_req() failed(%d)
\n
"
,
"%s(): mt7697_wr_disconnect_req() failed(%d)
\n
"
,
...
@@ -723,6 +689,7 @@ static int mt7697_proc_disconnect_ind(struct mt7697_cfg80211_info *cfg)
...
@@ -723,6 +689,7 @@ static int mt7697_proc_disconnect_ind(struct mt7697_cfg80211_info *cfg)
goto
cleanup
;
goto
cleanup
;
}
}
if
(
vif
->
sme_state
==
SME_CONNECTING
)
{
cfg80211_connect_result
(
vif
->
ndev
,
vif
->
bssid
,
cfg80211_connect_result
(
vif
->
ndev
,
vif
->
bssid
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
...
@@ -730,22 +697,6 @@ static int mt7697_proc_disconnect_ind(struct mt7697_cfg80211_info *cfg)
...
@@ -730,22 +697,6 @@ static int mt7697_proc_disconnect_ind(struct mt7697_cfg80211_info *cfg)
GFP_KERNEL
);
GFP_KERNEL
);
}
}
else
if
(
vif
->
sme_state
==
SME_CONNECTED
)
{
else
if
(
vif
->
sme_state
==
SME_CONNECTED
)
{
ret
=
mt7697_wr_set_ssid_req
(
cfg
,
IEEE80211_MAX_SSID_LEN
,
ssid
);
if
(
ret
<
0
)
{
dev_err
(
cfg
->
dev
,
"%s(): mt7697_wr_set_ssid_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
ret
=
mt7697_wr_reload_settings_req
(
cfg
,
vif
->
fw_vif_idx
);
if
(
ret
<
0
)
{
dev_err
(
cfg
->
dev
,
"%s(): mt7697_wr_reload_settings_req() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,44)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,44)
cfg80211_disconnected
(
vif
->
ndev
,
proto_reason
,
cfg80211_disconnected
(
vif
->
ndev
,
proto_reason
,
NULL
,
0
,
vif
->
locally_generated
,
GFP_KERNEL
);
NULL
,
0
,
vif
->
locally_generated
,
GFP_KERNEL
);
...
@@ -881,16 +832,6 @@ int mt7697_proc_80211cmd(const struct mt7697_rsp_hdr* rsp, void* priv)
...
@@ -881,16 +832,6 @@ int mt7697_proc_80211cmd(const struct mt7697_rsp_hdr* rsp, void* priv)
}
}
break
;
break
;
case
MT7697_CMD_GET_RADIO_STATE_RSP
:
ret
=
mt7697_proc_get_radio_state
(
rsp
,
cfg
);
if
(
ret
<
0
)
{
dev_err
(
cfg
->
dev
,
"mt7697_proc_get_radio_state() failed(%d)
\n
"
,
ret
);
goto
cleanup
;
}
break
;
case
MT7697_CMD_GET_LISTEN_INTERVAL_RSP
:
case
MT7697_CMD_GET_LISTEN_INTERVAL_RSP
:
ret
=
mt7697_proc_get_listen_interval
(
rsp
,
cfg
);
ret
=
mt7697_proc_get_listen_interval
(
rsp
,
cfg
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
@@ -991,10 +932,6 @@ int mt7697_proc_80211cmd(const struct mt7697_rsp_hdr* rsp, void* priv)
...
@@ -991,10 +932,6 @@ int mt7697_proc_80211cmd(const struct mt7697_rsp_hdr* rsp, void* priv)
dev_dbg
(
cfg
->
dev
,
"%s(): --> SET WIRELESS MODE RSP
\n
"
,
__func__
);
dev_dbg
(
cfg
->
dev
,
"%s(): --> SET WIRELESS MODE RSP
\n
"
,
__func__
);
break
;
break
;
case
MT7697_CMD_SET_RADIO_STATE_RSP
:
dev_dbg
(
cfg
->
dev
,
"%s(): --> SET RADIO STATE
\n
"
,
__func__
);
break
;
case
MT7697_CMD_SET_SECURITY_MODE_RSP
:
case
MT7697_CMD_SET_SECURITY_MODE_RSP
:
dev_dbg
(
cfg
->
dev
,
"%s(): --> SET SECURITY MODE RSP
\n
"
,
__func__
);
dev_dbg
(
cfg
->
dev
,
"%s(): --> SET SECURITY MODE RSP
\n
"
,
__func__
);
break
;
break
;
...
@@ -1309,60 +1246,6 @@ cleanup:
...
@@ -1309,60 +1246,6 @@ cleanup:
return
ret
;
return
ret
;
}
}
int
mt7697_wr_get_radio_state_req
(
const
struct
mt7697_cfg80211_info
*
cfg
)
{
struct
mt7697_get_radio_state_req
req
;
int
ret
;
req
.
len
=
sizeof
(
struct
mt7697_get_radio_state_req
);
req
.
grp
=
MT7697_CMD_GRP_80211
;
req
.
type
=
MT7697_CMD_GET_RADIO_STATE_REQ
;
dev_dbg
(
cfg
->
dev
,
"%s(): <-- GET RADIO STATE len(%u)
\n
"
,
__func__
,
req
.
len
);
ret
=
cfg
->
hif_ops
->
write
(
cfg
->
txq_hdl
,
(
const
u32
*
)
&
req
,
LEN_TO_WORD
(
req
.
len
));
if
(
ret
!=
LEN_TO_WORD
(
req
.
len
))
{
dev_err
(
cfg
->
dev
,
"%s(): write() failed(%d != %d)
\n
"
,
__func__
,
ret
,
LEN_TO_WORD
(
req
.
len
));
ret
=
(
ret
<
0
)
?
ret
:-
EIO
;
goto
cleanup
;
}
ret
=
0
;
cleanup:
return
ret
;
}
int
mt7697_wr_set_radio_state_req
(
const
struct
mt7697_cfg80211_info
*
cfg
,
u8
state
)
{
struct
mt7697_set_radio_state_req
req
;
int
ret
;
req
.
cmd
.
len
=
sizeof
(
struct
mt7697_set_radio_state_req
);
req
.
cmd
.
grp
=
MT7697_CMD_GRP_80211
;
req
.
cmd
.
type
=
MT7697_CMD_SET_RADIO_STATE_REQ
;
req
.
state
=
state
;
dev_dbg
(
cfg
->
dev
,
"%s(): <-- SET RADIO STATE(%u) len(%u)
\n
"
,
__func__
,
state
,
req
.
cmd
.
len
);
ret
=
cfg
->
hif_ops
->
write
(
cfg
->
txq_hdl
,
(
const
u32
*
)
&
req
,
LEN_TO_WORD
(
req
.
cmd
.
len
));
if
(
ret
!=
LEN_TO_WORD
(
req
.
cmd
.
len
))
{
dev_err
(
cfg
->
dev
,
"%s(): write() failed(%d != %d)
\n
"
,
__func__
,
ret
,
LEN_TO_WORD
(
req
.
cmd
.
len
));
ret
=
(
ret
<
0
)
?
ret
:-
EIO
;
goto
cleanup
;
}
ret
=
0
;
cleanup:
return
ret
;
}
int
mt7697_wr_get_listen_interval_req
(
const
struct
mt7697_cfg80211_info
*
cfg
)
int
mt7697_wr_get_listen_interval_req
(
const
struct
mt7697_cfg80211_info
*
cfg
)
{
{
struct
mt7697_get_listen_interval_req
req
;
struct
mt7697_get_listen_interval_req
req
;
...
...
linux_kernel_modules/mt7697wifi/wmi.h
View file @
4271ac69
...
@@ -28,14 +28,12 @@
...
@@ -28,14 +28,12 @@
#define MT7697_PASSPHRASE_LEN 64
#define MT7697_PASSPHRASE_LEN 64
#define mt7697_cfg_req mt7697_cmd_hdr
#define mt7697_cfg_req mt7697_cmd_hdr
#define mt7697_get_radio_state_req mt7697_cmd_hdr
#define mt7697_get_rx_filter_req mt7697_cmd_hdr
#define mt7697_get_rx_filter_req mt7697_cmd_hdr
#define mt7697_get_listen_interval_req mt7697_cmd_hdr
#define mt7697_get_listen_interval_req mt7697_cmd_hdr
#define mt7697_get_smart_conn_filter_req mt7697_cmd_hdr
#define mt7697_get_smart_conn_filter_req mt7697_cmd_hdr
#define mt7697_scan_stop mt7697_cmd_hdr
#define mt7697_scan_stop mt7697_cmd_hdr
#define mt7697_set_wireless_mode_rsp mt7697_rsp_hdr
#define mt7697_set_wireless_mode_rsp mt7697_rsp_hdr
#define mt7697_set_radio_state_rsp mt7697_rsp_hdr
#define mt7697_set_op_mode_rsp mt7697_rsp_hdr
#define mt7697_set_op_mode_rsp mt7697_rsp_hdr
#define mt7697_set_rx_filter_rsp mt7697_rsp_hdr
#define mt7697_set_rx_filter_rsp mt7697_rsp_hdr
#define mt7697_set_smart_conn_filter_rsp mt7697_rsp_hdr
#define mt7697_set_smart_conn_filter_rsp mt7697_rsp_hdr
...
@@ -72,10 +70,6 @@ enum mt7697_wifi_cmd_types {
...
@@ -72,10 +70,6 @@ enum mt7697_wifi_cmd_types {
MT7697_CMD_SET_WIRELESS_MODE_RSP
,
MT7697_CMD_SET_WIRELESS_MODE_RSP
,
MT7697_CMD_SET_OP_MODE_REQ
,
MT7697_CMD_SET_OP_MODE_REQ
,
MT7697_CMD_SET_OP_MODE_RSP
,
MT7697_CMD_SET_OP_MODE_RSP
,
MT7697_CMD_GET_RADIO_STATE_REQ
,
MT7697_CMD_GET_RADIO_STATE_RSP
,
MT7697_CMD_SET_RADIO_STATE_REQ
,
MT7697_CMD_SET_RADIO_STATE_RSP
,
MT7697_CMD_GET_LISTEN_INTERVAL_REQ
,
MT7697_CMD_GET_LISTEN_INTERVAL_REQ
,
MT7697_CMD_GET_LISTEN_INTERVAL_RSP
,
MT7697_CMD_GET_LISTEN_INTERVAL_RSP
,
MT7697_CMD_SET_LISTEN_INTERVAL_REQ
,
MT7697_CMD_SET_LISTEN_INTERVAL_REQ
,
...
@@ -147,16 +141,6 @@ struct mt7697_set_op_mode_req {
...
@@ -147,16 +141,6 @@ struct mt7697_set_op_mode_req {
__be32
opmode
;
__be32
opmode
;
}
__attribute__
((
packed
,
aligned
(
4
)));
}
__attribute__
((
packed
,
aligned
(
4
)));
struct
mt7697_get_radio_state_rsp
{
struct
mt7697_rsp_hdr
rsp
;
__be32
state
;
}
__attribute__
((
packed
,
aligned
(
4
)));
struct
mt7697_set_radio_state_req
{
struct
mt7697_cmd_hdr
cmd
;
__be32
state
;
}
__attribute__
((
packed
,
aligned
(
4
)));
struct
mt7697_get_listen_interval_rsp
{
struct
mt7697_get_listen_interval_rsp
{
struct
mt7697_rsp_hdr
rsp
;
struct
mt7697_rsp_hdr
rsp
;
__be32
interval
;
__be32
interval
;
...
@@ -284,8 +268,6 @@ int mt7697_wr_reload_settings_req(const struct mt7697_cfg80211_info*, u8);
...
@@ -284,8 +268,6 @@ int mt7697_wr_reload_settings_req(const struct mt7697_cfg80211_info*, u8);
int
mt7697_wr_mac_addr_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_mac_addr_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_cfg_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_cfg_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_set_op_mode_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_set_op_mode_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_get_radio_state_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_set_radio_state_req
(
const
struct
mt7697_cfg80211_info
*
,
u8
);
int
mt7697_wr_get_listen_interval_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_get_listen_interval_req
(
const
struct
mt7697_cfg80211_info
*
);
int
mt7697_wr_set_listen_interval_req
(
const
struct
mt7697_cfg80211_info
*
,
u32
);
int
mt7697_wr_set_listen_interval_req
(
const
struct
mt7697_cfg80211_info
*
,
u32
);
int
mt7697_wr_scan_req
(
const
struct
mt7697_cfg80211_info
*
,
u32
,
int
mt7697_wr_scan_req
(
const
struct
mt7697_cfg80211_info
*
,
u32
,
...
...
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