     // not found, add it if there's still room
     if (unique_num < MAX_MAC) {
         memcpy(&unique_mac[unique_num], mac, 6);
+        unique_mac[unique_num].last_seen = now;
         unique_num++;
         return true;
     } else {


        // check for packet with FromDS=0, packets from station
        if (((fc >> 9) & 1) == 0) {
            if (add_mac(addr2)) {
                sprintf(text, "%04X: ", fc);
                Serial.print(text);
                print_mac(addr2);
            }
        }
    }

    }
}

// expires old mac entries
static void expire_mac(unsigned long now, unsigned long expiry)
{
    char text[32];
    int i;
    for (i = 0; i < unique_num; i++) {
        if ((now - unique_mac[i].last_seen) > expiry) {
            // expired, overwrite it with the last one
            if (--unique_num > i) {
                sprintf(text, "%10d: ", now);
                Serial.print(text);
                print_mac(unique_mac[i].mac);
                sprintf(text, " expired: %d\n", unique_num);
                Serial.print(text);
                memcpy(&unique_mac[i], &unique_mac[unique_num], sizeof(mac_t));
            }
        }
    }
}

// callback for promiscuous mode
