@@ -86,7 +86,7 @@ static K_WORK_DELAYABLE_DEFINE(wpa_supp_status_work,
86
86
#define wpa_cli_cmd_v (cmd , ...) ({ \
87
87
bool status; \
88
88
\
89
- if (zephyr_wpa_cli_cmd_v(cmd, ##__VA_ARGS__) < 0) { \
89
+ if (zephyr_wpa_cli_cmd_v(wpa_s->ctrl_conn, cmd, ##__VA_ARGS__) < 0) { \
90
90
wpa_printf(MSG_ERROR, \
91
91
"Failed to execute wpa_cli command: %s", \
92
92
cmd); \
@@ -937,7 +937,7 @@ static int wpas_add_and_config_network(struct wpa_supplicant *wpa_s,
937
937
goto out ;
938
938
}
939
939
940
- ret = z_wpa_ctrl_add_network (& resp );
940
+ ret = z_wpa_ctrl_add_network (wpa_s -> ctrl_conn , & resp );
941
941
if (ret ) {
942
942
wpa_printf (MSG_ERROR , "Failed to add network" );
943
943
goto out ;
@@ -1626,7 +1626,7 @@ int supplicant_status(const struct device *dev, struct wifi_iface_status *status
1626
1626
status -> channel = channel ;
1627
1627
1628
1628
if (ssid_len == 0 ) {
1629
- int _res = z_wpa_ctrl_status (& cli_status );
1629
+ int _res = z_wpa_ctrl_status (wpa_s -> ctrl_conn , & cli_status );
1630
1630
1631
1631
if (_res < 0 ) {
1632
1632
ssid_len = 0 ;
@@ -1655,7 +1655,7 @@ int supplicant_status(const struct device *dev, struct wifi_iface_status *status
1655
1655
1656
1656
status -> rssi = - WPA_INVALID_NOISE ;
1657
1657
if (status -> iface_mode == WIFI_MODE_INFRA ) {
1658
- ret = z_wpa_ctrl_signal_poll (& signal_poll );
1658
+ ret = z_wpa_ctrl_signal_poll (wpa_s -> ctrl_conn , & signal_poll );
1659
1659
if (!ret ) {
1660
1660
status -> rssi = signal_poll .rssi ;
1661
1661
status -> current_phy_tx_rate = signal_poll .current_txrate ;
@@ -1805,6 +1805,7 @@ int supplicant_11k_cfg(const struct device *dev, struct wifi_11k_params *params)
1805
1805
int supplicant_11k_neighbor_request (const struct device * dev , struct wifi_11k_params * params )
1806
1806
{
1807
1807
int ssid_len = strlen (params -> ssid );
1808
+ struct wpa_supplicant * wpa_s = get_wpa_s_handle (dev );
1808
1809
1809
1810
if (params != NULL && ssid_len > 0 ) {
1810
1811
if (ssid_len > WIFI_SSID_MAX_LEN ) {
@@ -2071,6 +2072,7 @@ int supplicant_bss_ext_capab(const struct device *dev, int capab)
2071
2072
int supplicant_legacy_roam (const struct device * dev )
2072
2073
{
2073
2074
int ret = -1 ;
2075
+ struct wpa_supplicant * wpa_s = get_wpa_s_handle (dev );
2074
2076
2075
2077
k_mutex_lock (& wpa_supplicant_mutex , K_FOREVER );
2076
2078
if (!wpa_cli_cmd_v ("scan" )) {
@@ -2179,7 +2181,7 @@ static int supplicant_wps_pin(const struct device *dev, struct wifi_wps_config_p
2179
2181
}
2180
2182
2181
2183
if (params -> oper == WIFI_WPS_PIN_GET ) {
2182
- if (zephyr_wpa_cli_cmd_resp (get_pin_cmd , params -> pin )) {
2184
+ if (zephyr_wpa_cli_cmd_resp (wpa_s -> ctrl_conn , get_pin_cmd , params -> pin )) {
2183
2185
goto out ;
2184
2186
}
2185
2187
} else if (params -> oper == WIFI_WPS_PIN_SET ) {
0 commit comments