Lines Matching refs:wifi_ctx
36 } wifi_ctx; variable
46 wifi_ctx.scan_result++; in wifi_scan_result()
48 if (wifi_ctx.scan_result == 1U) { in wifi_scan_result()
57 wifi_ctx.scan_result, ssid_print, entry->ssid_length, entry->channel, in wifi_scan_result()
69 wifi_ctx.result = status->status; in wifi_connect_result()
71 if (wifi_ctx.result) { in wifi_connect_result()
72 LOG_INF("Connection request failed (%d)", wifi_ctx.result); in wifi_connect_result()
82 wifi_ctx.result = status->status; in wifi_disconnect_result()
84 if (!wifi_ctx.connecting) { in wifi_disconnect_result()
85 if (wifi_ctx.result) { in wifi_disconnect_result()
86 LOG_INF("Disconnect failed (%d)", wifi_ctx.result); in wifi_disconnect_result()
92 wifi_ctx.result = WIFI_STATUS_CONN_FAIL; in wifi_disconnect_result()
130 wifi_ctx.result = -EIO; in icmp_event()
142 wifi_ctx.result = strcmp(buf, TEST_DATA); in icmp_event()
152 int ret = net_mgmt(NET_REQUEST_WIFI_SCAN, wifi_ctx.iface, NULL, 0); in wifi_scan()
189 ret = net_mgmt(NET_REQUEST_WIFI_CONNECT, wifi_ctx.iface, ¶ms, in wifi_connect()
206 ret = net_mgmt(NET_REQUEST_WIFI_DISCONNECT, wifi_ctx.iface, NULL, 0); in wifi_disconnect()
220 net_mgmt(NET_REQUEST_WIFI_IFACE_STATUS, wifi_ctx.iface, &status, in wifi_state()
245 wifi_ctx.connecting = true; in ZTEST()
254 if (wifi_ctx.result) { in ZTEST()
263 wifi_ctx.connecting = false; in ZTEST()
282 gw_addr_4 = net_if_ipv4_get_gw(wifi_ctx.iface); in ZTEST()
301 ret = net_icmp_send_echo_request(&icmp_ctx, wifi_ctx.iface, in ZTEST()
316 zassert_equal(wifi_ctx.result, 0, "ICMP data error"); in ZTEST()
331 zassert_equal(wifi_ctx.result, 0, "Disconnect failed"); in ZTEST()
336 wifi_ctx.iface = net_if_get_wifi_sta(); in wifi_setup()
338 net_mgmt_init_event_callback(&wifi_ctx.wifi_mgmt_cb, wifi_mgmt_event_handler, in wifi_setup()
340 net_mgmt_add_event_callback(&wifi_ctx.wifi_mgmt_cb); in wifi_setup()