Skip to content

Commit 6ba447a

Browse files
MaochenWang1henrikbrixandersen
authored andcommitted
hostap: fix the build error of undefined wpa_s->ctrl_conn
Fix the build error that wpa_s isn't defined in supplicant_candidate_scan when CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING is enabled. Signed-off-by: Maochen Wang <[email protected]>
1 parent 3b5d7a4 commit 6ba447a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/hostap/src/supp_api.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,13 @@ int supplicant_candidate_scan(const struct device *dev, struct wifi_scan_params
15981598
char *pos = cmd;
15991599
char *end = pos + SUPPLICANT_CANDIDATE_SCAN_CMD_BUF_SIZE;
16001600
int freq = 0;
1601+
struct wpa_supplicant *wpa_s;
1602+
1603+
wpa_s = get_wpa_s_handle(dev);
1604+
if (!wpa_s) {
1605+
wpa_printf(MSG_ERROR, "Device %s not found", dev->name);
1606+
return -1;
1607+
}
16011608

16021609
strcpy(pos, "freq=");
16031610
pos += 5;

0 commit comments

Comments
 (0)