]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add "BSS LAST ..." command
authorAmar Singhal <asinghal@qca.qualcomm.com>
Tue, 5 Feb 2013 22:31:34 +0000 (00:31 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 5 Feb 2013 22:31:34 +0000 (00:31 +0200)
Add the "BSS LAST ..." command. This command helps in fetching the scan
entries iteratively from FIRST entry to LAST entry by ID.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/ctrl_iface.c

index 8a5428ae31b8691b13bbc6d5dc4e5e76cd407029..10c21f6e44ddfdb7dd6961558e0ac58fd6f78e2d 100644 (file)
@@ -3175,6 +3175,8 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
                }
        } else if (os_strncmp(cmd, "FIRST", 5) == 0)
                bss = dl_list_first(&wpa_s->bss_id, struct wpa_bss, list_id);
+       else if (os_strncmp(cmd, "LAST", 4) == 0)
+               bss = dl_list_last(&wpa_s->bss_id, struct wpa_bss, list_id);
        else if (os_strncmp(cmd, "ID-", 3) == 0) {
                i = atoi(cmd + 3);
                bss = wpa_bss_get_id(wpa_s, i);