wireless: fix index for stations
authorFelix Fietkau <nbd@nbd.name>
Wed, 29 Sep 2021 13:16:33 +0000 (15:16 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 29 Sep 2021 13:16:37 +0000 (15:16 +0200)
Use wdev->sta_idx instead of the VLAN counter wdev->vlan_idx

Signed-off-by: Felix Fietkau <nbd@nbd.name>
wireless.c

index 1b5e78e33224bbfe58a64e7499e89c0dc906bd0d..07cc3217fb727c26a3542327beced899128fece1 100644 (file)
@@ -1089,7 +1089,7 @@ wireless_station_create(struct wireless_device *wdev, char *vif, struct blob_att
        if (cur && blobmsg_get_bool(cur))
                return;
 
-       sprintf(name, "%d", wdev->vlan_idx++);
+       sprintf(name, "%d", wdev->sta_idx++);
 
        sta = calloc_a(sizeof(*sta),
                       &name_buf, strlen(name) + 1,