@@ -83,7 +83,7 @@ static K_WORK_DELAYABLE_DEFINE(wpa_supp_status_work,
83
83
#define wpa_cli_cmd_v (cmd , ...) ({ \
84
84
bool status; \
85
85
\
86
- if (zephyr_wpa_cli_cmd_v(cmd, ##__VA_ARGS__) < 0) { \
86
+ if (zephyr_wpa_cli_cmd_v(wpa_s->ctrl_conn, cmd, ##__VA_ARGS__) < 0) { \
87
87
wpa_printf(MSG_ERROR, \
88
88
"Failed to execute wpa_cli command: %s", \
89
89
cmd); \
@@ -620,7 +620,7 @@ static int wpas_add_and_config_network(struct wpa_supplicant *wpa_s,
620
620
goto out ;
621
621
}
622
622
623
- ret = z_wpa_ctrl_add_network (& resp );
623
+ ret = z_wpa_ctrl_add_network (wpa_s -> ctrl_conn , & resp );
624
624
if (ret ) {
625
625
wpa_printf (MSG_ERROR , "Failed to add network" );
626
626
goto out ;
@@ -1309,7 +1309,7 @@ int supplicant_status(const struct device *dev, struct wifi_iface_status *status
1309
1309
status -> channel = channel ;
1310
1310
1311
1311
if (ssid_len == 0 ) {
1312
- int _res = z_wpa_ctrl_status (& cli_status );
1312
+ int _res = z_wpa_ctrl_status (wpa_s -> ctrl_conn , & cli_status );
1313
1313
1314
1314
if (_res < 0 ) {
1315
1315
ssid_len = 0 ;
@@ -1338,7 +1338,7 @@ int supplicant_status(const struct device *dev, struct wifi_iface_status *status
1338
1338
1339
1339
status -> rssi = - WPA_INVALID_NOISE ;
1340
1340
if (status -> iface_mode == WIFI_MODE_INFRA ) {
1341
- ret = z_wpa_ctrl_signal_poll (& signal_poll );
1341
+ ret = z_wpa_ctrl_signal_poll (wpa_s -> ctrl_conn , & signal_poll );
1342
1342
if (!ret ) {
1343
1343
status -> rssi = signal_poll .rssi ;
1344
1344
status -> current_phy_tx_rate = signal_poll .current_txrate ;
@@ -1488,6 +1488,7 @@ int supplicant_11k_cfg(const struct device *dev, struct wifi_11k_params *params)
1488
1488
int supplicant_11k_neighbor_request (const struct device * dev , struct wifi_11k_params * params )
1489
1489
{
1490
1490
int ssid_len = strlen (params -> ssid );
1491
+ struct wpa_supplicant * wpa_s = get_wpa_s_handle (dev );
1491
1492
1492
1493
if (params != NULL && ssid_len > 0 ) {
1493
1494
if (ssid_len > WIFI_SSID_MAX_LEN ) {
@@ -1754,6 +1755,7 @@ int supplicant_bss_ext_capab(const struct device *dev, int capab)
1754
1755
int supplicant_legacy_roam (const struct device * dev )
1755
1756
{
1756
1757
int ret = -1 ;
1758
+ struct wpa_supplicant * wpa_s = get_wpa_s_handle (dev );
1757
1759
1758
1760
k_mutex_lock (& wpa_supplicant_mutex , K_FOREVER );
1759
1761
if (!wpa_cli_cmd_v ("scan" )) {
@@ -1862,7 +1864,7 @@ static int supplicant_wps_pin(const struct device *dev, struct wifi_wps_config_p
1862
1864
}
1863
1865
1864
1866
if (params -> oper == WIFI_WPS_PIN_GET ) {
1865
- if (zephyr_wpa_cli_cmd_resp (get_pin_cmd , params -> pin )) {
1867
+ if (zephyr_wpa_cli_cmd_resp (wpa_s -> ctrl_conn , get_pin_cmd , params -> pin )) {
1866
1868
goto out ;
1867
1869
}
1868
1870
} else if (params -> oper == WIFI_WPS_PIN_SET ) {
0 commit comments