Skip to content
This repository was archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[nrf noup] Update device name to nrf_wlan0
Browse files Browse the repository at this point in the history
Wi-Fi device name has been updated to nrf_wlan0 after moving
to devicetree based node creation. Modify the device name
references used in send_event calls.

Signed-off-by: Ravi Dondaputi <[email protected]>
  • Loading branch information
rado17 committed Jan 30, 2024
1 parent c382d98 commit fa804c9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions wpa_supplicant/wpa_cli_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static void wpa_cli_close_connection(struct wpa_supplicant *wpa_s)
wpa_s->ctrl_iface->mon_sock_pair[1] = -1;
}

static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl)
static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl, struct wpa_supplicant *wpa_s)
{
while (wpa_ctrl_pending(ctrl) > 0) {
char buf[sizeof(struct conn_msg)];
Expand All @@ -131,7 +131,7 @@ static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl)
if (msg->msg_len > 0) {
/* Only interested in CTRL-EVENTs */
if (strncmp(msg->msg, "CTRL-EVENT", 10) == 0) {
send_wifi_mgmt_event("wlan0", NET_EVENT_WPA_SUPP_CMD_INT_EVENT,
send_wifi_mgmt_event(wpa_s->ifname, NET_EVENT_WPA_SUPP_CMD_INT_EVENT,
msg->msg, msg->msg_len);
}
}
Expand All @@ -144,7 +144,9 @@ static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl)
static void wpa_cli_mon_receive(int sock, void *eloop_ctx,
void *sock_ctx)
{
wpa_cli_recv_pending(mon_conn);
struct wpa_supplicant *wpa_s = (struct wpa_supplicant *)eloop_ctx;

wpa_cli_recv_pending(mon_conn, wpa_s);
}

static int wpa_cli_open_connection(struct wpa_supplicant *wpa_s)
Expand All @@ -168,7 +170,7 @@ static int wpa_cli_open_connection(struct wpa_supplicant *wpa_s)
if (mon_conn) {
if (wpa_ctrl_attach(ctrl_conn) == 0) {
eloop_register_read_sock(wpa_s->ctrl_iface->mon_sock_pair[0],
wpa_cli_mon_receive, NULL, NULL);
wpa_cli_mon_receive, wpa_s, NULL);
}
}

Expand Down

0 comments on commit fa804c9

Please sign in to comment.